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/5798 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5798/labels{/name} | https://api.github.com/repos/psf/requests/issues/5798/comments | https://api.github.com/repos/psf/requests/issues/5798/events | https://github.com/psf/requests/issues/5798 | 865,744,201 | MDU6SXNzdWU4NjU3NDQyMDE= | 5,798 | `resuests.post` working in JupyterLab but failing in python script | {
"avatar_url": "https://avatars.githubusercontent.com/u/11691571?v=4",
"events_url": "https://api.github.com/users/msank00/events{/privacy}",
"followers_url": "https://api.github.com/users/msank00/followers",
"following_url": "https://api.github.com/users/msank00/following{/other_user}",
"gists_url": "https://api.github.com/users/msank00/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/msank00",
"id": 11691571,
"login": "msank00",
"node_id": "MDQ6VXNlcjExNjkxNTcx",
"organizations_url": "https://api.github.com/users/msank00/orgs",
"received_events_url": "https://api.github.com/users/msank00/received_events",
"repos_url": "https://api.github.com/users/msank00/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/msank00/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/msank00/subscriptions",
"type": "User",
"url": "https://api.github.com/users/msank00",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2021-04-23T05:02:00Z | 2021-08-27T00:08:25Z | 2021-04-23T11:04:45Z | NONE | resolved | # Summary.
Facing an unusual behavior. `requests.post` working in JupyterLab notebook for the below code snippet. But same is failing if running in script. Saw similar python `requests` issue in github, but people mistakenly posted it in Javascript `request` package github issue page [here](https://github.com/request/request/issues/3147)
## Expected Result
In JupyterLab getting response from the API endpoint and receiving the below response.
```py
{'input_id': 'b36e1cb8-a3e6-11eb-ae01-00505688397d',
'prediction': 12389.1817}
```
The above response is the actual behavior. Next copied the code and ran in a script but failing.
- Both JulyterLab and script running under same conda environement.
## Actual Result
What happened instead.
```py
urllib3.exceptions.ProtocolError: ("Connection broken: TimeoutError(110, 'Connection timed out')", TimeoutError(110, 'Connection timed out'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "webapp/debug_request.py", line 37, in <module>
response = rq.post(
File "/home/s1bfwd/miniconda3/envs/respai/lib/python3.8/site-packages/requests/api.py", line 119, in post
return request('post', url, data=data, json=json, **kwargs)
File "/home/s1bfwd/miniconda3/envs/respai/lib/python3.8/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/home/s1bfwd/miniconda3/envs/respai/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/home/s1bfwd/miniconda3/envs/respai/lib/python3.8/site-packages/requests/sessions.py", line 697, in send
r.content
File "/home/s1bfwd/miniconda3/envs/respai/lib/python3.8/site-packages/requests/models.py", line 831, in content
self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
File "/home/s1bfwd/miniconda3/envs/respai/lib/python3.8/site-packages/requests/models.py", line 756, in generate
raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ("Connection broken: TimeoutError(110, 'Connection timed out')", TimeoutError(110, 'Connection timed out'))
```
## Reproduction Steps
```python
import requests as rq
import json
payload = {
"test_input": [
{
"age": 61,
"sex": 0,
"bmi": 28.2,
"children": 0,
"smoker": 0,
"region": 3
}
],
"background_data": "/path/to/data",
"feature_columns": [
"age",
"sex",
"bmi",
"children",
"smoker",
"region"
],
"model_id": "model_id"
}
headers = {
"Content-Type": "application/json",
"Accept": "application/json",
}
url = "URL_to_HIT"
response = rq.post(
url,
data=json.dumps(payload),
verify=False,
headers=headers
)
json.loads(response.content)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "4.0.0"
},
"cryptography": {
"version": "3.3.1"
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.8.5"
},
"platform": {
"release": "4.15.0-142-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010109f",
"version": "20.0.1"
},
"requests": {
"version": "2.25.1"
},
"system_ssl": {
"version": "101010bf"
},
"urllib3": {
"version": "1.26.2"
},
"using_pyopenssl": true
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5798/reactions"
} | https://api.github.com/repos/psf/requests/issues/5798/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/5797 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5797/labels{/name} | https://api.github.com/repos/psf/requests/issues/5797/comments | https://api.github.com/repos/psf/requests/issues/5797/events | https://github.com/psf/requests/pull/5797 | 864,683,496 | MDExOlB1bGxSZXF1ZXN0NjIwODc1NzM2 | 5,797 | Switch LGPL'd chardet for MIT licensed charset_normalizer | {
"avatar_url": "https://avatars.githubusercontent.com/u/34150?v=4",
"events_url": "https://api.github.com/users/ashb/events{/privacy}",
"followers_url": "https://api.github.com/users/ashb/followers",
"following_url": "https://api.github.com/users/ashb/following{/other_user}",
"gists_url": "https://api.github.com/users/ashb/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ashb",
"id": 34150,
"login": "ashb",
"node_id": "MDQ6VXNlcjM0MTUw",
"organizations_url": "https://api.github.com/users/ashb/orgs",
"received_events_url": "https://api.github.com/users/ashb/received_events",
"repos_url": "https://api.github.com/users/ashb/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ashb/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ashb/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ashb",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 105 | 2021-04-22T08:25:50Z | 2021-10-26T15:05:48Z | 2021-07-06T23:55:03Z | CONTRIBUTOR | resolved | At least for Python 3 -- charset_normalizer doesn't support Python2, so for that chardet is still used -- this means the "have chardet" path is also still tested.
Although using the (non-vendored) chardet library is fine for requests itself, but using a LGPL dependency the story is a lot less clear for downstream projects, particularly ones that might like to bundle requests (and thus chardet) in to a single binary -- think something similar to what docker-compose is doing. By including an LGPL'd module it is no longer clear if the resulting artefact must also be LGPL'd.
By changing out this dependency for one under MIT we remove all license ambiguity.
As an "escape hatch" I have made the code so that it will use chardet first if it is installed, but we no longer depend upon it directly, although there is a new extra added, `requests[lgpl]`. This should minimize the impact to users, and give them an escape hatch if charset_normalizer turns out to be not as good. (In my non-exhaustive tests it detects the same encoding as chartdet in every case I threw at it)
I've read https://github.com/psf/requests/pull/4115, https://github.com/psf/requests/issues/3389, and https://github.com/chardet/chardet/issues/36#issuecomment-768281452 so I'm aware of the history, but I hope that the approach in this PR will allow this to be merged, as right now, the Apache Software Foundation doesn't allow projects to depend upon LGPL'd code (this is something I'm trying to get changed, but it is a _very_ slow process)
| {
"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": 19,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 1,
"laugh": 0,
"rocket": 0,
"total_count": 20,
"url": "https://api.github.com/repos/psf/requests/issues/5797/reactions"
} | https://api.github.com/repos/psf/requests/issues/5797/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5797.diff",
"html_url": "https://github.com/psf/requests/pull/5797",
"merged_at": "2021-07-06T23:55:02Z",
"patch_url": "https://github.com/psf/requests/pull/5797.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5797"
} | true | [
"That looks like an easy fix to a long-standing problem and licencing problem. It would be really great if this change gets merged and released.\n\nFor the maintainers of requests - I know You have limited time for testing but If you think there is any need for extra testing, I am happy to help to get it approved.... |
https://api.github.com/repos/psf/requests/issues/5796 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5796/labels{/name} | https://api.github.com/repos/psf/requests/issues/5796/comments | https://api.github.com/repos/psf/requests/issues/5796/events | https://github.com/psf/requests/issues/5796 | 861,968,459 | MDU6SXNzdWU4NjE5Njg0NTk= | 5,796 | Request.params causes invalid response with OpenID authorize call with response_type=code | {
"avatar_url": "https://avatars.githubusercontent.com/u/22151742?v=4",
"events_url": "https://api.github.com/users/caffeinatedMike/events{/privacy}",
"followers_url": "https://api.github.com/users/caffeinatedMike/followers",
"following_url": "https://api.github.com/users/caffeinatedMike/following{/other_user}",
"gists_url": "https://api.github.com/users/caffeinatedMike/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/caffeinatedMike",
"id": 22151742,
"login": "caffeinatedMike",
"node_id": "MDQ6VXNlcjIyMTUxNzQy",
"organizations_url": "https://api.github.com/users/caffeinatedMike/orgs",
"received_events_url": "https://api.github.com/users/caffeinatedMike/received_events",
"repos_url": "https://api.github.com/users/caffeinatedMike/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/caffeinatedMike/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/caffeinatedMike/subscriptions",
"type": "User",
"url": "https://api.github.com/users/caffeinatedMike",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2021-04-19T21:46:34Z | 2021-11-26T03:00:37Z | 2021-08-28T02:43:52Z | NONE | resolved | When attempting to call an OpenID authorize endpoint with a response_type of "code" the `params` property seems to be causing the calls to fail.
## Expected Result
The `params` should properly supply the OpenID-related fields as url parameters, so the authorization can proceed
## Actual Result
The `params` cause the call to fail in an error on the webserver, stopping the authorization process
## Reproduction Steps
```python
from urllib.parse import urlencode, quote
from base64 import urlsafe_b64encode
import hashlib
import random
import string
import os
import re
sess = requests.Session()
code_verifier = re.sub(r'[^a-zA-Z0-9]+', '', urlsafe_b64encode(os.urandom(40)).decode())
code_challenge = urlsafe_b64encode(
hashlib.sha256(code_verifier.encode()).digest()
).decode().replace('=', '') # hash code_verifier, then base64 urlencode and remove padding
url_params = dict(
client_id="connect-supplier-web",
redirect_uri="https://site.com/callback",
response_type="code",
scope="openid profile vendor-pricing-mgmt-api power-bi-report-api customer-api site-api",
state=''.join(random.choice(string.ascii_lowercase + string.digits) for _ in range(32)),
code_challege=code_challenge,
code_challenge_method="S256",
response_mode="query"
)
###
# FIRST ATTEMPT
###
resp = sess.get("https://connect-identity-server.site.com/connect/authorize", params=url_params) # does not work
print(resp.url) # resp.url is now https://connect-identity-server.site.com/home/error?errorId=CfD......X95
###
# SECOND ATTEMPT - Thinking maybe it was because of the "scope" field being quote_plused instead of quoted
###
resp = sess.get("https://connect-identity-server.site.com/connect/authorize", params=urlencode(url_params, quote_via=quote)) # does not work
print(resp.url) # resp.url is still https://connect-identity-server.site.com/home/error?errorId=CfD......X95
###
# THIRD ATTEMPT - Forgoing requests' params and providing the full, already-constructed url
###
resp = sess.get(
"https://connect-identity-server.site.com/connect/authorize?"
"client_id=connect-supplier-web&"
"redirect_uri=https%3A%2F%2Fsite.com%2Fcallback&"
"response_type=code&"
"scope=openid%20profile%20vendor-pricing-mgmt-api%20power-bi-report-api%20customer-api%20site-api&"
f"state={''.join(random.choice(string.ascii_lowercase + string.digits) for _ in range(32))}&"
f"code_challenge={code_challenge}&"
"code_challenge_method=S256&"
"response_mode=query"
)
print(resp.url) # resp.url is now correct - https://connect-identity-server.site.com/Account/Login?ReturnUrl=%2Fconnect%2Fauthorize%2Fcallback%3Fclient_id%3Dconnect-supplier-...%3DS256%26response_mode%3Dquery
```
## System Information
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.7.8"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.24.0"
},
"system_ssl": {
"version": "1010107f"
},
"urllib3": {
"version": "1.25.9"
},
"using_pyopenssl": false
}
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5796/reactions"
} | https://api.github.com/repos/psf/requests/issues/5796/timeline | null | completed | null | null | false | [
"What do the _request_ url's look like? And what do they look like initially? I.e., what is in `[req.url for req in resp.history]` and does it match what you build yourself? What's different there? Also we're using the standard library to encode the query parameters. Does your server require a specific ordering fo... |
https://api.github.com/repos/psf/requests/issues/5795 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5795/labels{/name} | https://api.github.com/repos/psf/requests/issues/5795/comments | https://api.github.com/repos/psf/requests/issues/5795/events | https://github.com/psf/requests/pull/5795 | 860,150,203 | MDExOlB1bGxSZXF1ZXN0NjE3MTA1NzIx | 5,795 | Replace getattr(...) is not None with hasattr(...) | {
"avatar_url": "https://avatars.githubusercontent.com/u/59511469?v=4",
"events_url": "https://api.github.com/users/takos22/events{/privacy}",
"followers_url": "https://api.github.com/users/takos22/followers",
"following_url": "https://api.github.com/users/takos22/following{/other_user}",
"gists_url": "https://api.github.com/users/takos22/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/takos22",
"id": 59511469,
"login": "takos22",
"node_id": "MDQ6VXNlcjU5NTExNDY5",
"organizations_url": "https://api.github.com/users/takos22/orgs",
"received_events_url": "https://api.github.com/users/takos22/received_events",
"repos_url": "https://api.github.com/users/takos22/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/takos22/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/takos22/subscriptions",
"type": "User",
"url": "https://api.github.com/users/takos22",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2021-04-16T20:35:39Z | 2021-08-27T00:08:43Z | 2021-04-16T20:38:19Z | NONE | resolved | Replace `getattr(body, 'tell', None) is not None` with `hasattr(body, 'tell')` | {
"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/5795/reactions"
} | https://api.github.com/repos/psf/requests/issues/5795/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5795.diff",
"html_url": "https://github.com/psf/requests/pull/5795",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5795.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5795"
} | true | [
"Hi @takos22,\r\n\r\nThis syntax is intentional. You can read the reasoning [here](https://hynek.me/articles/hasattr/). ",
"Ok my bad, didn't know about that issue with ``hasattr``. Thanks for the info and for the fast response."
] |
https://api.github.com/repos/psf/requests/issues/5794 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5794/labels{/name} | https://api.github.com/repos/psf/requests/issues/5794/comments | https://api.github.com/repos/psf/requests/issues/5794/events | https://github.com/psf/requests/issues/5794 | 859,870,644 | MDU6SXNzdWU4NTk4NzA2NDQ= | 5,794 | response.json() raises inconsistent exception type | {
"avatar_url": "https://avatars.githubusercontent.com/u/675558?v=4",
"events_url": "https://api.github.com/users/rowanseymour/events{/privacy}",
"followers_url": "https://api.github.com/users/rowanseymour/followers",
"following_url": "https://api.github.com/users/rowanseymour/following{/other_user}",
"gists_url": "https://api.github.com/users/rowanseymour/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rowanseymour",
"id": 675558,
"login": "rowanseymour",
"node_id": "MDQ6VXNlcjY3NTU1OA==",
"organizations_url": "https://api.github.com/users/rowanseymour/orgs",
"received_events_url": "https://api.github.com/users/rowanseymour/received_events",
"repos_url": "https://api.github.com/users/rowanseymour/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rowanseymour/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rowanseymour/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rowanseymour",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 10 | 2021-04-16T14:32:24Z | 2021-10-24T16:00:30Z | 2021-07-26T15:56:44Z | NONE | resolved | There are some comments about this on https://github.com/psf/requests/issues/4842 but I think it warrants its own issue.
If `simplejson` is present in the environment, the library uses it so `.json()` returns `simplejson.errors.JSONDecodeError` rather than `json.decoder.JSONDecodeError`
If I'm writing a library that uses `requests` I don't know what other libraries will be present in an environment. I expect that a method returns a consistent exception type that I can handle. As it stands, anyone writing a library (e.g. https://github.com/conda-forge/conda-smithy/pull/1369, https://github.com/Vonage/vonage-python-sdk/issues/197) has to check themselves if `simplejson` is present to know what exception type will be thrown. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 2,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 2,
"url": "https://api.github.com/repos/psf/requests/issues/5794/reactions"
} | https://api.github.com/repos/psf/requests/issues/5794/timeline | null | completed | null | null | false | [
"Maybe the simplest solution which wouldn't break existing code is to provide a `requests.JSONDecodeError` which aliases whatever exception type will be thrown, and calling code should always use that.",
"Any update :)?",
"I don't see a easy way to do this without breaking existing code for other developers bec... |
https://api.github.com/repos/psf/requests/issues/5793 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5793/labels{/name} | https://api.github.com/repos/psf/requests/issues/5793/comments | https://api.github.com/repos/psf/requests/issues/5793/events | https://github.com/psf/requests/issues/5793 | 856,498,008 | MDU6SXNzdWU4NTY0OTgwMDg= | 5,793 | 当响应头中有空格时,response.headers 会被截断 | {
"avatar_url": "https://avatars.githubusercontent.com/u/26384334?v=4",
"events_url": "https://api.github.com/users/Emptytao/events{/privacy}",
"followers_url": "https://api.github.com/users/Emptytao/followers",
"following_url": "https://api.github.com/users/Emptytao/following{/other_user}",
"gists_url": "https://api.github.com/users/Emptytao/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Emptytao",
"id": 26384334,
"login": "Emptytao",
"node_id": "MDQ6VXNlcjI2Mzg0MzM0",
"organizations_url": "https://api.github.com/users/Emptytao/orgs",
"received_events_url": "https://api.github.com/users/Emptytao/received_events",
"repos_url": "https://api.github.com/users/Emptytao/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Emptytao/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Emptytao/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Emptytao",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2021-04-13T02:02:35Z | 2021-08-27T00:08:26Z | 2021-04-14T00:27:25Z | NONE | resolved | Summary.
## 这是完整的响应数据包

## 这是response.headers获取的数据包

| {
"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/5793/reactions"
} | https://api.github.com/repos/psf/requests/issues/5793/timeline | null | completed | null | null | false | [] |
https://api.github.com/repos/psf/requests/issues/5792 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5792/labels{/name} | https://api.github.com/repos/psf/requests/issues/5792/comments | https://api.github.com/repos/psf/requests/issues/5792/events | https://github.com/psf/requests/pull/5792 | 855,382,217 | MDExOlB1bGxSZXF1ZXN0NjEzMTI5MTYz | 5,792 | Short-circuit raise_for_status code for statuses that will not raise … | {
"avatar_url": "https://avatars.githubusercontent.com/u/383875?v=4",
"events_url": "https://api.github.com/users/ptmcg/events{/privacy}",
"followers_url": "https://api.github.com/users/ptmcg/followers",
"following_url": "https://api.github.com/users/ptmcg/following{/other_user}",
"gists_url": "https://api.github.com/users/ptmcg/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ptmcg",
"id": 383875,
"login": "ptmcg",
"node_id": "MDQ6VXNlcjM4Mzg3NQ==",
"organizations_url": "https://api.github.com/users/ptmcg/orgs",
"received_events_url": "https://api.github.com/users/ptmcg/received_events",
"repos_url": "https://api.github.com/users/ptmcg/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ptmcg/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ptmcg/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ptmcg",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2021-04-11T19:00:47Z | 2021-12-01T16:06:02Z | 2021-09-02T15:49:30Z | NONE | resolved | …an exception
This short-circuit code will skip the steps for decoding response.reason if the status code is not an exception-raising 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/5792/reactions"
} | https://api.github.com/repos/psf/requests/issues/5792/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5792.diff",
"html_url": "https://github.com/psf/requests/pull/5792",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5792.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5792"
} | true | [
"Decoding the `reason` certainly isn't that expensive in reality. Why add this complexity here? What does this gain anybody?",
"Early exit from an exception-raising routine, when it can be quickly determined that no exception will be raised, would be considered by some to be less complexity, not more. At run-time... |
https://api.github.com/repos/psf/requests/issues/5791 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5791/labels{/name} | https://api.github.com/repos/psf/requests/issues/5791/comments | https://api.github.com/repos/psf/requests/issues/5791/events | https://github.com/psf/requests/pull/5791 | 854,957,457 | MDExOlB1bGxSZXF1ZXN0NjEyODE1Nzcy | 5,791 | Grammar fix in description | {
"avatar_url": "https://avatars.githubusercontent.com/u/20052700?v=4",
"events_url": "https://api.github.com/users/cocobennett/events{/privacy}",
"followers_url": "https://api.github.com/users/cocobennett/followers",
"following_url": "https://api.github.com/users/cocobennett/following{/other_user}",
"gists_url": "https://api.github.com/users/cocobennett/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cocobennett",
"id": 20052700,
"login": "cocobennett",
"node_id": "MDQ6VXNlcjIwMDUyNzAw",
"organizations_url": "https://api.github.com/users/cocobennett/orgs",
"received_events_url": "https://api.github.com/users/cocobennett/received_events",
"repos_url": "https://api.github.com/users/cocobennett/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cocobennett/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cocobennett/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cocobennett",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2021-04-10T02:01:13Z | 2021-08-27T00:08:41Z | 2021-04-11T16:25:49Z | CONTRIBUTOR | resolved | Fixes https://github.com/psf/requests/issues/5785
Could not find the second error as described `This is also a problem on the pypi page under the project description.` | {
"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/5791/reactions"
} | https://api.github.com/repos/psf/requests/issues/5791/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5791.diff",
"html_url": "https://github.com/psf/requests/pull/5791",
"merged_at": "2021-04-11T16:25:49Z",
"patch_url": "https://github.com/psf/requests/pull/5791.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5791"
} | true | [
"Thank you!",
"@cocobennett,\r\nTo answer this-\r\n> Could not find the second error as described This is also a problem on the pypi page under the project description.\r\n\r\nThis would essentially be fixed by your patch as the `long_description` picked up by PyPI page to populate the description section is set ... |
https://api.github.com/repos/psf/requests/issues/5790 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5790/labels{/name} | https://api.github.com/repos/psf/requests/issues/5790/comments | https://api.github.com/repos/psf/requests/issues/5790/events | https://github.com/psf/requests/issues/5790 | 854,852,352 | MDU6SXNzdWU4NTQ4NTIzNTI= | 5,790 | use new format model | {
"avatar_url": "https://avatars.githubusercontent.com/u/60766355?v=4",
"events_url": "https://api.github.com/users/EmadDeve20/events{/privacy}",
"followers_url": "https://api.github.com/users/EmadDeve20/followers",
"following_url": "https://api.github.com/users/EmadDeve20/following{/other_user}",
"gists_url": "https://api.github.com/users/EmadDeve20/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/EmadDeve20",
"id": 60766355,
"login": "EmadDeve20",
"node_id": "MDQ6VXNlcjYwNzY2MzU1",
"organizations_url": "https://api.github.com/users/EmadDeve20/orgs",
"received_events_url": "https://api.github.com/users/EmadDeve20/received_events",
"repos_url": "https://api.github.com/users/EmadDeve20/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/EmadDeve20/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/EmadDeve20/subscriptions",
"type": "User",
"url": "https://api.github.com/users/EmadDeve20",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2021-04-09T21:02:59Z | 2021-08-27T00:08:27Z | 2021-04-10T00:13:52Z | NONE | resolved | Hi.
I think if we using a format like:
```print(f"{name}")```
is better than :
```print("{}".format(name))```
No?
if I right can I fix it? | {
"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/5790/reactions"
} | https://api.github.com/repos/psf/requests/issues/5790/timeline | null | completed | null | null | false | [
"This library still supports Python 2.7 and so the examples should work across all versions"
] |
https://api.github.com/repos/psf/requests/issues/5789 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5789/labels{/name} | https://api.github.com/repos/psf/requests/issues/5789/comments | https://api.github.com/repos/psf/requests/issues/5789/events | https://github.com/psf/requests/issues/5789 | 853,358,939 | MDU6SXNzdWU4NTMzNTg5Mzk= | 5,789 | User guide for how to provide timeouts | {
"avatar_url": "https://avatars.githubusercontent.com/u/182122?v=4",
"events_url": "https://api.github.com/users/torotil/events{/privacy}",
"followers_url": "https://api.github.com/users/torotil/followers",
"following_url": "https://api.github.com/users/torotil/following{/other_user}",
"gists_url": "https://api.github.com/users/torotil/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/torotil",
"id": 182122,
"login": "torotil",
"node_id": "MDQ6VXNlcjE4MjEyMg==",
"organizations_url": "https://api.github.com/users/torotil/orgs",
"received_events_url": "https://api.github.com/users/torotil/received_events",
"repos_url": "https://api.github.com/users/torotil/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/torotil/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/torotil/subscriptions",
"type": "User",
"url": "https://api.github.com/users/torotil",
"user_view_type": "public"
} | [] | closed | false | null | [] | null | 11 | 2021-04-08T11:14:40Z | 2024-02-15T14:24:58Z | 2024-02-15T14:24:39Z | NONE | null | [As](https://github.com/psf/requests/issues/5637) [many](https://github.com/psf/requests/issues/3054) [others](https://github.com/psf/requests/issues/2856) [before](https://github.com/psf/requests/issues/2508) [me](https://github.com/psf/requests/issues/2011) I have the need to set a default timeout for all requests (blocking forever just isn’t a very good default in most cases I guess).
I appreciate that this has been covered exhaustingly in this issue queue, that there [might not be a recommendation for all use-cases](https://github.com/psf/requests/issues/2011#issuecomment-64444354), and there are [different](https://github.com/psf/requests/issues/2011#issuecomment-64440818) [ways](https://github.com/psf/requests/issues/3054#issuecomment-197400891) [to](https://github.com/psf/requests/issues/2011#issuecomment-490050252) [do](https://github.com/psf/requests/issues/2011#issuecomment-637156626) this.
That’s exactly why I’m proposing to add documentation at the [appropriate](https://2.python-requests.org/en/master/user/advanced/#timeouts) [places](https://2.python-requests.org/en/master/user/advanced/#session-objects) for this in order to improve the experience for downstream developers and to avoid further mayhem in the issue queue.
So what are recommendable ways to have a default timeout and which disadvantages / advantages do they have? | {
"avatar_url": "https://avatars.githubusercontent.com/u/182122?v=4",
"events_url": "https://api.github.com/users/torotil/events{/privacy}",
"followers_url": "https://api.github.com/users/torotil/followers",
"following_url": "https://api.github.com/users/torotil/following{/other_user}",
"gists_url": "https://api.github.com/users/torotil/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/torotil",
"id": 182122,
"login": "torotil",
"node_id": "MDQ6VXNlcjE4MjEyMg==",
"organizations_url": "https://api.github.com/users/torotil/orgs",
"received_events_url": "https://api.github.com/users/torotil/received_events",
"repos_url": "https://api.github.com/users/torotil/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/torotil/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/torotil/subscriptions",
"type": "User",
"url": "https://api.github.com/users/torotil",
"user_view_type": "public"
} | {
"+1": 4,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 4,
"url": "https://api.github.com/repos/psf/requests/issues/5789/reactions"
} | https://api.github.com/repos/psf/requests/issues/5789/timeline | null | completed | null | null | false | [
"All of your issues describe providing one timeout for a session rather than how to provide timeouts for requests.\r\n\r\nIt sounds like you thus want to add an example of a recipe to the documentation that shows people how to create their own session object that accepts a timeout and passes that on to every reques... |
https://api.github.com/repos/psf/requests/issues/5788 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5788/labels{/name} | https://api.github.com/repos/psf/requests/issues/5788/comments | https://api.github.com/repos/psf/requests/issues/5788/events | https://github.com/psf/requests/issues/5788 | 851,569,425 | MDU6SXNzdWU4NTE1Njk0MjU= | 5,788 | SSL requests error in version 2.25.1 (upgraded from version 2.24.0) | {
"avatar_url": "https://avatars.githubusercontent.com/u/76916440?v=4",
"events_url": "https://api.github.com/users/M-Stenzel/events{/privacy}",
"followers_url": "https://api.github.com/users/M-Stenzel/followers",
"following_url": "https://api.github.com/users/M-Stenzel/following{/other_user}",
"gists_url": "https://api.github.com/users/M-Stenzel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/M-Stenzel",
"id": 76916440,
"login": "M-Stenzel",
"node_id": "MDQ6VXNlcjc2OTE2NDQw",
"organizations_url": "https://api.github.com/users/M-Stenzel/orgs",
"received_events_url": "https://api.github.com/users/M-Stenzel/received_events",
"repos_url": "https://api.github.com/users/M-Stenzel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/M-Stenzel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/M-Stenzel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/M-Stenzel",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2021-04-06T15:57:57Z | 2021-08-27T00:08:28Z | 2021-04-08T22:17:16Z | NONE | resolved | Dear team,
I am using requests for the searx search engine (https://github.com/searx/searx)
The script below throws this error and I do not know whether this is related to python-requests or to searx or my specific installation?
System is opensuse, python 3.6.12. latest requests release (2.25.1).
This (original searx) code gives me the error
#!/usr/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'searx==1.0.0','console_scripts','searx-run'
__requires__ = 'searx==1.0.0'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(
load_entry_point('searx==1.0.0', 'console_scripts', 'searx-run')()
)
Output with error message:
Serving Flask app "searx.webapp" (lazy loading)
Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
Debug mode: off
INFO:werkzeug: * Running on http://127.0.0.1:8898/ (Press CTRL+C to quit)
ERROR:searx.engines:yggtorrent engine: Fail to initialize
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 672, in urlopen
chunked=chunked,
File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 994, in validate_conn
conn.connect()
File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 360, in connect
ssl_context=context,
File "/usr/lib/python3.6/site-packages/urllib3/util/ssl.py", line 370, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/lib64/python3.6/ssl.py", line 407, in wrap_socket
_context=self, _session=session)
File "/usr/lib64/python3.6/ssl.py", line 817, in init
self.do_handshake()
File "/usr/lib64/python3.6/ssl.py", line 1077, in do_handshake
self._sslobj.do_handshake()
File "/usr/lib64/python3.6/ssl.py", line 689, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 720, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/usr/lib/python3.6/site-packages/urllib3/util/retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www4.yggtorrent.li', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)'),))
Obviously there seem to be problems with SSL/certificate.
Martin.
P. S. This is kinda of crosspost (I know, maybe not the best idea...)
The other post to be found here:
https://github.com/searx/searx/issues/2731
| {
"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/5788/reactions"
} | https://api.github.com/repos/psf/requests/issues/5788/timeline | null | completed | null | null | false | [
"Did you downgrade to the prior working version of requests? If not. Please try that. I doubt you'll see a difference here."
] |
https://api.github.com/repos/psf/requests/issues/5787 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5787/labels{/name} | https://api.github.com/repos/psf/requests/issues/5787/comments | https://api.github.com/repos/psf/requests/issues/5787/events | https://github.com/psf/requests/issues/5787 | 850,792,591 | MDU6SXNzdWU4NTA3OTI1OTE= | 5,787 | SOCKS5 Timeout | {
"avatar_url": "https://avatars.githubusercontent.com/u/12672984?v=4",
"events_url": "https://api.github.com/users/CollabSensei/events{/privacy}",
"followers_url": "https://api.github.com/users/CollabSensei/followers",
"following_url": "https://api.github.com/users/CollabSensei/following{/other_user}",
"gists_url": "https://api.github.com/users/CollabSensei/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/CollabSensei",
"id": 12672984,
"login": "CollabSensei",
"node_id": "MDQ6VXNlcjEyNjcyOTg0",
"organizations_url": "https://api.github.com/users/CollabSensei/orgs",
"received_events_url": "https://api.github.com/users/CollabSensei/received_events",
"repos_url": "https://api.github.com/users/CollabSensei/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/CollabSensei/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/CollabSensei/subscriptions",
"type": "User",
"url": "https://api.github.com/users/CollabSensei",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2021-04-05T23:08:21Z | 2021-08-27T00:08:28Z | 2021-04-06T11:22:58Z | NONE | resolved | Summary.
## Expected Result
Successful HTTP post via SOCKS5 Proxy. The web service takes about 2-3 minutes to respond. When connecting directly, without SOCKS5, it works fine. Using a Dante Socks5 proxy. Dante logs indicate that the client closed the connection.
## Actual Result
Traceback (most recent call last):
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\urllib3\connectionpool.py", line 706, in urlopen
chunked=chunked,
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\urllib3\connectionpool.py", line 445, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\urllib3\connectionpool.py", line 440, in _make_request
httplib_response = conn.getresponse()
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\http\client.py", line 1331, in getresponse
response.begin()
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\http\client.py", line 297, in begin
version, status, reason = self._read_status()
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\http\client.py", line 266, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
## Reproduction Steps
```python
url = "https://" + hostname + ":" + api_port + "/axl/"
bodyUpdate = """
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/%version">
<soapenv:Header/>
<soapenv:Body>
<ns:doSmartLicenseRegister>
<token>%token</token>
<force>true</force>
</ns:doSmartLicenseRegister>
</soapenv:Body>
</soapenv:Envelope>"""
bodyUpdate = bodyUpdate.replace("%version",str(version))
bodyUpdate = bodyUpdate.replace("%token", getSmartLicenseToken('myToken'))
sock5Proxy = {
'http': 'socks5h://' + vapp_ip + ':1080',
'https':'socks5h://' + vapp_ip + ':1080'
}
response = requests.post(url, data=bodyUpdate, auth=(username,password), headers={'SOAPAction': 'CUCM:DB ver=14.0'}, proxies=sock5Proxy, verify = False)
```
## System Information
{
"chardet": {
"version": "4.0.0"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.6.6"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.25.1"
},
"system_ssl": {
"version": "100020ff"
},
"urllib3": {
"version": "1.26.3"
},
"using_pyopenssl": false
```
<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/5787/reactions"
} | https://api.github.com/repos/psf/requests/issues/5787/timeline | null | completed | null | null | false | [
"We rely on urllib3 for socks proxying and you've already opened https://github.com/urllib3/urllib3/issues/2195 so I'm closing this"
] |
https://api.github.com/repos/psf/requests/issues/5786 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5786/labels{/name} | https://api.github.com/repos/psf/requests/issues/5786/comments | https://api.github.com/repos/psf/requests/issues/5786/events | https://github.com/psf/requests/issues/5786 | 850,624,739 | MDU6SXNzdWU4NTA2MjQ3Mzk= | 5,786 | Requests don't work within a celery async task | {
"avatar_url": "https://avatars.githubusercontent.com/u/16038063?v=4",
"events_url": "https://api.github.com/users/augustosamame/events{/privacy}",
"followers_url": "https://api.github.com/users/augustosamame/followers",
"following_url": "https://api.github.com/users/augustosamame/following{/other_user}",
"gists_url": "https://api.github.com/users/augustosamame/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/augustosamame",
"id": 16038063,
"login": "augustosamame",
"node_id": "MDQ6VXNlcjE2MDM4MDYz",
"organizations_url": "https://api.github.com/users/augustosamame/orgs",
"received_events_url": "https://api.github.com/users/augustosamame/received_events",
"repos_url": "https://api.github.com/users/augustosamame/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/augustosamame/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/augustosamame/subscriptions",
"type": "User",
"url": "https://api.github.com/users/augustosamame",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2021-04-05T20:01:56Z | 2021-08-27T00:08:29Z | 2021-04-05T21:04:02Z | NONE | resolved | When running this in Django shell:
```
import requests
response = requests.get('https://auth.myfanpark.com/health')
```
I get a valid response
The same 2 lines when ran as async celery job in the same Django project:
```
import requests
response = requests.get('https://auth.myfanpark.com/health')
```
Exception: too many values to unpack (expected 2)
## Expected Result
For requests call to work correctly in async celery calls just like in regular Django shell.
## Actual Result
Exception: too many values to unpack (expected 2)
## Reproduction Steps
```python
import requests
response = requests.get(url = 'https://auth.myfanpark.com/health')
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.6.7"
},
"platform": {
"release": "19.6.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.21.0"
},
"system_ssl": {
"version": "1010109f"
},
"urllib3": {
"version": "1.24.1"
},
"using_pyopenssl": false
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
| {
"avatar_url": "https://avatars.githubusercontent.com/u/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/5786/reactions"
} | https://api.github.com/repos/psf/requests/issues/5786/timeline | null | completed | null | null | false | [
"Can we get the full traceback? One line of the traceback isn't useful for figuring out the issue here.",
"Also, I use requests in Celery and it works fine. So I'm pretty close to closing this.",
"I will have a stack trace soon.\n\nOn Mon, 5 Apr 2021 at 15:31, Ian Stapleton Cordasco <\n***@***.***> wrote:\n\n> ... |
https://api.github.com/repos/psf/requests/issues/5785 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5785/labels{/name} | https://api.github.com/repos/psf/requests/issues/5785/comments | https://api.github.com/repos/psf/requests/issues/5785/events | https://github.com/psf/requests/issues/5785 | 849,979,181 | MDU6SXNzdWU4NDk5NzkxODE= | 5,785 | Grammar error in GitHub description | {
"avatar_url": "https://avatars.githubusercontent.com/u/55339220?v=4",
"events_url": "https://api.github.com/users/saltedcoffii/events{/privacy}",
"followers_url": "https://api.github.com/users/saltedcoffii/followers",
"following_url": "https://api.github.com/users/saltedcoffii/following{/other_user}",
"gists_url": "https://api.github.com/users/saltedcoffii/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/saltedcoffii",
"id": 55339220,
"login": "saltedcoffii",
"node_id": "MDQ6VXNlcjU1MzM5MjIw",
"organizations_url": "https://api.github.com/users/saltedcoffii/orgs",
"received_events_url": "https://api.github.com/users/saltedcoffii/received_events",
"repos_url": "https://api.github.com/users/saltedcoffii/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/saltedcoffii/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/saltedcoffii/subscriptions",
"type": "User",
"url": "https://api.github.com/users/saltedcoffii",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2021-04-04T23:01:04Z | 2021-08-27T00:08:27Z | 2021-04-11T16:25:49Z | NONE | resolved | The GitHub description reads as follows: "A simple, yet elegant HTTP library."
It should be: "A simple, yet elegant, HTTP library."
This is also a problem on the pypi page under the project description. | {
"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/5785/reactions"
} | https://api.github.com/repos/psf/requests/issues/5785/timeline | null | completed | null | null | false | [] |
https://api.github.com/repos/psf/requests/issues/5784 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5784/labels{/name} | https://api.github.com/repos/psf/requests/issues/5784/comments | https://api.github.com/repos/psf/requests/issues/5784/events | https://github.com/psf/requests/pull/5784 | 846,374,415 | MDExOlB1bGxSZXF1ZXN0NjA1NDc0ODkw | 5,784 | fix typo | {
"avatar_url": "https://avatars.githubusercontent.com/u/50807669?v=4",
"events_url": "https://api.github.com/users/DavidKimDY/events{/privacy}",
"followers_url": "https://api.github.com/users/DavidKimDY/followers",
"following_url": "https://api.github.com/users/DavidKimDY/following{/other_user}",
"gists_url": "https://api.github.com/users/DavidKimDY/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/DavidKimDY",
"id": 50807669,
"login": "DavidKimDY",
"node_id": "MDQ6VXNlcjUwODA3NjY5",
"organizations_url": "https://api.github.com/users/DavidKimDY/orgs",
"received_events_url": "https://api.github.com/users/DavidKimDY/received_events",
"repos_url": "https://api.github.com/users/DavidKimDY/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/DavidKimDY/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/DavidKimDY/subscriptions",
"type": "User",
"url": "https://api.github.com/users/DavidKimDY",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2021-03-31T10:25:43Z | 2021-08-27T00:08:44Z | 2021-03-31T11:32:39Z | NONE | resolved | fix typo | {
"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/5784/reactions"
} | https://api.github.com/repos/psf/requests/issues/5784/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5784.diff",
"html_url": "https://github.com/psf/requests/pull/5784",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5784.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5784"
} | true | [
"Thank you for your contribution! Unfortunately, we didn't write the content of that comment and don't maintain the comments in that file."
] |
https://api.github.com/repos/psf/requests/issues/5783 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5783/labels{/name} | https://api.github.com/repos/psf/requests/issues/5783/comments | https://api.github.com/repos/psf/requests/issues/5783/events | https://github.com/psf/requests/pull/5783 | 843,692,355 | MDExOlB1bGxSZXF1ZXN0NjAzMDQwNjY5 | 5,783 | Add support for brotli decoding | {
"avatar_url": "https://avatars.githubusercontent.com/u/4992947?v=4",
"events_url": "https://api.github.com/users/dilyanpalauzov/events{/privacy}",
"followers_url": "https://api.github.com/users/dilyanpalauzov/followers",
"following_url": "https://api.github.com/users/dilyanpalauzov/following{/other_user}",
"gists_url": "https://api.github.com/users/dilyanpalauzov/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dilyanpalauzov",
"id": 4992947,
"login": "dilyanpalauzov",
"node_id": "MDQ6VXNlcjQ5OTI5NDc=",
"organizations_url": "https://api.github.com/users/dilyanpalauzov/orgs",
"received_events_url": "https://api.github.com/users/dilyanpalauzov/received_events",
"repos_url": "https://api.github.com/users/dilyanpalauzov/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dilyanpalauzov/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dilyanpalauzov/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dilyanpalauzov",
"user_view_type": "public"
} | [] | closed | true | null | [] | {
"closed_at": "2021-08-25T21:25:16Z",
"closed_issues": 3,
"created_at": "2021-05-20T21:01:54Z",
"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/28",
"id": 6778816,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/28/labels",
"node_id": "MDk6TWlsZXN0b25lNjc3ODgxNg==",
"number": 28,
"open_issues": 0,
"state": "closed",
"title": "2.26.0",
"updated_at": "2021-08-25T21:25:16Z",
"url": "https://api.github.com/repos/psf/requests/milestones/28"
} | 8 | 2021-03-29T18:53:59Z | 2021-10-05T14:19:31Z | 2021-07-07T13:16:28Z | CONTRIBUTOR | resolved | When the `brotli` or `brotlicffi` packages are installed, `urllib3.util.make_headers()` inserts ',br' in the Accept-Encoding header and decodes br from the answers. | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 1,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/5783/reactions"
} | https://api.github.com/repos/psf/requests/issues/5783/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5783.diff",
"html_url": "https://github.com/psf/requests/pull/5783",
"merged_at": "2021-07-07T13:16:28Z",
"patch_url": "https://github.com/psf/requests/pull/5783.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5783"
} | true | [
"Should that not be something more along the lines of...\r\n\r\n```python\r\nmake_headers(accept_encoding=True).get('accept-encoding', ', '.join(('gzip', 'deflate'))),\r\n```\r\n\r\nas a 'fail safe'",
"You can change it as you want, as long Requests sends transparently `Accept-Encoding: br`.\r\n\r\n.join is an ov... |
https://api.github.com/repos/psf/requests/issues/5782 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5782/labels{/name} | https://api.github.com/repos/psf/requests/issues/5782/comments | https://api.github.com/repos/psf/requests/issues/5782/events | https://github.com/psf/requests/issues/5782 | 841,548,138 | MDU6SXNzdWU4NDE1NDgxMzg= | 5,782 | AttributeError: type object 'Retry' has no attribute 'other' | {
"avatar_url": "https://avatars.githubusercontent.com/u/23280179?v=4",
"events_url": "https://api.github.com/users/dkbarn/events{/privacy}",
"followers_url": "https://api.github.com/users/dkbarn/followers",
"following_url": "https://api.github.com/users/dkbarn/following{/other_user}",
"gists_url": "https://api.github.com/users/dkbarn/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dkbarn",
"id": 23280179,
"login": "dkbarn",
"node_id": "MDQ6VXNlcjIzMjgwMTc5",
"organizations_url": "https://api.github.com/users/dkbarn/orgs",
"received_events_url": "https://api.github.com/users/dkbarn/received_events",
"repos_url": "https://api.github.com/users/dkbarn/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dkbarn/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dkbarn/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dkbarn",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2021-03-26T03:08:14Z | 2021-08-27T00:08:29Z | 2021-03-26T18:30:08Z | NONE | resolved | I am using requests 2.25.1 with urllib3 1.26.3. Occasionally I get the following stacktrace. Note that the program is multi-threaded but I have all calls to ```session.get()``` inside a ```with threading.Lock()``` so there should not be concurrent access to a ```requests.Session``` object.
```
Traceback (most recent call last):
File "/opt/venv/dkbarn-py38/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/opt/venv/dkbarn-py38/lib/python3.8/site-packages/urllib3/connectionpool.py", line 445, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/opt/venv/dkbarn-py38/lib/python3.8/site-packages/urllib3/connectionpool.py", line 440, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.8/http/client.py", line 1347, in getresponse
response.begin()
File "/usr/lib/python3.8/http/client.py", line 307, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.8/http/client.py", line 268, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.8/socket.py", line 669, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.8/ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.8/ssl.py", line 1099, in read
return self._sslobj.read(len, buffer)
ConnectionResetError: [Errno 104] Connection reset by peer
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/venv/dkbarn-py38/lib/python3.8/site-packages/urllib3/util/retry.py", line 595, in __getattr__
return getattr(super(Retry, self), item)
AttributeError: 'super' object has no attribute 'other'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/venv/dkbarn-py38/lib/python3.8/site-packages/dkbarn/wdb/worker/mixins/multithreaded.py", line 114, in run
self._run()
File "/opt/venv/dkbarn-py38/lib/python3.8/site-packages/dkbarn/wdb/worker/mixins/multithreaded.py", line 229, in _run
self.worker.update_users(update_requests)
File "/opt/venv/dkbarn-py38/lib/python3.8/site-packages/dkbarn/wdb/worker/mixins/account.py", line 101, in update_users
self.__fetch_users(user_requests)
File "/opt/venv/dkbarn-py38/lib/python3.8/site-packages/dkbarn/wdb/worker/mixins/account.py", line 66, in __fetch_users
users_by_id, fetch_time = self._fetch_users_by_id(external_ids)
File "/opt/venv/dkbarn-py38/lib/python3.8/site-packages/dkbarn/wdb/worker/ti.py", line 270, in _fetch_users_by_id
user = self.client_pool.make_request("get_user", external_id)
File "/opt/venv/dkbarn-py38/lib/python3.8/site-packages/dkbarn/wdb/client_pool.py", line 188, in make_request
client, response = self.make_request_get_client(funcname, *args, **kwargs)
File "/opt/venv/dkbarn-py38/lib/python3.8/site-packages/dkbarn/wdb/client_pool.py", line 177, in make_request_get_client
response = client.make_request(funcname, *args, **kwargs, retry_on_throttled=retry_on_throttled)
File "/opt/venv/dkbarn-py38/lib/python3.8/site-packages/dkbarn/wdb/worker/ti.py", line 128, in make_request
return super(TiClientWrapper, self).make_request(funcname, *args, **kwargs)
File "/opt/venv/dkbarn-py38/lib/python3.8/site-packages/dkbarn/wdb/client_pool.py", line 82, in make_request
response = getattr(self.client, funcname)(*args, **kwargs)
File "/opt/venv/dkbarn-py38/lib/python3.8/site-packages/dkbarn/apiclient/ti/_client.py", line 274, in get_user
payload = self.__make_api_request(USER_URL.format(user_id=user_id), "get")
File "/opt/venv/dkbarn-py38/lib/python3.8/site-packages/dkbarn/apiclient/ti/_client.py", line 299, in __make_api_request
response = request_with_retry(
File "/opt/venv/dkbarn-py38/lib/python3.8/site-packages/dkbarn/apiclient/__init__.py", line 48, in request_with_retry
result = session.get(url, params=args, **kwargs)
File "/opt/venv/dkbarn-py38/lib/python3.8/site-packages/requests/sessions.py", line 555, in get
return self.request('GET', url, **kwargs)
File "/opt/venv/dkbarn-py38/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/opt/venv/dkbarn-py38/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/opt/venv/dkbarn-py38/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/opt/venv/dkbarn-py38/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/opt/venv/dkbarn-py38/lib/python3.8/site-packages/urllib3/util/retry.py", line 516, in increment
other = self.other
File "/opt/venv/dkbarn-py38/lib/python3.8/site-packages/urllib3/util/retry.py", line 597, in __getattr__
return getattr(Retry, item)
AttributeError: type object 'Retry' has no attribute 'other'
``` | {
"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/5782/reactions"
} | https://api.github.com/repos/psf/requests/issues/5782/timeline | null | completed | null | null | false | [
"So the fundamental problem here is that `ConnectionResetError: [Errno 104] Connection reset by peer` while handling that exception we're running into a different exception that's unexpected.\r\n\r\nAll of that said, you have discarded the issue template intended to help us help you. I'm closing this. If you can pr... |
https://api.github.com/repos/psf/requests/issues/5781 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5781/labels{/name} | https://api.github.com/repos/psf/requests/issues/5781/comments | https://api.github.com/repos/psf/requests/issues/5781/events | https://github.com/psf/requests/issues/5781 | 837,455,034 | MDU6SXNzdWU4Mzc0NTUwMzQ= | 5,781 | Why not support Selector or BeautifulSoup to the model of Response like scrapy? | {
"avatar_url": "https://avatars.githubusercontent.com/u/67509508?v=4",
"events_url": "https://api.github.com/users/fango6/events{/privacy}",
"followers_url": "https://api.github.com/users/fango6/followers",
"following_url": "https://api.github.com/users/fango6/following{/other_user}",
"gists_url": "https://api.github.com/users/fango6/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/fango6",
"id": 67509508,
"login": "fango6",
"node_id": "MDQ6VXNlcjY3NTA5NTA4",
"organizations_url": "https://api.github.com/users/fango6/orgs",
"received_events_url": "https://api.github.com/users/fango6/received_events",
"repos_url": "https://api.github.com/users/fango6/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/fango6/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fango6/subscriptions",
"type": "User",
"url": "https://api.github.com/users/fango6",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2021-03-22T08:23:14Z | 2021-08-27T00:08:29Z | 2021-03-22T09:07:53Z | NONE | resolved | easily parse the response data, such as
```python
response = requests.get("https://github.com", verify=False)
title = response.xpath("//head/title/text()").get()
print(title)
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/67509508?v=4",
"events_url": "https://api.github.com/users/fango6/events{/privacy}",
"followers_url": "https://api.github.com/users/fango6/followers",
"following_url": "https://api.github.com/users/fango6/following{/other_user}",
"gists_url": "https://api.github.com/users/fango6/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/fango6",
"id": 67509508,
"login": "fango6",
"node_id": "MDQ6VXNlcjY3NTA5NTA4",
"organizations_url": "https://api.github.com/users/fango6/orgs",
"received_events_url": "https://api.github.com/users/fango6/received_events",
"repos_url": "https://api.github.com/users/fango6/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/fango6/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fango6/subscriptions",
"type": "User",
"url": "https://api.github.com/users/fango6",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5781/reactions"
} | https://api.github.com/repos/psf/requests/issues/5781/timeline | null | completed | null | null | false | [] |
https://api.github.com/repos/psf/requests/issues/5780 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5780/labels{/name} | https://api.github.com/repos/psf/requests/issues/5780/comments | https://api.github.com/repos/psf/requests/issues/5780/events | https://github.com/psf/requests/pull/5780 | 836,264,546 | MDExOlB1bGxSZXF1ZXN0NTk2Nzk2NjAy | 5,780 | Update setup.py | {
"avatar_url": "https://avatars.githubusercontent.com/u/42208098?v=4",
"events_url": "https://api.github.com/users/armangido/events{/privacy}",
"followers_url": "https://api.github.com/users/armangido/followers",
"following_url": "https://api.github.com/users/armangido/following{/other_user}",
"gists_url": "https://api.github.com/users/armangido/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/armangido",
"id": 42208098,
"login": "armangido",
"node_id": "MDQ6VXNlcjQyMjA4MDk4",
"organizations_url": "https://api.github.com/users/armangido/orgs",
"received_events_url": "https://api.github.com/users/armangido/received_events",
"repos_url": "https://api.github.com/users/armangido/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/armangido/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/armangido/subscriptions",
"type": "User",
"url": "https://api.github.com/users/armangido",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2021-03-19T18:38:13Z | 2021-08-27T00:08:44Z | 2021-03-19T22:09:29Z | CONTRIBUTOR | resolved | Removed `import re` as unnecessary import | {
"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/5780/reactions"
} | https://api.github.com/repos/psf/requests/issues/5780/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5780.diff",
"html_url": "https://github.com/psf/requests/pull/5780",
"merged_at": "2021-03-19T22:09:29Z",
"patch_url": "https://github.com/psf/requests/pull/5780.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5780"
} | true | [
"Thank you! 🎉 "
] |
https://api.github.com/repos/psf/requests/issues/5779 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5779/labels{/name} | https://api.github.com/repos/psf/requests/issues/5779/comments | https://api.github.com/repos/psf/requests/issues/5779/events | https://github.com/psf/requests/pull/5779 | 836,016,285 | MDExOlB1bGxSZXF1ZXN0NTk2NTg3NDA4 | 5,779 | sets a default timeout and resolves #3070 | {
"avatar_url": "https://avatars.githubusercontent.com/u/3444196?v=4",
"events_url": "https://api.github.com/users/grintor/events{/privacy}",
"followers_url": "https://api.github.com/users/grintor/followers",
"following_url": "https://api.github.com/users/grintor/following{/other_user}",
"gists_url": "https://api.github.com/users/grintor/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/grintor",
"id": 3444196,
"login": "grintor",
"node_id": "MDQ6VXNlcjM0NDQxOTY=",
"organizations_url": "https://api.github.com/users/grintor/orgs",
"received_events_url": "https://api.github.com/users/grintor/received_events",
"repos_url": "https://api.github.com/users/grintor/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/grintor/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/grintor/subscriptions",
"type": "User",
"url": "https://api.github.com/users/grintor",
"user_view_type": "public"
} | [
{
"color": "eb6420",
"default": false,
"description": null,
"id": 44501256,
"name": "Breaking API Change",
"node_id": "MDU6TGFiZWw0NDUwMTI1Ng==",
"url": "https://api.github.com/repos/psf/requests/labels/Breaking%20API%20Change"
}
] | open | false | null | [] | null | 5 | 2021-03-19T13:50:35Z | 2022-01-03T15:05:49Z | null | NONE | null | This sets a (very high) default timeout which is guaranteed not to create any breaking changes while also fixing the longstanding issue of requests possibly hanging indefinitely in any script where the dev forgot to include a timeout. I would like to urge this commit make it into the next minor release version with the possibility of lowering the timeout to 300 seconds in the next major release version.
Please see the discussion at https://github.com/psf/requests/issues/3070 | null | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 4,
"laugh": 0,
"rocket": 0,
"total_count": 4,
"url": "https://api.github.com/repos/psf/requests/issues/5779/reactions"
} | https://api.github.com/repos/psf/requests/issues/5779/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5779.diff",
"html_url": "https://github.com/psf/requests/pull/5779",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5779.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5779"
} | true | [
"I'd vote for going straight to whatever timeouts browsers have as the default and skipping the intermediate step your have here, but anything will be an important improvement.",
"There are - unfortunately - people who've been made to feel unsafe contributing on issue #3070 who have emailed me in the past to urge... |
https://api.github.com/repos/psf/requests/issues/5778 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5778/labels{/name} | https://api.github.com/repos/psf/requests/issues/5778/comments | https://api.github.com/repos/psf/requests/issues/5778/events | https://github.com/psf/requests/pull/5778 | 835,656,016 | MDExOlB1bGxSZXF1ZXN0NTk2MjgxNzQx | 5,778 | Cleanup redundant allow_redirects kwargs in api | {
"avatar_url": "https://avatars.githubusercontent.com/u/12206611?v=4",
"events_url": "https://api.github.com/users/laggardkernel/events{/privacy}",
"followers_url": "https://api.github.com/users/laggardkernel/followers",
"following_url": "https://api.github.com/users/laggardkernel/following{/other_user}",
"gists_url": "https://api.github.com/users/laggardkernel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/laggardkernel",
"id": 12206611,
"login": "laggardkernel",
"node_id": "MDQ6VXNlcjEyMjA2NjEx",
"organizations_url": "https://api.github.com/users/laggardkernel/orgs",
"received_events_url": "https://api.github.com/users/laggardkernel/received_events",
"repos_url": "https://api.github.com/users/laggardkernel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/laggardkernel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/laggardkernel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/laggardkernel",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2021-03-19T07:38:02Z | 2021-08-27T00:08:44Z | 2021-03-19T16:44:20Z | CONTRIBUTOR | resolved | Not a big problem, just remove the redundant param `allow_redirects` in API `get()` and `options()`. Cause the underlying calling `Session.request()` has param `allow_redirects` defaults to `True`.
Only leaves
```python
def head(url, **kwargs):
kwargs.setdefault('allow_redirects', False)
return request('head', url, **kwargs)
```
in `api.py` to make a contrast that http method `head()` is the only one disallows redirects by default. | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5778/reactions"
} | https://api.github.com/repos/psf/requests/issues/5778/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5778.diff",
"html_url": "https://github.com/psf/requests/pull/5778",
"merged_at": "2021-03-19T16:44:20Z",
"patch_url": "https://github.com/psf/requests/pull/5778.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5778"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/5777 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5777/labels{/name} | https://api.github.com/repos/psf/requests/issues/5777/comments | https://api.github.com/repos/psf/requests/issues/5777/events | https://github.com/psf/requests/pull/5777 | 834,555,224 | MDExOlB1bGxSZXF1ZXN0NTk1MzQ2OTcz | 5,777 | quickstart.rst: r.json() can raise JSONDecodeError on Py3 | {
"avatar_url": "https://avatars.githubusercontent.com/u/3709715?v=4",
"events_url": "https://api.github.com/users/cclauss/events{/privacy}",
"followers_url": "https://api.github.com/users/cclauss/followers",
"following_url": "https://api.github.com/users/cclauss/following{/other_user}",
"gists_url": "https://api.github.com/users/cclauss/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cclauss",
"id": 3709715,
"login": "cclauss",
"node_id": "MDQ6VXNlcjM3MDk3MTU=",
"organizations_url": "https://api.github.com/users/cclauss/orgs",
"received_events_url": "https://api.github.com/users/cclauss/received_events",
"repos_url": "https://api.github.com/users/cclauss/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cclauss/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cclauss/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cclauss",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2021-03-18T09:06:28Z | 2021-08-27T00:08:45Z | 2021-03-18T14:36:35Z | CONTRIBUTOR | resolved | % `python2 -c "import requests ; requests.get('https://github.com').json()"`
% `python3 -c "import requests ; requests.get('https://github.com').json()"`
Python | Simplejson is installed | Simplejson is NOT installed
--- | --- | ---
Python 2 | simplejson.JSONDecodeError | ValueError
Python 3 | simplejson.JSONDecodeError | json.JSONDecodeError | {
"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/5777/reactions"
} | https://api.github.com/repos/psf/requests/issues/5777/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5777.diff",
"html_url": "https://github.com/psf/requests/pull/5777",
"merged_at": "2021-03-18T14:36:35Z",
"patch_url": "https://github.com/psf/requests/pull/5777.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5777"
} | true | [
"Thank you! 🎉 "
] |
https://api.github.com/repos/psf/requests/issues/5776 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5776/labels{/name} | https://api.github.com/repos/psf/requests/issues/5776/comments | https://api.github.com/repos/psf/requests/issues/5776/events | https://github.com/psf/requests/pull/5776 | 833,712,902 | MDExOlB1bGxSZXF1ZXN0NTk0NjYyNzU4 | 5,776 | Added explanation why the timeout is doubled.(#5773) | {
"avatar_url": "https://avatars.githubusercontent.com/u/80456253?v=4",
"events_url": "https://api.github.com/users/cpyberry/events{/privacy}",
"followers_url": "https://api.github.com/users/cpyberry/followers",
"following_url": "https://api.github.com/users/cpyberry/following{/other_user}",
"gists_url": "https://api.github.com/users/cpyberry/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpyberry",
"id": 80456253,
"login": "cpyberry",
"node_id": "MDQ6VXNlcjgwNDU2MjUz",
"organizations_url": "https://api.github.com/users/cpyberry/orgs",
"received_events_url": "https://api.github.com/users/cpyberry/received_events",
"repos_url": "https://api.github.com/users/cpyberry/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpyberry/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpyberry/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpyberry",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 8 | 2021-03-17T12:21:12Z | 2022-01-03T15:22:26Z | null | NONE | null | ## issue
#5773 | 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/5776/reactions"
} | https://api.github.com/repos/psf/requests/issues/5776/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5776.diff",
"html_url": "https://github.com/psf/requests/pull/5776",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5776.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5776"
} | true | [
"@sigmavirus24\n\nI added what the user should do and made the phenomenon stand out.\n\nIf you have time, I'd be happy if you could see it\n",
"Hi,\r\n\r\nI would like to tell what I understand on what you want to publish, and possibly, suggest a different worlds to be more accurate.\r\n\r\nIn Networking, we ... |
https://api.github.com/repos/psf/requests/issues/5775 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5775/labels{/name} | https://api.github.com/repos/psf/requests/issues/5775/comments | https://api.github.com/repos/psf/requests/issues/5775/events | https://github.com/psf/requests/issues/5775 | 833,010,180 | MDU6SXNzdWU4MzMwMTAxODA= | 5,775 | RFC6874 IPv6 Zone Identifiers in urls not parsed correctly | {
"avatar_url": "https://avatars.githubusercontent.com/u/80776399?v=4",
"events_url": "https://api.github.com/users/ph1l1p139/events{/privacy}",
"followers_url": "https://api.github.com/users/ph1l1p139/followers",
"following_url": "https://api.github.com/users/ph1l1p139/following{/other_user}",
"gists_url": "https://api.github.com/users/ph1l1p139/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ph1l1p139",
"id": 80776399,
"login": "ph1l1p139",
"node_id": "MDQ6VXNlcjgwNzc2Mzk5",
"organizations_url": "https://api.github.com/users/ph1l1p139/orgs",
"received_events_url": "https://api.github.com/users/ph1l1p139/received_events",
"repos_url": "https://api.github.com/users/ph1l1p139/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ph1l1p139/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ph1l1p139/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ph1l1p139",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2021-03-16T16:52:53Z | 2021-08-27T00:08:30Z | 2021-03-16T18:18:41Z | NONE | resolved | [RFC6874 ](https://tools.ietf.org/html/rfc6874)updates [RFC3986 ](https://tools.ietf.org/html/rfc3986) URI Syntax to support IPv6 Zone Identifiers. Zone identifiers are required when working with link local IPv6 addresses on a machine with multiple network adapters.
RFC6874 updates the URI ABNF to include:
> IP-literal = "[" ( IPv6address / IPv6addrz / IPvFuture ) "]"
> ZoneID = 1*( unreserved / pct-encoded )
> IPv6addrz = IPv6address "%25" ZoneID
Windows systems use integers for the zone identifiers (Linux systems often use interface names instead).
When performing a get request to a link local address with zone ID "37" formatted as per RFC6874 (e.g. http://[fe80::1234%2537]) the percent encoding seems to be interpreted incorrectly and attempts to access fe80::12347 which is an invalid IPv6 address.
## Expected Result
Get request to "fe80::1234%37" performed correctly
## Actual Result
urlllib3 LocationParseError and requests.exceptions.InvalidURL exceptions are generated.
```
>>> r = requests.get("http://[fe80::1234%2537]")
Traceback (most recent call last):
File "C:\Users\username_removed\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\adapters.py", line 412, in send
conn = self.get_connection(request.url, proxies)
File "C:\Users\username_removed\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\adapters.py", line 315, in get_connection
conn = self.poolmanager.connection_from_url(url)
File "C:\Users\username_removed\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\poolmanager.py", line 297, in connection_from_url
u = parse_url(url)
File "C:\Users\username_removed\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\util\url.py", line 392, in parse_url
return six.raise_from(LocationParseError(source_url), None)
File "<string>", line 3, in raise_from
urllib3.exceptions.LocationParseError: Failed to parse: http://[fe80::12347]/
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\username_removed\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "C:\Users\username_removed\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Users\username_removed\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\username_removed\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "C:\Users\username_removed\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\adapters.py", line 414, in send
raise InvalidURL(e, request=request)
requests.exceptions.InvalidURL: Failed to parse: http://[fe80::12347]/
```
It seems that part of the zone ID is concatenated onto the IPv6 address and the % removed altogther.
## Reproduction Steps
```python
import requests
r = requests.get("http://[fe80::1234%2537]")
```
Note that the zone identifiers vary between PCs/OSs and sometimes over reboots, it is unlikely that 37 will be a valid Zone ID on most systems. However the connection should fail with "[WinError 10049] The requested address is not valid in its context" rather than
## Other Notes
The correct URL can be accesses by escaping the Zone ID twice. e.g:
```python
import requests
r = requests.get("http://[fe80::1234%252537]")
```
Will attempt to access the correct address fe80::1234%37 perhaps %encoding is being performed twice?
Exact behaviour depends on the specific zone ID used, for instance some zone IDs work with or without the percent encoded % character:
- r = requests.get("http://[fe80::1234%1]")
- r = requests.get("http://[fe80::1234%251]")
- r = requests.get("http://[fe80::1234%25251]")
All attempt a get request from fe80::1234%1
## urllib3 behaviour
urllib3 seems to perform in accordance with RFC6874:
```
>>> import urllib3
>>> urllib3.util.parse_url("http://[fe80::1234%2537]")
Url(scheme='http', auth=None, host='[fe80::1234%37]', port=None, path=None, query=None, fragment=None)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "4.0.0"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.9.2"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.25.1"
},
"system_ssl": {
"version": "1010109f"
},
"urllib3": {
"version": "1.26.3"
},
"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/5775/reactions"
} | https://api.github.com/repos/psf/requests/issues/5775/timeline | null | completed | null | null | false | [
"Duplicate of https://github.com/psf/requests/issues/5126"
] |
https://api.github.com/repos/psf/requests/issues/5774 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5774/labels{/name} | https://api.github.com/repos/psf/requests/issues/5774/comments | https://api.github.com/repos/psf/requests/issues/5774/events | https://github.com/psf/requests/pull/5774 | 831,906,368 | MDExOlB1bGxSZXF1ZXN0NTkzMTU0Mjc4 | 5,774 | #5773: Fixed the number of seconds specified for timeout being doubled | {
"avatar_url": "https://avatars.githubusercontent.com/u/80456253?v=4",
"events_url": "https://api.github.com/users/cpyberry/events{/privacy}",
"followers_url": "https://api.github.com/users/cpyberry/followers",
"following_url": "https://api.github.com/users/cpyberry/following{/other_user}",
"gists_url": "https://api.github.com/users/cpyberry/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cpyberry",
"id": 80456253,
"login": "cpyberry",
"node_id": "MDQ6VXNlcjgwNDU2MjUz",
"organizations_url": "https://api.github.com/users/cpyberry/orgs",
"received_events_url": "https://api.github.com/users/cpyberry/received_events",
"repos_url": "https://api.github.com/users/cpyberry/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cpyberry/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cpyberry/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cpyberry",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2021-03-15T15:07:31Z | 2021-08-27T00:08:45Z | 2021-03-15T17:18:19Z | NONE | resolved | ## issue
#5773
## changes
Create a subclass that divides the connect argument of TimeoutSauce by 2. | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5774/reactions"
} | https://api.github.com/repos/psf/requests/issues/5774/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5774.diff",
"html_url": "https://github.com/psf/requests/pull/5774",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5774.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5774"
} | true | [
"IMHO blindly halving the specified timeout is not a good strategy, specially if the underlying issue is still unknown.\r\n\r\nBesides, there are a few issues with that implementation, from not handling a `None` value to shadowing the imported name",
"Thank you for looking at my code.",
"I forgot about handling... |
https://api.github.com/repos/psf/requests/issues/5773 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5773/labels{/name} | https://api.github.com/repos/psf/requests/issues/5773/comments | https://api.github.com/repos/psf/requests/issues/5773/events | https://github.com/psf/requests/issues/5773 | 831,807,572 | MDU6SXNzdWU4MzE4MDc1NzI= | 5,773 | Connection timeout (not Read, Wall or Total) is consistently taking twice as long | {
"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"
} | [
{
"color": "fad8c7",
"default": false,
"description": null,
"id": 136616769,
"name": "Documentation",
"node_id": "MDU6TGFiZWwxMzY2MTY3Njk=",
"url": "https://api.github.com/repos/psf/requests/labels/Documentation"
}
] | closed | false | null | [] | null | 11 | 2021-03-15T13:23:45Z | 2023-12-28T02:03:33Z | 2023-12-16T13:30:21Z | CONTRIBUTOR | null | I'm aware that several issues related to timeout were opened (and closed) before, so I'm trying to narrow this report down to a very specific scope: **connection** timeout is behaving in a consistent, wrong way: it times out at _precisely_ **twice** the requested time.
Results below are _so_ consistent we must acknowledge there is _something_ going on here! I **beg** you guys not to dismiss this report before taking a look at it!
What this report is **not** about:
- Total/Wall timeout:
That would be a nice feature, but I'm fully aware this is currently outside the scope of Requests. I'm focusing on _connection_ timeout only.
- Read timeout:
All my tests were using http://google.com:81, which fails to even _connect_. There's no read involved, the server exists but never responds, not even to refuse the connection. No data is ever transmitted. No HTTP connection is ever established. This is **not** about `ReadTimeoutError`, this is about `ConnectTimeoutError`.
- Accurate timings / network fluctuations:
Not asking for millisecond precision. I don't even care about _whole seconds_ imprecision. But, surprisingly, `requests` is being incredibly accurate... to _twice_ the time.
## Expected Result
`requests.get('http://google.com:81', timeout=(4, 1))` should take _approximately_ 4 seconds to timeout.
## Actual Result
It _consistently_ takes about 8.0 seconds to raise `requests.ConnectTimeout`. It always takes twice the time, for timeouts ranging from 1 to 100. Exception message clearly says in the end: `Connection to google.com timed out. (connect timeout=4)`, a very distinct message from read timeouts.
## Reproduction Steps
```python
import requests, time, os, sys
# Using a know URL to test connection timeout
def test_timeout(timeout, url='http://google.com:81'):
start = time.time()
try:
requests.get(url, timeout=timeout)
print("OK!") # will never reach this...
except requests.ConnectTimeout: # any other exception will bubble out
print('{}: {:.1f}'.format(timeout, time.time()-start))
print("\n1 to 10, simple numeric timeout")
for i in range(1, 11):
test_timeout(i)
print("\n1 to 10, (x, 1) timeout tuple")
for i in range(1, 11):
test_timeout((i, 1))
print("\n1 to 10, (x, 10) timeout tuple")
for i in range(1, 11):
test_timeout((i, 1))
print("\nLarge timeouts")
for i in (20, 30, 50, 100):
test_timeout((i, 1))
```
Results:
```
Linux desktop 5.4.0-66-generic #74~18.04.2-Ubuntu SMP Fri Feb 5 11:17:31 UTC 2021 x86_64
3.6.9 (default, Jan 26 2021, 15:33:00)
[GCC 8.4.0]
Requests: 2.25.1
Urllib3: 1.26.3
1 to 10, simple numeric timeout
1: 2.0
2: 4.0
3: 6.0
4: 8.0
5: 10.0
6: 12.0
7: 14.0
8: 16.0
9: 18.0
10: 20.0
1 to 10, (x, 1) timeout tuple
(1, 1): 2.0
(2, 1): 4.0
(3, 1): 6.0
(4, 1): 8.0
(5, 1): 10.0
(6, 1): 12.0
(7, 1): 14.0
(8, 1): 16.0
(9, 1): 18.0
(10, 1): 20.0
1 to 10, (x, 10) timeout tuple
(1, 10): 2.0
(2, 10): 4.0
(3, 10): 6.0
(4, 10): 8.0
(5, 10): 10.0
(6, 10): 12.0
(7, 10): 14.0
(8, 10): 16.0
(9, 10): 18.0
(10, 10): 20.0
Large timeouts
(20, 1): 40.0
(30, 1): 60.0
(50, 1): 100.1
(100, 1): 200.2
```
## System Information
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "3.2.1"
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.6.9"
},
"platform": {
"release": "5.4.0-66-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010108f",
"version": "17.5.0"
},
"requests": {
"version": "2.25.1"
},
"system_ssl": {
"version": "1010100f"
},
"urllib3": {
"version": "1.26.3"
},
"using_pyopenssl": true
}
```
It seems there **is** a single, "hidden", connection retry, performed by either `requests` or `urllib3`, somewhere in the line. It has been reported by other users in other platforms too.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 2,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 2,
"url": "https://api.github.com/repos/psf/requests/issues/5773/reactions"
} | https://api.github.com/repos/psf/requests/issues/5773/timeline | null | completed | null | null | false | [
"When using `urllib3` directly, it seems to also give a very consistent timeout of **8 times** the requested one:\r\n\r\n```pycon\r\n>>> import urllib3, time\r\n>>> http = urllib3.PoolManager()\r\n>>> try:\r\n... start = time.time()\r\n... http.request('GET', 'http://google.com:81', timeout=1)\r\n... except... |
https://api.github.com/repos/psf/requests/issues/5772 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5772/labels{/name} | https://api.github.com/repos/psf/requests/issues/5772/comments | https://api.github.com/repos/psf/requests/issues/5772/events | https://github.com/psf/requests/issues/5772 | 830,110,982 | MDU6SXNzdWU4MzAxMTA5ODI= | 5,772 | Session proxies definition raise error on Get method | {
"avatar_url": "https://avatars.githubusercontent.com/u/31013072?v=4",
"events_url": "https://api.github.com/users/bbuzens/events{/privacy}",
"followers_url": "https://api.github.com/users/bbuzens/followers",
"following_url": "https://api.github.com/users/bbuzens/following{/other_user}",
"gists_url": "https://api.github.com/users/bbuzens/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bbuzens",
"id": 31013072,
"login": "bbuzens",
"node_id": "MDQ6VXNlcjMxMDEzMDcy",
"organizations_url": "https://api.github.com/users/bbuzens/orgs",
"received_events_url": "https://api.github.com/users/bbuzens/received_events",
"repos_url": "https://api.github.com/users/bbuzens/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bbuzens/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bbuzens/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bbuzens",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2021-03-12T13:18:14Z | 2021-11-26T03:00:37Z | 2021-08-28T02:46:01Z | NONE | resolved | I want to pass proxies definition through session's proxies attribute.
It is described in [the documentation](https://2.python-requests.org/en/master/user/advanced/#proxies).
In my configuration, it raises a ProxyError
## Expected Result
This should work
```Python
import requests
proxies = {
'http': 'http://10.10.1.10:3128',
'https': 'http://10.10.1.10:1080',
}
requests.get('http://example.org', proxies=proxies)
```
That too
```Python
import requests
proxies = {
'http': 'http://10.10.1.10:3128',
'https': 'http://10.10.1.10:1080',
}
session = requests.Session()
session.proxies.update(proxies)
session.get('http://example.org')
```
So, i wrote something like that
```Python
import requests
proxies = {
'http': 'http://localhost:53128',
'https': 'http://localhost:53128',
}
session = requests.sessions.Session()
session_response = session.get('https://www.google.com', proxies=proxies).status_code
print(session_response)
session_with_proxies = requests.sessions.Session()
session_with_proxies.proxies.update(proxies)
print(session_with_proxies.proxies)
try:
session_with_proxies_response = session_with_proxies.get('https://www.google.com').status_code
except requests.exceptions.ProxyError:
print("Proxy error catched")
```
The *session_with_proxies_response* should work and no *"Proxy error catched"* should be catched.
## Actual Result
And i got
```
200
{'http': 'http://localhost:53128', 'https': 'http://localhost:53128', 'ftp': 'ftp://localhost:53128'}
Proxy error catched
Process finished with exit code 0
```
The `session_with_proxies.get('https://www.google.com').status_code` command raises a proxy error.
But the proxy is defined as it is recommanded by the documentation.
## Reproduction Steps
Install *requests*
```python
import requests
```
Run that script with a local proxy running (Squid or what you like...)
```Python
import requests
proxies = {
'http': 'http://localhost:53128',
'https': 'http://localhost:53128',
}
session = requests.sessions.Session()
session_response = session.get('https://www.google.com', proxies=proxies).status_code
print(session_response)
session_with_proxies = requests.sessions.Session()
session_with_proxies.proxies.update(proxies)
print(session_with_proxies.proxies)
session_with_proxies_response = session_with_proxies.get('https://www.google.com').status_code
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "4.0.0"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.8.3"
},
"platform": {
"release": "7",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.25.1"
},
"system_ssl": {
"version": "1010106f"
},
"urllib3": {
"version": "1.26.3"
},
"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/5772/reactions"
} | https://api.github.com/repos/psf/requests/issues/5772/timeline | null | completed | null | null | false | [
"Hi @bbuzens, there's no information on the actual error you're receiving. From the information provided, it looks like there's a legitimate issue connecting to your proxy.\r\n\r\nIf you have more information on the exact traceback you're receiving we can take a look. I'm going to close this for now since there isn... |
https://api.github.com/repos/psf/requests/issues/5771 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5771/labels{/name} | https://api.github.com/repos/psf/requests/issues/5771/comments | https://api.github.com/repos/psf/requests/issues/5771/events | https://github.com/psf/requests/issues/5771 | 828,958,525 | MDU6SXNzdWU4Mjg5NTg1MjU= | 5,771 | Dependency on cryptography package breaks upgrades | {
"avatar_url": "https://avatars.githubusercontent.com/u/203885?v=4",
"events_url": "https://api.github.com/users/jfinkhaeuser/events{/privacy}",
"followers_url": "https://api.github.com/users/jfinkhaeuser/followers",
"following_url": "https://api.github.com/users/jfinkhaeuser/following{/other_user}",
"gists_url": "https://api.github.com/users/jfinkhaeuser/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jfinkhaeuser",
"id": 203885,
"login": "jfinkhaeuser",
"node_id": "MDQ6VXNlcjIwMzg4NQ==",
"organizations_url": "https://api.github.com/users/jfinkhaeuser/orgs",
"received_events_url": "https://api.github.com/users/jfinkhaeuser/received_events",
"repos_url": "https://api.github.com/users/jfinkhaeuser/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jfinkhaeuser/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jfinkhaeuser/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jfinkhaeuser",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2021-03-11T09:20:22Z | 2021-03-11T17:50:59Z | 2021-03-11T12:42:23Z | NONE | resolved | Unfortunately, the maintainers of the `pyca/cryptography` package have made Rust a hard dependency in newer releases. Since they cut short any discussion about this (not your problem, but a problem for the Python community in general), I was not able to explain to them that a dependency that is required by default and must be manually disabled can be considered a hard dependency.
As a result, updating any package that depends on `cryptography` breaks. Yours happens to be a widely used one.
It's not your fault, for which I am sorry. But you can solve this for your package by keeping your requirement on `cryptography` restricted to versions that do not require Rust.
## Expected Result
When I `pip install -U requests[security]`, the update works.
## Actual Result
I get errors that newer versions of the `cryptography` require a Rust toolchain.
## Reproduction Steps
see above.
## System Information
various | {
"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": 1,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/5771/reactions"
} | https://api.github.com/repos/psf/requests/issues/5771/timeline | null | completed | null | null | false | [
"Relates to https://github.com/pyca/cryptography/issues/5810",
"No. In fact, I think we should raise the lower limit to the ones requiring the Rust toolchain. It's significantly more secure which is one of the tenants of this library - maximum security by default for users",
"Ok.\r\n\r\nI disagree. Rust has the... |
https://api.github.com/repos/psf/requests/issues/5770 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5770/labels{/name} | https://api.github.com/repos/psf/requests/issues/5770/comments | https://api.github.com/repos/psf/requests/issues/5770/events | https://github.com/psf/requests/issues/5770 | 827,911,617 | MDU6SXNzdWU4Mjc5MTE2MTc= | 5,770 | Considerations before posting a new "Issue" | {
"avatar_url": "https://avatars.githubusercontent.com/u/45062549?v=4",
"events_url": "https://api.github.com/users/jakermx/events{/privacy}",
"followers_url": "https://api.github.com/users/jakermx/followers",
"following_url": "https://api.github.com/users/jakermx/following{/other_user}",
"gists_url": "https://api.github.com/users/jakermx/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jakermx",
"id": 45062549,
"login": "jakermx",
"node_id": "MDQ6VXNlcjQ1MDYyNTQ5",
"organizations_url": "https://api.github.com/users/jakermx/orgs",
"received_events_url": "https://api.github.com/users/jakermx/received_events",
"repos_url": "https://api.github.com/users/jakermx/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jakermx/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jakermx/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jakermx",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2021-03-10T15:26:51Z | 2021-03-11T14:35:50Z | 2021-03-11T14:35:46Z | NONE | off-topic | I really appreciate your hard word guys, but I would like to suggest you that tell your lib consumers that your lib is a state of art HTTPimplementantion, that depends on urllib3 and OS TCP/IP stack... which means... this library just consume and uses another libraries, so this lib is a pretty and easy way to grab content from WebServers,but it depends onthe urllib3 and OS network features and capabilies...
For Everybody, I am not a Contributor, Developer or friend of the ones who really have done this Lib....I just saying what I think and what we all might take in mind before opening an Issue.
Respect you all
To my concerns, I will only say.. OMFG Thanks you all for your great and hard effort...keep it going!!!
| {
"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/5770/reactions"
} | https://api.github.com/repos/psf/requests/issues/5770/timeline | null | completed | null | null | false | [] |
https://api.github.com/repos/psf/requests/issues/5769 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5769/labels{/name} | https://api.github.com/repos/psf/requests/issues/5769/comments | https://api.github.com/repos/psf/requests/issues/5769/events | https://github.com/psf/requests/issues/5769 | 826,029,989 | MDU6SXNzdWU4MjYwMjk5ODk= | 5,769 | Couldn't modify user-agent while sending multipart/form-data request | {
"avatar_url": "https://avatars.githubusercontent.com/u/53445798?v=4",
"events_url": "https://api.github.com/users/DarcJC/events{/privacy}",
"followers_url": "https://api.github.com/users/DarcJC/followers",
"following_url": "https://api.github.com/users/DarcJC/following{/other_user}",
"gists_url": "https://api.github.com/users/DarcJC/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/DarcJC",
"id": 53445798,
"login": "DarcJC",
"node_id": "MDQ6VXNlcjUzNDQ1Nzk4",
"organizations_url": "https://api.github.com/users/DarcJC/orgs",
"received_events_url": "https://api.github.com/users/DarcJC/received_events",
"repos_url": "https://api.github.com/users/DarcJC/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/DarcJC/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/DarcJC/subscriptions",
"type": "User",
"url": "https://api.github.com/users/DarcJC",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2021-03-09T14:37:53Z | 2021-08-27T00:08:30Z | 2021-03-09T15:02:37Z | NONE | resolved | Here is my code:
```python
with requests.Session() as s:
s.cookies.set("CASTGC", CASTGC)
s.get(...) // to get target website cookie through redirecting to CAS service.
files = {"Filedata": (
'upload.png',
tmp_file,
'image/png'
)}
res = s.post('my url', files=files, header={'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0'})
assert(res.request.body is None) // excepted ======xxxx blabla
```
It is ok after changing user-gent header to '1111', But I need to pass user-agent header to bypass the firewall. | {
"avatar_url": "https://avatars.githubusercontent.com/u/53445798?v=4",
"events_url": "https://api.github.com/users/DarcJC/events{/privacy}",
"followers_url": "https://api.github.com/users/DarcJC/followers",
"following_url": "https://api.github.com/users/DarcJC/following{/other_user}",
"gists_url": "https://api.github.com/users/DarcJC/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/DarcJC",
"id": 53445798,
"login": "DarcJC",
"node_id": "MDQ6VXNlcjUzNDQ1Nzk4",
"organizations_url": "https://api.github.com/users/DarcJC/orgs",
"received_events_url": "https://api.github.com/users/DarcJC/received_events",
"repos_url": "https://api.github.com/users/DarcJC/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/DarcJC/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/DarcJC/subscriptions",
"type": "User",
"url": "https://api.github.com/users/DarcJC",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5769/reactions"
} | https://api.github.com/repos/psf/requests/issues/5769/timeline | null | completed | null | null | false | [
"Oops, I found it is caused by the 302 redirecting."
] |
https://api.github.com/repos/psf/requests/issues/5768 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5768/labels{/name} | https://api.github.com/repos/psf/requests/issues/5768/comments | https://api.github.com/repos/psf/requests/issues/5768/events | https://github.com/psf/requests/issues/5768 | 824,139,206 | MDU6SXNzdWU4MjQxMzkyMDY= | 5,768 | model.RequestEncodingMixin._encode_files does not work for 3 or 4 elements tuple | {
"avatar_url": "https://avatars.githubusercontent.com/u/16507006?v=4",
"events_url": "https://api.github.com/users/hefvcjm/events{/privacy}",
"followers_url": "https://api.github.com/users/hefvcjm/followers",
"following_url": "https://api.github.com/users/hefvcjm/following{/other_user}",
"gists_url": "https://api.github.com/users/hefvcjm/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hefvcjm",
"id": 16507006,
"login": "hefvcjm",
"node_id": "MDQ6VXNlcjE2NTA3MDA2",
"organizations_url": "https://api.github.com/users/hefvcjm/orgs",
"received_events_url": "https://api.github.com/users/hefvcjm/received_events",
"repos_url": "https://api.github.com/users/hefvcjm/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hefvcjm/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hefvcjm/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hefvcjm",
"user_view_type": "public"
} | [
{
"color": "777777",
"default": false,
"description": null,
"id": 162780722,
"name": "Question/Not a bug",
"node_id": "MDU6TGFiZWwxNjI3ODA3MjI=",
"url": "https://api.github.com/repos/psf/requests/labels/Question/Not%20a%20bug"
}
] | closed | true | null | [] | null | 1 | 2021-03-08T03:53:53Z | 2021-08-27T00:08:30Z | 2021-03-08T16:26:46Z | NONE | resolved | https://github.com/psf/requests/blob/913880c45a3a8c3bf6b298e9c38709cd95a9c97c/requests/models.py#L110-L118
Anotation for this function mentions "The tuples may be 2-tuples (filename, fileobj), 3-tuples (filename, fileobj, contentype) or 4-tuples (filename, fileobj, contentype, custom_headers).", but it does not work for 3 or 4 elements tuple.
It will throw exception in following line
https://github.com/psf/requests/blob/913880c45a3a8c3bf6b298e9c38709cd95a9c97c/requests/models.py#L141
My test code:
```python
import requests
with open("file.txt", "r") as f:
requests.get("http://www.example.com", files=[("file.txt", f, "multipart/form-data")])
```
And exception:
```
...
...
for (k, v) in files:
ValueError: too many values to unpack
```
would you comfire which one, the anotation or the code, is right? 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/5768/reactions"
} | https://api.github.com/repos/psf/requests/issues/5768/timeline | null | completed | null | null | false | [
"That is not the documentation or annotation you should be reading for that parameter. Please read the appropriate documentation"
] |
https://api.github.com/repos/psf/requests/issues/5767 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5767/labels{/name} | https://api.github.com/repos/psf/requests/issues/5767/comments | https://api.github.com/repos/psf/requests/issues/5767/events | https://github.com/psf/requests/issues/5767 | 822,998,883 | MDU6SXNzdWU4MjI5OTg4ODM= | 5,767 | Invalid JSON serialization of data with NaNs when using `json` request argument | {
"avatar_url": "https://avatars.githubusercontent.com/u/44946?v=4",
"events_url": "https://api.github.com/users/soxofaan/events{/privacy}",
"followers_url": "https://api.github.com/users/soxofaan/followers",
"following_url": "https://api.github.com/users/soxofaan/following{/other_user}",
"gists_url": "https://api.github.com/users/soxofaan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/soxofaan",
"id": 44946,
"login": "soxofaan",
"node_id": "MDQ6VXNlcjQ0OTQ2",
"organizations_url": "https://api.github.com/users/soxofaan/orgs",
"received_events_url": "https://api.github.com/users/soxofaan/received_events",
"repos_url": "https://api.github.com/users/soxofaan/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/soxofaan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/soxofaan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/soxofaan",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2021-03-05T11:28:28Z | 2021-08-27T00:08:23Z | 2021-05-06T18:18:58Z | NONE | resolved | When passing data to `json` argument in a `requests.post()` (or comparable) request and data contains "nan" floats (`float("nan")`), the data payload will be invalid JSON (in strict sense). Example:
>>> import requests
>>> requests.__version__
'2.25.1'
>>> data = {"foo": float("nan")}
>>> resp = requests.post("https://httpbin.org/post", json=data)
>>> resp.json()["data"]
'{"foo": NaN}'
While the `NaN` in this result (the JSON serialized data payload that is sent) is valid JavaScript, it is not valid JSON.
The reason is that stdlib's `json.dumps` has `allow_nan` option which is `True` by default and consequently generates invalid JSON by default:
>>> json.dumps(data)
'{"foo": NaN}'
## Expected Result
A ValueError should be raised (at least by default). E.g.:
>>> json.dumps(data, allow_nan=False)
...
ValueError: Out of range float values are not JSON compliant
## Actual Result
library silently sends invalid JSON
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 2,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 2,
"url": "https://api.github.com/repos/psf/requests/issues/5767/reactions"
} | https://api.github.com/repos/psf/requests/issues/5767/timeline | null | completed | null | null | false | [
"I am a first-time contributor and I would like to work on this issue and implement it if possible? Do let me know. Thank you!\r\n",
"Hello, I am not sure if I have fixed this with the PR #5810 , can someone check it out ?"
] |
https://api.github.com/repos/psf/requests/issues/5766 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5766/labels{/name} | https://api.github.com/repos/psf/requests/issues/5766/comments | https://api.github.com/repos/psf/requests/issues/5766/events | https://github.com/psf/requests/issues/5766 | 821,104,641 | MDU6SXNzdWU4MjExMDQ2NDE= | 5,766 | Randomly returning TypeError from AWS Lambda | {
"avatar_url": "https://avatars.githubusercontent.com/u/26573544?v=4",
"events_url": "https://api.github.com/users/mickog/events{/privacy}",
"followers_url": "https://api.github.com/users/mickog/followers",
"following_url": "https://api.github.com/users/mickog/following{/other_user}",
"gists_url": "https://api.github.com/users/mickog/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mickog",
"id": 26573544,
"login": "mickog",
"node_id": "MDQ6VXNlcjI2NTczNTQ0",
"organizations_url": "https://api.github.com/users/mickog/orgs",
"received_events_url": "https://api.github.com/users/mickog/received_events",
"repos_url": "https://api.github.com/users/mickog/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mickog/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mickog/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mickog",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2021-03-03T13:21:46Z | 2021-08-27T00:08:32Z | 2021-03-04T13:13:53Z | NONE | resolved | Hi trying to pull a file from S3 and ingest to a multipart post endpoint on another service, code looks something like this
```
def execute(event, context):
if "emailId" in event:
props = {
"fieldOne": "someValue",
"fieldTwo": "someOtherValue",
"contentType": "eml"
}
props = json.dumps(props)
file = download_s3_file_to_tmp(event["emailId"])
multipart_request(props, file, event["emailId"])
def download_s3_file_to_tmp(message_id):
s3_key = "".join([_email_bucket_folder_name, "/", str(message_id), ".eml"])
s3_client = boto3.client("s3", _region)
s3_client.download_file(_my_bucket, s3_key, "/tmp/"+str(message_id)+".eml")
downloaded_eml_file = open("/tmp/"+str(message_id)+".eml", 'rb')
return downloaded_eml_file
def multipart_request(props, file_content, message_id):
my_id = decrypt_edm_secrets(_encrypted_id)
secret = decrypt_edm_secrets(_encrypted_secret)
url = f"{_url}/...."
payload = {"props": props}
files = [{"fileContent", file_content}]
tmp_file_path = "/tmp/"+message_id+".eml"
if os.path.exists(tmp_file_path):
os.remove(tmp_file_path)
print("Removed the file %s" % tmp_file_path)
else:
print("File %s does not exist." % tmp_file_path)
LOGGER.info(f"payload: {payload}")
resp = requests.post(url,data=payload,files=files,auth=requests.auth.HTTPBasicAuth(my_id, secret))
LOGGER.info(f"Request Headers: {resp.request.headers}")
return resp.status_code, resp.text, filenote_id
```
The problem is(when testing with the same file from the S3 bucket so should be no inconsistencies there) that intermittently I am getting the error below, sometimes however there is no issues I am receiving 200 response.
```
{
"errorMessage": "expected string or bytes-like object",
"errorType": "TypeError",
"stackTrace": [
" File \"/var/task/my_lambda.py\", line 42, in execute\n multipart_request(props, file, event["emailId"])\n",
" File \"/var/task/mime_retrieval_parser.py\", line 75, in multipart_request\n resp = requests.post(url,data=payload,files=files,auth=requests.auth.HTTPBasicAuth(edm_id, edm_secret))\n",
" File \"/opt/python/requests/api.py\", line 119, in post\n return request('post', url, data=data, json=json, **kwargs)\n",
" File \"/opt/python/requests/api.py\", line 61, in request\n return session.request(method=method, url=url, **kwargs)\n",
" File \"/opt/python/requests/sessions.py\", line 516, in request\n prep = self.prepare_request(req)\n",
" File \"/opt/python/requests/sessions.py\", line 449, in prepare_request\n p.prepare(\n",
" File \"/opt/python/requests/models.py\", line 317, in prepare\n self.prepare_body(data, files, json)\n",
" File \"/opt/python/requests/models.py\", line 505, in prepare_body\n (body, content_type) = self._encode_files(files, data)\n",
" File \"/opt/python/requests/models.py\", line 166, in _encode_files\n rf.make_multipart(content_type=ft)\n",
" File \"/opt/python/urllib3/fields.py\", line 267, in make_multipart\n self._render_parts(\n",
" File \"/opt/python/urllib3/fields.py\", line 225, in _render_parts\n parts.append(self._render_part(name, value))\n",
" File \"/opt/python/urllib3/fields.py\", line 205, in _render_part\n return self.header_formatter(name, value)\n",
" File \"/opt/python/urllib3/fields.py\", line 116, in format_header_param_html5\n value = _replace_multiple(value, _HTML5_REPLACEMENTS)\n",
" File \"/opt/python/urllib3/fields.py\", line 89, in _replace_multiple\n result = pattern.sub(replacer, value)\n"
]
}
```
Is this some sort of bug or is there any other explanation, not sure where to look now. | {
"avatar_url": "https://avatars.githubusercontent.com/u/26573544?v=4",
"events_url": "https://api.github.com/users/mickog/events{/privacy}",
"followers_url": "https://api.github.com/users/mickog/followers",
"following_url": "https://api.github.com/users/mickog/following{/other_user}",
"gists_url": "https://api.github.com/users/mickog/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mickog",
"id": 26573544,
"login": "mickog",
"node_id": "MDQ6VXNlcjI2NTczNTQ0",
"organizations_url": "https://api.github.com/users/mickog/orgs",
"received_events_url": "https://api.github.com/users/mickog/received_events",
"repos_url": "https://api.github.com/users/mickog/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mickog/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mickog/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mickog",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5766/reactions"
} | https://api.github.com/repos/psf/requests/issues/5766/timeline | null | completed | null | null | false | [
"You're passing in something in either `data` or `files` that isn't a string or bytes-like object. This isn't a bug in Requests. It sounds like your external dependencies are perhaps causing this problem for you (i.e., downloading a file from S3 to re-upload elsewhere could be failing",
"Yes correct, thanks for y... |
https://api.github.com/repos/psf/requests/issues/5765 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5765/labels{/name} | https://api.github.com/repos/psf/requests/issues/5765/comments | https://api.github.com/repos/psf/requests/issues/5765/events | https://github.com/psf/requests/issues/5765 | 819,832,321 | MDU6SXNzdWU4MTk4MzIzMjE= | 5,765 | Shortcut to set auth header | {
"avatar_url": "https://avatars.githubusercontent.com/u/2218936?v=4",
"events_url": "https://api.github.com/users/OlafvdSpek/events{/privacy}",
"followers_url": "https://api.github.com/users/OlafvdSpek/followers",
"following_url": "https://api.github.com/users/OlafvdSpek/following{/other_user}",
"gists_url": "https://api.github.com/users/OlafvdSpek/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/OlafvdSpek",
"id": 2218936,
"login": "OlafvdSpek",
"node_id": "MDQ6VXNlcjIyMTg5MzY=",
"organizations_url": "https://api.github.com/users/OlafvdSpek/orgs",
"received_events_url": "https://api.github.com/users/OlafvdSpek/received_events",
"repos_url": "https://api.github.com/users/OlafvdSpek/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/OlafvdSpek/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/OlafvdSpek/subscriptions",
"type": "User",
"url": "https://api.github.com/users/OlafvdSpek",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2021-03-02T09:35:08Z | 2021-08-27T00:08:33Z | 2021-03-03T19:52:11Z | NONE | resolved | > Requests is not accepting feature requests at this time.
Hmm ;)
AFAIK the simplest way is currently `headers={'Authorization': 'super secret'}`
Could `auth='super secret'` be supported?
| {
"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/5765/reactions"
} | https://api.github.com/repos/psf/requests/issues/5765/timeline | null | completed | null | null | false | [
"No"
] |
https://api.github.com/repos/psf/requests/issues/5764 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5764/labels{/name} | https://api.github.com/repos/psf/requests/issues/5764/comments | https://api.github.com/repos/psf/requests/issues/5764/events | https://github.com/psf/requests/issues/5764 | 819,549,775 | MDU6SXNzdWU4MTk1NDk3NzU= | 5,764 | Would anyone know why using requests with proxies through repl.it would cause this SSLError? | {
"avatar_url": "https://avatars.githubusercontent.com/u/67934523?v=4",
"events_url": "https://api.github.com/users/jonathanlin0/events{/privacy}",
"followers_url": "https://api.github.com/users/jonathanlin0/followers",
"following_url": "https://api.github.com/users/jonathanlin0/following{/other_user}",
"gists_url": "https://api.github.com/users/jonathanlin0/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jonathanlin0",
"id": 67934523,
"login": "jonathanlin0",
"node_id": "MDQ6VXNlcjY3OTM0NTIz",
"organizations_url": "https://api.github.com/users/jonathanlin0/orgs",
"received_events_url": "https://api.github.com/users/jonathanlin0/received_events",
"repos_url": "https://api.github.com/users/jonathanlin0/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jonathanlin0/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jonathanlin0/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jonathanlin0",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2021-03-02T02:48:15Z | 2021-08-27T00:08:31Z | 2021-03-04T14:47:53Z | NONE | resolved | As the title stated, I'm attempting to ping google to check the quality of the proxy through an api in repl.it but when I try it gives this error:
HTTPSConnectionPool(host='www.google.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1125)')))

| {
"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/5764/reactions"
} | https://api.github.com/repos/psf/requests/issues/5764/timeline | null | completed | null | null | false | [
"This isn't a Q&A forum and is likely best asked to someone familiar with `repl.it`."
] |
https://api.github.com/repos/psf/requests/issues/5763 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5763/labels{/name} | https://api.github.com/repos/psf/requests/issues/5763/comments | https://api.github.com/repos/psf/requests/issues/5763/events | https://github.com/psf/requests/issues/5763 | 819,363,841 | MDU6SXNzdWU4MTkzNjM4NDE= | 5,763 | raise InvalidSchema("No connection adapters were found for {!r}".format(url)) requests.exceptions.InvalidSchema: No connection adapters were found for '/v1/models/flower-classification:predict' | {
"avatar_url": "https://avatars.githubusercontent.com/u/20457308?v=4",
"events_url": "https://api.github.com/users/Adesoji1/events{/privacy}",
"followers_url": "https://api.github.com/users/Adesoji1/followers",
"following_url": "https://api.github.com/users/Adesoji1/following{/other_user}",
"gists_url": "https://api.github.com/users/Adesoji1/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Adesoji1",
"id": 20457308,
"login": "Adesoji1",
"node_id": "MDQ6VXNlcjIwNDU3MzA4",
"organizations_url": "https://api.github.com/users/Adesoji1/orgs",
"received_events_url": "https://api.github.com/users/Adesoji1/received_events",
"repos_url": "https://api.github.com/users/Adesoji1/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Adesoji1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Adesoji1/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Adesoji1",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2021-03-01T22:35:47Z | 2021-08-27T00:08:32Z | 2021-03-04T01:34:51Z | NONE | resolved | Summa have this issue too. below is the code.
import os
import json
import io
import requests
import numpy as np
import tensorflow as tf
from PIL import Image
import matplotlib.pyplot as plt
import PIL
ASSETS_DIR = r"C:\Users\Sortol\Documents\adesoji-fastapi\assets"
TEST_IMAGES_DIR = r"C:\Users\Sortol\Documents\adesoji-fastapi\images"
classes = json.load(open(os.path.join(ASSETS_DIR,'categories.json')))
classes = {v:k for k,v in classes.items()}
URL = "/v1/models/flower-classification:predict"
def read_img_file(file) -> Image.Image:
img = Image.open(io.BytesIO(file))
if img.mode == "RGBA":
img = img.convert("RGB")
img = img.resize((224,224), Image.ANTIALIAS)
img = tf.expand_dims(np.asarray(img)/255, 0)
return img
def load_img(img_path, show:bool=False):
img_path = random.choice(glob.glob(f"{DATASET_DIR}/test/{cls}/*.jpg"))
img = PIL.Image.open(img_path)
img = img.resize((224,224), PIL.Image.ANTIALIAS)
if show:
plt.imshow(img)
plt.title('cls')
img = tf.expand_dims(np.asarray(img)/255, 0)
return img
def predict(img):
headers = {
"content-type" : "application/json"
}
data = json.dumps({
"signature_name": "serving_default", "instances": img.numpy().tolist()
})
response = requests.post(URL, data=data, headers=headers)
response_data = json.loads(response.text)['predictions'][0]
confidence = np.max(response_data)
predicted_class = classes[np.argmax(response_data)]
return response_data,confidence,predicted_class
now i get this error below
C:\Users\Sortol\Documents\adesoji-fastapi\app>uvicorn main:app
2021-03-01 23:18:10.330558: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
INFO: Started server process [6912]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: 127.0.0.1:54121 - "GET / HTTP/1.1" 404 Not Found
INFO: 127.0.0.1:54129 - "GET /docs HTTP/1.1" 200 OK
INFO: 127.0.0.1:54129 - "GET /openapi.json HTTP/1.1" 200 OK
2021-03-01 23:18:39.587847: I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set
2021-03-01 23:18:39.596337: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library nvcuda.dll
2021-03-01 23:18:39.686352: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1720] Found device 0 with properties:
pciBusID: 0000:03:00.0 name: GeForce 840M computeCapability: 5.0
coreClock: 1.124GHz coreCount: 3 deviceMemorySize: 2.00GiB deviceMemoryBandwidth: 13.41GiB/s
2021-03-01 23:18:39.687791: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
2021-03-01 23:18:39.782907: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cublas64_11.dll
2021-03-01 23:18:39.783942: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cublasLt64_11.dll
2021-03-01 23:18:39.832809: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cufft64_10.dll
2021-03-01 23:18:39.844951: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library curand64_10.dll
2021-03-01 23:18:39.939685: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cusolver64_10.dll
2021-03-01 23:18:39.961540: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cusparse64_11.dll
2021-03-01 23:18:39.965590: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudnn64_8.dll
2021-03-01 23:18:39.966611: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1862] Adding visible gpu devices: 0
2021-03-01 23:18:39.981739: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2021-03-01 23:18:39.985255: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1720] Found device 0 with properties:
pciBusID: 0000:03:00.0 name: GeForce 840M computeCapability: 5.0
coreClock: 1.124GHz coreCount: 3 deviceMemorySize: 2.00GiB deviceMemoryBandwidth: 13.41GiB/s
2021-03-01 23:18:39.987565: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
2021-03-01 23:18:39.988770: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cublas64_11.dll
2021-03-01 23:18:39.989115: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cublasLt64_11.dll
2021-03-01 23:18:39.989445: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cufft64_10.dll
2021-03-01 23:18:39.989775: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library curand64_10.dll
2021-03-01 23:18:39.991063: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cusolver64_10.dll
2021-03-01 23:18:39.991441: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cusparse64_11.dll
2021-03-01 23:18:39.991842: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudnn64_8.dll
2021-03-01 23:18:39.993129: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1862] Adding visible gpu devices: 0
2021-03-01 23:18:43.086253: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1261] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-03-01 23:18:43.088620: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1267] 0
2021-03-01 23:18:43.089128: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1280] 0: N
2021-03-01 23:18:43.107867: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1406] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with
1369 MB memory) -> physical GPU (device: 0, name: GeForce 840M, pci bus id: 0000:03:00.0, compute capability: 5.0)
2021-03-01 23:18:43.156687: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set
tf.Tensor(
[[[[0.64705882 0.65490196 0.48627451]
[0.58823529 0.60392157 0.46666667]
[0.54117647 0.56078431 0.42352941]
...
[0.35686275 0.52941176 0.32941176]
[0.20392157 0.34509804 0.23529412]
[0.13333333 0.25882353 0.14117647]]
[[0.6627451 0.69411765 0.51372549]
[0.58431373 0.60784314 0.4627451 ]
[0.50588235 0.50980392 0.4 ]
...
[0.39607843 0.55294118 0.36470588]
[0.15294118 0.29411765 0.18431373]
[0.05098039 0.18823529 0.06666667]]
[[0.61960784 0.64313725 0.50196078]
[0.63921569 0.62745098 0.52156863]
[0.57254902 0.51764706 0.47843137]
...
[0.38039216 0.52156863 0.36862745]
[0.16862745 0.30980392 0.21568627]
[0.0745098 0.21960784 0.09411765]]
...
[[0.32941176 0.48627451 0.33333333]
[0.32941176 0.48627451 0.3254902 ]
[0.31764706 0.50196078 0.32156863]
...
[0.57254902 0.68235294 0.66666667]
[0.23529412 0.34509804 0.36078431]
[0.20784314 0.3254902 0.29411765]]
[[0.36078431 0.48235294 0.3372549 ]
[0.35686275 0.49019608 0.32941176]
[0.34117647 0.52156863 0.3372549 ]
...
[0.53333333 0.67058824 0.63137255]
[0.22745098 0.36078431 0.37254902]
[0.27843137 0.40392157 0.37647059]]
[[0.34509804 0.4745098 0.32941176]
[0.34117647 0.49019608 0.32156863]
[0.33333333 0.52156863 0.3254902 ]
...
[0.51764706 0.67843137 0.61568627]
[0.25098039 0.40392157 0.40784314]
[0.22352941 0.37647059 0.33333333]]]], shape=(1, 224, 224, 3), dtype=float64)
INFO: 127.0.0.1:54141 - "POST /predict HTTP/1.1" 500 Internal Server Error
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "c:\users\sortol\anaconda3\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 396, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "c:\users\sortol\anaconda3\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 45, in call
return await self.app(scope, receive, send)
File "c:\users\sortol\anaconda3\lib\site-packages\fastapi\applications.py", line 199, in call
await super().call(scope, receive, send)
File "c:\users\sortol\anaconda3\lib\site-packages\starlette\applications.py", line 111, in call
await self.middleware_stack(scope, receive, send)
File "c:\users\sortol\anaconda3\lib\site-packages\starlette\middleware\errors.py", line 181, in call
raise exc from None
File "c:\users\sortol\anaconda3\lib\site-packages\starlette\middleware\errors.py", line 159, in call
await self.app(scope, receive, _send)
File "c:\users\sortol\anaconda3\lib\site-packages\starlette\exceptions.py", line 82, in call
raise exc from None
File "c:\users\sortol\anaconda3\lib\site-packages\starlette\exceptions.py", line 71, in call
await self.app(scope, receive, sender)
File "c:\users\sortol\anaconda3\lib\site-packages\starlette\routing.py", line 566, in call
await route.handle(scope, receive, send)
File "c:\users\sortol\anaconda3\lib\site-packages\starlette\routing.py", line 227, in handle
await self.app(scope, receive, send)
File "c:\users\sortol\anaconda3\lib\site-packages\starlette\routing.py", line 41, in app
response = await func(request)
File "c:\users\sortol\anaconda3\lib\site-packages\fastapi\routing.py", line 201, in app
raw_response = await run_endpoint_function(
File "c:\users\sortol\anaconda3\lib\site-packages\fastapi\routing.py", line 148, in run_endpoint_function
return await dependant.call(**values)
File ".\main.py", line 21, in predict_image
predictions = predict(flower_img)
File ".\helpers.py", line 46, in predict
response = requests.post(URL, data=data, headers=headers)
File "c:\users\sortol\anaconda3\lib\site-packages\requests\api.py", line 119, in post
return request('post', url, data=data, json=json, **kwargs)
File "c:\users\sortol\anaconda3\lib\site-packages\requests\api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "c:\users\sortol\anaconda3\lib\site-packages\requests\sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "c:\users\sortol\anaconda3\lib\site-packages\requests\sessions.py", line 637, in send
adapter = self.get_adapter(url=request.url)
File "c:\users\sortol\anaconda3\lib\site-packages\requests\sessions.py", line 730, in get_adapter
raise InvalidSchema("No connection adapters were found for {!r}".format(url))
requests.exceptions.InvalidSchema: No connection adapters were found for '/v1/models/flower-classification:predict'ry.
## Expected Result
What you expected.
## Actual Result
What happened instead.
## Reproduction Steps
```python
import requests
```
## System Information
$ python -m requests.help
```
<paste here>
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
| {
"avatar_url": "https://avatars.githubusercontent.com/u/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/5763/reactions"
} | https://api.github.com/repos/psf/requests/issues/5763/timeline | null | completed | null | null | false | [
"You're specifying the path without a scheme or host. This is not a bug and even if it were, you did not fill out the full issue template."
] |
https://api.github.com/repos/psf/requests/issues/5762 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5762/labels{/name} | https://api.github.com/repos/psf/requests/issues/5762/comments | https://api.github.com/repos/psf/requests/issues/5762/events | https://github.com/psf/requests/issues/5762 | 818,182,524 | MDU6SXNzdWU4MTgxODI1MjQ= | 5,762 | No Error is thrown when proxie url or key is wrong or the proxie is not reachable | {
"avatar_url": "https://avatars.githubusercontent.com/u/40398336?v=4",
"events_url": "https://api.github.com/users/DanielGermann/events{/privacy}",
"followers_url": "https://api.github.com/users/DanielGermann/followers",
"following_url": "https://api.github.com/users/DanielGermann/following{/other_user}",
"gists_url": "https://api.github.com/users/DanielGermann/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/DanielGermann",
"id": 40398336,
"login": "DanielGermann",
"node_id": "MDQ6VXNlcjQwMzk4MzM2",
"organizations_url": "https://api.github.com/users/DanielGermann/orgs",
"received_events_url": "https://api.github.com/users/DanielGermann/received_events",
"repos_url": "https://api.github.com/users/DanielGermann/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/DanielGermann/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/DanielGermann/subscriptions",
"type": "User",
"url": "https://api.github.com/users/DanielGermann",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2021-02-28T11:18:39Z | 2021-11-25T20:00:35Z | 2021-08-27T19:41:24Z | NONE | resolved | Summary.
## Expected Result
When I make a get request with
```proxies = {key: value}
request.get(url, proxies=proxies)
```
I would assume that an error is thrown if the key value pair is not correct or if the proxie connection was not possible.
So if i would write something like this
```{"i am a wonderfull key": "i am a wonderfull value"}```,
i think an error should be the output.
Also i think there should be an output if the proxie connection was not possible, so if the key: value pair is right but the proxie is not reachable.
## Actual Result
Nothing, the request just works fine you dont get an error message.
## Reproduction Steps
```python
import requests
proxies = {"i am a wonderfull key": "i am a wonderfull value"}
request.get(url=example.url, proxies=proxies)
```
```python
import requests
proxies = {"http": "unreachable proxie"}
request.get(url=example.url, proxies=proxies)
```
## System Information
```
{
"chardet": {
"version": "3.0.2"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.7.7"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.25.1"
},
"system_ssl": {
"version": "1010104f"
},
"urllib3": {
"version": "1.26.2"
},
"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/5762/reactions"
} | https://api.github.com/repos/psf/requests/issues/5762/timeline | null | completed | null | null | false | [
"Hi @Mettfisto,\r\n\r\nIt looks like you may have some confusion about how the proxies dict works in Requests.\r\n\r\n> I would assume that an error is thrown if the key value pair is not correct or if the proxie connection was not possible.\r\nSo if i would write something like this\r\n{\"i am a wonderfull key\": ... |
https://api.github.com/repos/psf/requests/issues/5761 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5761/labels{/name} | https://api.github.com/repos/psf/requests/issues/5761/comments | https://api.github.com/repos/psf/requests/issues/5761/events | https://github.com/psf/requests/pull/5761 | 815,678,173 | MDExOlB1bGxSZXF1ZXN0NTc5NDY4MDg5 | 5,761 | Fix typo | {
"avatar_url": "https://avatars.githubusercontent.com/u/1322614?v=4",
"events_url": "https://api.github.com/users/andrewmwhite/events{/privacy}",
"followers_url": "https://api.github.com/users/andrewmwhite/followers",
"following_url": "https://api.github.com/users/andrewmwhite/following{/other_user}",
"gists_url": "https://api.github.com/users/andrewmwhite/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/andrewmwhite",
"id": 1322614,
"login": "andrewmwhite",
"node_id": "MDQ6VXNlcjEzMjI2MTQ=",
"organizations_url": "https://api.github.com/users/andrewmwhite/orgs",
"received_events_url": "https://api.github.com/users/andrewmwhite/received_events",
"repos_url": "https://api.github.com/users/andrewmwhite/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/andrewmwhite/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/andrewmwhite/subscriptions",
"type": "User",
"url": "https://api.github.com/users/andrewmwhite",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2021-02-24T17:10:51Z | 2021-08-27T00:08:46Z | 2021-02-24T17:19:48Z | CONTRIBUTOR | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5761/reactions"
} | https://api.github.com/repos/psf/requests/issues/5761/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5761.diff",
"html_url": "https://github.com/psf/requests/pull/5761",
"merged_at": "2021-02-24T17:19:48Z",
"patch_url": "https://github.com/psf/requests/pull/5761.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5761"
} | true | [] | |
https://api.github.com/repos/psf/requests/issues/5760 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5760/labels{/name} | https://api.github.com/repos/psf/requests/issues/5760/comments | https://api.github.com/repos/psf/requests/issues/5760/events | https://github.com/psf/requests/issues/5760 | 814,659,995 | MDU6SXNzdWU4MTQ2NTk5OTU= | 5,760 | requests.get() timeout times out after twice the given value | {
"avatar_url": "https://avatars.githubusercontent.com/u/1658405?v=4",
"events_url": "https://api.github.com/users/LefterisJP/events{/privacy}",
"followers_url": "https://api.github.com/users/LefterisJP/followers",
"following_url": "https://api.github.com/users/LefterisJP/following{/other_user}",
"gists_url": "https://api.github.com/users/LefterisJP/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/LefterisJP",
"id": 1658405,
"login": "LefterisJP",
"node_id": "MDQ6VXNlcjE2NTg0MDU=",
"organizations_url": "https://api.github.com/users/LefterisJP/orgs",
"received_events_url": "https://api.github.com/users/LefterisJP/received_events",
"repos_url": "https://api.github.com/users/LefterisJP/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/LefterisJP/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/LefterisJP/subscriptions",
"type": "User",
"url": "https://api.github.com/users/LefterisJP",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2021-02-23T17:11:57Z | 2021-03-15T11:56:17Z | 2021-02-24T15:47:00Z | NONE | null | I made a simple example script to showcase what I experienced
```python
import requests
import time
print('About to do a request that will timeout')
start_time = int(time.time())
try:
response = requests.get('http://www.google.com:81/', timeout=4)
except requests.exceptions.RequestException as e:
print(f'Exception: {str(e)}')
elapsed_secs = int(time.time()) - start_time
print(f'After request that should timeout. Elapsed seconds: {elapsed_secs}')
```
## Expected Result
I expected this to timeout after 4 seconds and per the given timeout.
## Actual Result
What happens instead is that the timeout exception is raised after 2x the given timeout argument.
```
About to do a request that will timeout
Exception: HTTPConnectionPool(host='www.google.com', port=81): Max retries exceeded with url: / (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f204f680550>, 'Connection to www.google.com timed out. (connect timeout=4)'))
After request that should timeout. Elapsed seconds: 8
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "4.0.0"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.7.9"
},
"platform": {
"release": "5.10.16-arch1-1",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.25.1"
},
"system_ssl": {
"version": "101010af"
},
"urllib3": {
"version": "1.26.3"
},
"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/5760/reactions"
} | https://api.github.com/repos/psf/requests/issues/5760/timeline | null | completed | null | null | false | [
"In the future, please search **closed and** open issues before creating new ones that are duplicates.",
"Hello @sigmavirus24 thank you for your response.\r\n\r\nI did do that but could not find one. I can of course only judge by the issue's title and what github search can afford to show me.\r\n\r\n Can you plea... |
https://api.github.com/repos/psf/requests/issues/5759 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5759/labels{/name} | https://api.github.com/repos/psf/requests/issues/5759/comments | https://api.github.com/repos/psf/requests/issues/5759/events | https://github.com/psf/requests/issues/5759 | 812,697,135 | MDU6SXNzdWU4MTI2OTcxMzU= | 5,759 | Upper version limits in dependencies | {
"avatar_url": "https://avatars.githubusercontent.com/u/233340?v=4",
"events_url": "https://api.github.com/users/oberstet/events{/privacy}",
"followers_url": "https://api.github.com/users/oberstet/followers",
"following_url": "https://api.github.com/users/oberstet/following{/other_user}",
"gists_url": "https://api.github.com/users/oberstet/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/oberstet",
"id": 233340,
"login": "oberstet",
"node_id": "MDQ6VXNlcjIzMzM0MA==",
"organizations_url": "https://api.github.com/users/oberstet/orgs",
"received_events_url": "https://api.github.com/users/oberstet/received_events",
"repos_url": "https://api.github.com/users/oberstet/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/oberstet/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/oberstet/subscriptions",
"type": "User",
"url": "https://api.github.com/users/oberstet",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 15 | 2021-02-20T20:08:34Z | 2021-11-25T20:00:36Z | 2021-08-27T19:32:59Z | NONE | resolved | **requests** [currently](https://github.com/psf/requests/blob/bdc00eb0978dd3cdd43f7cd1f95ced7aa75fab39/setup.py#L44) has a bunch of version restrictions:
* `chardet>=3.0.2,<5`
* `idna>=2.5,<3`
* `urllib3>=1.21.1,<1.27`
In particular with **idna** and **urllib3**, which are widely used themself, whenever another package triggers installation of an open-ended version of these libraries, a subsequent install of **requests** then will lead to warnings or errors the like
```
requests 2.25.1 requires idna<3,>=2.5, but you'll have idna 3.1 which is incompatible.
```
Are there actual reasons to limit the upper versions? Could these be lifted?
> Putting version upper limits into widely used libraries leads to major headaches for downstream project. Even when following a dedicated-venv-per-app model, if that app has multiple dependencies that in turn depend on above, this is tricky to fix (order dependency, finding an intersecting version in the first place, ..). fwiw, I've spent countless hours on fixing fallout from such scenarios ... | {
"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/5759/reactions"
} | https://api.github.com/repos/psf/requests/issues/5759/timeline | null | completed | null | null | false | [
"Seems related to https://github.com/psf/requests/issues/5710, in that case the reasoning for version limits is that version 3.x of idna doesn't support python2.x anymore which leads to why it's proposed fix in https://github.com/psf/requests/pull/5711 has version markers with the upper limit being different for py... |
https://api.github.com/repos/psf/requests/issues/5758 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5758/labels{/name} | https://api.github.com/repos/psf/requests/issues/5758/comments | https://api.github.com/repos/psf/requests/issues/5758/events | https://github.com/psf/requests/pull/5758 | 812,581,232 | MDExOlB1bGxSZXF1ZXN0NTc2OTE1NzU1 | 5,758 | Catch urllib3 LocationParseError on send(), raise InvalidURL instead | {
"avatar_url": "https://avatars.githubusercontent.com/u/33416700?v=4",
"events_url": "https://api.github.com/users/cknabs/events{/privacy}",
"followers_url": "https://api.github.com/users/cknabs/followers",
"following_url": "https://api.github.com/users/cknabs/following{/other_user}",
"gists_url": "https://api.github.com/users/cknabs/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cknabs",
"id": 33416700,
"login": "cknabs",
"node_id": "MDQ6VXNlcjMzNDE2NzAw",
"organizations_url": "https://api.github.com/users/cknabs/orgs",
"received_events_url": "https://api.github.com/users/cknabs/received_events",
"repos_url": "https://api.github.com/users/cknabs/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cknabs/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cknabs/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cknabs",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2021-02-20T11:03:52Z | 2024-07-30T00:03:44Z | 2023-07-30T02:00:07Z | NONE | resolved | Fixes #5744 | {
"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/5758/reactions"
} | https://api.github.com/repos/psf/requests/issues/5758/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5758.diff",
"html_url": "https://github.com/psf/requests/pull/5758",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5758.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5758"
} | true | [
"@cknabs the tests are failing. Did you struggle to understand why? Can you please fix them?",
"Resolving as this hasn't seen an update in quite some time and appears to have stalled out waiting for review comments to be addressed."
] |
https://api.github.com/repos/psf/requests/issues/5757 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5757/labels{/name} | https://api.github.com/repos/psf/requests/issues/5757/comments | https://api.github.com/repos/psf/requests/issues/5757/events | https://github.com/psf/requests/issues/5757 | 811,072,041 | MDU6SXNzdWU4MTEwNzIwNDE= | 5,757 | Add support for HTTP/2 | {
"avatar_url": "https://avatars.githubusercontent.com/u/8332263?v=4",
"events_url": "https://api.github.com/users/Apteryks/events{/privacy}",
"followers_url": "https://api.github.com/users/Apteryks/followers",
"following_url": "https://api.github.com/users/Apteryks/following{/other_user}",
"gists_url": "https://api.github.com/users/Apteryks/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Apteryks",
"id": 8332263,
"login": "Apteryks",
"node_id": "MDQ6VXNlcjgzMzIyNjM=",
"organizations_url": "https://api.github.com/users/Apteryks/orgs",
"received_events_url": "https://api.github.com/users/Apteryks/received_events",
"repos_url": "https://api.github.com/users/Apteryks/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Apteryks/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Apteryks/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Apteryks",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2021-02-18T12:52:00Z | 2021-08-27T00:08:34Z | 2021-02-20T15:04:55Z | NONE | resolved | It is my understanding that HTTP/2 is not currently supported by requests; hence this is a feature request (no pun intended) to add such support. | {
"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/5757/reactions"
} | https://api.github.com/repos/psf/requests/issues/5757/timeline | null | completed | null | null | false | [
"Duplicate of #4604 and #5506\r\n\r\nRequests is in a feature-freeze and is unlikely to add HTTP/2 in the future"
] |
https://api.github.com/repos/psf/requests/issues/5756 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5756/labels{/name} | https://api.github.com/repos/psf/requests/issues/5756/comments | https://api.github.com/repos/psf/requests/issues/5756/events | https://github.com/psf/requests/issues/5756 | 810,699,615 | MDU6SXNzdWU4MTA2OTk2MTU= | 5,756 | Issue while issuing GET requests to Google owned services. | {
"avatar_url": "https://avatars.githubusercontent.com/u/43145883?v=4",
"events_url": "https://api.github.com/users/Lyfhael/events{/privacy}",
"followers_url": "https://api.github.com/users/Lyfhael/followers",
"following_url": "https://api.github.com/users/Lyfhael/following{/other_user}",
"gists_url": "https://api.github.com/users/Lyfhael/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lyfhael",
"id": 43145883,
"login": "Lyfhael",
"node_id": "MDQ6VXNlcjQzMTQ1ODgz",
"organizations_url": "https://api.github.com/users/Lyfhael/orgs",
"received_events_url": "https://api.github.com/users/Lyfhael/received_events",
"repos_url": "https://api.github.com/users/Lyfhael/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lyfhael/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lyfhael/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lyfhael",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2021-02-18T02:30:27Z | 2021-08-27T00:08:35Z | 2021-02-18T05:30:31Z | NONE | resolved | GET Requests to Google owned services don't work or work very very slowly(minutes). Example of urls having problems : Google.com Google.fr Youtube.fr Youtube.com Googleapis.com
I have no issue with any other website(I tried github.com, facebook.com and a bunch of others)
It worked an hour ago, it doesn't work anymore, I didn't change anything.
I can still access those urls fine on my browser.
## Expected Result
I expect to get a response, but the program seems to be loading(?) indefinitely
## Actual Result
It seems to be loading indefinitely. Rarely, I get a response, 99% of cases(Only 2 worked) it just doesn't do anything and the program doesn't stop or show anything
## Reproduction Steps
```python
import requests
a = requests.get("https://www.youtube.fr")
print(a)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.8.0"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.25.1"
},
"system_ssl": {
"version": "1010104f"
},
"urllib3": {
"version": "1.26.3"
},
"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/43145883?v=4",
"events_url": "https://api.github.com/users/Lyfhael/events{/privacy}",
"followers_url": "https://api.github.com/users/Lyfhael/followers",
"following_url": "https://api.github.com/users/Lyfhael/following{/other_user}",
"gists_url": "https://api.github.com/users/Lyfhael/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lyfhael",
"id": 43145883,
"login": "Lyfhael",
"node_id": "MDQ6VXNlcjQzMTQ1ODgz",
"organizations_url": "https://api.github.com/users/Lyfhael/orgs",
"received_events_url": "https://api.github.com/users/Lyfhael/received_events",
"repos_url": "https://api.github.com/users/Lyfhael/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lyfhael/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lyfhael/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lyfhael",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5756/reactions"
} | https://api.github.com/repos/psf/requests/issues/5756/timeline | null | completed | null | null | false | [
"It fixed by itself... Not sure what it was since no error messages. I haven't restarted my computer or done anything.\r\n"
] |
https://api.github.com/repos/psf/requests/issues/5755 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5755/labels{/name} | https://api.github.com/repos/psf/requests/issues/5755/comments | https://api.github.com/repos/psf/requests/issues/5755/events | https://github.com/psf/requests/pull/5755 | 810,524,175 | MDExOlB1bGxSZXF1ZXN0NTc1MjAxMzQ2 | 5,755 | Provide directions for cloning repository despite malformed commits | {
"avatar_url": "https://avatars.githubusercontent.com/u/31069?v=4",
"events_url": "https://api.github.com/users/pdmccormick/events{/privacy}",
"followers_url": "https://api.github.com/users/pdmccormick/followers",
"following_url": "https://api.github.com/users/pdmccormick/following{/other_user}",
"gists_url": "https://api.github.com/users/pdmccormick/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pdmccormick",
"id": 31069,
"login": "pdmccormick",
"node_id": "MDQ6VXNlcjMxMDY5",
"organizations_url": "https://api.github.com/users/pdmccormick/orgs",
"received_events_url": "https://api.github.com/users/pdmccormick/received_events",
"repos_url": "https://api.github.com/users/pdmccormick/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pdmccormick/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pdmccormick/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pdmccormick",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2021-02-17T20:44:27Z | 2021-08-27T00:08:47Z | 2021-02-17T21:37:02Z | CONTRIBUTOR | resolved | Issues #2690, #3008, #3088, #3805 #4254 all refer to the issue with commit 5e6ecdad9f69b1ff789a17733b8edc6fd7091bd8 that cause Git to error out when cloning the repository. As originally discussed in #2690, this issue cannot be avoided without rewriting history, so why don't we instead include some helpful directions at the bottom of the README? | {
"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/5755/reactions"
} | https://api.github.com/repos/psf/requests/issues/5755/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5755.diff",
"html_url": "https://github.com/psf/requests/pull/5755",
"merged_at": "2021-02-17T21:37:02Z",
"patch_url": "https://github.com/psf/requests/pull/5755.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5755"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/5754 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5754/labels{/name} | https://api.github.com/repos/psf/requests/issues/5754/comments | https://api.github.com/repos/psf/requests/issues/5754/events | https://github.com/psf/requests/pull/5754 | 810,131,311 | MDExOlB1bGxSZXF1ZXN0NTc0ODcyMjg2 | 5,754 | Enhance RequestEncodingMixin._encode_params to support complex dict struct when content-type is x-www-form-urlencoded | {
"avatar_url": "https://avatars.githubusercontent.com/u/19822609?v=4",
"events_url": "https://api.github.com/users/zgj0607/events{/privacy}",
"followers_url": "https://api.github.com/users/zgj0607/followers",
"following_url": "https://api.github.com/users/zgj0607/following{/other_user}",
"gists_url": "https://api.github.com/users/zgj0607/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/zgj0607",
"id": 19822609,
"login": "zgj0607",
"node_id": "MDQ6VXNlcjE5ODIyNjA5",
"organizations_url": "https://api.github.com/users/zgj0607/orgs",
"received_events_url": "https://api.github.com/users/zgj0607/received_events",
"repos_url": "https://api.github.com/users/zgj0607/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/zgj0607/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zgj0607/subscriptions",
"type": "User",
"url": "https://api.github.com/users/zgj0607",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2021-02-17T12:14:50Z | 2021-08-27T00:08:47Z | 2021-02-17T15:27:59Z | NONE | resolved | Add an util's method in `utils.py` named `unfold_complex_data_key`, called by `RequestEncodingMixin._encode_params` to support complex dict struct when content-type is `x-www-form-urlencoded`.
The function unfold_complex_data_key just do the follow work:
Unfold complex dict which has deep level key or list to simple list[tuple]
when requests.post()'s pemeter data is
`{ "id": "857-37-9333", "label": "User", "count": 0, "properties": { "name": "Rich Hintz", "city": "New Edythstad", "gender": "male", "age": 24, "profile": [ "Zondy", "ZTESoft", "YunWen", "Ci123" ] } }`
encoding the date to follow format:
`[('id','857-37-9333'), ('label','User'), ('count',0), ('properties[name]','Rich Hintz'), ('properties[city]','New Edythstad') ('properties[gender]','male'), ('properties[age]',24), ('properties[profile][0]','Zondy'), ('properties[profile][1]','ZTESoft'), ('properties[profile][2]','YunWen'), ('properties[profile][3]','Ci123')]` | {
"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/5754/reactions"
} | https://api.github.com/repos/psf/requests/issues/5754/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5754.diff",
"html_url": "https://github.com/psf/requests/pull/5754",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5754.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5754"
} | true | [
"There's already a way to do this in the requests-toolbelt and this feature has been rejected before in this project"
] |
https://api.github.com/repos/psf/requests/issues/5753 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5753/labels{/name} | https://api.github.com/repos/psf/requests/issues/5753/comments | https://api.github.com/repos/psf/requests/issues/5753/events | https://github.com/psf/requests/pull/5753 | 810,079,203 | MDExOlB1bGxSZXF1ZXN0NTc0ODI4Mzcz | 5,753 | enhance RequestEncodingMixin._encode_params to support complex dict struct when content-type is x-www-form-urlencoded | {
"avatar_url": "https://avatars.githubusercontent.com/u/19822609?v=4",
"events_url": "https://api.github.com/users/zgj0607/events{/privacy}",
"followers_url": "https://api.github.com/users/zgj0607/followers",
"following_url": "https://api.github.com/users/zgj0607/following{/other_user}",
"gists_url": "https://api.github.com/users/zgj0607/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/zgj0607",
"id": 19822609,
"login": "zgj0607",
"node_id": "MDQ6VXNlcjE5ODIyNjA5",
"organizations_url": "https://api.github.com/users/zgj0607/orgs",
"received_events_url": "https://api.github.com/users/zgj0607/received_events",
"repos_url": "https://api.github.com/users/zgj0607/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/zgj0607/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zgj0607/subscriptions",
"type": "User",
"url": "https://api.github.com/users/zgj0607",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2021-02-17T11:00:41Z | 2021-08-27T00:08:48Z | 2021-02-17T12:08:37Z | NONE | resolved | Add an util's method in `utils.py`, named `unfold_complex_data_key`, called by `RequestEncodingMixin._encode_params` to support complex dict struct when content-type is `x-www-form-urlencoded`.
The function unfold_complex_data_key just do the follow work:
Unfold complex dict which has deep level key or list to simple list[tuple]
when requests.post()'s pemeter data is
`
{
"id": "857-37-9333",
"label": "User",
"count": 0,
"properties": {
"name": "Rich Hintz",
"city": "New Edythstad",
"gender": "male",
"age": 24,
"profile": [
"Zondy",
"ZTESoft",
"YunWen",
"Ci123"
]
}
}
`
encoding the date to follow format:
`
[
('id','857-37-9333'),
('label','User'),
('count',0),
('properties[name]','Rich Hintz'),
('properties[city]','New Edythstad')
('properties[gender]','male'),
('properties[age]',24),
('properties[profile][0]','Zondy'),
('properties[profile][1]','ZTESoft'),
('properties[profile][2]','YunWen'),
('properties[profile][3]','Ci123'),
]
` | {
"avatar_url": "https://avatars.githubusercontent.com/u/19822609?v=4",
"events_url": "https://api.github.com/users/zgj0607/events{/privacy}",
"followers_url": "https://api.github.com/users/zgj0607/followers",
"following_url": "https://api.github.com/users/zgj0607/following{/other_user}",
"gists_url": "https://api.github.com/users/zgj0607/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/zgj0607",
"id": 19822609,
"login": "zgj0607",
"node_id": "MDQ6VXNlcjE5ODIyNjA5",
"organizations_url": "https://api.github.com/users/zgj0607/orgs",
"received_events_url": "https://api.github.com/users/zgj0607/received_events",
"repos_url": "https://api.github.com/users/zgj0607/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/zgj0607/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zgj0607/subscriptions",
"type": "User",
"url": "https://api.github.com/users/zgj0607",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5753/reactions"
} | https://api.github.com/repos/psf/requests/issues/5753/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5753.diff",
"html_url": "https://github.com/psf/requests/pull/5753",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5753.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5753"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/5752 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5752/labels{/name} | https://api.github.com/repos/psf/requests/issues/5752/comments | https://api.github.com/repos/psf/requests/issues/5752/events | https://github.com/psf/requests/issues/5752 | 808,811,531 | MDU6SXNzdWU4MDg4MTE1MzE= | 5,752 | Issue with verify options | {
"avatar_url": "https://avatars.githubusercontent.com/u/3485377?v=4",
"events_url": "https://api.github.com/users/kornpow/events{/privacy}",
"followers_url": "https://api.github.com/users/kornpow/followers",
"following_url": "https://api.github.com/users/kornpow/following{/other_user}",
"gists_url": "https://api.github.com/users/kornpow/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kornpow",
"id": 3485377,
"login": "kornpow",
"node_id": "MDQ6VXNlcjM0ODUzNzc=",
"organizations_url": "https://api.github.com/users/kornpow/orgs",
"received_events_url": "https://api.github.com/users/kornpow/received_events",
"repos_url": "https://api.github.com/users/kornpow/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kornpow/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kornpow/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kornpow",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2021-02-15T20:51:49Z | 2021-08-27T00:08:31Z | 2021-02-15T20:53:59Z | NONE | resolved | Since the verify parameter is designed with the certificate stored on the filesystem, I have had to do some workarounds in my application, since I am expecting certificates to be passed in using environment variables. While experimenting with these workarounds, I noticed some strange behaviors.
Main Issue:
* The docs claim that path/path-like objects are the intended use case, however, you are able to pass some things in that aren't path-like, and it is able to work.
* You should definitely be able to just pass in a certificate as a variable, why is this not supported?
Please read the _Reproduction Steps_ below, that is best way to understand the issue.
## Expected Result
When using the verify= parameter, I expect to be able to pass in these types of objects:
* string of path
* os.PathLike
Current Error Message, when passing in a wrong Type:
TypeError: stat: path should be string, bytes, os.PathLike or integer, not _io.StringIO
## Actual Result
Things passed in that could work:
* certificate in string form, however only when using .read() function
* path or pathlike of certificate
What happened instead.
## Reproduction Steps
```python
import requests
from io import StringIO
import os
import tempfile
## Get certificate stored in env variable
tls = os.getenv("TLS")
## Do some conversions of the certificate
# StringIO Form
f = StringIO(codecs.decode(tls, encoding="hex").decode())
# String Form
y = f.read()
# Tempfile Form
a = bytes.fromhex(tls)
fp = tempfile.NamedTemporaryFile()
fn = fp.name
fp.write(a)
fp.seek(0)
cert_path = fn
## Use the certificate in various ways:
requests.get("https://192.168.1.12:8080/v1/getinfo", headers=headers, verify=cert_path).json()
# Successful, most canonical way to do it
requests.get("https://192.168.1.12:8080/v1/getinfo", headers=headers, verify=f.read()).json()
# Successful, throws WARNING: InsecureRequestWarning: Unverified HTTPS request is being made to host '192.168.1.12'. # Adding certificate verification is strongly advised.
# Since it was successful, it seems the warning isn't valid, since an unverified HTTPS requests was not sent.
requests.get("https://192.168.1.12:8080/v1/getinfo", headers=headers, verify=y).json()
# Failure: OSError: Could not find a suitable TLS CA certificate bundle, invalid path: ...
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "3.2"
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.8.5"
},
"platform": {
"release": "5.8.0-7642-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010108f",
"version": "20.0.1"
},
"requests": {
"version": "2.25.0"
},
"system_ssl": {
"version": "1010106f"
},
"urllib3": {
"version": "1.25.10"
},
"using_pyopenssl": true
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
| {
"avatar_url": "https://avatars.githubusercontent.com/u/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/5752/reactions"
} | https://api.github.com/repos/psf/requests/issues/5752/timeline | null | completed | null | null | false | [
"In the future, please search **closed and** open issues before creating new ones that are duplicates.",
"While I have been fighting with the issue of \"Unable to pass in a variable to verify\" for years now, and from what I can tell there is no desire to change that behavior, I do believe this might be a new iss... |
https://api.github.com/repos/psf/requests/issues/5751 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5751/labels{/name} | https://api.github.com/repos/psf/requests/issues/5751/comments | https://api.github.com/repos/psf/requests/issues/5751/events | https://github.com/psf/requests/issues/5751 | 808,039,895 | MDU6SXNzdWU4MDgwMzk4OTU= | 5,751 | TLS SNI Support (Under Python 2.7.6) | {
"avatar_url": "https://avatars.githubusercontent.com/u/3859005?v=4",
"events_url": "https://api.github.com/users/Tectract/events{/privacy}",
"followers_url": "https://api.github.com/users/Tectract/followers",
"following_url": "https://api.github.com/users/Tectract/following{/other_user}",
"gists_url": "https://api.github.com/users/Tectract/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Tectract",
"id": 3859005,
"login": "Tectract",
"node_id": "MDQ6VXNlcjM4NTkwMDU=",
"organizations_url": "https://api.github.com/users/Tectract/orgs",
"received_events_url": "https://api.github.com/users/Tectract/received_events",
"repos_url": "https://api.github.com/users/Tectract/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Tectract/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Tectract/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Tectract",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 7 | 2021-02-14T20:25:23Z | 2021-11-26T14:00:18Z | 2021-08-28T02:51:19Z | NONE | resolved | Hello.
In reference to https://github.com/psf/requests/issues/749
I'm trying to get SNI support working on a system that is locked to Python2.7.6 / pip20.3.4.
I've tried 'pip install -U requests' and 'pip install -U requests[security]', but the issue is not resolved for me.
I'm getting this error when I try to connect to servers that support SNI:
[Errno 1] _ssl.c:510: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
Is there some way I can still backport SNI support into my Python2.7.6 / pip installation here? Could I just copy the SSL libs from a pip3 installation or something?
| {
"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/5751/reactions"
} | https://api.github.com/repos/psf/requests/issues/5751/timeline | null | completed | null | null | false | [
"Was the code from PR 749 reverted? I'm looking at the __init__.py from requests v2.25.1 and I don't see this:\r\n\r\n```\r\n# Attempt to enable urllib3's SNI support, if possible\r\ntry:\r\n from requests.packages.urllib3.contrib import pyopenssl\r\n pyopenssl.inject_into_urllib3()\r\nexcept ImportError:\r\n... |
https://api.github.com/repos/psf/requests/issues/5750 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5750/labels{/name} | https://api.github.com/repos/psf/requests/issues/5750/comments | https://api.github.com/repos/psf/requests/issues/5750/events | https://github.com/psf/requests/issues/5750 | 807,691,598 | MDU6SXNzdWU4MDc2OTE1OTg= | 5,750 | Post request using https proxies returning encoded text after update to python 3.9.1 | {
"avatar_url": "https://avatars.githubusercontent.com/u/30209138?v=4",
"events_url": "https://api.github.com/users/bloxploits/events{/privacy}",
"followers_url": "https://api.github.com/users/bloxploits/followers",
"following_url": "https://api.github.com/users/bloxploits/following{/other_user}",
"gists_url": "https://api.github.com/users/bloxploits/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bloxploits",
"id": 30209138,
"login": "bloxploits",
"node_id": "MDQ6VXNlcjMwMjA5MTM4",
"organizations_url": "https://api.github.com/users/bloxploits/orgs",
"received_events_url": "https://api.github.com/users/bloxploits/received_events",
"repos_url": "https://api.github.com/users/bloxploits/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bloxploits/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bloxploits/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bloxploits",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 8 | 2021-02-13T06:45:51Z | 2021-08-27T00:08:34Z | 2021-02-19T06:03:35Z | NONE | resolved | Summary.
I am making a request to a url with a proxy, however, after I updated from python 3.8.3 to 3.9.1, the response started to be encoded.
When I request this url without a proxy, there are no problems and it worked before with a proxy in 3.8.3. I don't know which of requests I used in 3.8.3, but I've seen a few open and closed issues about proxies in the new requests update.
I also tried using the latest version of urllib3 (1.2.6), and the requests just never got sent, I was stuck on an empty console screen so I was forced to use an older version of urllib that worked.
Expected result:
{
"fingerprint": "810034976510050356.i2OpgwJJalp3uKzcq7sakA10bMY"
}
Actual result:
! c�R������� � ��TX���p8��,��,�cO�L5��Lޙ�R��A�z���'��
Code example:
```python
import requests
session = requests.Session()
adapter = HTTPAdapter(max_retries=Retry(connect=15, backoff_factor=0.5))
session.mount("http://", adapter)
session.mount("https://", adapter)
proxy = "example:port"
proxy_dict = {"http": "http://" + proxy, "https": "http:s//" + proxy}
headers = {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-encoding": "gzip, deflate, br",
"accept-language": "en-US,en;q=0.9",
"cache-control": "no-cache",
"pragma": "no-cache",
"sec-fetch-dest": "document",
"sec-fetch-mode": "navigate",
"sec-fetch-site": "none",
"sec-fetch-user": "?1",
"upgrade-insecure-requests": "1",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Safari/537.36"
}
r = session.post("https://example.com/", headers=headers, proxies=proxy_dict)
print(r.text)
```
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.9.1"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.25.1"
},
"system_ssl": {
"version": "1010107f"
},
"urllib3": {
"version": "1.25.2"
},
"using_pyopenssl": false
}
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/30209138?v=4",
"events_url": "https://api.github.com/users/bloxploits/events{/privacy}",
"followers_url": "https://api.github.com/users/bloxploits/followers",
"following_url": "https://api.github.com/users/bloxploits/following{/other_user}",
"gists_url": "https://api.github.com/users/bloxploits/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bloxploits",
"id": 30209138,
"login": "bloxploits",
"node_id": "MDQ6VXNlcjMwMjA5MTM4",
"organizations_url": "https://api.github.com/users/bloxploits/orgs",
"received_events_url": "https://api.github.com/users/bloxploits/received_events",
"repos_url": "https://api.github.com/users/bloxploits/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bloxploits/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bloxploits/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bloxploits",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5750/reactions"
} | https://api.github.com/repos/psf/requests/issues/5750/timeline | null | completed | null | null | false | [
"What do the response headers look like? I have a suspicion as to what this is related to, but it likely is related to you having different versions of Requests, not different versions of Python.",
"> What do the response headers look like? I have a suspicion as to what this is related to, but it likely is relate... |
https://api.github.com/repos/psf/requests/issues/5749 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5749/labels{/name} | https://api.github.com/repos/psf/requests/issues/5749/comments | https://api.github.com/repos/psf/requests/issues/5749/events | https://github.com/psf/requests/issues/5749 | 805,982,602 | MDU6SXNzdWU4MDU5ODI2MDI= | 5,749 | Params list with one item | {
"avatar_url": "https://avatars.githubusercontent.com/u/614232?v=4",
"events_url": "https://api.github.com/users/iBobik/events{/privacy}",
"followers_url": "https://api.github.com/users/iBobik/followers",
"following_url": "https://api.github.com/users/iBobik/following{/other_user}",
"gists_url": "https://api.github.com/users/iBobik/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/iBobik",
"id": 614232,
"login": "iBobik",
"node_id": "MDQ6VXNlcjYxNDIzMg==",
"organizations_url": "https://api.github.com/users/iBobik/orgs",
"received_events_url": "https://api.github.com/users/iBobik/received_events",
"repos_url": "https://api.github.com/users/iBobik/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/iBobik/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/iBobik/subscriptions",
"type": "User",
"url": "https://api.github.com/users/iBobik",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2021-02-11T00:19:13Z | 2021-08-27T00:08:36Z | 2021-02-11T00:51:46Z | NONE | resolved | If parameter has list with only one item, then the list is converted to a string.
## Expected Result
`params={'fields': ['fieldname']}` should convert to `?fields[]=fieldname`
## Actual Result
`params={'fields': ['fieldname']}` converts to `?fields=fieldname`
## Reproduction Steps
```python
import requests
requests.request(method,
posixpath.join(self.base_url, url),
params={'fields': ['fieldname']},
data=payload,
headers=self.headers)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "4.0.0"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.9.1"
},
"platform": {
"release": "4.19.121-linuxkit",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.25.1"
},
"system_ssl": {
"version": "1010104f"
},
"urllib3": {
"version": "1.26.3"
},
"using_pyopenssl": false
}
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5749/reactions"
} | https://api.github.com/repos/psf/requests/issues/5749/timeline | null | completed | null | null | false | [
"Hi @iBobik,\r\n\r\nThe behavior you're seeing is what's intended. Our documentation shows how we handle parameter encoding for lists and it's identical regardless of the length of the list. We'll generate a key-value pair for every list element.\r\n\r\nThe proposed expectation is non-standard and violates ABNF for... |
https://api.github.com/repos/psf/requests/issues/5748 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5748/labels{/name} | https://api.github.com/repos/psf/requests/issues/5748/comments | https://api.github.com/repos/psf/requests/issues/5748/events | https://github.com/psf/requests/pull/5748 | 805,501,636 | MDExOlB1bGxSZXF1ZXN0NTcxMDkxNzg3 | 5,748 | Fix: #4362 - Redirect resolved even though allow_redirects is set to False causing exception for unsupported connection adapter | {
"avatar_url": "https://avatars.githubusercontent.com/u/41421345?v=4",
"events_url": "https://api.github.com/users/luckydenis/events{/privacy}",
"followers_url": "https://api.github.com/users/luckydenis/followers",
"following_url": "https://api.github.com/users/luckydenis/following{/other_user}",
"gists_url": "https://api.github.com/users/luckydenis/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/luckydenis",
"id": 41421345,
"login": "luckydenis",
"node_id": "MDQ6VXNlcjQxNDIxMzQ1",
"organizations_url": "https://api.github.com/users/luckydenis/orgs",
"received_events_url": "https://api.github.com/users/luckydenis/received_events",
"repos_url": "https://api.github.com/users/luckydenis/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/luckydenis/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/luckydenis/subscriptions",
"type": "User",
"url": "https://api.github.com/users/luckydenis",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 2 | 2021-02-10T13:12:54Z | 2021-12-29T03:56:43Z | null | CONTRIBUTOR | null | Good evening
The problem was that when checking, we got data that passed the condition test: they contained `:` , and the request did not start with `http`. Example `0.0.0.0:8080`.
Done:
- [x] Fix #4362
- [x] Add and fix tests
- [x] make test
- [x] flake8 (diff) | 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/5748/reactions"
} | https://api.github.com/repos/psf/requests/issues/5748/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5748.diff",
"html_url": "https://github.com/psf/requests/pull/5748",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5748.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5748"
} | true | [
"Good evening, @kennethreitz42\r\n\r\nPlease review my edits when you have some free time",
"Hi @LuckyDenis, we're looking at this as a possible candidate for 2.27.0. There was some feedback left in July on the current proposal. Would you have time to rebase this change and address that?"
] |
https://api.github.com/repos/psf/requests/issues/5747 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5747/labels{/name} | https://api.github.com/repos/psf/requests/issues/5747/comments | https://api.github.com/repos/psf/requests/issues/5747/events | https://github.com/psf/requests/pull/5747 | 805,405,860 | MDExOlB1bGxSZXF1ZXN0NTcxMDExNjA3 | 5,747 | utils.py: default to utf-8 for text/csv (#5746) | {
"avatar_url": "https://avatars.githubusercontent.com/u/265630?v=4",
"events_url": "https://api.github.com/users/jgehrcke/events{/privacy}",
"followers_url": "https://api.github.com/users/jgehrcke/followers",
"following_url": "https://api.github.com/users/jgehrcke/following{/other_user}",
"gists_url": "https://api.github.com/users/jgehrcke/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jgehrcke",
"id": 265630,
"login": "jgehrcke",
"node_id": "MDQ6VXNlcjI2NTYzMA==",
"organizations_url": "https://api.github.com/users/jgehrcke/orgs",
"received_events_url": "https://api.github.com/users/jgehrcke/received_events",
"repos_url": "https://api.github.com/users/jgehrcke/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jgehrcke/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jgehrcke/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jgehrcke",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 7 | 2021-02-10T10:57:41Z | 2023-05-12T00:03:07Z | 2022-05-11T01:28:52Z | NONE | resolved | This is a super quick attempt to address https://github.com/psf/requests/issues/5746 -- an invitation for feedback. Would appreciate your opinions. Thanks! | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5747/reactions"
} | https://api.github.com/repos/psf/requests/issues/5747/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5747.diff",
"html_url": "https://github.com/psf/requests/pull/5747",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5747.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5747"
} | true | [
"(happy to add tests, changelog entry, etc -- brief instructions appreciated)",
"I believe the last change we accepted along these lines was contentious and broke things. Plus 7111 is likely not widely implemented by folks distributing `text/csv` files at this point given it's recency (and given that 16+ year old... |
https://api.github.com/repos/psf/requests/issues/5746 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5746/labels{/name} | https://api.github.com/repos/psf/requests/issues/5746/comments | https://api.github.com/repos/psf/requests/issues/5746/events | https://github.com/psf/requests/issues/5746 | 805,400,543 | MDU6SXNzdWU4MDU0MDA1NDM= | 5,746 | content-type: text/csv does not apply UTF-8-decoding by default (RFC 7111 violation?) | {
"avatar_url": "https://avatars.githubusercontent.com/u/265630?v=4",
"events_url": "https://api.github.com/users/jgehrcke/events{/privacy}",
"followers_url": "https://api.github.com/users/jgehrcke/followers",
"following_url": "https://api.github.com/users/jgehrcke/following{/other_user}",
"gists_url": "https://api.github.com/users/jgehrcke/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jgehrcke",
"id": 265630,
"login": "jgehrcke",
"node_id": "MDQ6VXNlcjI2NTYzMA==",
"organizations_url": "https://api.github.com/users/jgehrcke/orgs",
"received_events_url": "https://api.github.com/users/jgehrcke/received_events",
"repos_url": "https://api.github.com/users/jgehrcke/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jgehrcke/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jgehrcke/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jgehrcke",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 1 | 2021-02-10T10:50:42Z | 2021-02-10T11:01:38Z | null | NONE | null | Created a test/repro/MWE sheet here with a cell containing the letter `ö`: https://docs.google.com/spreadsheets/d/1q02F0AjDfCo_XlgFtT7HHU96emOcyf0PRQGKGoQTXCE/edit?usp=sharing
When you HTTP GET `https://docs.google.com/spreadsheets/d/1q02F0AjDfCo_XlgFtT7HHU96emOcyf0PRQGKGoQTXCE/export?format=csv` Google generates and sends a CSV document with UTF-8-encoded text in the response body.
Fetching this URL with `requests` and accessing the response content with the `text` attribute reveals that `requests` does _not_ UTF-8-decode the response body bytes:
```text
$ python -c 'import requests; r=requests.get("https://docs.google.com/spreadsheets/d/1q02F0AjDfCo_XlgFtT7HHU96emOcyf0PRQGKGoQTXCE/export?format=csv"); print(r.text)'
foo,bar,umlaut: öö
```
Library version:
```
$ pip list | grep requests
requests 2.25.1
```
Response headers (from a `curl -v ...`):
```
> GET /<snip> HTTP/2
> Host: doc-14-2s-sheets.googleusercontent.com
> user-agent: curl/7.69.1
> accept: */*
>
{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [264 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [264 bytes data]
* old SSL session ID is stale, removing
{ [5 bytes data]
* Connection state changed (MAX_CONCURRENT_STREAMS == 100)!
} [5 bytes data]
< HTTP/2 200
< content-type: text/csv
< x-robots-tag: noindex, nofollow, nosnippet
< cache-control: no-cache, no-store, max-age=0, must-revalidate
< pragma: no-cache
< expires: Mon, 01 Jan 1990 00:00:00 GMT
< date: Wed, 10 Feb 2021 10:12:52 GMT
< content-disposition: attachment; filename="<snip>.csv"; filename*=UTF-8''<snip>.csv
< access-control-allow-origin: *
< access-control-expose-headers: Cache-Control,Content-Disposition,Content-Encoding,Content-Length,Content-Type,Date,Expires,Pragma,Server,Transfer-Encoding
< content-security-policy: base-uri 'self';object-src 'self';report-uri https://docs.google.com/spreadsheets/cspreport;script-src 'nonce-+Qyt<snip>w' 'unsafe-inline' 'strict-dynamic' https: http: 'unsafe-eval';worker-src 'self'
< content-security-policy: frame-ancestors 'self' https://docs.google.com
< x-frame-options: ALLOW-FROM https://docs.google.com
< x-content-type-options: nosniff
< x-xss-protection: 1; mode=block
< server: GSE
< alt-svc: h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
< accept-ranges: none
< vary: Accept-Encoding
```
So, there is `content-type: text/csv`, i.e. no `'charset'` specification.
I am not sure if [RFC 7111](https://tools.ietf.org/html/rfc7111) is the most recent / authoritative reference, but it says about the `text/csv` media type that
```
The "charset" parameter specifies the charset employed by the CSV
content. In accordance with RFC 6657 [RFC6657], the charset
parameter SHOULD be used, and if it is not present, UTF-8 SHOULD
be assumed as the default (this implies that US-ASCII CSV will
work, even when not specifying the "charset" parameter). Any
charset defined by IANA for the "text" tree may be used in
conjunction with the "charset" parameter.
```
| 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/5746/reactions"
} | https://api.github.com/repos/psf/requests/issues/5746/timeline | null | null | null | null | false | [
"Given this a quick stab at https://github.com/psf/requests/pull/5747. Would appreciate an initial review and opinions. Thanks!"
] |
https://api.github.com/repos/psf/requests/issues/5745 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5745/labels{/name} | https://api.github.com/repos/psf/requests/issues/5745/comments | https://api.github.com/repos/psf/requests/issues/5745/events | https://github.com/psf/requests/issues/5745 | 804,678,861 | MDU6SXNzdWU4MDQ2Nzg4NjE= | 5,745 | HTTPDigestAuth uses quotes for algorithm and qop tokens of the Digest header | {
"avatar_url": "https://avatars.githubusercontent.com/u/4246686?v=4",
"events_url": "https://api.github.com/users/alex-che/events{/privacy}",
"followers_url": "https://api.github.com/users/alex-che/followers",
"following_url": "https://api.github.com/users/alex-che/following{/other_user}",
"gists_url": "https://api.github.com/users/alex-che/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alex-che",
"id": 4246686,
"login": "alex-che",
"node_id": "MDQ6VXNlcjQyNDY2ODY=",
"organizations_url": "https://api.github.com/users/alex-che/orgs",
"received_events_url": "https://api.github.com/users/alex-che/received_events",
"repos_url": "https://api.github.com/users/alex-che/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alex-che/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alex-che/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alex-che",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 0 | 2021-02-09T15:53:28Z | 2021-02-09T15:53:28Z | null | NONE | null | The `HTTPDigestAuth.build_digest_header()` method produces the Digest header witch contains quoted strings for `algorithm` and `qop` tokens. E.g.:
`
Digest username="admin", realm="server", nonce="QScBItGtnPq4Dz3v25Tht4SlctJnsR", uri="/api/v1/info", response="e0d12a4b85789351a847c773e6f4b30e", algorithm="MD5", qop="auth", nc=00000001, cnonce="0f905170a2cafe15"`
While according to [RFC 7616](https://tools.ietf.org/html/rfc7616) these tokens must not be quoted:
`
Digest username="admin", realm="server", nonce="QScBItGtnPq4Dz3v25Tht4SlctJnsR", uri="/api/v1/info", response="e0d12a4b85789351a847c773e6f4b30e", algorithm=MD5, qop=auth, nc=00000001, cnonce="0f905170a2cafe15"`
Below is the [corresponding part of the RFC](https://tools.ietf.org/html/rfc7616#section-3.4):
_For historical reasons, a sender MUST only generate the quoted string syntax for the following parameters: username, realm, nonce, uri, response, cnonce, and opaque._
_For historical reasons, a sender MUST NOT generate the quoted string syntax for the following parameters: algorithm, qop, and nc._
This can also be seen in [requests examples](https://tools.ietf.org/html/rfc7616#section-3.9) in the RFC.
Current behavior may cause problems with some servers. The following subclass can be used as a temporary workaround:
```
class FixedHTTPDigestAuth(HTTPDigestAuth):
def build_digest_header(self, method, url):
header = super().build_digest_header(method, url)
invalid_parts = ('algorithm', 'qop')
parts = header.split(', ')
for i, part in enumerate(parts):
if any(part.startswith(ip + '=') for ip in invalid_parts):
parts[i] = part.replace('"', '')
header = ', '.join(parts)
return header
```
| 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/5745/reactions"
} | https://api.github.com/repos/psf/requests/issues/5745/timeline | null | null | null | null | false | [] |
https://api.github.com/repos/psf/requests/issues/5744 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5744/labels{/name} | https://api.github.com/repos/psf/requests/issues/5744/comments | https://api.github.com/repos/psf/requests/issues/5744/events | https://github.com/psf/requests/issues/5744 | 802,720,321 | MDU6SXNzdWU4MDI3MjAzMjE= | 5,744 | urllib3 LocationParseError (label empty or too long) uncaught by requests | {
"avatar_url": "https://avatars.githubusercontent.com/u/33416700?v=4",
"events_url": "https://api.github.com/users/cknabs/events{/privacy}",
"followers_url": "https://api.github.com/users/cknabs/followers",
"following_url": "https://api.github.com/users/cknabs/following{/other_user}",
"gists_url": "https://api.github.com/users/cknabs/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cknabs",
"id": 33416700,
"login": "cknabs",
"node_id": "MDQ6VXNlcjMzNDE2NzAw",
"organizations_url": "https://api.github.com/users/cknabs/orgs",
"received_events_url": "https://api.github.com/users/cknabs/received_events",
"repos_url": "https://api.github.com/users/cknabs/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cknabs/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cknabs/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cknabs",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 1 | 2021-02-06T15:06:05Z | 2021-02-20T09:37:35Z | null | NONE | null | When accessing an URL with a label with more than 63 characters, an `urllib3.exceptions.LocationParseError` (label empty or too long) is returned without being caught by requests.
Maybe this is related to #4746?
## Expected Result
No exception, or an exception raised by requests (maybe InvalidURL?).
## Actual Result
Exception is not caught by requests.
## Reproduction Steps
```python
import requests
requests.get('http://1234567890123456789012345678901234567890123456789012345678901234.com')
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/home/christian/Projects/EUvsDisinfo/venv/lib64/python3.8/site-packages/requests/api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "/home/christian/Projects/EUvsDisinfo/venv/lib64/python3.8/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/home/christian/Projects/EUvsDisinfo/venv/lib64/python3.8/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/home/christian/Projects/EUvsDisinfo/venv/lib64/python3.8/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/home/christian/Projects/EUvsDisinfo/venv/lib64/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/home/christian/Projects/EUvsDisinfo/venv/lib64/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/home/christian/Projects/EUvsDisinfo/venv/lib64/python3.8/site-packages/urllib3/connectionpool.py", line 394, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/home/christian/Projects/EUvsDisinfo/venv/lib64/python3.8/site-packages/urllib3/connection.py", line 234, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/usr/lib64/python3.8/http/client.py", line 1255, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib64/python3.8/http/client.py", line 1301, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib64/python3.8/http/client.py", line 1250, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib64/python3.8/http/client.py", line 1010, in _send_output
self.send(msg)
File "/usr/lib64/python3.8/http/client.py", line 950, in send
self.connect()
File "/home/christian/Projects/EUvsDisinfo/venv/lib64/python3.8/site-packages/urllib3/connection.py", line 200, in connect
conn = self._new_conn()
File "/home/christian/Projects/EUvsDisinfo/venv/lib64/python3.8/site-packages/urllib3/connection.py", line 169, in _new_conn
conn = connection.create_connection(
File "/home/christian/Projects/EUvsDisinfo/venv/lib64/python3.8/site-packages/urllib3/util/connection.py", line 69, in create_connection
return six.raise_from(
File "<string>", line 3, in raise_from
urllib3.exceptions.LocationParseError: Failed to parse: '1234567890123456789012345678901234567890123456789012345678901234.com', label empty or too long
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "4.0.0"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.8.7"
},
"platform": {
"release": "5.10.11-100.fc32.x86_64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.25.1"
},
"system_ssl": {
"version": "1010109f"
},
"urllib3": {
"version": "1.26.2"
},
"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/5744/reactions"
} | https://api.github.com/repos/psf/requests/issues/5744/timeline | null | null | null | null | false | [
"After sifting through similar issues/PR, it seems that this could be solved similarly to #2344, i.e., catch `urllib3.exceptions.LocationParseError` for every call to `urllib3.util.parse_url` and raise an `requests.exceptions.InvalidURL` instead. "
] |
https://api.github.com/repos/psf/requests/issues/5743 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5743/labels{/name} | https://api.github.com/repos/psf/requests/issues/5743/comments | https://api.github.com/repos/psf/requests/issues/5743/events | https://github.com/psf/requests/issues/5743 | 802,017,200 | MDU6SXNzdWU4MDIwMTcyMDA= | 5,743 | Loss of the cookie state when using max-age=0. | {
"avatar_url": "https://avatars.githubusercontent.com/u/41421345?v=4",
"events_url": "https://api.github.com/users/luckydenis/events{/privacy}",
"followers_url": "https://api.github.com/users/luckydenis/followers",
"following_url": "https://api.github.com/users/luckydenis/following{/other_user}",
"gists_url": "https://api.github.com/users/luckydenis/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/luckydenis",
"id": 41421345,
"login": "luckydenis",
"node_id": "MDQ6VXNlcjQxNDIxMzQ1",
"organizations_url": "https://api.github.com/users/luckydenis/orgs",
"received_events_url": "https://api.github.com/users/luckydenis/received_events",
"repos_url": "https://api.github.com/users/luckydenis/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/luckydenis/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/luckydenis/subscriptions",
"type": "User",
"url": "https://api.github.com/users/luckydenis",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 1 | 2021-02-05T09:48:37Z | 2021-02-06T16:43:22Z | null | CONTRIBUTOR | null | Summary.
Loss of the `cookie` state when receiving a response from the server containing the lifetime in the format `max-age=0`.
## Expected Result
```python
import requests
r = requests.get('http://127.0.0.1:5000/expire')
>>> r.headers
{'Set-Cookie': 'test=test; Path=/; Max-Age=0', 'Content-Type': 'text/html; charset=utf-8', 'Content-Length': '10', 'Server': 'Werkzeug/1.0.1 Python/3.8.7', 'Date': 'Fri, 05 Feb 2021 09:26:48 GMT'}
>>> r.cookies
<RequestsCookieJar[Cookie(version=0, name='test', value='test', port=None, port_specified=False, domain='127.0.0.1', domain_specified=False, domain_initial_dot=False, path='/', path_specified=True, secure=False, expires=1612520808, discard=False, comment=None, comment_url=None, rest={}, rfc2109=False)]>
```
## Actual Result
```python
>>> import requests
>>> r = requests.get('http://127.0.0.1:5000/expire')
>>> r.headers
{'Set-Cookie': 'test=test; Path=/; Max-Age=0', 'Content-Type': 'text/html; charset=utf-8', 'Content-Length': '14', 'Server': 'Werkzeug/1.0.1 Python/3.8.7', 'Date': 'Fri, 05 Feb 2021 09:16:43 GMT'}
>>> r.cookies
<RequestsCookieJar[]>
```
## Reproduction Steps
app.py
```python
from flask import Flask, make_response
app = Flask(__name__)
@app.route('/expire')
def expire():
return "Expired cookie", {'Set-Cookie': 'test=test; Path=/; Max-Age=0'}
```
Start app: `FLASK_APP=app.py flask run -p 5000`
test.py
```python
import requests
r = requests.get('http://127.0.0.1:5000/expire')
print('headers:', r.headers)
print()
print('cookies:', r.cookies)
```
output
```bash
headers: {'Set-Cookie': 'test=test; Path=/; Max-Age=0', 'Content-Type': 'text/html; charset=utf-8', 'Content-Length': '14', 'Server': 'Werkzeug/1.0.1 Python/3.8.7', 'Date': 'Fri, 05 Feb 2021 09:40:32 GMT'}
cookies: <RequestsCookieJar[]>
```
## System Information
$ python -m requests.help
```bash
{
"chardet": {
"version": "4.0.0"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.8.7"
},
"platform": {
"release": "5.8.0-41-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.25.1"
},
"system_ssl": {
"version": "1010106f"
},
"urllib3": {
"version": "1.26.3"
},
"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/5743/reactions"
} | https://api.github.com/repos/psf/requests/issues/5743/timeline | null | null | null | null | false | [
"Good evening.\r\nThe cookie state is deleted at this location.\r\nhttps://github.com/python/cpython/blob/39aeb9ff9064808b08ec629403edbc36a232369b/Lib/http/cookiejar.py#L1548-L1561"
] |
https://api.github.com/repos/psf/requests/issues/5742 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5742/labels{/name} | https://api.github.com/repos/psf/requests/issues/5742/comments | https://api.github.com/repos/psf/requests/issues/5742/events | https://github.com/psf/requests/issues/5742 | 800,755,699 | MDU6SXNzdWU4MDA3NTU2OTk= | 5,742 | Request not redirecting when I use a user agent | {
"avatar_url": "https://avatars.githubusercontent.com/u/59785672?v=4",
"events_url": "https://api.github.com/users/trevtravtrev/events{/privacy}",
"followers_url": "https://api.github.com/users/trevtravtrev/followers",
"following_url": "https://api.github.com/users/trevtravtrev/following{/other_user}",
"gists_url": "https://api.github.com/users/trevtravtrev/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/trevtravtrev",
"id": 59785672,
"login": "trevtravtrev",
"node_id": "MDQ6VXNlcjU5Nzg1Njcy",
"organizations_url": "https://api.github.com/users/trevtravtrev/orgs",
"received_events_url": "https://api.github.com/users/trevtravtrev/received_events",
"repos_url": "https://api.github.com/users/trevtravtrev/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/trevtravtrev/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/trevtravtrev/subscriptions",
"type": "User",
"url": "https://api.github.com/users/trevtravtrev",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2021-02-03T22:34:41Z | 2021-02-03T23:37:43Z | 2021-02-03T22:53:16Z | NONE | resolved | I am making a request to a twitter shortened url that redirects to amazon. When I don't use a user agent it redirects perfectly, when I use a user agent it no longer redirects.
## Expected Result
Make a request to a twitter shortened url for an amazon link with a user agent header and it successfully redirect to amazon.
## Actual Result
When I add a user agent to my request, it is no longer redirecting to amazon. (When I remove the user agent again, the request redirects perfectly fine to amazon.
## Reproduction Steps
```python
import requests
header = {'User-Agent': 'Mozilla/5.0 (iPad; CPU OS 8_1_2 like Mac OS X; en-US) AppleWebKit/534.20.2 (KHTML, like Gecko) Version/4.0.5 Mobile/8B116 Safari/6534.20.2'}
session = requests.Session()
session.headers.update(header)
request = session.head("https://t.co/ErjlKsTuZy?amp=1", allow_redirects=True)
amazon_link = request.url
```
## System Information
$ python3 -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.6.1"
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.7.3"
},
"platform": {
"release": "5.4.51-v7l+",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010104f",
"version": "19.0.0"
},
"requests": {
"version": "2.25.1"
},
"system_ssl": {
"version": "1010104f"
},
"urllib3": {
"version": "1.24.1"
},
"using_pyopenssl": true
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
| {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5742/reactions"
} | https://api.github.com/repos/psf/requests/issues/5742/timeline | null | completed | null | null | false | [
"Hi @trevtravtrev, there's a handful of closed issues already discussing this behavior and it's pretty quick to self validate. If you shut off redirects and check the `status_code` and `headers` returned from the first request, you'll see Twitter isn't returning a redirect with the custom user-agent. They're doing ... |
https://api.github.com/repos/psf/requests/issues/5741 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5741/labels{/name} | https://api.github.com/repos/psf/requests/issues/5741/comments | https://api.github.com/repos/psf/requests/issues/5741/events | https://github.com/psf/requests/pull/5741 | 800,640,233 | MDExOlB1bGxSZXF1ZXN0NTY3MDkzNzY1 | 5,741 | Add 2/3 Check So Latest idna Works in 3 | {
"avatar_url": "https://avatars.githubusercontent.com/u/2775739?v=4",
"events_url": "https://api.github.com/users/utkonos/events{/privacy}",
"followers_url": "https://api.github.com/users/utkonos/followers",
"following_url": "https://api.github.com/users/utkonos/following{/other_user}",
"gists_url": "https://api.github.com/users/utkonos/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/utkonos",
"id": 2775739,
"login": "utkonos",
"node_id": "MDQ6VXNlcjI3NzU3Mzk=",
"organizations_url": "https://api.github.com/users/utkonos/orgs",
"received_events_url": "https://api.github.com/users/utkonos/received_events",
"repos_url": "https://api.github.com/users/utkonos/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/utkonos/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/utkonos/subscriptions",
"type": "User",
"url": "https://api.github.com/users/utkonos",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2021-02-03T19:37:28Z | 2021-08-27T00:08:48Z | 2021-02-03T20:08:46Z | NONE | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5741/reactions"
} | https://api.github.com/repos/psf/requests/issues/5741/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5741.diff",
"html_url": "https://github.com/psf/requests/pull/5741",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5741.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5741"
} | true | [
"Resolving as a duplicate of #5711."
] | |
https://api.github.com/repos/psf/requests/issues/5740 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5740/labels{/name} | https://api.github.com/repos/psf/requests/issues/5740/comments | https://api.github.com/repos/psf/requests/issues/5740/events | https://github.com/psf/requests/issues/5740 | 799,623,604 | MDU6SXNzdWU3OTk2MjM2MDQ= | 5,740 | Unable to use system proxy with HTTPS connection on Windows and Python 3.9 | {
"avatar_url": "https://avatars.githubusercontent.com/u/17663689?v=4",
"events_url": "https://api.github.com/users/kotori2/events{/privacy}",
"followers_url": "https://api.github.com/users/kotori2/followers",
"following_url": "https://api.github.com/users/kotori2/following{/other_user}",
"gists_url": "https://api.github.com/users/kotori2/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kotori2",
"id": 17663689,
"login": "kotori2",
"node_id": "MDQ6VXNlcjE3NjYzNjg5",
"organizations_url": "https://api.github.com/users/kotori2/orgs",
"received_events_url": "https://api.github.com/users/kotori2/received_events",
"repos_url": "https://api.github.com/users/kotori2/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kotori2/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kotori2/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kotori2",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2021-02-02T19:49:36Z | 2021-08-27T00:08:33Z | 2021-02-21T17:41:59Z | NONE | resolved | On Windows you can only set a "host:port" http proxy as system proxy.
```
PS > Get-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' | findstr ProxyServer
ProxyServer : 127.0.0.1:7890
```
But in Python, it assumes that this proxy supports both http and https on the same port:
```
>>> import urllib
>>> urllib.request.getproxies()
{'http': 'http://127.0.0.1:7890', 'https': 'https://127.0.0.1:7890', 'ftp': 'ftp://127.0.0.1:7890'}
```
Which will try to handshake httpps on http port.
## Expected Result
On Python 3.8.x:
```
> .\python38.exe
Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:37:02) [MSC v.1924 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib, requests
>>> urllib.request.getproxies()
{'http': 'http://127.0.0.1:7890', 'https': 'https://127.0.0.1:7890', 'ftp': 'ftp://127.0.0.1:7890'}
>>> requests.get("http://www.google.com")
<Response [200]>
>>> requests.get("https://www.google.com")
<Response [200]>
```
## Actual Result
```
> python3
Python 3.9.1 (tags/v3.9.1:1e5d33e, Dec 7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib, requests
>>> urllib.request.getproxies()
{'http': 'http://127.0.0.1:7890', 'https': 'https://127.0.0.1:7890', 'ftp': 'ftp://127.0.0.1:7890'}
>>> requests.get("http://www.google.com")
<Response [200]>
>>> requests.get("https://www.google.com")
Traceback (most recent call last):
File "C:\Python39\lib\site-packages\urllib3\connectionpool.py", line 696, in urlopen
self._prepare_proxy(conn)
File "C:\Python39\lib\site-packages\urllib3\connectionpool.py", line 964, in _prepare_proxy
conn.connect()
File "C:\Python39\lib\site-packages\urllib3\connection.py", line 359, in connect
conn = self._connect_tls_proxy(hostname, conn)
File "C:\Python39\lib\site-packages\urllib3\connection.py", line 496, in _connect_tls_proxy
return ssl_wrap_socket(
File "C:\Python39\lib\site-packages\urllib3\util\ssl_.py", line 432, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls)
File "C:\Python39\lib\site-packages\urllib3\util\ssl_.py", line 474, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock)
File "C:\Python39\lib\ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "C:\Python39\lib\ssl.py", line 1040, in _create
self.do_handshake()
File "C:\Python39\lib\ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1123)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python39\lib\site-packages\requests\adapters.py", line 439, in send
resp = conn.urlopen(
File "C:\Python39\lib\site-packages\urllib3\connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "C:\Python39\lib\site-packages\urllib3\util\retry.py", line 573, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www.google.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1123)')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python39\lib\site-packages\requests\api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "C:\Python39\lib\site-packages\requests\api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Python39\lib\site-packages\requests\sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "C:\Python39\lib\site-packages\requests\sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "C:\Python39\lib\site-packages\requests\adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='www.google.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1123)')))
```
## Reproduction Steps
Set a http Windows system proxy then execute:
```python
import requests
requests.get("https://www.google.com")
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "4.0.0"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.9.1"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.25.1"
},
"system_ssl": {
"version": "1010107f"
},
"urllib3": {
"version": "1.26.2"
},
"using_pyopenssl": false
}
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/17663689?v=4",
"events_url": "https://api.github.com/users/kotori2/events{/privacy}",
"followers_url": "https://api.github.com/users/kotori2/followers",
"following_url": "https://api.github.com/users/kotori2/following{/other_user}",
"gists_url": "https://api.github.com/users/kotori2/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kotori2",
"id": 17663689,
"login": "kotori2",
"node_id": "MDQ6VXNlcjE3NjYzNjg5",
"organizations_url": "https://api.github.com/users/kotori2/orgs",
"received_events_url": "https://api.github.com/users/kotori2/received_events",
"repos_url": "https://api.github.com/users/kotori2/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kotori2/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kotori2/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kotori2",
"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/5740/reactions"
} | https://api.github.com/repos/psf/requests/issues/5740/timeline | null | completed | null | null | false | [
"see: https://github.com/pypa/pip/issues/9216#issuecomment-741836058\r\n\r\nreinstall `urllib3==1.25.11` or pass `proxies` to requests\r\n\r\n```python\r\nproxies={\r\n'http': 'http://127.0.0.1:7890',\r\n'https': 'http://127.0.0.1:7890' # https -> http\r\n}\r\n\r\nr = requests.get(url, proxies=proxies)\r\n```",
... |
https://api.github.com/repos/psf/requests/issues/5739 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5739/labels{/name} | https://api.github.com/repos/psf/requests/issues/5739/comments | https://api.github.com/repos/psf/requests/issues/5739/events | https://github.com/psf/requests/issues/5739 | 797,777,526 | MDU6SXNzdWU3OTc3Nzc1MjY= | 5,739 | Safe Option for the Character Endoing of GET Request Parameters | {
"avatar_url": "https://avatars.githubusercontent.com/u/74075657?v=4",
"events_url": "https://api.github.com/users/farshiddel/events{/privacy}",
"followers_url": "https://api.github.com/users/farshiddel/followers",
"following_url": "https://api.github.com/users/farshiddel/following{/other_user}",
"gists_url": "https://api.github.com/users/farshiddel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/farshiddel",
"id": 74075657,
"login": "farshiddel",
"node_id": "MDQ6VXNlcjc0MDc1NjU3",
"organizations_url": "https://api.github.com/users/farshiddel/orgs",
"received_events_url": "https://api.github.com/users/farshiddel/received_events",
"repos_url": "https://api.github.com/users/farshiddel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/farshiddel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/farshiddel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/farshiddel",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2021-01-31T18:27:31Z | 2021-08-27T00:08:37Z | 2021-01-31T18:47:49Z | NONE | resolved | This issue is related to character encoding of the request parameters when sending a GET request. In my scenario, I need the percent character to not be encoded as %25. The `urllib.parse.urlencode` function has the `safe` input for this purpose. However, the `requests.get` function does not have such input. Therefore, I use `urllib.parse.urlencode` with `safe='%'` to get an ampersand-separated string of my request parameters and send that in for the `params` value of `requests.get`. Even with this trick, the response that I get is different than what I get with `urllib.request.Request`. The interesting thing is that when I print `response.url` (where `response` is the response object of `requests.get`), I see that the percent character is not encoded, but still the response is incorrect. It seems like encoding takes place somewhere else. I really hate abandoning the requests package because of this defect. I was wondering if there is any way this can be fixed in a future release.
## Expected Result
```
<result>
<TotalMatches>1135</TotalMatches>
<TotalPages>57</TotalPages>
<PageNumber>1</PageNumber>
<item>
<mid>36145</mid>
<merchantname> ...
```
## Actual Result
```
<result>
<TotalMatches>0</TotalMatches>
<TotalPages>0</TotalPages>
<PageNumber>1</PageNumber>
</result>
```
## Reproduction Steps
This is the URL I am hitting:
`http://productsearch.linksynergy.com/productsearch?token=<token>&mid=36145&cat=Women%27s+Warehouse+Sale+-+Up+To+70%+Off&keyword=dress&pagenumber=1`
Unfortunately, I cannot share the token. The decoded value for the `cat` parameter is "Women's Warehouse Sale - Up To 70% Off". The percent sign after 70 is the one that is causing the issue.
```python
import requests
with requests.Session() as http_session:
response = http_session.get('http://productsearch.linksynergy.com/productsearch', params='token=<token>&mid=36145&cat=Women%27s+Warehouse+Sale+-+Up+To+70%+Off&keyword=dress&pagenumber=1')
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "4.0.0"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.7.2"
},
"platform": {
"release": "5.8.0-40-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.25.1"
},
"system_ssl": {
"version": "1010106f"
},
"urllib3": {
"version": "1.26.3"
},
"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/5739/reactions"
} | https://api.github.com/repos/psf/requests/issues/5739/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\nThere are many issues here that are closed with the same root issue (wanting greater control over query parameter encoding). The short answer is to use the prepared request flow."
] |
https://api.github.com/repos/psf/requests/issues/5738 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5738/labels{/name} | https://api.github.com/repos/psf/requests/issues/5738/comments | https://api.github.com/repos/psf/requests/issues/5738/events | https://github.com/psf/requests/issues/5738 | 797,602,068 | MDU6SXNzdWU3OTc2MDIwNjg= | 5,738 | Timeout not working | {
"avatar_url": "https://avatars.githubusercontent.com/u/42503383?v=4",
"events_url": "https://api.github.com/users/surenjanath/events{/privacy}",
"followers_url": "https://api.github.com/users/surenjanath/followers",
"following_url": "https://api.github.com/users/surenjanath/following{/other_user}",
"gists_url": "https://api.github.com/users/surenjanath/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/surenjanath",
"id": 42503383,
"login": "surenjanath",
"node_id": "MDQ6VXNlcjQyNTAzMzgz",
"organizations_url": "https://api.github.com/users/surenjanath/orgs",
"received_events_url": "https://api.github.com/users/surenjanath/received_events",
"repos_url": "https://api.github.com/users/surenjanath/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/surenjanath/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/surenjanath/subscriptions",
"type": "User",
"url": "https://api.github.com/users/surenjanath",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2021-01-31T02:39:21Z | 2021-08-28T00:05:54Z | 2021-01-31T14:29:26Z | NONE | resolved | Summary.
## Expected Result
div with temp email and not loading after couple seconds of loading
<input class="emailbox-input opentip" data-original-title="Your 10 Minute Mail address" data-placement="bottom" id="mail" onclick="select(this);" readonly="" type="text" value=**""**/>
What you expected.
## Actual Result
blank
## Reproduction Steps
No paused between timeout
```python
import requests
with requests.Session() as s:
post = s.get('https://temp-mail.org/en/10minutemail',headers=headers,timeout=20)
data = bs(post.text,'html.parser')
email = data.find('input',{'id':'mail'})
print(email)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "3.2.1"
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.9.0"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "1010108f",
"version": "20.0.1"
},
"requests": {
"version": "2.24.0"
},
"system_ssl": {
"version": "1010107f"
},
"urllib3": {
"version": "1.25.11"
},
"using_pyopenssl": true
}
google callaborator
```
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/5738/reactions"
} | https://api.github.com/repos/psf/requests/issues/5738/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/5737 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5737/labels{/name} | https://api.github.com/repos/psf/requests/issues/5737/comments | https://api.github.com/repos/psf/requests/issues/5737/events | https://github.com/psf/requests/issues/5737 | 797,496,186 | MDU6SXNzdWU3OTc0OTYxODY= | 5,737 | How to force session pool connections to reestablish? | {
"avatar_url": "https://avatars.githubusercontent.com/u/28147700?v=4",
"events_url": "https://api.github.com/users/ikhz/events{/privacy}",
"followers_url": "https://api.github.com/users/ikhz/followers",
"following_url": "https://api.github.com/users/ikhz/following{/other_user}",
"gists_url": "https://api.github.com/users/ikhz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ikhz",
"id": 28147700,
"login": "ikhz",
"node_id": "MDQ6VXNlcjI4MTQ3NzAw",
"organizations_url": "https://api.github.com/users/ikhz/orgs",
"received_events_url": "https://api.github.com/users/ikhz/received_events",
"repos_url": "https://api.github.com/users/ikhz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ikhz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ikhz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ikhz",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2021-01-30T18:10:46Z | 2021-08-28T00:05:55Z | 2021-01-30T20:29:17Z | NONE | resolved | I have an app (desktop) that use sessions for keepalive connections, there is a case when users restart internet connection or switch vpn on/off, the next 2-3 requests (no matter how much time passed after switching internet) made from session hang until read timeout but internet connection is already up (script that runs in parallel in separate thread that making same requests but without session is already started to receive responses). How can I force session to reeastablish all connections or any other workaround? | {
"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/5737/reactions"
} | https://api.github.com/repos/psf/requests/issues/5737/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/5736 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5736/labels{/name} | https://api.github.com/repos/psf/requests/issues/5736/comments | https://api.github.com/repos/psf/requests/issues/5736/events | https://github.com/psf/requests/pull/5736 | 796,770,876 | MDExOlB1bGxSZXF1ZXN0NTYzODk0MjYw | 5,736 | Make the response class in adapter easier to override | {
"avatar_url": "https://avatars.githubusercontent.com/u/8541009?v=4",
"events_url": "https://api.github.com/users/sonthonaxrk/events{/privacy}",
"followers_url": "https://api.github.com/users/sonthonaxrk/followers",
"following_url": "https://api.github.com/users/sonthonaxrk/following{/other_user}",
"gists_url": "https://api.github.com/users/sonthonaxrk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sonthonaxrk",
"id": 8541009,
"login": "sonthonaxrk",
"node_id": "MDQ6VXNlcjg1NDEwMDk=",
"organizations_url": "https://api.github.com/users/sonthonaxrk/orgs",
"received_events_url": "https://api.github.com/users/sonthonaxrk/received_events",
"repos_url": "https://api.github.com/users/sonthonaxrk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sonthonaxrk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sonthonaxrk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sonthonaxrk",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2021-01-29T10:36:45Z | 2021-08-27T00:08:48Z | 2021-01-29T18:27:11Z | NONE | resolved | I find myself pinning for this quite a bit. | {
"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/5736/reactions"
} | https://api.github.com/repos/psf/requests/issues/5736/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5736.diff",
"html_url": "https://github.com/psf/requests/pull/5736",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5736.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5736"
} | true | [
"We're not accepting new features at this time",
"@sigmavirus24 \r\nWhat's the process to add a feature? Do you tender roadmaps? Or is the internal API of requests just utterly frozen?"
] |
https://api.github.com/repos/psf/requests/issues/5735 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5735/labels{/name} | https://api.github.com/repos/psf/requests/issues/5735/comments | https://api.github.com/repos/psf/requests/issues/5735/events | https://github.com/psf/requests/pull/5735 | 796,256,743 | MDExOlB1bGxSZXF1ZXN0NTYzNDY0NTE4 | 5,735 | 5677: Respect variable precedence in session | {
"avatar_url": "https://avatars.githubusercontent.com/u/1688249?v=4",
"events_url": "https://api.github.com/users/mateusduboli/events{/privacy}",
"followers_url": "https://api.github.com/users/mateusduboli/followers",
"following_url": "https://api.github.com/users/mateusduboli/following{/other_user}",
"gists_url": "https://api.github.com/users/mateusduboli/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mateusduboli",
"id": 1688249,
"login": "mateusduboli",
"node_id": "MDQ6VXNlcjE2ODgyNDk=",
"organizations_url": "https://api.github.com/users/mateusduboli/orgs",
"received_events_url": "https://api.github.com/users/mateusduboli/received_events",
"repos_url": "https://api.github.com/users/mateusduboli/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mateusduboli/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mateusduboli/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mateusduboli",
"user_view_type": "public"
} | [
{
"color": "eb6420",
"default": false,
"description": null,
"id": 44501256,
"name": "Breaking API Change",
"node_id": "MDU6TGFiZWw0NDUwMTI1Ng==",
"url": "https://api.github.com/repos/psf/requests/labels/Breaking%20API%20Change"
}
] | open | false | null | [] | null | 12 | 2021-01-28T18:44:04Z | 2022-01-03T15:25:21Z | null | CONTRIBUTOR | null | - Move `Session#merge_environment_variables` from `Session#request` to `Session#send` to make it consistent
- On `Session#send` change variable precedence to (higher precedence first) `kwargs` -> `session args` -> `environment`. | null | {
"+1": 2,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 2,
"url": "https://api.github.com/repos/psf/requests/issues/5735/reactions"
} | https://api.github.com/repos/psf/requests/issues/5735/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5735.diff",
"html_url": "https://github.com/psf/requests/pull/5735",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5735.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5735"
} | true | [
"I propose the following change at line:\r\nhttps://github.com/psf/requests/blob/913880c45a3a8c3bf6b298e9c38709cd95a9c97c/requests/sessions.py#L530\r\n\r\nReplace it by:\r\n\r\n```python\r\nproxies = proxies or self.proxies\r\n```\r\n\r\nThis change will make this hierarchy `kwargs` -> `session args` -> `environmen... |
https://api.github.com/repos/psf/requests/issues/5734 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5734/labels{/name} | https://api.github.com/repos/psf/requests/issues/5734/comments | https://api.github.com/repos/psf/requests/issues/5734/events | https://github.com/psf/requests/issues/5734 | 795,255,014 | MDU6SXNzdWU3OTUyNTUwMTQ= | 5,734 | Cannot stream both request and response at the same time | {
"avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4",
"events_url": "https://api.github.com/users/ghost/events{/privacy}",
"followers_url": "https://api.github.com/users/ghost/followers",
"following_url": "https://api.github.com/users/ghost/following{/other_user}",
"gists_url": "https://api.github.com/users/ghost/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ghost",
"id": 10137,
"login": "ghost",
"node_id": "MDQ6VXNlcjEwMTM3",
"organizations_url": "https://api.github.com/users/ghost/orgs",
"received_events_url": "https://api.github.com/users/ghost/received_events",
"repos_url": "https://api.github.com/users/ghost/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ghost/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ghost",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2021-01-27T16:31:57Z | 2021-08-28T00:05:55Z | 2021-01-27T18:22:33Z | NONE | resolved | It appears to not be possible to use a generator for the data and `stream=True` and expect to be able to iterate over `resp.iter_lines()` at the same time.
## Expected Result
I expected to be able to send request data from a generator, and read response data with `resp.iter_lines`, at the same time.
## Actual Result
The library seemingly waits until all `data` is sent before `resp.iter_lines` produces any ouptut.
## Reproduction Steps
With a `server.py` using `flask==1.1.2`:
```python
from flask import Flask, Response, request, stream_with_context
app = Flask('bug')
@app.route('/bug', methods=['POST'])
def bug():
def resp():
while True:
line = request.stream.readline()
print(line)
if line:
yield 'Bye\n'
else:
break
return Response(stream_with_context(resp()))
app.run()
```
And a `client.py` using `requests==2.25.1`:
```python
import requests
import time
def req():
for _ in range(10):
yield b'Hi\n'
time.sleep(0.5)
resp = requests.post("http://localhost:5000/bug", data=req(), stream=True)
for line in resp.iter_lines():
print(line)
```
By running `server.py` in one console and then `client.py` in another, it can be seen that the server correctly prints the incoming request data every 0.5s, while the client prints all lines immediately after 5s.
I have also tried with a different library, `aiohttp`, and this seems to be capable of streaming both request and response at the same time.
Note that iterating over `resp.iter_lines()` in a different thread doesn't make it work either, although I would expect it to work with a single thread.
<details><summary>Threaded code</summary>
```python
import requests
import time
import threading
def req():
for _ in range(10):
yield b'Hi\n'
time.sleep(0.5)
def handle_resp(resp):
for line in resp.iter_lines():
print(line)
threading.Thread(
target=handle_resp,
args=(requests.post("http://localhost:5000/bug", data=req(), stream=True),)
).start()
```
</details>
## System Information
<details><summary>$ python -m requests.help</summary>
```json
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.9.1"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.25.1"
},
"system_ssl": {
"version": "1010107f"
},
"urllib3": {
"version": "1.26.2"
},
"using_pyopenssl": false
}
```
</details> | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 1,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/5734/reactions"
} | https://api.github.com/repos/psf/requests/issues/5734/timeline | null | completed | null | null | false | [
"I’ve noticed this too. I believe this is unfortunately a known issue with status WONTFIX (and can try to find a reference to a previous issue later if no one beats me to it), but please correct me if I’m wrong.\r\n\r\nA separate but related issue that I think has also been reported before and is in the same catego... |
https://api.github.com/repos/psf/requests/issues/5733 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5733/labels{/name} | https://api.github.com/repos/psf/requests/issues/5733/comments | https://api.github.com/repos/psf/requests/issues/5733/events | https://github.com/psf/requests/issues/5733 | 793,026,725 | MDU6SXNzdWU3OTMwMjY3MjU= | 5,733 | How to send multiple images to Fastapi using requests library | {
"avatar_url": "https://avatars.githubusercontent.com/u/38287214?v=4",
"events_url": "https://api.github.com/users/saireddy12/events{/privacy}",
"followers_url": "https://api.github.com/users/saireddy12/followers",
"following_url": "https://api.github.com/users/saireddy12/following{/other_user}",
"gists_url": "https://api.github.com/users/saireddy12/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/saireddy12",
"id": 38287214,
"login": "saireddy12",
"node_id": "MDQ6VXNlcjM4Mjg3MjE0",
"organizations_url": "https://api.github.com/users/saireddy12/orgs",
"received_events_url": "https://api.github.com/users/saireddy12/received_events",
"repos_url": "https://api.github.com/users/saireddy12/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/saireddy12/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/saireddy12/subscriptions",
"type": "User",
"url": "https://api.github.com/users/saireddy12",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2021-01-25T05:02:47Z | 2021-08-28T00:05:55Z | 2021-01-28T12:58:00Z | NONE | resolved | I need to hit the api with multiple images
```
@app.post("/text")
def get_text(files: List[UploadFile] = File(...),frame_timestamps: Optional[List[int]] = Body([]),is_video:bool=False)
```
its working when I try uploading multiple images using /docs interface, I tried with one file its working fine here is the code for it
```
import requests
import json
def get_text(image_path):
#images={}
url = 'http://address/text''
try:
with open(image_path, "rb") as im:
image_data={"files":im}
response=requests.post(url,files=image_data)
return json.loads(response.text)
except Exception as er:
print("error occured")
return "{} error occured".format(er)
```
when I tried adding one more image. to the image_data I am getting error . tried this
```
image_data ={"files":[]}
for image in image_list:
with open(image, "rb") as im:
image_data['files'].append(im)
```
The error I am getting is
<img width="1015" alt="Screenshot 2021-01-25 at 9 27 02 AM" src="https://user-images.githubusercontent.com/38287214/105663586-a2227680-5ef8-11eb-9438-fa3bc09c51de.png">
| {
"avatar_url": "https://avatars.githubusercontent.com/u/38287214?v=4",
"events_url": "https://api.github.com/users/saireddy12/events{/privacy}",
"followers_url": "https://api.github.com/users/saireddy12/followers",
"following_url": "https://api.github.com/users/saireddy12/following{/other_user}",
"gists_url": "https://api.github.com/users/saireddy12/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/saireddy12",
"id": 38287214,
"login": "saireddy12",
"node_id": "MDQ6VXNlcjM4Mjg3MjE0",
"organizations_url": "https://api.github.com/users/saireddy12/orgs",
"received_events_url": "https://api.github.com/users/saireddy12/received_events",
"repos_url": "https://api.github.com/users/saireddy12/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/saireddy12/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/saireddy12/subscriptions",
"type": "User",
"url": "https://api.github.com/users/saireddy12",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5733/reactions"
} | https://api.github.com/repos/psf/requests/issues/5733/timeline | null | completed | null | null | false | [
"I finally found the solution \r\nIncase any one needs the solution here it is \r\n```\r\nfiles = [\r\n ('files', ('image1', open('/Users/ai/image1.jpg','rb'), 'image/png')),\r\n ('files', ('image2', open('/Users/ai/image2.jpeg','rb'), 'image/png'))\r\n ]\r\n```\r\nyou can use the below funct... |
https://api.github.com/repos/psf/requests/issues/5732 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5732/labels{/name} | https://api.github.com/repos/psf/requests/issues/5732/comments | https://api.github.com/repos/psf/requests/issues/5732/events | https://github.com/psf/requests/issues/5732 | 792,692,953 | MDU6SXNzdWU3OTI2OTI5NTM= | 5,732 | endless redirection because of rewriting query containing "[]". | {
"avatar_url": "https://avatars.githubusercontent.com/u/507141?v=4",
"events_url": "https://api.github.com/users/darkfader/events{/privacy}",
"followers_url": "https://api.github.com/users/darkfader/followers",
"following_url": "https://api.github.com/users/darkfader/following{/other_user}",
"gists_url": "https://api.github.com/users/darkfader/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/darkfader",
"id": 507141,
"login": "darkfader",
"node_id": "MDQ6VXNlcjUwNzE0MQ==",
"organizations_url": "https://api.github.com/users/darkfader/orgs",
"received_events_url": "https://api.github.com/users/darkfader/received_events",
"repos_url": "https://api.github.com/users/darkfader/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/darkfader/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/darkfader/subscriptions",
"type": "User",
"url": "https://api.github.com/users/darkfader",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2021-01-24T01:04:21Z | 2021-08-28T00:05:56Z | 2021-01-24T13:15:46Z | NONE | resolved | It's probably a combination of python3 libraries, since I am not seeing this effect on my webbrowser nor cURL.
I tried disabling automatic redirection but my subsequent prepare_request calls ends up in the same rewriting.
## Expected Result
[] should not rewrite save characters %5B%5D I think because those are safe characters?. For redirection, It probably just should take the redirection from the server as granted anyways.
## Actual Result
[] in queries gets rewritten to %5B%5D. Server rewrites %5B%5D back to [] in Location response header in a redirect.
## Reproduction Steps
```python
import requests
session = requests.Session()
session.send(session.prepare_request(requests.Request(method='get', url='https://www.suruga-ya.jp/search?category=&search_word=&restrict[]=brand=ATARI')), allow_redirects=False)
# ( just some example URL with [] )
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "3.3.1"
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.9.1"
},
"platform": {
"release": "20.3.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "1010109f",
"version": "20.0.1"
},
"requests": {
"version": "2.25.1"
},
"system_ssl": {
"version": "1010109f"
},
"urllib3": {
"version": "1.26.2"
},
"using_pyopenssl": true
}
```
(the server runs Drupal 8 with PHP/7.3.11 if that matters)
## Workaround
In urllib3.util.url I replaced
`QUERY_CHARS = FRAGMENT_CHARS = PATH_CHARS | {"?"}`
to
`QUERY_CHARS = FRAGMENT_CHARS = PATH_CHARS | {"?","[","]","(",")","=",":","_"}`
(I think there are more safe characters though) | {
"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/5732/reactions"
} | https://api.github.com/repos/psf/requests/issues/5732/timeline | null | completed | null | null | false | [
"urllib3 follows RFC 3986 on URLs. If you look at the [ABNF](https://tools.ietf.org/html/rfc3986#appendix-A) for query you'll see that `[` and `]` are not allowed (they are characters in `gen-delims` so not in `pchar`) so I would argue that the server is not handling your request correctly. ",
"Further, not escap... |
https://api.github.com/repos/psf/requests/issues/5731 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5731/labels{/name} | https://api.github.com/repos/psf/requests/issues/5731/comments | https://api.github.com/repos/psf/requests/issues/5731/events | https://github.com/psf/requests/issues/5731 | 792,638,349 | MDU6SXNzdWU3OTI2MzgzNDk= | 5,731 | no/no_proxy is not honoured | {
"avatar_url": "https://avatars.githubusercontent.com/u/2320837?v=4",
"events_url": "https://api.github.com/users/Suika/events{/privacy}",
"followers_url": "https://api.github.com/users/Suika/followers",
"following_url": "https://api.github.com/users/Suika/following{/other_user}",
"gists_url": "https://api.github.com/users/Suika/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Suika",
"id": 2320837,
"login": "Suika",
"node_id": "MDQ6VXNlcjIzMjA4Mzc=",
"organizations_url": "https://api.github.com/users/Suika/orgs",
"received_events_url": "https://api.github.com/users/Suika/received_events",
"repos_url": "https://api.github.com/users/Suika/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Suika/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Suika/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Suika",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 8 | 2021-01-23T19:59:26Z | 2024-02-06T17:54:56Z | null | NONE | null | I guess PRs are overlooked without an Issues. It's about #5596 and the way handle no_proxy. Since urllib handles `no_proxy` properly, it's the logic in requests that messes with the env in a seemingly twisted way.
## Expected Result
The ability to use no_proxy vairable via OS and function arguments.
## Actual Result
Only OS `no_proxy` ENV is being processed. Uncer certain conditions that were described multiple times in the `no_proxy` issues.
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.9.2"
},
"idna": {
"version": "2.9"
},
"implementation": {
"name": "CPython",
"version": "3.8.5"
},
"platform": {
"release": "4.15.18-10-pve",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010107f",
"version": "19.1.0"
},
"requests": {
"version": "2.23.0"
},
"system_ssl": {
"version": "1010107f"
},
"urllib3": {
"version": "1.25.9"
},
"using_pyopenssl": true
}
```
| null | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5731/reactions"
} | https://api.github.com/repos/psf/requests/issues/5731/timeline | null | null | null | null | false | [
"I have the same issue: `no_proxy` is ignored in a simple `requests.get()` call:\r\n```\r\nimport requests\r\n\r\nproxies = {\r\n 'http': 'proxy.example.com',\r\n 'no_proxy': 'google.com'\r\n}\r\n\r\nrequests.get('http://google.com/', proxies=proxies)\r\n```\r\n\r\nWith 2.28.0 this yields:\r\n\r\n```\r\nrequests.... |
https://api.github.com/repos/psf/requests/issues/5730 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5730/labels{/name} | https://api.github.com/repos/psf/requests/issues/5730/comments | https://api.github.com/repos/psf/requests/issues/5730/events | https://github.com/psf/requests/issues/5730 | 792,612,984 | MDU6SXNzdWU3OTI2MTI5ODQ= | 5,730 | Why does the same request return different things on burp suite and python? | {
"avatar_url": "https://avatars.githubusercontent.com/u/72662270?v=4",
"events_url": "https://api.github.com/users/jvictore/events{/privacy}",
"followers_url": "https://api.github.com/users/jvictore/followers",
"following_url": "https://api.github.com/users/jvictore/following{/other_user}",
"gists_url": "https://api.github.com/users/jvictore/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jvictore",
"id": 72662270,
"login": "jvictore",
"node_id": "MDQ6VXNlcjcyNjYyMjcw",
"organizations_url": "https://api.github.com/users/jvictore/orgs",
"received_events_url": "https://api.github.com/users/jvictore/received_events",
"repos_url": "https://api.github.com/users/jvictore/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jvictore/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jvictore/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jvictore",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2021-01-23T17:38:39Z | 2021-08-28T00:05:56Z | 2021-01-23T22:56:45Z | NONE | resolved | When I make a post with Burpsuite the post is executed correctly. But whe I try to do the same post using python requests I get the 401 error. I am using the same User agent and the same headers for everything. There is a way for the site to recognize that the request isn’t from a browser? Do you have any ideias for what could I do?
I look for the answer everywhere, mainly on stack overflow, but I didn’t find the answer.
Thank for the help | {
"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/5730/reactions"
} | https://api.github.com/repos/psf/requests/issues/5730/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 ask for help on [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here.\r\n\r\n"
] |
https://api.github.com/repos/psf/requests/issues/5729 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5729/labels{/name} | https://api.github.com/repos/psf/requests/issues/5729/comments | https://api.github.com/repos/psf/requests/issues/5729/events | https://github.com/psf/requests/issues/5729 | 792,521,358 | MDU6SXNzdWU3OTI1MjEzNTg= | 5,729 | Cookies d'ont work | {
"avatar_url": "https://avatars.githubusercontent.com/u/53025923?v=4",
"events_url": "https://api.github.com/users/UnknownSourceCode/events{/privacy}",
"followers_url": "https://api.github.com/users/UnknownSourceCode/followers",
"following_url": "https://api.github.com/users/UnknownSourceCode/following{/other_user}",
"gists_url": "https://api.github.com/users/UnknownSourceCode/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/UnknownSourceCode",
"id": 53025923,
"login": "UnknownSourceCode",
"node_id": "MDQ6VXNlcjUzMDI1OTIz",
"organizations_url": "https://api.github.com/users/UnknownSourceCode/orgs",
"received_events_url": "https://api.github.com/users/UnknownSourceCode/received_events",
"repos_url": "https://api.github.com/users/UnknownSourceCode/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/UnknownSourceCode/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/UnknownSourceCode/subscriptions",
"type": "User",
"url": "https://api.github.com/users/UnknownSourceCode",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2021-01-23T10:01:56Z | 2021-08-28T00:05:56Z | 2021-01-23T13:05:32Z | NONE | resolved | Well i wanted to Login to my textnow account to send smsusing cookies
i copied from firefox to curl and the request done and worked very well
when i use python
requests.get("https://www.textnow.com/api/sessions",
headers={
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
},
cookies={},
)
i tried use Cookies in Cookies KeyWord i tried use requests.cookies.set ,set-cookie header, cookie header , tried injecting cookies to cookie jar and tried use alot of things and everything i found on stackoverflow i tried
Every New thing i try Cookies Fail
## Reproduction Steps | {
"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/5729/reactions"
} | https://api.github.com/repos/psf/requests/issues/5729/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.",
"I TRIED ALl StackOVerflow posts no solution\r\n",
... |
https://api.github.com/repos/psf/requests/issues/5728 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5728/labels{/name} | https://api.github.com/repos/psf/requests/issues/5728/comments | https://api.github.com/repos/psf/requests/issues/5728/events | https://github.com/psf/requests/issues/5728 | 792,013,249 | MDU6SXNzdWU3OTIwMTMyNDk= | 5,728 | GET Method + HTTPS does not append request Body | {
"avatar_url": "https://avatars.githubusercontent.com/u/62646829?v=4",
"events_url": "https://api.github.com/users/MimounMen/events{/privacy}",
"followers_url": "https://api.github.com/users/MimounMen/followers",
"following_url": "https://api.github.com/users/MimounMen/following{/other_user}",
"gists_url": "https://api.github.com/users/MimounMen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/MimounMen",
"id": 62646829,
"login": "MimounMen",
"node_id": "MDQ6VXNlcjYyNjQ2ODI5",
"organizations_url": "https://api.github.com/users/MimounMen/orgs",
"received_events_url": "https://api.github.com/users/MimounMen/received_events",
"repos_url": "https://api.github.com/users/MimounMen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/MimounMen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/MimounMen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/MimounMen",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2021-01-22T13:40:34Z | 2021-08-28T00:05:57Z | 2021-01-22T16:04:14Z | NONE | resolved | I'm writing a Script to interact with an Elasticsearch Instance. The ES Server blocks POST Requests, therefore i have to use GET Methods with a request body.
## Expected Result
A HTTP GET Request with Content-type and Content-length set with the corrensponding body
## Actual Result
The Headers are always been set, but if the protocol is HTTPS the body will not be appended.
## Reproduction Steps
```python
import requests, json
proxies={'http':'http://localhost:8080',
'https':'https://localhost:8080'
}
test={'test':'test'}
payload=json.dumps(test)
#Does not append Body (GET,HTTPS)
r=requests.request(method='get',url='https://google.com',json=payload,proxies=proxies)
#Does Append Body (GET, HTTP)
r=requests.request(method='get',url='http://google.com',json=payload,proxies=proxies)
#Does append Body (POST HTTPS)
r=requests.request(method='post',url='https://google.com',json=payload,proxies=proxies)
``` | {
"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/5728/reactions"
} | https://api.github.com/repos/psf/requests/issues/5728/timeline | null | completed | null | null | false | [
"Hey, I know about Elasticsearch because I'm the Python ES client maintainer. Elasticsearch accepts POST in place of GET for all requests that require a body. The client automatically uses POST for you for this reason.",
"Hi Sethmlarson, thanks for the quick answer.\r\nThere is a Proxy between the client and the ... |
https://api.github.com/repos/psf/requests/issues/5727 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5727/labels{/name} | https://api.github.com/repos/psf/requests/issues/5727/comments | https://api.github.com/repos/psf/requests/issues/5727/events | https://github.com/psf/requests/pull/5727 | 792,009,179 | MDExOlB1bGxSZXF1ZXN0NTU5OTY3NTM4 | 5,727 | Fix typo error | {
"avatar_url": "https://avatars.githubusercontent.com/u/22741481?v=4",
"events_url": "https://api.github.com/users/xiaojueguan/events{/privacy}",
"followers_url": "https://api.github.com/users/xiaojueguan/followers",
"following_url": "https://api.github.com/users/xiaojueguan/following{/other_user}",
"gists_url": "https://api.github.com/users/xiaojueguan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/xiaojueguan",
"id": 22741481,
"login": "xiaojueguan",
"node_id": "MDQ6VXNlcjIyNzQxNDgx",
"organizations_url": "https://api.github.com/users/xiaojueguan/orgs",
"received_events_url": "https://api.github.com/users/xiaojueguan/received_events",
"repos_url": "https://api.github.com/users/xiaojueguan/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/xiaojueguan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/xiaojueguan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/xiaojueguan",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2021-01-22T13:34:35Z | 2021-08-27T00:08:50Z | 2021-01-22T13:41:40Z | CONTRIBUTOR | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4",
"events_url": "https://api.github.com/users/sethmlarson/events{/privacy}",
"followers_url": "https://api.github.com/users/sethmlarson/followers",
"following_url": "https://api.github.com/users/sethmlarson/following{/other_user}",
"gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sethmlarson",
"id": 18519037,
"login": "sethmlarson",
"node_id": "MDQ6VXNlcjE4NTE5MDM3",
"organizations_url": "https://api.github.com/users/sethmlarson/orgs",
"received_events_url": "https://api.github.com/users/sethmlarson/received_events",
"repos_url": "https://api.github.com/users/sethmlarson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sethmlarson",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5727/reactions"
} | https://api.github.com/repos/psf/requests/issues/5727/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5727.diff",
"html_url": "https://github.com/psf/requests/pull/5727",
"merged_at": "2021-01-22T13:41:39Z",
"patch_url": "https://github.com/psf/requests/pull/5727.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5727"
} | true | [] | |
https://api.github.com/repos/psf/requests/issues/5726 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5726/labels{/name} | https://api.github.com/repos/psf/requests/issues/5726/comments | https://api.github.com/repos/psf/requests/issues/5726/events | https://github.com/psf/requests/issues/5726 | 791,814,139 | MDU6SXNzdWU3OTE4MTQxMzk= | 5,726 | Possible memory leaking when combining session, threading and proxies | {
"avatar_url": "https://avatars.githubusercontent.com/u/9117697?v=4",
"events_url": "https://api.github.com/users/jaimecoj/events{/privacy}",
"followers_url": "https://api.github.com/users/jaimecoj/followers",
"following_url": "https://api.github.com/users/jaimecoj/following{/other_user}",
"gists_url": "https://api.github.com/users/jaimecoj/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jaimecoj",
"id": 9117697,
"login": "jaimecoj",
"node_id": "MDQ6VXNlcjkxMTc2OTc=",
"organizations_url": "https://api.github.com/users/jaimecoj/orgs",
"received_events_url": "https://api.github.com/users/jaimecoj/received_events",
"repos_url": "https://api.github.com/users/jaimecoj/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jaimecoj/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jaimecoj/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jaimecoj",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 7 | 2021-01-22T08:42:05Z | 2023-11-03T02:03:03Z | null | NONE | null | I it helps I got error `OSError: [Errno 24] Too many open files` when running script, not sure if it is related with memory leak, I solved setting to 10000 `ulimit -n 10000`
## Expected Result
RAM usage kept under reasonable limits
## Actual Result
RAM usage doesn't stop growing
## Reproduction Steps
I usually wouldn't be posting target website or the proxy credentials, but in this case I think they are needed for reproduce the bug.
```
import requests
from threading import Thread
from time import sleep
session = requests.Session()
from memory_profiler import profile
from random import randrange
finished = False
def get_proxy():
proxy = "http://lum-customer-hl_f53c879b-zone-static-session-" + str(randrange(999999)) + ":au2d3rzz8tut@zproxy.lum-superproxy.io:22225"
return {
"http": proxy,
"https": proxy
}
def make_request(url):
session.get(url, proxies=get_proxy())
def worker():
while True:
if finished: return
make_request("http://1000imagens.com/")
@profile
def main():
global finished
threads = []
for i in range(2):
t = Thread(target=worker)
t.start()
threads.append(t)
count = 0
while True:
sleep(1)
count += 1
if count == 300:
finished = True
return
main()
```
## System Information
$ python3.9 -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.9.1"
},
"platform": {
"release": "4.15.0-134-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.25.1"
},
"system_ssl": {
"version": "1010100f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}
```
```
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic
```
I tried with python versions 3.6, 3.8 and 3.9 and found no difference.
## Output of memory_profiler
```
Line # Mem usage Increment Occurences Line Contents
============================================================
31 23.8 MiB 23.8 MiB 1 @profile
32 def main():
33 global finished
34 23.8 MiB 0.0 MiB 1 threads = []
35 23.8 MiB 0.0 MiB 3 for i in range(2):
36 23.8 MiB 0.0 MiB 2 t = Thread(target=worker)
37 23.8 MiB 0.0 MiB 2 t.start()
38 23.8 MiB 0.0 MiB 2 threads.append(t)
39
40 23.8 MiB 0.0 MiB 1 count = 0
41 while True:
42 547.1 MiB 523.2 MiB 300 sleep(1)
43 547.1 MiB 0.0 MiB 300 count += 1
44 547.1 MiB 0.0 MiB 300 if count == 300:
45 547.1 MiB 0.0 MiB 1 finished = True
46 547.1 MiB 0.0 MiB 1 return
```
After 5 minutes it eats +500MB ram. If I leave it running indefinitely it would consume all available ram and would be killed.
| 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/5726/reactions"
} | https://api.github.com/repos/psf/requests/issues/5726/timeline | null | null | null | null | false | [
"If I add `verify=False` to same script it doesn't leak, so it seems related to SSL verification\r\n\r\n```\r\nLine # Mem usage Increment Occurences Line Contents\r\n============================================================\r\n 31 23.9 MiB 23.9 MiB 1 @profile\r\n 32 ... |
https://api.github.com/repos/psf/requests/issues/5725 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5725/labels{/name} | https://api.github.com/repos/psf/requests/issues/5725/comments | https://api.github.com/repos/psf/requests/issues/5725/events | https://github.com/psf/requests/issues/5725 | 791,526,254 | MDU6SXNzdWU3OTE1MjYyNTQ= | 5,725 | Support for logging is abysmal, and documentation is missing | {
"avatar_url": "https://avatars.githubusercontent.com/u/4665100?v=4",
"events_url": "https://api.github.com/users/jackjansen/events{/privacy}",
"followers_url": "https://api.github.com/users/jackjansen/followers",
"following_url": "https://api.github.com/users/jackjansen/following{/other_user}",
"gists_url": "https://api.github.com/users/jackjansen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jackjansen",
"id": 4665100,
"login": "jackjansen",
"node_id": "MDQ6VXNlcjQ2NjUxMDA=",
"organizations_url": "https://api.github.com/users/jackjansen/orgs",
"received_events_url": "https://api.github.com/users/jackjansen/received_events",
"repos_url": "https://api.github.com/users/jackjansen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jackjansen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jackjansen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jackjansen",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 3 | 2021-01-21T22:03:23Z | 2022-02-21T22:54:10Z | null | NONE | null | Attempting to change logging for requests is very complicated, can only be done application-wide (I think), and the documentation is missing.
Google finds many incorrect suggestions (mainly pointing to readthedocs documentation of requests version 0.x), the only workable information I found was at this stack overflow thread: https://stackoverflow.com/questions/10588644/how-can-i-see-the-entire-http-request-thats-being-sent-by-my-python-application
As a first step it would be good if the information from this thread (insofar as it is still correct) was included in the documentation somewhere.
But it would be a lot nicer if there was easier support for logging, possibly through a toolbelt module or something. Controlling logging on a fine-grained scale is vital, especially when you are trying to debug things like SSL-related errors (which are rather unintelligible in their own right) in a large scale application.
I understand that part of the problem is with urllib3, but I guess I have to start somewhere.
And I'm willing to help, if personpower is an issue. | 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/5725/reactions"
} | https://api.github.com/repos/psf/requests/issues/5725/timeline | null | null | null | null | false | [
"I guess nobody would mind if information from https://docs.python-requests.org/en/master/api/#api-changes will get its own Debugging chapter.\r\n\r\nMerging the actual code into helper method might not be accepted as that will lead to many pull requests with different formats that people want. For example, sometim... |
https://api.github.com/repos/psf/requests/issues/5724 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5724/labels{/name} | https://api.github.com/repos/psf/requests/issues/5724/comments | https://api.github.com/repos/psf/requests/issues/5724/events | https://github.com/psf/requests/issues/5724 | 791,335,269 | MDU6SXNzdWU3OTEzMzUyNjk= | 5,724 | Support the new Deprecation HTTP header | {
"avatar_url": "https://avatars.githubusercontent.com/u/1526883?v=4",
"events_url": "https://api.github.com/users/pimterry/events{/privacy}",
"followers_url": "https://api.github.com/users/pimterry/followers",
"following_url": "https://api.github.com/users/pimterry/following{/other_user}",
"gists_url": "https://api.github.com/users/pimterry/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pimterry",
"id": 1526883,
"login": "pimterry",
"node_id": "MDQ6VXNlcjE1MjY4ODM=",
"organizations_url": "https://api.github.com/users/pimterry/orgs",
"received_events_url": "https://api.github.com/users/pimterry/received_events",
"repos_url": "https://api.github.com/users/pimterry/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pimterry/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pimterry/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pimterry",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 9 | 2021-01-21T17:04:06Z | 2022-02-26T03:00:20Z | 2021-11-28T02:58:30Z | NONE | resolved | The Deprecation header indicates that an API is deprecated, and shouldn't be used. It's either `true`, or an HTTP datetime value (the time after which the API is deprecated).
This is a draft HTTP standard from the IETF HTTPAPI working group: https://datatracker.ietf.org/doc/draft-ietf-httpapi-deprecation-header/. It's still a draft, but it's been around since 2019 and been through a few revisions already. It'd be great if it was supported by Requests!
I think there's a good argument that Requests should treat this like any of its own internal deprecation warnings (e.g. [a](https://github.com/psf/requests/blob/4f6c0187150af09d085c03096504934eb91c7a9e/requests/auth.py#L38-L55), [b](https://github.com/psf/requests/blob/589c4547338b592b1fb77c65663d8aa6fbb7e38b/requests/utils.py#L446-L450), [c](https://github.com/psf/requests/blob/589c4547338b592b1fb77c65663d8aa6fbb7e38b/requests/utils.py#L551-L555)), i.e. automatically logging it via `warnings` (if true, or if the date in the header has passed) to notify developers that they're depending on explicitly deprecated functionality. This seems like a quick standards-based win to help developers deal with API changes before their projects break, rather than later.
I understand if you'd prefer to wait until the standard is finalized, but in the meantime I'm just interested to know if the Requests team is open to supporting this in theory?
Feedback on the standard is also very welcome, the WG mailing list is here: https://www.ietf.org/mailman/listinfo/httpapi | {
"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/5724/reactions"
} | https://api.github.com/repos/psf/requests/issues/5724/timeline | null | completed | null | null | false | [
"Since this standard appears to not require any functional changes beyond unconditionally emitting warnings, should this instead be supported by applications that use Requests? That's my initial thought here. ",
"Yes, it could be, it's absolutely possible to handle application-side (with a session hook as the bes... |
https://api.github.com/repos/psf/requests/issues/5723 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5723/labels{/name} | https://api.github.com/repos/psf/requests/issues/5723/comments | https://api.github.com/repos/psf/requests/issues/5723/events | https://github.com/psf/requests/pull/5723 | 789,537,622 | MDExOlB1bGxSZXF1ZXN0NTU3ODY5Njg4 | 5,723 | Format c_rehash | {
"avatar_url": "https://avatars.githubusercontent.com/u/1192780?v=4",
"events_url": "https://api.github.com/users/bbodenmiller/events{/privacy}",
"followers_url": "https://api.github.com/users/bbodenmiller/followers",
"following_url": "https://api.github.com/users/bbodenmiller/following{/other_user}",
"gists_url": "https://api.github.com/users/bbodenmiller/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bbodenmiller",
"id": 1192780,
"login": "bbodenmiller",
"node_id": "MDQ6VXNlcjExOTI3ODA=",
"organizations_url": "https://api.github.com/users/bbodenmiller/orgs",
"received_events_url": "https://api.github.com/users/bbodenmiller/received_events",
"repos_url": "https://api.github.com/users/bbodenmiller/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bbodenmiller/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bbodenmiller/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bbodenmiller",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2021-01-20T01:28:08Z | 2021-08-27T00:08:50Z | 2021-01-20T14:58:36Z | CONTRIBUTOR | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5723/reactions"
} | https://api.github.com/repos/psf/requests/issues/5723/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5723.diff",
"html_url": "https://github.com/psf/requests/pull/5723",
"merged_at": "2021-01-20T14:58:36Z",
"patch_url": "https://github.com/psf/requests/pull/5723.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5723"
} | true | [] | |
https://api.github.com/repos/psf/requests/issues/5722 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5722/labels{/name} | https://api.github.com/repos/psf/requests/issues/5722/comments | https://api.github.com/repos/psf/requests/issues/5722/events | https://github.com/psf/requests/pull/5722 | 789,335,333 | MDExOlB1bGxSZXF1ZXN0NTU3NjkyNTg3 | 5,722 | To work just like normal browsers, default headers in requests.api.get(), requests.api.request(), requests.models.Request.__init__() and requests.sessions.Session.request() are set | {
"avatar_url": "https://avatars.githubusercontent.com/u/74560907?v=4",
"events_url": "https://api.github.com/users/shreyanavigyan/events{/privacy}",
"followers_url": "https://api.github.com/users/shreyanavigyan/followers",
"following_url": "https://api.github.com/users/shreyanavigyan/following{/other_user}",
"gists_url": "https://api.github.com/users/shreyanavigyan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shreyanavigyan",
"id": 74560907,
"login": "shreyanavigyan",
"node_id": "MDQ6VXNlcjc0NTYwOTA3",
"organizations_url": "https://api.github.com/users/shreyanavigyan/orgs",
"received_events_url": "https://api.github.com/users/shreyanavigyan/received_events",
"repos_url": "https://api.github.com/users/shreyanavigyan/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shreyanavigyan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shreyanavigyan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shreyanavigyan",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2021-01-19T20:20:43Z | 2021-08-27T00:08:51Z | 2021-01-19T20:25:49Z | NONE | resolved | The headers argument in `requests.api.get()`, `requests.api.request()`, `requests.models.Request.__init__()` and `requests.sessions.Session.request()` are set to a default dictionary value rather than NoneType Data Type to handle errors like 503 server error though the URL is correct. Some websites block webscrapers. To avoid being blocked, this default headers is very useful. This works in Mac OS X, Linux and Windows as of January 2020.
For example, https://www.amazon.com blocks Web-scrapers nowadays. Before this change, the returned response object's status code was always 503 though the website existed.

After this change, the returned response object's status code is always 200.

| {
"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/5722/reactions"
} | https://api.github.com/repos/psf/requests/issues/5722/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5722.diff",
"html_url": "https://github.com/psf/requests/pull/5722",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5722.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5722"
} | true | [
"Hi @shreyanavigyan,\r\n\r\nI don't think it makes sense to add these user agents to Requests. They aren't actually accurate and the goal of Requests isn't to impersonate a browser. Users are free to add headers as they see fit, but we're not trying to violate protective restrictions services have put in place by d... |
https://api.github.com/repos/psf/requests/issues/5721 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5721/labels{/name} | https://api.github.com/repos/psf/requests/issues/5721/comments | https://api.github.com/repos/psf/requests/issues/5721/events | https://github.com/psf/requests/issues/5721 | 789,267,504 | MDU6SXNzdWU3ODkyNjc1MDQ= | 5,721 | requests library code walkthrough | {
"avatar_url": "https://avatars.githubusercontent.com/u/77692938?v=4",
"events_url": "https://api.github.com/users/samrohon/events{/privacy}",
"followers_url": "https://api.github.com/users/samrohon/followers",
"following_url": "https://api.github.com/users/samrohon/following{/other_user}",
"gists_url": "https://api.github.com/users/samrohon/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/samrohon",
"id": 77692938,
"login": "samrohon",
"node_id": "MDQ6VXNlcjc3NjkyOTM4",
"organizations_url": "https://api.github.com/users/samrohon/orgs",
"received_events_url": "https://api.github.com/users/samrohon/received_events",
"repos_url": "https://api.github.com/users/samrohon/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/samrohon/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/samrohon/subscriptions",
"type": "User",
"url": "https://api.github.com/users/samrohon",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2021-01-19T18:44:21Z | 2022-02-26T04:00:33Z | 2021-11-28T03:37:59Z | NONE | resolved | Wannabe opensource contributor and intermediate python developer here. I am wondering if any contributors of this library has done or could do a code walkthrough video ?
- It is difficult for newbies to undestand the code base from a bigger perspective, what are the patterns used, design decisions made etc merely going throught the code
- Most of the time there is a lot of context that is required by the reader, around why code is written the way it is - which cannot be understood simply reading the code
- There are a lot of tutorials on how to use the repo functionality, but I could not find any on the implementation details and the design.
- This library has been reccomended by many as a good case study of readable python code. It would highly benifit the community if there is a free-form walkthrough of the code base - which gives a good intro to the internal of the library - and give a bigger picture on how a successful python opensource project is structured and run. | {
"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/5721/reactions"
} | https://api.github.com/repos/psf/requests/issues/5721/timeline | null | completed | null | null | false | [
"> * This library has been reccomended by many as a good case study of readable python code.\r\n\r\nAs a maintainer for several years, I've always disagreed with this notion. That said, those folks would be the people who should be doing the walk-through. I would never feel honest giving such a walk through, ... |
https://api.github.com/repos/psf/requests/issues/5720 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5720/labels{/name} | https://api.github.com/repos/psf/requests/issues/5720/comments | https://api.github.com/repos/psf/requests/issues/5720/events | https://github.com/psf/requests/issues/5720 | 788,116,053 | MDU6SXNzdWU3ODgxMTYwNTM= | 5,720 | Requests is using dependencies with copyleft licenses | {
"avatar_url": "https://avatars.githubusercontent.com/u/12371245?v=4",
"events_url": "https://api.github.com/users/farooquiyasir/events{/privacy}",
"followers_url": "https://api.github.com/users/farooquiyasir/followers",
"following_url": "https://api.github.com/users/farooquiyasir/following{/other_user}",
"gists_url": "https://api.github.com/users/farooquiyasir/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/farooquiyasir",
"id": 12371245,
"login": "farooquiyasir",
"node_id": "MDQ6VXNlcjEyMzcxMjQ1",
"organizations_url": "https://api.github.com/users/farooquiyasir/orgs",
"received_events_url": "https://api.github.com/users/farooquiyasir/received_events",
"repos_url": "https://api.github.com/users/farooquiyasir/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/farooquiyasir/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/farooquiyasir/subscriptions",
"type": "User",
"url": "https://api.github.com/users/farooquiyasir",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2021-01-18T09:57:31Z | 2021-08-28T00:05:58Z | 2021-01-18T14:57:16Z | NONE | resolved | We are using request's latest version but it uses certifi as depedency which is under MPL 2.0 license. This makes certifi a plugin with a copyleft license. Our company does not want to use any copyleft license plugin. I know that requests added certifi as separate plugin dependency after v 2.16 and onwards but I am not sure if its okay to use v2.15 because a lot of other bugs would also be fixed in latest versions. Is there a way we can exclude certifi depedency to avoid using a copyleft license plugin? | {
"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/5720/reactions"
} | https://api.github.com/repos/psf/requests/issues/5720/timeline | null | completed | null | null | false | [
"The MPL-licensed code included in certifi is not modified so doesn't trigger the MPL license terms. Please search for existing closed issues before opening a new one. "
] |
https://api.github.com/repos/psf/requests/issues/5719 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5719/labels{/name} | https://api.github.com/repos/psf/requests/issues/5719/comments | https://api.github.com/repos/psf/requests/issues/5719/events | https://github.com/psf/requests/issues/5719 | 787,146,532 | MDU6SXNzdWU3ODcxNDY1MzI= | 5,719 | Old Dependencies | {
"avatar_url": "https://avatars.githubusercontent.com/u/22400253?v=4",
"events_url": "https://api.github.com/users/gtoph/events{/privacy}",
"followers_url": "https://api.github.com/users/gtoph/followers",
"following_url": "https://api.github.com/users/gtoph/following{/other_user}",
"gists_url": "https://api.github.com/users/gtoph/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gtoph",
"id": 22400253,
"login": "gtoph",
"node_id": "MDQ6VXNlcjIyNDAwMjUz",
"organizations_url": "https://api.github.com/users/gtoph/orgs",
"received_events_url": "https://api.github.com/users/gtoph/received_events",
"repos_url": "https://api.github.com/users/gtoph/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gtoph/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gtoph/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gtoph",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2021-01-15T19:37:01Z | 2021-08-28T00:05:58Z | 2021-01-15T19:40:39Z | NONE | resolved | Just wondering why the dependencies haven't been updated for a while now. Seems to be requiring a pretty old version of IDNA
**requests 2.25.1 requires idna<3,>=2.5**
Ran it with the latest 3.1 and still seems to work fine. Wonder if the older version is a real requirement?
| {
"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/5719/reactions"
} | https://api.github.com/repos/psf/requests/issues/5719/timeline | null | completed | null | null | false | [
"Hi @gtoph,\r\n\r\nidna 3.0 was only released 2 weeks ago. We've restricted version caps at major version bumps to avoid pulling in breaking API changes without testing. There's currently a PR (#5711) open discussing this, so we'll close this in favor of that. Thanks.",
"No worries, it's just my ocd to have the l... |
https://api.github.com/repos/psf/requests/issues/5718 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5718/labels{/name} | https://api.github.com/repos/psf/requests/issues/5718/comments | https://api.github.com/repos/psf/requests/issues/5718/events | https://github.com/psf/requests/pull/5718 | 783,377,581 | MDExOlB1bGxSZXF1ZXN0NTUyNzQ3MDU2 | 5,718 | c2b307d | {
"avatar_url": "https://avatars.githubusercontent.com/u/77180439?v=4",
"events_url": "https://api.github.com/users/Aleksey0329/events{/privacy}",
"followers_url": "https://api.github.com/users/Aleksey0329/followers",
"following_url": "https://api.github.com/users/Aleksey0329/following{/other_user}",
"gists_url": "https://api.github.com/users/Aleksey0329/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Aleksey0329",
"id": 77180439,
"login": "Aleksey0329",
"node_id": "MDQ6VXNlcjc3MTgwNDM5",
"organizations_url": "https://api.github.com/users/Aleksey0329/orgs",
"received_events_url": "https://api.github.com/users/Aleksey0329/received_events",
"repos_url": "https://api.github.com/users/Aleksey0329/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Aleksey0329/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Aleksey0329/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Aleksey0329",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2021-01-11T13:37:03Z | 2021-01-11T14:06:52Z | 2021-01-11T14:06:40Z | NONE | spam | Grohs | {
"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/5718/reactions"
} | https://api.github.com/repos/psf/requests/issues/5718/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5718.diff",
"html_url": "https://github.com/psf/requests/pull/5718",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5718.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5718"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/5717 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5717/labels{/name} | https://api.github.com/repos/psf/requests/issues/5717/comments | https://api.github.com/repos/psf/requests/issues/5717/events | https://github.com/psf/requests/pull/5717 | 782,843,151 | MDExOlB1bGxSZXF1ZXN0NTUyMzAxODg1 | 5,717 | Make raise_for_status() chainable | {
"avatar_url": "https://avatars.githubusercontent.com/u/24324496?v=4",
"events_url": "https://api.github.com/users/sambragg/events{/privacy}",
"followers_url": "https://api.github.com/users/sambragg/followers",
"following_url": "https://api.github.com/users/sambragg/following{/other_user}",
"gists_url": "https://api.github.com/users/sambragg/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sambragg",
"id": 24324496,
"login": "sambragg",
"node_id": "MDQ6VXNlcjI0MzI0NDk2",
"organizations_url": "https://api.github.com/users/sambragg/orgs",
"received_events_url": "https://api.github.com/users/sambragg/received_events",
"repos_url": "https://api.github.com/users/sambragg/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sambragg/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sambragg/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sambragg",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2021-01-10T15:35:20Z | 2021-08-27T00:08:52Z | 2021-01-10T17:16:43Z | NONE | resolved | Frequently, I find myself doing the following:
```python
r = requests.get(url)
r.raise_for_status()
json = r.json()
```
I thought it may be useful to be able to do the following instead, where `raise_for_status()` is chainable:
```python
r = requests.get(url)
json = r.raise_for_status().json()
``` | {
"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/5717/reactions"
} | https://api.github.com/repos/psf/requests/issues/5717/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5717.diff",
"html_url": "https://github.com/psf/requests/pull/5717",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5717.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5717"
} | true | [
"Unfortunately, Requests is under a feature-freeze. As a result, we won't be expanding the behaviour of `raise_for_status()`"
] |
https://api.github.com/repos/psf/requests/issues/5716 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5716/labels{/name} | https://api.github.com/repos/psf/requests/issues/5716/comments | https://api.github.com/repos/psf/requests/issues/5716/events | https://github.com/psf/requests/pull/5716 | 782,713,713 | MDExOlB1bGxSZXF1ZXN0NTUyMjA2NjAz | 5,716 | testes e mais testes | {
"avatar_url": "https://avatars.githubusercontent.com/u/69920850?v=4",
"events_url": "https://api.github.com/users/rayokofi/events{/privacy}",
"followers_url": "https://api.github.com/users/rayokofi/followers",
"following_url": "https://api.github.com/users/rayokofi/following{/other_user}",
"gists_url": "https://api.github.com/users/rayokofi/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rayokofi",
"id": 69920850,
"login": "rayokofi",
"node_id": "MDQ6VXNlcjY5OTIwODUw",
"organizations_url": "https://api.github.com/users/rayokofi/orgs",
"received_events_url": "https://api.github.com/users/rayokofi/received_events",
"repos_url": "https://api.github.com/users/rayokofi/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rayokofi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rayokofi/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rayokofi",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2021-01-10T00:32:32Z | 2021-08-27T00:08:52Z | 2021-01-10T00:41:48Z | NONE | resolved | só treinando e nada mais | {
"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/5716/reactions"
} | https://api.github.com/repos/psf/requests/issues/5716/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5716.diff",
"html_url": "https://github.com/psf/requests/pull/5716",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5716.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5716"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/5715 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5715/labels{/name} | https://api.github.com/repos/psf/requests/issues/5715/comments | https://api.github.com/repos/psf/requests/issues/5715/events | https://github.com/psf/requests/pull/5715 | 781,799,770 | MDExOlB1bGxSZXF1ZXN0NTUxNDY4NTc0 | 5,715 | Add json arguments to .put and .patch | {
"avatar_url": "https://avatars.githubusercontent.com/u/117248?v=4",
"events_url": "https://api.github.com/users/mdelcambre/events{/privacy}",
"followers_url": "https://api.github.com/users/mdelcambre/followers",
"following_url": "https://api.github.com/users/mdelcambre/following{/other_user}",
"gists_url": "https://api.github.com/users/mdelcambre/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mdelcambre",
"id": 117248,
"login": "mdelcambre",
"node_id": "MDQ6VXNlcjExNzI0OA==",
"organizations_url": "https://api.github.com/users/mdelcambre/orgs",
"received_events_url": "https://api.github.com/users/mdelcambre/received_events",
"repos_url": "https://api.github.com/users/mdelcambre/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mdelcambre/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mdelcambre/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mdelcambre",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2021-01-08T02:47:03Z | 2021-08-27T00:08:52Z | 2021-01-08T19:24:55Z | NONE | resolved | This PR adds the `json` argument to both the `put` and `patch` function definitions. This is to bring them into agreement with the docstring of each function and to mirror the definition of `post`.
This should not change any functionally as the `json` arg would be captured by the `**kwargs` expansion.
Obviously, if this difference was intentional, feel free to close without merging. Alternatively, if you prefer I can quickly put together a pr to update the docstring. It was just something that briefly tripped me up and I figured it was quick and easy to change. | {
"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/5715/reactions"
} | https://api.github.com/repos/psf/requests/issues/5715/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5715.diff",
"html_url": "https://github.com/psf/requests/pull/5715",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5715.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5715"
} | true | [
"Duplicate of https://github.com/psf/requests/pull/3664",
"Swear I searched before submitting but must have only looked in issues not closed PRs, sorry about that.\r\n\r\nIronically, it was the PR from that (#3666) that introduced the issue I was trying to solve. Currently, the documentation specifically calls ou... |
https://api.github.com/repos/psf/requests/issues/5714 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5714/labels{/name} | https://api.github.com/repos/psf/requests/issues/5714/comments | https://api.github.com/repos/psf/requests/issues/5714/events | https://github.com/psf/requests/issues/5714 | 781,373,560 | MDU6SXNzdWU3ODEzNzM1NjA= | 5,714 | Inconsistent behavior after redirects when passing cookies directly | {
"avatar_url": "https://avatars.githubusercontent.com/u/4580066?v=4",
"events_url": "https://api.github.com/users/JanPokorny/events{/privacy}",
"followers_url": "https://api.github.com/users/JanPokorny/followers",
"following_url": "https://api.github.com/users/JanPokorny/following{/other_user}",
"gists_url": "https://api.github.com/users/JanPokorny/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JanPokorny",
"id": 4580066,
"login": "JanPokorny",
"node_id": "MDQ6VXNlcjQ1ODAwNjY=",
"organizations_url": "https://api.github.com/users/JanPokorny/orgs",
"received_events_url": "https://api.github.com/users/JanPokorny/received_events",
"repos_url": "https://api.github.com/users/JanPokorny/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JanPokorny/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JanPokorny/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JanPokorny",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 5 | 2021-01-07T14:57:10Z | 2021-01-07T23:40:23Z | null | NONE | null | I have noticed that cookies passed directly (no session) behave strangely. When passed as the `cookie` argument, cookies are persisted after all redirects (even cross-domain and when expired explicitly). When passed as the `Cookie` header, the header is dropped after any redirect.
I came across this behavior when discussing the same issue for the `httpx` library (https://github.com/encode/httpx/issues/1404). I do not know whether this behavior is intended. If it is, I would be glad for an explanation behind this design choice.
## Expected Result
I would expect cookies passed as the `cookie` argument to work the same way as if a single-use session was used, and the `Cookie` header to be passed regardless of redirects.
## Actual Result
`cookie` argument cookies are always passed (regardless of being expired or the redirect being cross-domain), while `Cookie` header cookies are always dropped (even on same-domain redirects).
## Reproduction Steps
Server:
```python
import flask
app = flask.Flask(__name__)
@app.route('/r')
def r():
return "yes" if "test" in flask.request.cookies else "no"
@app.route('/same_domain_redirect')
def same_domain_redirect():
return flask.redirect("/r", code=302)
@app.route('/cross_domain_redirect')
def cross_domain_redirect():
return flask.redirect("http://localhost:5000/r", code=302)
@app.route('/same_domain_redirect_expire')
def same_domain_redirect_expire():
resp = flask.redirect("/r", code=302)
resp.set_cookie('test', '', expires=0)
return resp
if __name__ == '__main__':
app.run()
```
Client:
```python
import requests
print(requests.get("http://127.0.0.1:5000/same_domain_redirect", cookies={ "test": "test" }).content)
print(requests.get("http://127.0.0.1:5000/cross_domain_redirect", cookies={ "test": "test" }).content)
print(requests.get("http://127.0.0.1:5000/same_domain_redirect_expire", cookies={ "test": "test" }).content)
print(requests.get("http://127.0.0.1:5000/same_domain_redirect", headers={ "Cookie": "test=test" }).content)
print(requests.get("http://127.0.0.1:5000/cross_domain_redirect", headers={ "Cookie": "test=test" }).content)
print(requests.get("http://127.0.0.1:5000/same_domain_redirect_expire", headers={ "Cookie": "test=test" }).content)
```
## System Information
```
{
"chardet": {
"version": "4.0.0"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.9.1"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.25.1"
},
"system_ssl": {
"version": "1010107f"
},
"urllib3": {
"version": "1.26.2"
},
"using_pyopenssl": false
}
``` | null | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5714/reactions"
} | https://api.github.com/repos/psf/requests/issues/5714/timeline | null | null | null | null | false | [
"This is expected behaviour as the `cookies` argument doesn't provide a domain attribute for us to check. I've discouraged this usage in the past and even started building something to make handling cookies (and then passing that to Requests) more sensible (such that it would be harder to do this here) but it's inc... |
https://api.github.com/repos/psf/requests/issues/5713 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5713/labels{/name} | https://api.github.com/repos/psf/requests/issues/5713/comments | https://api.github.com/repos/psf/requests/issues/5713/events | https://github.com/psf/requests/issues/5713 | 778,769,741 | MDU6SXNzdWU3Nzg3Njk3NDE= | 5,713 | PUT call to unify does not work, curl call does | {
"avatar_url": "https://avatars.githubusercontent.com/u/3207629?v=4",
"events_url": "https://api.github.com/users/pverhoye/events{/privacy}",
"followers_url": "https://api.github.com/users/pverhoye/followers",
"following_url": "https://api.github.com/users/pverhoye/following{/other_user}",
"gists_url": "https://api.github.com/users/pverhoye/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pverhoye",
"id": 3207629,
"login": "pverhoye",
"node_id": "MDQ6VXNlcjMyMDc2Mjk=",
"organizations_url": "https://api.github.com/users/pverhoye/orgs",
"received_events_url": "https://api.github.com/users/pverhoye/received_events",
"repos_url": "https://api.github.com/users/pverhoye/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pverhoye/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pverhoye/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pverhoye",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2021-01-05T09:00:58Z | 2021-08-28T00:05:58Z | 2021-01-05T18:54:25Z | NONE | resolved | Hi all!
Best wishes (first things first!)
I want to enable/disable a PoE port on my UniFi switch. For this I aim using Python 3.9.1 (first time) with the following code:
```
import requests
import json
import sys
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
gateway = {"ip": "MYSERVER.COM", "port": "8443"}
headers = {"Accept": "application/json", "Content-Type": "application/json"}
login_url = f"https://{gateway['ip']}:{gateway['port']}/api/login"
login_data = {
"username": "MYUSERNAME",
"password": "MYPASSWORD"
}
session = requests.Session()
login_response = session.post(login_url, headers=headers, data=json.dumps(login_data), verify=False)
if (login_response.status_code == 200):
poe_url = f"https://{gateway['ip']}:{gateway['port']}/api/s/default/rest/device/MYDEVICEID"
json_poe_state_off = '{"port_overrides": [{"port_idx": 6, "portconf_id": "MYPROFILE2"}]}'
post_response = session.put(poe_url, headers=headers, data=json.dumps(json_poe_state_off))
print('Response HTTP Request {request}'.format(request=post_response.request ))
else:
print("Login failed")
```
The login works (I get the 2 security cookies and tried them in Paw (a macOS REST API client) to see if these were ok)) but the second call, the. PUT, returns OK but noting happens.
Before I've done this in Python, I tried all my calls in Paw first and there it works. I tried everything in bash with curl and there it works too. So I am a bit at a loss here.
Anyone has an idea?
Thank you for your time!
Best regards!
Peter
| {
"avatar_url": "https://avatars.githubusercontent.com/u/3207629?v=4",
"events_url": "https://api.github.com/users/pverhoye/events{/privacy}",
"followers_url": "https://api.github.com/users/pverhoye/followers",
"following_url": "https://api.github.com/users/pverhoye/following{/other_user}",
"gists_url": "https://api.github.com/users/pverhoye/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pverhoye",
"id": 3207629,
"login": "pverhoye",
"node_id": "MDQ6VXNlcjMyMDc2Mjk=",
"organizations_url": "https://api.github.com/users/pverhoye/orgs",
"received_events_url": "https://api.github.com/users/pverhoye/received_events",
"repos_url": "https://api.github.com/users/pverhoye/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pverhoye/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pverhoye/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pverhoye",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5713/reactions"
} | https://api.github.com/repos/psf/requests/issues/5713/timeline | null | completed | null | null | false | [
"It's likely your device is being super picky about how the HTTP request looks.\r\n\r\nTry using Wireshark to capture the exact bytes / headers that are being sent by Requests and curl and compare them. If you aren't able to discern a difference attach the output/.pcap files here and we can maybe lend an eye. Witho... |
https://api.github.com/repos/psf/requests/issues/5712 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5712/labels{/name} | https://api.github.com/repos/psf/requests/issues/5712/comments | https://api.github.com/repos/psf/requests/issues/5712/events | https://github.com/psf/requests/issues/5712 | 777,299,266 | MDU6SXNzdWU3NzcyOTkyNjY= | 5,712 | Unable to to get request | {
"avatar_url": "https://avatars.githubusercontent.com/u/54060657?v=4",
"events_url": "https://api.github.com/users/imzeki/events{/privacy}",
"followers_url": "https://api.github.com/users/imzeki/followers",
"following_url": "https://api.github.com/users/imzeki/following{/other_user}",
"gists_url": "https://api.github.com/users/imzeki/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/imzeki",
"id": 54060657,
"login": "imzeki",
"node_id": "MDQ6VXNlcjU0MDYwNjU3",
"organizations_url": "https://api.github.com/users/imzeki/orgs",
"received_events_url": "https://api.github.com/users/imzeki/received_events",
"repos_url": "https://api.github.com/users/imzeki/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/imzeki/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/imzeki/subscriptions",
"type": "User",
"url": "https://api.github.com/users/imzeki",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2021-01-01T15:02:31Z | 2021-02-10T14:33:45Z | 2021-01-01T15:10:44Z | NONE | resolved | I was following a tutorial on W3School on how to do get request. The link is here: https://www.w3schools.com/python/ref_requests_get.asp
I expected the status code of 200 when I run the code
## Actual Result
I got a error saying:
File "api2.py", line 3, in <module>
x = requests.get('https://w3schools.com')
File "C:\Users\...\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "C:\Users\...\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\api.py", line 61, in request
File "C:\Users\...\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\...\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "C:\Users\...\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\adapters.py", line 412, in send
conn = self.get_connection(request.url, proxies)
File "C:\Users\...\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\adapters.py", line 315, in get_connection
conn = self.poolmanager.connection_from_url(url)
File "C:\Users\...\AppData\Local\Programs\Python\Python39\lib\urllib3\poolmanager.py", line 293, in connection_from_url
return self.connection_from_host(
File "C:\Users\...\AppData\Local\Programs\Python\Python39\lib\urllib3\poolmanager.py", line 240, in connection_from_host
return self.connection_from_context(request_context)
File "C:\Users\...\AppData\Local\Programs\Python\Python39\lib\urllib3\poolmanager.py", line 253, in connection_from_context
pool_key = pool_key_constructor(request_context)
File "C:\Users\...\AppData\Local\Programs\Python\Python39\lib\urllib3\poolmanager.py", line 119, in _default_key_normalizer
return key_class(**context)
TypeError: <lambda>() got an unexpected keyword argument 'key_strict'
PS C:\Users\zekgo> & C:/Users/../AppData/Local/Programs/Python/Python39/python.exe
## Reproduction Steps
```
import requests
x = requests.get('https://w3schools.com')
print(x.status_code)
```
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).
My Python Version is 3.9, version of requests is 2.25.1 and my operating system is Windows. Any help will be appreciated | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5712/reactions"
} | https://api.github.com/repos/psf/requests/issues/5712/timeline | null | completed | null | null | false | [
"This exception is coming from a dependency of requests. Without the information you were asked to provide, we can't provide any guidance as to what might be causing it.",
"Ok understood",
"https://github.com/urllib3/urllib3/commit/b6061f09741082bed3d8b7db10c25bf1ae683a43"
] |
https://api.github.com/repos/psf/requests/issues/5711 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5711/labels{/name} | https://api.github.com/repos/psf/requests/issues/5711/comments | https://api.github.com/repos/psf/requests/issues/5711/events | https://github.com/psf/requests/pull/5711 | 777,277,874 | MDExOlB1bGxSZXF1ZXN0NTQ3NjIyNzEx | 5,711 | bump idna has version 3.0 was released | {
"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 | [] | {
"closed_at": "2021-08-25T21:25:16Z",
"closed_issues": 3,
"created_at": "2021-05-20T21:01:54Z",
"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/28",
"id": 6778816,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/28/labels",
"node_id": "MDk6TWlsZXN0b25lNjc3ODgxNg==",
"number": 28,
"open_issues": 0,
"state": "closed",
"title": "2.26.0",
"updated_at": "2021-08-25T21:25:16Z",
"url": "https://api.github.com/repos/psf/requests/milestones/28"
} | 18 | 2021-01-01T12:31:47Z | 2021-07-07T13:25:21Z | 2021-07-07T13:25:20Z | CONTRIBUTOR | off-topic | Closes https://github.com/psf/requests/issues/5710 | {
"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/5711/reactions"
} | https://api.github.com/repos/psf/requests/issues/5711/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5711.diff",
"html_url": "https://github.com/psf/requests/pull/5711",
"merged_at": "2021-07-07T13:25:20Z",
"patch_url": "https://github.com/psf/requests/pull/5711.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5711"
} | true | [
"Hi @naorlivne,\r\n\r\nThanks for the PR. I think this looks fine but there's some mild concern about users on Python 2. idna 3.0 drops Python 2 support and has added an appropriate `python_requires` specifier so in most cases this change will work fine. Users still on Python 2 though tend to have more outdated ver... |
https://api.github.com/repos/psf/requests/issues/5710 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5710/labels{/name} | https://api.github.com/repos/psf/requests/issues/5710/comments | https://api.github.com/repos/psf/requests/issues/5710/events | https://github.com/psf/requests/issues/5710 | 777,277,633 | MDU6SXNzdWU3NzcyNzc2MzM= | 5,710 | idna 3.0 version package conflict | {
"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 | 20 | 2021-01-01T12:29:46Z | 2021-10-07T20:00:26Z | 2021-07-07T13:25:20Z | CONTRIBUTOR | resolved | idna released version 3.0 but requests has a dependency on idna<3, this makes it impossible to keep up to date on both packages.
## Expected Result
I want to be able to install the latest idna package alongside the latest requests package
## Actual Result
```
ERROR: Cannot install -r requirements.txt (line 12) and idna==3.0 because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested idna==3.0
requests 2.25.1 depends on idna<3 and >=2.5
```
## Reproduction Steps
try to run `pip install` on a requirements.txt file with
```
requests==2.25.1
idna==3.0
```
## System Information
multiple Python versions (3.6 up to 3.9) running on Docker containers inside Drone CI/CD | {
"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": 88,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 88,
"url": "https://api.github.com/repos/psf/requests/issues/5710/reactions"
} | https://api.github.com/repos/psf/requests/issues/5710/timeline | null | completed | null | null | false | [
"As `urllib3[secure]` defines\r\n\r\nhttps://github.com/urllib3/urllib3/blob/3f21165969b838fda29898cbd7218ac9578e319b/setup.py#L119\r\n\r\n```py\r\n\"idna>=2.0.0\",\r\n```\r\n\r\nThis causes `pip` 20.2.1 to show warning:\r\n\r\n```\r\n> pip install urllib3[secure] requests --force-reinstall\r\n...\r\nCollecting idn... |
https://api.github.com/repos/psf/requests/issues/5709 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5709/labels{/name} | https://api.github.com/repos/psf/requests/issues/5709/comments | https://api.github.com/repos/psf/requests/issues/5709/events | https://github.com/psf/requests/issues/5709 | 774,742,813 | MDU6SXNzdWU3NzQ3NDI4MTM= | 5,709 | Cookies are lost on 307 redirects | {
"avatar_url": "https://avatars.githubusercontent.com/u/6244078?v=4",
"events_url": "https://api.github.com/users/gil9red/events{/privacy}",
"followers_url": "https://api.github.com/users/gil9red/followers",
"following_url": "https://api.github.com/users/gil9red/following{/other_user}",
"gists_url": "https://api.github.com/users/gil9red/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gil9red",
"id": 6244078,
"login": "gil9red",
"node_id": "MDQ6VXNlcjYyNDQwNzg=",
"organizations_url": "https://api.github.com/users/gil9red/orgs",
"received_events_url": "https://api.github.com/users/gil9red/received_events",
"repos_url": "https://api.github.com/users/gil9red/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gil9red/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gil9red/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gil9red",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 1 | 2020-12-25T14:42:22Z | 2020-12-25T14:58:28Z | null | NONE | null | When I submit a request, I get a 307 response and a cookie. But when the request is repeated, the cookie is not added.
Added request logging:
```
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.
import logging
logging.basicConfig()
logging.getLogger().setLevel(logging.DEBUG)
requests_log = logging.getLogger("requests.packages.urllib3")
requests_log.setLevel(logging.DEBUG)
requests_log.propagate = True
```
Result (first 2 requests):
```
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): www.dns-shop.ru:443
send: b'GET /product/4d664a0d90d61b80/processor-amd-ryzen-7-3700x-oem/ HTTP/1.1\r\nHost: www.dns-shop.ru\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nConnection: keep-alive\r\n\r\n'
DEBUG:urllib3.connectionpool:https://www.dns-shop.ru:443 "GET /product/4d664a0d90d61b80/processor-amd-ryzen-7-3700x-oem/ HTTP/1.1" 307 0
reply: 'HTTP/1.1 307 TemporaryRedirect\r\n'
header: Server: Variti/0.9.3a
header: Date: Fry, 25 Dec 2020 14:3753 GMT
header: Set-Cookie: ipp_uid_tst=1608907073940/2LhuRHu-NT--na0AX4hLKg; Expires=; Domain=; Path=/
header: Location: /product/4d664a0d90d61b80/processor-amd-ryzen-7-3700x-oem/
header: Connection: keep-alive
header: Keep-Alive: timeout=60
header: Content-Length: 0
send: b'GET /product/4d664a0d90d61b80/processor-amd-ryzen-7-3700x-oem/ HTTP/1.1\r\nHost: www.dns-shop.ru\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nConnection: keep-alive\r\n\r\n'
DEBUG:urllib3.connectionpool:https://www.dns-shop.ru:443 "GET /product/4d664a0d90d61b80/processor-amd-ryzen-7-3700x-oem/ HTTP/1.1" 307 0
reply: 'HTTP/1.1 307 TemporaryRedirect\r\n'
header: Server: Variti/0.9.3a
header: Date: Fry, 25 Dec 2020 14:3754 GMT
header: Set-Cookie: ipp_uid_tst=1608907074028/oOg1XsGU12ZE8PkUludY5g; Expires=; Domain=; Path=/
header: Location: /product/4d664a0d90d61b80/processor-amd-ryzen-7-3700x-oem/
header: Connection: keep-alive
header: Keep-Alive: timeout=60
header: Content-Length: 0
```
## Expected Result
HTTP 200, OK
## Actual Result
```
Traceback (most recent call last):
File "C:/Users/ipetrash/Projects/SimplePyScripts/html_parsing/www_dns_shop_ru/get_price.py", line 17, in <module>
rs = requests.get('https://www.dns-shop.ru/')
File "C:\Users\ipetrash\Anaconda3\lib\site-packages\requests\api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "C:\Users\ipetrash\Anaconda3\lib\site-packages\requests\api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Users\ipetrash\Anaconda3\lib\site-packages\requests\sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\ipetrash\Anaconda3\lib\site-packages\requests\sessions.py", line 677, in send
history = [resp for resp in gen]
File "C:\Users\ipetrash\Anaconda3\lib\site-packages\requests\sessions.py", line 677, in <listcomp>
history = [resp for resp in gen]
File "C:\Users\ipetrash\Anaconda3\lib\site-packages\requests\sessions.py", line 166, in resolve_redirects
raise TooManyRedirects('Exceeded {} redirects.'.format(self.max_redirects), response=resp)
requests.exceptions.TooManyRedirects: Exceeded 30 redirects.
```
## Reproduction Steps
```python
import requests
session = requests.session()
rs = session.get('https://www.dns-shop.ru/')
print(rs)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.7"
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.7.3"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "1010103f",
"version": "17.2.0"
},
"requests": {
"version": "2.25.1"
},
"system_ssl": {
"version": "1010108f"
},
"urllib3": {
"version": "1.24.2"
},
"using_pyopenssl": true
}
```
| null | {
"+1": 2,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 2,
"url": "https://api.github.com/repos/psf/requests/issues/5709/reactions"
} | https://api.github.com/repos/psf/requests/issues/5709/timeline | null | null | null | null | false | [
"Rewrote the code to manually handle redirects and forwarding cookies.\r\n\r\nPS. after I sent the cookie, there was no 307 on subsequent requests.\r\n\r\nThey have interesting protection ...\r\n\r\n[Code:](https://github.com/gil9red/SimplePyScripts/blob/7c3fc621399d7ec32bfde9174d5d47dfed30282d/html_parsing/www_dns... |
https://api.github.com/repos/psf/requests/issues/5708 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5708/labels{/name} | https://api.github.com/repos/psf/requests/issues/5708/comments | https://api.github.com/repos/psf/requests/issues/5708/events | https://github.com/psf/requests/issues/5708 | 774,694,700 | MDU6SXNzdWU3NzQ2OTQ3MDA= | 5,708 | Can requests work with file:/// urls? | {
"avatar_url": "https://avatars.githubusercontent.com/u/71920621?v=4",
"events_url": "https://api.github.com/users/amaank404/events{/privacy}",
"followers_url": "https://api.github.com/users/amaank404/followers",
"following_url": "https://api.github.com/users/amaank404/following{/other_user}",
"gists_url": "https://api.github.com/users/amaank404/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/amaank404",
"id": 71920621,
"login": "amaank404",
"node_id": "MDQ6VXNlcjcxOTIwNjIx",
"organizations_url": "https://api.github.com/users/amaank404/orgs",
"received_events_url": "https://api.github.com/users/amaank404/received_events",
"repos_url": "https://api.github.com/users/amaank404/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/amaank404/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/amaank404/subscriptions",
"type": "User",
"url": "https://api.github.com/users/amaank404",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-12-25T09:40:25Z | 2021-08-28T00:05:59Z | 2020-12-25T16:10:41Z | NONE | resolved | for example my application uses requests for downloading some special data. i want that to be compatible with `file:///` type urls while also supporting `http://`. does requests have that ability builtin or not?
Also if you know a work around please help me | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5708/reactions"
} | https://api.github.com/repos/psf/requests/issues/5708/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/5707 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5707/labels{/name} | https://api.github.com/repos/psf/requests/issues/5707/comments | https://api.github.com/repos/psf/requests/issues/5707/events | https://github.com/psf/requests/pull/5707 | 774,541,972 | MDExOlB1bGxSZXF1ZXN0NTQ1NDQ5Njg1 | 5,707 | Avoid zip extract racing condition by using read+write instead extract | {
"avatar_url": "https://avatars.githubusercontent.com/u/690238?v=4",
"events_url": "https://api.github.com/users/gaborbernat/events{/privacy}",
"followers_url": "https://api.github.com/users/gaborbernat/followers",
"following_url": "https://api.github.com/users/gaborbernat/following{/other_user}",
"gists_url": "https://api.github.com/users/gaborbernat/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gaborbernat",
"id": 690238,
"login": "gaborbernat",
"node_id": "MDQ6VXNlcjY5MDIzOA==",
"organizations_url": "https://api.github.com/users/gaborbernat/orgs",
"received_events_url": "https://api.github.com/users/gaborbernat/received_events",
"repos_url": "https://api.github.com/users/gaborbernat/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gaborbernat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gaborbernat/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gaborbernat",
"user_view_type": "public"
} | [] | closed | true | null | [] | {
"closed_at": "2021-08-25T21:25:16Z",
"closed_issues": 3,
"created_at": "2021-05-20T21:01:54Z",
"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/28",
"id": 6778816,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/28/labels",
"node_id": "MDk6TWlsZXN0b25lNjc3ODgxNg==",
"number": 28,
"open_issues": 0,
"state": "closed",
"title": "2.26.0",
"updated_at": "2021-08-25T21:25:16Z",
"url": "https://api.github.com/repos/psf/requests/milestones/28"
} | 2 | 2020-12-24T19:20:04Z | 2021-12-28T19:23:15Z | 2021-07-07T00:14:52Z | CONTRIBUTOR | resolved | Extract also creates the folder hierarchy, however we do not need that,
the file itself being extracted to a temporary folder is good enough.
Instead we read the content of the zip and then write it. The write is
not locked but it's OK to update the same file multiple times given the
update operation will not alter the content of the file. By not creating
the folder hierarchy (default via extract) we no longer can run into the
problem of two parallel extracts both trying to create the folder
hierarchy without exists ok flag, and one must fail.
Resolves #5223.
Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
| {
"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": 1,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/5707/reactions"
} | https://api.github.com/repos/psf/requests/issues/5707/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5707.diff",
"html_url": "https://github.com/psf/requests/pull/5707",
"merged_at": "2021-07-07T00:14:52Z",
"patch_url": "https://github.com/psf/requests/pull/5707.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5707"
} | true | [
"@sigmavirus24 @nateprewitt would you be able to accept this, so we can fix a long outstanding pip issue? Thanks!",
"@sigmavirus24 @nateprewitt do you have any plan to have a look at this?"
] |
https://api.github.com/repos/psf/requests/issues/5706 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5706/labels{/name} | https://api.github.com/repos/psf/requests/issues/5706/comments | https://api.github.com/repos/psf/requests/issues/5706/events | https://github.com/psf/requests/issues/5706 | 774,303,732 | MDU6SXNzdWU3NzQzMDM3MzI= | 5,706 | Using session object in a multiprocess pool | {
"avatar_url": "https://avatars.githubusercontent.com/u/2996964?v=4",
"events_url": "https://api.github.com/users/g1patnaik/events{/privacy}",
"followers_url": "https://api.github.com/users/g1patnaik/followers",
"following_url": "https://api.github.com/users/g1patnaik/following{/other_user}",
"gists_url": "https://api.github.com/users/g1patnaik/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/g1patnaik",
"id": 2996964,
"login": "g1patnaik",
"node_id": "MDQ6VXNlcjI5OTY5NjQ=",
"organizations_url": "https://api.github.com/users/g1patnaik/orgs",
"received_events_url": "https://api.github.com/users/g1patnaik/received_events",
"repos_url": "https://api.github.com/users/g1patnaik/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/g1patnaik/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/g1patnaik/subscriptions",
"type": "User",
"url": "https://api.github.com/users/g1patnaik",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-12-24T09:54:45Z | 2021-08-28T00:05:59Z | 2020-12-24T14:15:57Z | NONE | resolved | Hi,
I am trying to run parallel requests to server. And my understanding is that it is only possible by having multiple connections created to the server. And I think somehow the Session object is doing that -> automatically creating multiple connections to the server from a single session object or it could be that a new scope of session object is created when a new process is forked and hence, new connection is created.
Now, I want to send a bulk of requests to the process pool such that the requests are streamlined in to the existing connections.
ie., Let's say if I have 50 requests and processpool of 20 and using map function, I can submit the 50 requests in bulk to the process pool. Internally, it the splits the 50 requests to 20 sets based on some hash value I think and they are submitted to each process in the pool.
Issue is that I expected a maximum of 20 connections will be created and which will stay alive and handles all the existing requests. However, I see the connections are being recycled and I couldn't find a pattern.
However, I could see the issue only when I give the process pool a value higher than 10 and if I give a value less than 10, the connections doesn't recycle.
I have tried disabling the garbage collector import gc; gc.disable() and still connections are recycled.
```
#!/usr/bin/env python3
import time
import requests
from multiprocessing.dummy import Pool as ProcessPool, current_process as processpool_process
def get_list_of_ids():
some_calls()
return(id_list)
def check_ids(id):
url = f"https://myserver.com/check/{ id }"
json_op = s.get(url,verify=False).json()
value = json_op['id']
print(str(value) + '-' + str(processpool_process()) + str(id(s)))
def main():
pool = ProcessPool(processes=20)
while True:
pool.map(check_ids, get_list_of_ids())
print("Let's wait for 10 seconds")
time.sleep(10)
if __name__ == "__main__":
s = requests.Session()
s.headers.update = {
'Accept': 'application/json'
}
main()
```
Output Example:
```
4-<DummyProcess(Thread-2, started daemon 140209222559488)>140209446508360
5-<DummyProcess(Thread-5, started daemon 140209123481344)>140209446508360
7-<DummyProcess(Thread-6, started daemon 140209115088640)>140209446508360
2-<DummyProcess(Thread-11, started daemon 140208527894272)>140209446508360
None-<DummyProcess(Thread-1, started daemon 140209230952192)>140209446508360
10-<DummyProcess(Thread-4, started daemon 140209131874048)>140209446508360
12-<DummyProcess(Thread-7, started daemon 140209106695936)>140209446508360
8-<DummyProcess(Thread-3, started daemon 140209140266752)>140209446508360
6-<DummyProcess(Thread-12, started daemon 140208519501568)>140209446508360
3-<DummyProcess(Thread-13, started daemon 140208511108864)>140209446508360
11-<DummyProcess(Thread-10, started daemon 140208536286976)>140209446508360
9-<DummyProcess(Thread-9, started daemon 140209089910528)>140209446508360
1-<DummyProcess(Thread-8, started daemon 140209098303232)>140209446508360
Let's wait for 10 seconds
None-<DummyProcess(Thread-14, started daemon 140208502716160)>140209446508360
3-<DummyProcess(Thread-20, started daemon 140208108455680)>140209446508360
1-<DummyProcess(Thread-19, started daemon 140208116848384)>140209446508360
7-<DummyProcess(Thread-17, started daemon 140208133633792)>140209446508360
6-<DummyProcess(Thread-6, started daemon 140209115088640)>140209446508360
4-<DummyProcess(Thread-4, started daemon 140209131874048)>140209446508360
9-<DummyProcess(Thread-16, started daemon 140208485930752)>140209446508360
5-<DummyProcess(Thread-15, started daemon 140208494323456)>140209446508360
2-<DummyProcess(Thread-2, started daemon 140209222559488)>140209446508360
8-<DummyProcess(Thread-18, started daemon 140208125241088)>140209446508360
11-<DummyProcess(Thread-1, started daemon 140209230952192)>140209446508360
10-<DummyProcess(Thread-11, started daemon 140208527894272)>140209446508360
12-<DummyProcess(Thread-5, started daemon 140209123481344)>140209446508360
Let's wait for 10 seconds
None-<DummyProcess(Thread-3, started daemon 140209140266752)>140209446508360
2-<DummyProcess(Thread-10, started daemon 140208536286976)>140209446508360
1-<DummyProcess(Thread-12, started daemon 140208519501568)>140209446508360
4-<DummyProcess(Thread-9, started daemon 140209089910528)>140209446508360
5-<DummyProcess(Thread-14, started daemon 140208502716160)>140209446508360
9-<DummyProcess(Thread-6, started daemon 140209115088640)>140209446508360
8-<DummyProcess(Thread-16, started daemon 140208485930752)>140209446508360
7-<DummyProcess(Thread-4, started daemon 140209131874048)>140209446508360
3-<DummyProcess(Thread-20, started daemon 140208108455680)>140209446508360
6-<DummyProcess(Thread-8, started daemon 140209098303232)>140209446508360
12-<DummyProcess(Thread-13, started daemon 140208511108864)>140209446508360
10-<DummyProcess(Thread-7, started daemon 140209106695936)>140209446508360
11-<DummyProcess(Thread-19, started daemon 140208116848384)>140209446508360
Let's wait for 10 seconds
.
.
```
Is it the correct way of creating batch requests using session object to a multi process pool and at the same time have optimal use of resources?
| {
"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/5706/reactions"
} | https://api.github.com/repos/psf/requests/issues/5706/timeline | null | completed | null | null | false | [
"> Issue is that I expected a maximum of 20 connections will be created and which will stay alive and handles all the existing requests. However, I see the connections are being recycled and I couldn't find a pattern.\r\n\r\nThere are so many potential problems happening here, not the least of which being a fundame... |
https://api.github.com/repos/psf/requests/issues/5705 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5705/labels{/name} | https://api.github.com/repos/psf/requests/issues/5705/comments | https://api.github.com/repos/psf/requests/issues/5705/events | https://github.com/psf/requests/pull/5705 | 773,491,771 | MDExOlB1bGxSZXF1ZXN0NTQ0NTczODA3 | 5,705 | Update README.md | {
"avatar_url": "https://avatars.githubusercontent.com/u/71920621?v=4",
"events_url": "https://api.github.com/users/amaank404/events{/privacy}",
"followers_url": "https://api.github.com/users/amaank404/followers",
"following_url": "https://api.github.com/users/amaank404/following{/other_user}",
"gists_url": "https://api.github.com/users/amaank404/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/amaank404",
"id": 71920621,
"login": "amaank404",
"node_id": "MDQ6VXNlcjcxOTIwNjIx",
"organizations_url": "https://api.github.com/users/amaank404/orgs",
"received_events_url": "https://api.github.com/users/amaank404/received_events",
"repos_url": "https://api.github.com/users/amaank404/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/amaank404/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/amaank404/subscriptions",
"type": "User",
"url": "https://api.github.com/users/amaank404",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-12-23T05:14:15Z | 2021-08-27T00:08:53Z | 2020-12-23T14:19:41Z | NONE | resolved | A liitle bit of stats update 😄 | {
"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/5705/reactions"
} | https://api.github.com/repos/psf/requests/issues/5705/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5705.diff",
"html_url": "https://github.com/psf/requests/pull/5705",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5705.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5705"
} | true | [
"Hi @xcodz-dot, thanks for sending us a PR. 500,000+ by default includes 750,000. I don't think keeping these \"up-to-date\" is particularly important. If it were, we should be uploading the downloads per month count and lots of other things here. As it stands, these statistics aren't the most important thing to ma... |
https://api.github.com/repos/psf/requests/issues/5704 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5704/labels{/name} | https://api.github.com/repos/psf/requests/issues/5704/comments | https://api.github.com/repos/psf/requests/issues/5704/events | https://github.com/psf/requests/issues/5704 | 772,965,956 | MDU6SXNzdWU3NzI5NjU5NTY= | 5,704 | Documentation bug - missing cookies documentation | {
"avatar_url": "https://avatars.githubusercontent.com/u/73482956?v=4",
"events_url": "https://api.github.com/users/ascopes/events{/privacy}",
"followers_url": "https://api.github.com/users/ascopes/followers",
"following_url": "https://api.github.com/users/ascopes/following{/other_user}",
"gists_url": "https://api.github.com/users/ascopes/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ascopes",
"id": 73482956,
"login": "ascopes",
"node_id": "MDQ6VXNlcjczNDgyOTU2",
"organizations_url": "https://api.github.com/users/ascopes/orgs",
"received_events_url": "https://api.github.com/users/ascopes/received_events",
"repos_url": "https://api.github.com/users/ascopes/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ascopes/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ascopes/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ascopes",
"user_view_type": "public"
} | [
{
"color": "f7c6c7",
"default": false,
"description": null,
"id": 167537670,
"name": "Propose Close",
"node_id": "MDU6TGFiZWwxNjc1Mzc2NzA=",
"url": "https://api.github.com/repos/psf/requests/labels/Propose%20Close"
},
{
"color": "fef2c0",
"default": false,
"description": ... | closed | true | null | [] | null | 6 | 2020-12-22T13:56:59Z | 2021-08-28T00:05:58Z | 2021-01-18T04:08:11Z | NONE | resolved | On the current latest documentation, there is a `cookies` link under the `quickstart` option.

We can see that this section should be displayed between `Response Headers` and `Redirection History`.

This section does not currently exist, and the link in the sidebar list is dead - clicking it does nothing.
Is this section missing, or should this link be removed? | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5704/reactions"
} | https://api.github.com/repos/psf/requests/issues/5704/timeline | null | completed | null | null | false | [
"This section is missing!\r\n",
"Do we have a template for what information we would want to put in here? I would happily put up a PR if so.",
"The `Cookies` section under `Developer Interface` is missing as well",
"What domain are you accessing the documentation at? Both sections appear at:\r\n\r\nhttps://re... |
https://api.github.com/repos/psf/requests/issues/5703 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5703/labels{/name} | https://api.github.com/repos/psf/requests/issues/5703/comments | https://api.github.com/repos/psf/requests/issues/5703/events | https://github.com/psf/requests/issues/5703 | 772,654,080 | MDU6SXNzdWU3NzI2NTQwODA= | 5,703 | BUG REPORT: 2.25.1 breaks SSL for proxy connections. Reverting back to 2.24.0 fixes issue. | {
"avatar_url": "https://avatars.githubusercontent.com/u/180487?v=4",
"events_url": "https://api.github.com/users/vgoklani/events{/privacy}",
"followers_url": "https://api.github.com/users/vgoklani/followers",
"following_url": "https://api.github.com/users/vgoklani/following{/other_user}",
"gists_url": "https://api.github.com/users/vgoklani/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/vgoklani",
"id": 180487,
"login": "vgoklani",
"node_id": "MDQ6VXNlcjE4MDQ4Nw==",
"organizations_url": "https://api.github.com/users/vgoklani/orgs",
"received_events_url": "https://api.github.com/users/vgoklani/received_events",
"repos_url": "https://api.github.com/users/vgoklani/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/vgoklani/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vgoklani/subscriptions",
"type": "User",
"url": "https://api.github.com/users/vgoklani",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-12-22T05:33:21Z | 2021-08-28T00:06:00Z | 2020-12-23T03:01:53Z | NONE | resolved | Using requests 2.25.1:
session = requests.session()
session.proxies.update(proxies_dict)
should setup connections over our proxy server.
Unfortunately this is what we see:
SSLError: HTTPSConnectionPool(host='api.xyz.com', port=443): Max retries exceeded with url: /my/url (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1123)')))
The error disappears when reverting back to 2.24.0
Please help!
thanks 👍
| {
"avatar_url": "https://avatars.githubusercontent.com/u/180487?v=4",
"events_url": "https://api.github.com/users/vgoklani/events{/privacy}",
"followers_url": "https://api.github.com/users/vgoklani/followers",
"following_url": "https://api.github.com/users/vgoklani/following{/other_user}",
"gists_url": "https://api.github.com/users/vgoklani/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/vgoklani",
"id": 180487,
"login": "vgoklani",
"node_id": "MDQ6VXNlcjE4MDQ4Nw==",
"organizations_url": "https://api.github.com/users/vgoklani/orgs",
"received_events_url": "https://api.github.com/users/vgoklani/received_events",
"repos_url": "https://api.github.com/users/vgoklani/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/vgoklani/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vgoklani/subscriptions",
"type": "User",
"url": "https://api.github.com/users/vgoklani",
"user_view_type": "public"
} | {
"+1": 4,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 4,
"url": "https://api.github.com/repos/psf/requests/issues/5703/reactions"
} | https://api.github.com/repos/psf/requests/issues/5703/timeline | null | completed | null | null | false | [
"I guess this urllib3 bug is related: https://github.com/urllib3/urllib3/issues/2075\r\nSince requests 2.25.1 urllib 1.16 is used, which fixed a bug regarding proxies and https connections.\r\n\r\nThe 'solution' posted there fixed the issue for me."
] |
https://api.github.com/repos/psf/requests/issues/5702 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5702/labels{/name} | https://api.github.com/repos/psf/requests/issues/5702/comments | https://api.github.com/repos/psf/requests/issues/5702/events | https://github.com/psf/requests/pull/5702 | 771,580,659 | MDExOlB1bGxSZXF1ZXN0NTQzMDYzMjIy | 5,702 | Don't perform authentication if no credential provided | {
"avatar_url": "https://avatars.githubusercontent.com/u/59408894?v=4",
"events_url": "https://api.github.com/users/shelld3v/events{/privacy}",
"followers_url": "https://api.github.com/users/shelld3v/followers",
"following_url": "https://api.github.com/users/shelld3v/following{/other_user}",
"gists_url": "https://api.github.com/users/shelld3v/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shelld3v",
"id": 59408894,
"login": "shelld3v",
"node_id": "MDQ6VXNlcjU5NDA4ODk0",
"organizations_url": "https://api.github.com/users/shelld3v/orgs",
"received_events_url": "https://api.github.com/users/shelld3v/received_events",
"repos_url": "https://api.github.com/users/shelld3v/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shelld3v/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shelld3v/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shelld3v",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2020-12-20T12:46:32Z | 2021-08-27T00:08:38Z | 2020-12-20T13:35:06Z | NONE | resolved | ## The old behavior:
```python
>>> requests.get('http://127.0.0.1:8080', auth=(None, None))
```
```http
GET / HTTP/1.1
Host: 127.0.0.1:8080
User-Agent: python-requests/2.25.0
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Authorization: Basic Tm9uZTpOb25l (None:None)
```
This is weird, right!
## Now:
```python
>>> requests.get('http://127.0.0.1:8080', auth=(None, None))
```
```http
GET / HTTP/1.1
Host: 127.0.0.1:8080
User-Agent: python-requests/2.25.0
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
```
(No authentication)
This will be easier for applications that allow auth username and password from arguments:
```python
response = self.session.request(
self.httpmethod,
url,
data=self.data,
proxies=proxy,
verify=False,
allow_redirects=self.redirect,
headers=dict(self.headers),
timeout=self.timeout,
auth=(self.user, self.pass)
)
```
If the user didn't provide credentials, which means they don't need to authenticate, then `self.user` will be `None` and `self.pass` will be `None` too. And in this situation, `requests` with my update won't perform authentication!
But in the old version (without my update), we must do this:
```python
if self.user and self.pass:
response = self.session.request(
self.httpmethod,
url,
data=self.data,
proxies=proxy,
verify=False,
allow_redirects=self.redirect,
headers=dict(self.headers),
timeout=self.timeout,
auth=(self.user, self.pass)
)
else:
response = self.session.request(
self.httpmethod,
url,
data=self.data,
proxies=proxy,
verify=False,
allow_redirects=self.redirect,
headers=dict(self.headers),
timeout=self.timeout
)
``` | {
"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/5702/reactions"
} | https://api.github.com/repos/psf/requests/issues/5702/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5702.diff",
"html_url": "https://github.com/psf/requests/pull/5702",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5702.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5702"
} | true | [
"Also, None username or password will become an empty username/password",
"Requests is in a feature-freeze and this is strictly backwards incompatible",
"Hi, what's the problem? I just want to help!!",
"Totally, change the `None` object to the username `None` (string) is really crazy"
] |
https://api.github.com/repos/psf/requests/issues/5701 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5701/labels{/name} | https://api.github.com/repos/psf/requests/issues/5701/comments | https://api.github.com/repos/psf/requests/issues/5701/events | https://github.com/psf/requests/pull/5701 | 771,567,638 | MDExOlB1bGxSZXF1ZXN0NTQzMDU0MDU1 | 5,701 | Problem fix | {
"avatar_url": "https://avatars.githubusercontent.com/u/59408894?v=4",
"events_url": "https://api.github.com/users/shelld3v/events{/privacy}",
"followers_url": "https://api.github.com/users/shelld3v/followers",
"following_url": "https://api.github.com/users/shelld3v/following{/other_user}",
"gists_url": "https://api.github.com/users/shelld3v/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shelld3v",
"id": 59408894,
"login": "shelld3v",
"node_id": "MDQ6VXNlcjU5NDA4ODk0",
"organizations_url": "https://api.github.com/users/shelld3v/orgs",
"received_events_url": "https://api.github.com/users/shelld3v/received_events",
"repos_url": "https://api.github.com/users/shelld3v/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shelld3v/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shelld3v/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shelld3v",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2020-12-20T11:25:47Z | 2021-08-27T00:08:54Z | 2020-12-20T12:47:22Z | NONE | resolved | You should check the protocol, not the start of the URL. Otherwise, this will be a valid protocol: `httpfuck://google.com` | {
"avatar_url": "https://avatars.githubusercontent.com/u/59408894?v=4",
"events_url": "https://api.github.com/users/shelld3v/events{/privacy}",
"followers_url": "https://api.github.com/users/shelld3v/followers",
"following_url": "https://api.github.com/users/shelld3v/following{/other_user}",
"gists_url": "https://api.github.com/users/shelld3v/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shelld3v",
"id": 59408894,
"login": "shelld3v",
"node_id": "MDQ6VXNlcjU5NDA4ODk0",
"organizations_url": "https://api.github.com/users/shelld3v/orgs",
"received_events_url": "https://api.github.com/users/shelld3v/received_events",
"repos_url": "https://api.github.com/users/shelld3v/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shelld3v/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shelld3v/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shelld3v",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5701/reactions"
} | https://api.github.com/repos/psf/requests/issues/5701/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5701.diff",
"html_url": "https://github.com/psf/requests/pull/5701",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5701.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5701"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/5700 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5700/labels{/name} | https://api.github.com/repos/psf/requests/issues/5700/comments | https://api.github.com/repos/psf/requests/issues/5700/events | https://github.com/psf/requests/pull/5700 | 771,561,746 | MDExOlB1bGxSZXF1ZXN0NTQzMDUwMDQz | 5,700 | Auto-add labels to issues | {
"avatar_url": "https://avatars.githubusercontent.com/u/59408894?v=4",
"events_url": "https://api.github.com/users/shelld3v/events{/privacy}",
"followers_url": "https://api.github.com/users/shelld3v/followers",
"following_url": "https://api.github.com/users/shelld3v/following{/other_user}",
"gists_url": "https://api.github.com/users/shelld3v/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shelld3v",
"id": 59408894,
"login": "shelld3v",
"node_id": "MDQ6VXNlcjU5NDA4ODk0",
"organizations_url": "https://api.github.com/users/shelld3v/orgs",
"received_events_url": "https://api.github.com/users/shelld3v/received_events",
"repos_url": "https://api.github.com/users/shelld3v/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shelld3v/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shelld3v/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shelld3v",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-12-20T10:48:01Z | 2021-08-27T00:08:54Z | 2020-12-20T13:36:27Z | NONE | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5700/reactions"
} | https://api.github.com/repos/psf/requests/issues/5700/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5700.diff",
"html_url": "https://github.com/psf/requests/pull/5700",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5700.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5700"
} | true | [
"Many folks open bugs and feature requests that are neither. Auto-labelling would then require more effort to remove those labels on the part of the maintainers"
] | |
https://api.github.com/repos/psf/requests/issues/5699 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5699/labels{/name} | https://api.github.com/repos/psf/requests/issues/5699/comments | https://api.github.com/repos/psf/requests/issues/5699/events | https://github.com/psf/requests/pull/5699 | 771,524,935 | MDExOlB1bGxSZXF1ZXN0NTQzMDI1MTQ0 | 5,699 | Don't perform authentication if no credential provided | {
"avatar_url": "https://avatars.githubusercontent.com/u/59408894?v=4",
"events_url": "https://api.github.com/users/shelld3v/events{/privacy}",
"followers_url": "https://api.github.com/users/shelld3v/followers",
"following_url": "https://api.github.com/users/shelld3v/following{/other_user}",
"gists_url": "https://api.github.com/users/shelld3v/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shelld3v",
"id": 59408894,
"login": "shelld3v",
"node_id": "MDQ6VXNlcjU5NDA4ODk0",
"organizations_url": "https://api.github.com/users/shelld3v/orgs",
"received_events_url": "https://api.github.com/users/shelld3v/received_events",
"repos_url": "https://api.github.com/users/shelld3v/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shelld3v/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shelld3v/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shelld3v",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-12-20T06:28:32Z | 2021-08-27T00:08:54Z | 2020-12-20T12:40:07Z | NONE | resolved | ## The old behavior:
```python
>>> requests.get('http://127.0.0.1:8080', auth=(None, None))
```
```http
GET / HTTP/1.1
Host: 127.0.0.1:8080
User-Agent: python-requests/2.25.0
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Authorization: Basic Tm9uZTpOb25l (None:None)
```
The same thing will happen with:
```python
>>> requests.get('http://127.0.0.1:8080', auth=('None', 'None'))
```
This is weird, right!
## Now:
```python
>>> requests.get('http://127.0.0.1:8080', auth=(None, None))
```
```http
GET / HTTP/1.1
Host: 127.0.0.1:8080
User-Agent: python-requests/2.25.0
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
```
(No authentication)
This will be easier if the application allows auth username and password from arguments:
```python
response = self.session.request(
self.httpmethod,
url,
data=self.data,
proxies=proxy,
verify=False,
allow_redirects=self.redirect,
headers=dict(self.headers),
timeout=self.timeout,
auth=(self.user, self.pass)
)
```
If the user didn't provide credentials, which means they don't need to authenticate, then `self.user == None` and `self.pass == None`. And in this situation, `requests` with my update won't perform authentication!
In the old version (without my update), it will be like:
```python
if self.user and self.pass:
response = self.session.request(
self.httpmethod,
url,
data=self.data,
proxies=proxy,
verify=False,
allow_redirects=self.redirect,
headers=dict(self.headers),
timeout=self.timeout,
auth=(self.user, self.pass)
)
else:
response = self.session.request(
self.httpmethod,
url,
data=self.data,
proxies=proxy,
verify=False,
allow_redirects=self.redirect,
headers=dict(self.headers),
timeout=self.timeout
)
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/59408894?v=4",
"events_url": "https://api.github.com/users/shelld3v/events{/privacy}",
"followers_url": "https://api.github.com/users/shelld3v/followers",
"following_url": "https://api.github.com/users/shelld3v/following{/other_user}",
"gists_url": "https://api.github.com/users/shelld3v/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shelld3v",
"id": 59408894,
"login": "shelld3v",
"node_id": "MDQ6VXNlcjU5NDA4ODk0",
"organizations_url": "https://api.github.com/users/shelld3v/orgs",
"received_events_url": "https://api.github.com/users/shelld3v/received_events",
"repos_url": "https://api.github.com/users/shelld3v/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shelld3v/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shelld3v/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shelld3v",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5699/reactions"
} | https://api.github.com/repos/psf/requests/issues/5699/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5699.diff",
"html_url": "https://github.com/psf/requests/pull/5699",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5699.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5699"
} | true | [
"Also, `None` username or password will become an empty username/password"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.