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/6215 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6215/labels{/name} | https://api.github.com/repos/psf/requests/issues/6215/comments | https://api.github.com/repos/psf/requests/issues/6215/events | https://github.com/psf/requests/issues/6215 | 1,342,857,754 | I_kwDOABTKOs5QCmIa | 6,215 | return response from `raise_for_status` | {
"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 | 4 | 2022-08-18T09:53:48Z | 2024-02-27T12:15:03Z | 2023-10-28T09:47:25Z | NONE | resolved | I'd guess this has been requested before, but couldn't find any pointers so far.
(I also understand that requests does not accept feature requests, but this is code-wise a trivial one-line change, so I'm going to try anyway :smile: ).
Feature request: return `self` from `Response.raise_for_status()` (instead of returning `None` implicitly).
That allows using it in a compact chained/fluent manner, for example
```python
data = [
requests.get(url).raise_for_status().json()
for url in urls
]
```
With the current `raise_for_status` you can not use list comprehension like in this examle because you have to use separate statements for the `.get()`, `.raise_for_status()` and `.json()` .
(An alternative solution could be to add some kind of `raise_for_status` opt-in option to `.get()` and alike, but that would require a lot more code changes than a simple `return self` as proposed higher)
| {
"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": 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/6215/reactions"
} | https://api.github.com/repos/psf/requests/issues/6215/timeline | null | not_planned | null | null | false | [
"This project is in indefinite feature-freeze and not changing the API in ways that may be surprising for existing users. Also I'm certain this has been requested before but am on mobile and can't easily search ",
"I am junior SDE, and I want to contribute to open source. This is my first time.\r\nCan I work on t... |
https://api.github.com/repos/psf/requests/issues/6214 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6214/labels{/name} | https://api.github.com/repos/psf/requests/issues/6214/comments | https://api.github.com/repos/psf/requests/issues/6214/events | https://github.com/psf/requests/pull/6214 | 1,339,683,767 | PR_kwDOABTKOs49N1pV | 6,214 | Update reference to "cookielib" to "cookiejar" in documentation | {
"avatar_url": "https://avatars.githubusercontent.com/u/110642?v=4",
"events_url": "https://api.github.com/users/ittner/events{/privacy}",
"followers_url": "https://api.github.com/users/ittner/followers",
"following_url": "https://api.github.com/users/ittner/following{/other_user}",
"gists_url": "https://api.github.com/users/ittner/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ittner",
"id": 110642,
"login": "ittner",
"node_id": "MDQ6VXNlcjExMDY0Mg==",
"organizations_url": "https://api.github.com/users/ittner/orgs",
"received_events_url": "https://api.github.com/users/ittner/received_events",
"repos_url": "https://api.github.com/users/ittner/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ittner/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ittner/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ittner",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2022-08-16T01:02:34Z | 2024-07-30T00:03:49Z | 2023-07-30T01:50:43Z | CONTRIBUTOR | resolved | Docstrings still called this module as it was in python2.7; update
them to use the name from python3. Mostly useful as a reference for
people who need a custom cookiejar.
Code does still use the compatibility layer for a no-more-supported
python2, however. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 1,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/6214/reactions"
} | https://api.github.com/repos/psf/requests/issues/6214/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6214.diff",
"html_url": "https://github.com/psf/requests/pull/6214",
"merged_at": "2023-07-30T01:50:43Z",
"patch_url": "https://github.com/psf/requests/pull/6214.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6214"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/6213 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6213/labels{/name} | https://api.github.com/repos/psf/requests/issues/6213/comments | https://api.github.com/repos/psf/requests/issues/6213/events | https://github.com/psf/requests/issues/6213 | 1,337,999,854 | I_kwDOABTKOs5PwEHu | 6,213 | Other Language isn't workin as a parameter | {
"avatar_url": "https://avatars.githubusercontent.com/u/67215274?v=4",
"events_url": "https://api.github.com/users/abirabedinkhan/events{/privacy}",
"followers_url": "https://api.github.com/users/abirabedinkhan/followers",
"following_url": "https://api.github.com/users/abirabedinkhan/following{/other_user}",
"gists_url": "https://api.github.com/users/abirabedinkhan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/abirabedinkhan",
"id": 67215274,
"login": "abirabedinkhan",
"node_id": "MDQ6VXNlcjY3MjE1Mjc0",
"organizations_url": "https://api.github.com/users/abirabedinkhan/orgs",
"received_events_url": "https://api.github.com/users/abirabedinkhan/received_events",
"repos_url": "https://api.github.com/users/abirabedinkhan/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/abirabedinkhan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/abirabedinkhan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/abirabedinkhan",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2022-08-13T16:13:59Z | 2023-08-14T00:03:15Z | 2022-08-13T16:16:26Z | NONE | resolved | Please refer to our [Stack Overflow tag](https://stackoverflow.com/questions/tagged/python-requests) for guidance.
when i sending a other langueges parameters requests into a url it retuens
```বা�লাদ�শ প�রতিদিন স�বাদ পত�র```
this stuffs
in python requests | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6213/reactions"
} | https://api.github.com/repos/psf/requests/issues/6213/timeline | null | not_planned | null | null | false | [
"@abirabedinkhan Please don't open the same issue multiple times.\n\nIf you need assistance with this please consult the documentation and ask for assistance on StackOverflow using the python-requests tag."
] |
https://api.github.com/repos/psf/requests/issues/6212 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6212/labels{/name} | https://api.github.com/repos/psf/requests/issues/6212/comments | https://api.github.com/repos/psf/requests/issues/6212/events | https://github.com/psf/requests/issues/6212 | 1,337,981,422 | I_kwDOABTKOs5Pv_nu | 6,212 | বাà¦à¦²à¦¾à¦¦à§à¦¶ পà§à¦°à¦¤à¦¿à¦¦à¦¿à¦¨ সà¦à¦¬à¦¾à¦¦ পতà§à¦° | {
"avatar_url": "https://avatars.githubusercontent.com/u/67215274?v=4",
"events_url": "https://api.github.com/users/abirabedinkhan/events{/privacy}",
"followers_url": "https://api.github.com/users/abirabedinkhan/followers",
"following_url": "https://api.github.com/users/abirabedinkhan/following{/other_user}",
"gists_url": "https://api.github.com/users/abirabedinkhan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/abirabedinkhan",
"id": 67215274,
"login": "abirabedinkhan",
"node_id": "MDQ6VXNlcjY3MjE1Mjc0",
"organizations_url": "https://api.github.com/users/abirabedinkhan/orgs",
"received_events_url": "https://api.github.com/users/abirabedinkhan/received_events",
"repos_url": "https://api.github.com/users/abirabedinkhan/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/abirabedinkhan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/abirabedinkhan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/abirabedinkhan",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2022-08-13T14:46:11Z | 2023-08-14T00:03:16Z | 2022-08-13T15:04:10Z | NONE | resolved | Please refer to our [Stack Overflow tag](https://stackoverflow.com/questions/tagged/python-requests) for guidance.
when i sending a other langueges parameters requests into a url it retuens
``` বাà¦à¦²à¦¾à¦¦à§à¦¶ পà§à¦°à¦¤à¦¿à¦¦à¦¿à¦¨ সà¦à¦¬à¦¾à¦¦ পতà§à¦° ```
this stuffs
in python requests | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6212/reactions"
} | https://api.github.com/repos/psf/requests/issues/6212/timeline | null | not_planned | null | null | false | [
"Please refer to the top of the issue template. We won't be able to assist with this on this issue tracker.",
"Sorry I didn't understand what u said. Can u explain a bit? What to do"
] |
https://api.github.com/repos/psf/requests/issues/6211 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6211/labels{/name} | https://api.github.com/repos/psf/requests/issues/6211/comments | https://api.github.com/repos/psf/requests/issues/6211/events | https://github.com/psf/requests/issues/6211 | 1,327,625,146 | I_kwDOABTKOs5PIfO6 | 6,211 | Merge types-requests into psf/requests with py.typed marker | {
"avatar_url": "https://avatars.githubusercontent.com/u/947110?v=4",
"events_url": "https://api.github.com/users/kkirsche/events{/privacy}",
"followers_url": "https://api.github.com/users/kkirsche/followers",
"following_url": "https://api.github.com/users/kkirsche/following{/other_user}",
"gists_url": "https://api.github.com/users/kkirsche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kkirsche",
"id": 947110,
"login": "kkirsche",
"node_id": "MDQ6VXNlcjk0NzExMA==",
"organizations_url": "https://api.github.com/users/kkirsche/orgs",
"received_events_url": "https://api.github.com/users/kkirsche/received_events",
"repos_url": "https://api.github.com/users/kkirsche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kkirsche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kkirsche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kkirsche",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 2 | 2022-08-03T18:24:02Z | 2022-08-03T18:53:30Z | null | CONTRIBUTOR | null | This issue is to merge the existing type hints available in typeshed ([here](https://github.com/python/typeshed/tree/master/stubs/requests)) into this repository.
Currently, psf/requests supports only Python 3.7+ per https://github.com/psf/requests/blob/main/setup.py#L10
As a result, type-related code would not impact usability by end users. Performance concerns related to additional imports may also be addressed by protecting the type-only imports under the `typing.TYPE_CHECKING` boolean and using the correct syntax downstream.
By making this change, it will keep type information paired with the code, ensuring they get updated together, it will reduce the maintenance burden on the typeshed team (not requested, just a side effect), and will enable more users to get type-hint related information without having to install separate packages.
Depending on your point of view on type hints, they also can reduce the risk of bugs caused by refactoring. | null | {
"+1": 6,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 6,
"url": "https://api.github.com/repos/psf/requests/issues/6211/reactions"
} | https://api.github.com/repos/psf/requests/issues/6211/timeline | null | null | null | null | false | [
"Hi @kkirsche,\r\n\r\nWe've looked at doing this before. There are a number of issues with the existing typeshed hints we found during our last review. We have a feature branch looking at getting some level of typing integrated in the future but there is currently no timeline for this.",
"Understandable. Some asp... |
https://api.github.com/repos/psf/requests/issues/6210 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6210/labels{/name} | https://api.github.com/repos/psf/requests/issues/6210/comments | https://api.github.com/repos/psf/requests/issues/6210/events | https://github.com/psf/requests/issues/6210 | 1,324,048,617 | I_kwDOABTKOs5O62Dp | 6,210 | Python Requests Libarary Removes some Characters in URL when Sending Request | {
"avatar_url": "https://avatars.githubusercontent.com/u/61124903?v=4",
"events_url": "https://api.github.com/users/nxenon/events{/privacy}",
"followers_url": "https://api.github.com/users/nxenon/followers",
"following_url": "https://api.github.com/users/nxenon/following{/other_user}",
"gists_url": "https://api.github.com/users/nxenon/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nxenon",
"id": 61124903,
"login": "nxenon",
"node_id": "MDQ6VXNlcjYxMTI0OTAz",
"organizations_url": "https://api.github.com/users/nxenon/orgs",
"received_events_url": "https://api.github.com/users/nxenon/received_events",
"repos_url": "https://api.github.com/users/nxenon/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nxenon/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nxenon/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nxenon",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2022-08-01T08:40:01Z | 2023-08-02T00:03:09Z | 2022-08-01T14:01:52Z | NONE | resolved | Python **requests** library changes URL in some situations.
it removes some parameters
for example
`
url = "https://www.example.com/test?"
`
it removes `?` in the request when I see it in Burp proxy
it changes to
`https://www.example.com/test`
because I'm pentesting web applications I need to send for example quotation mark too and other things which will be removed by library automatically.
I need following path:

after ? must be empty | {
"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/6210/reactions"
} | https://api.github.com/repos/psf/requests/issues/6210/timeline | null | completed | null | null | false | [
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here.\n\nIn the future, please search **closed and** open iss... |
https://api.github.com/repos/psf/requests/issues/6209 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6209/labels{/name} | https://api.github.com/repos/psf/requests/issues/6209/comments | https://api.github.com/repos/psf/requests/issues/6209/events | https://github.com/psf/requests/pull/6209 | 1,323,571,494 | PR_kwDOABTKOs48Yuc0 | 6,209 | Added support for TRACE method | {
"avatar_url": "https://avatars.githubusercontent.com/u/71654184?v=4",
"events_url": "https://api.github.com/users/cheehong1030/events{/privacy}",
"followers_url": "https://api.github.com/users/cheehong1030/followers",
"following_url": "https://api.github.com/users/cheehong1030/following{/other_user}",
"gists_url": "https://api.github.com/users/cheehong1030/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cheehong1030",
"id": 71654184,
"login": "cheehong1030",
"node_id": "MDQ6VXNlcjcxNjU0MTg0",
"organizations_url": "https://api.github.com/users/cheehong1030/orgs",
"received_events_url": "https://api.github.com/users/cheehong1030/received_events",
"repos_url": "https://api.github.com/users/cheehong1030/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cheehong1030/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cheehong1030/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cheehong1030",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2022-07-31T20:44:29Z | 2023-08-01T00:03:38Z | 2022-07-31T22:47:55Z | NONE | resolved | - Added support for TRACE method
- Added TRACE method in docs
- Fix docs missing OPTIONS method | {
"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/6209/reactions"
} | https://api.github.com/repos/psf/requests/issues/6209/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6209.diff",
"html_url": "https://github.com/psf/requests/pull/6209",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6209.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6209"
} | true | [
"Please check open and closed issues and pull requests in the future before opening new ones.\n\nWe will not be accepting this because we are not adding new areas to the API. This is also possible via `requests.request` or `Session.request`"
] |
https://api.github.com/repos/psf/requests/issues/6208 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6208/labels{/name} | https://api.github.com/repos/psf/requests/issues/6208/comments | https://api.github.com/repos/psf/requests/issues/6208/events | https://github.com/psf/requests/issues/6208 | 1,323,349,335 | I_kwDOABTKOs5O4LVX | 6,208 | Cant download big file | {
"avatar_url": "https://avatars.githubusercontent.com/u/55866633?v=4",
"events_url": "https://api.github.com/users/liuweidong888/events{/privacy}",
"followers_url": "https://api.github.com/users/liuweidong888/followers",
"following_url": "https://api.github.com/users/liuweidong888/following{/other_user}",
"gists_url": "https://api.github.com/users/liuweidong888/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/liuweidong888",
"id": 55866633,
"login": "liuweidong888",
"node_id": "MDQ6VXNlcjU1ODY2NjMz",
"organizations_url": "https://api.github.com/users/liuweidong888/orgs",
"received_events_url": "https://api.github.com/users/liuweidong888/received_events",
"repos_url": "https://api.github.com/users/liuweidong888/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/liuweidong888/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/liuweidong888/subscriptions",
"type": "User",
"url": "https://api.github.com/users/liuweidong888",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2022-07-31T03:11:58Z | 2023-08-01T00:03:37Z | 2022-07-31T03:13:25Z | NONE | resolved | Please refer to our [Stack Overflow tag](https://stackoverflow.com/questions/tagged/python-requests) for guidance.
I use requests.get(url) to download a big file from our own cloud box.
But the response['Content-length'] isnt right, and use 'strem=True' args is wrong, the downloaded file which is a .zip file cant be opened .
| {
"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/6208/reactions"
} | https://api.github.com/repos/psf/requests/issues/6208/timeline | null | completed | null | null | false | [
"Hi @liuweidong88, please refer to the guidance at the beginning of the ticket template. We unfortunately won't be able to help with this."
] |
https://api.github.com/repos/psf/requests/issues/6207 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6207/labels{/name} | https://api.github.com/repos/psf/requests/issues/6207/comments | https://api.github.com/repos/psf/requests/issues/6207/events | https://github.com/psf/requests/pull/6207 | 1,322,996,357 | PR_kwDOABTKOs48W3c6 | 6,207 | Remove `__nonzero__` method from `models.Response` | {
"avatar_url": "https://avatars.githubusercontent.com/u/4660275?v=4",
"events_url": "https://api.github.com/users/sobolevn/events{/privacy}",
"followers_url": "https://api.github.com/users/sobolevn/followers",
"following_url": "https://api.github.com/users/sobolevn/following{/other_user}",
"gists_url": "https://api.github.com/users/sobolevn/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sobolevn",
"id": 4660275,
"login": "sobolevn",
"node_id": "MDQ6VXNlcjQ2NjAyNzU=",
"organizations_url": "https://api.github.com/users/sobolevn/orgs",
"received_events_url": "https://api.github.com/users/sobolevn/received_events",
"repos_url": "https://api.github.com/users/sobolevn/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sobolevn/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sobolevn/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sobolevn",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2022-07-30T11:17:30Z | 2023-07-31T00:03:22Z | 2022-07-30T19:35:29Z | NONE | resolved | `__nonzero__` was used in python2 as we now use `__bool__`. It is not used at all in python3.
And since [`setup.py` says](https://github.com/psf/requests/blob/177dd90f18a8f4dc79a7d2049f0a3f4fcc5932a0/setup.py#L10) that `reqeusts` supports only `python >= 3.7`, I don't think that it is really required.
I found this while working on `typeshed` types for `requests`: https://github.com/python/typeshed/blob/3fe1f5d6c46b39b8b4632aadc70477a729241d25/stubs/requests/requests/models.pyi#L107 | {
"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/6207/reactions"
} | https://api.github.com/repos/psf/requests/issues/6207/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6207.diff",
"html_url": "https://github.com/psf/requests/pull/6207",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6207.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6207"
} | true | [
"Hi @sobolevn,\r\n\r\nThanks for the PR, but I think we’re unlikely to remove this. The use of `super().__nonzero__()` to implement `__bool__` in subclasses was quite popular when the Python 3 migration started. There’s a high chance this will be breaking if we remove the function entirely."
] |
https://api.github.com/repos/psf/requests/issues/6206 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6206/labels{/name} | https://api.github.com/repos/psf/requests/issues/6206/comments | https://api.github.com/repos/psf/requests/issues/6206/events | https://github.com/psf/requests/pull/6206 | 1,322,037,649 | PR_kwDOABTKOs48TrxE | 6,206 | added from_raw class method to PreparedRequest | {
"avatar_url": "https://avatars.githubusercontent.com/u/26948113?v=4",
"events_url": "https://api.github.com/users/ToraNova/events{/privacy}",
"followers_url": "https://api.github.com/users/ToraNova/followers",
"following_url": "https://api.github.com/users/ToraNova/following{/other_user}",
"gists_url": "https://api.github.com/users/ToraNova/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ToraNova",
"id": 26948113,
"login": "ToraNova",
"node_id": "MDQ6VXNlcjI2OTQ4MTEz",
"organizations_url": "https://api.github.com/users/ToraNova/orgs",
"received_events_url": "https://api.github.com/users/ToraNova/received_events",
"repos_url": "https://api.github.com/users/ToraNova/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ToraNova/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ToraNova/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ToraNova",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2022-07-29T10:14:12Z | 2023-07-30T00:03:33Z | 2022-07-29T15:43:16Z | NONE | resolved | Adds a class method to create PreparedRequests from raw HTTP request using Python's builtin BaseHTTPRequestHandler class.
Example usage:
```
>>> from requests import PreparedRequest, Session
>>> prq = PreparedRequest.from_raw('GET / HTTP/1.1\r\nHost: example.com\r\n\r\n', use_https=False)
>>> res = Session().send(prq)
<Response [200]>
```
This would be very useful for someone that wants to use the python requests library but with raw HTTP requests. | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6206/reactions"
} | https://api.github.com/repos/psf/requests/issues/6206/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6206.diff",
"html_url": "https://github.com/psf/requests/pull/6206",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6206.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6206"
} | true | [
"Requests is not accepting feature requests or new feature additions at this time. Thank you for putting this together but we won't be accepting it"
] |
https://api.github.com/repos/psf/requests/issues/6205 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6205/labels{/name} | https://api.github.com/repos/psf/requests/issues/6205/comments | https://api.github.com/repos/psf/requests/issues/6205/events | https://github.com/psf/requests/issues/6205 | 1,320,190,408 | I_kwDOABTKOs5OsIHI | 6,205 | Transport adapters not honored with proxy | {
"avatar_url": "https://avatars.githubusercontent.com/u/14196171?v=4",
"events_url": "https://api.github.com/users/patatetom/events{/privacy}",
"followers_url": "https://api.github.com/users/patatetom/followers",
"following_url": "https://api.github.com/users/patatetom/following{/other_user}",
"gists_url": "https://api.github.com/users/patatetom/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/patatetom",
"id": 14196171,
"login": "patatetom",
"node_id": "MDQ6VXNlcjE0MTk2MTcx",
"organizations_url": "https://api.github.com/users/patatetom/orgs",
"received_events_url": "https://api.github.com/users/patatetom/received_events",
"repos_url": "https://api.github.com/users/patatetom/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/patatetom/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/patatetom/subscriptions",
"type": "User",
"url": "https://api.github.com/users/patatetom",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 0 | 2022-07-27T22:34:31Z | 2022-08-02T07:20:27Z | null | NONE | null | hi,
making a poor socks server at localhost on port 8001 with ssh/sshd running at localhost :
```console
@term1$ ssh -N -D localhost:8001 localhost
```
making a self-signed certificate for testing and debuging negociations on server side with s_server@openssl :
```console
@term2$ openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes
while :
do
echo -e "HTTP/1.0 200 OK\nContent-Length: 0\n\n" |
openssl s_server -4 -cert cert.pem -key key.pem -accept 4433 -msg
done
```
getting `requests` informations :
```console
@term3$ python -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"charset_normalizer": {
"version": "2.1.0"
},
"cryptography": {
"version": "2.8"
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.8.10"
},
"platform": {
"release": "5.10.0-1057-oem",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010106f",
"version": "19.0.0"
},
"requests": {
"version": "2.28.1"
},
"system_ssl": {
"version": "1010106f"
},
"urllib3": {
"version": "1.25.8"
},
"using_charset_normalizer": false,
"using_pyopenssl": true
}
```
running `requests` simply :
```console
@term3$ python <<~~~
import requests
url = "https://localhost:4433/"
session = requests.Session()
response = session.head(url=url, verify=False)
~~~
```
TLS1.3 by default :
```console
@term2$ ...
<<< TLS 1.3, Handshake [length 0034], Finished
...
>>> TLS 1.3, Handshake [length 00e9], NewSessionTicket
...
```
running `requests` with transport adapter only :
```console
@term3$ python <<~~~
import ssl
import requests
from requests.adapters import HTTPAdapter
from urllib3.poolmanager import PoolManager
class TestHTTPAdapter(HTTPAdapter):
def init_poolmanager(self, connections, maxsize, block=False):
self.poolmanager = PoolManager(
num_pools=connections,
maxsize=maxsize,
block=block,
ssl_version=ssl.PROTOCOL_TLSv1_2
)
url = "https://localhost:4433/"
session = requests.Session()
session.mount(url, TestHTTPAdapter())
response = session.head(url=url, verify=False)
~~~
```
TLS1.2 is OK :slightly_smiling_face: :
```console
@term2$ ...
>>> TLS 1.2, Handshake [length 0010], Finished
...
```
running `requests` with transport adapter **and socks proxy** :
```console
@term3$ python <<~~~
import ssl
import requests
from requests.adapters import HTTPAdapter
from urllib3.poolmanager import PoolManager
class TestHTTPAdapter(HTTPAdapter):
def init_poolmanager(self, connections, maxsize, block=False):
self.poolmanager = PoolManager(
num_pools=connections,
maxsize=maxsize,
block=block,
ssl_version=ssl.PROTOCOL_TLSv1_2
)
url = "https://localhost:4433/"
session = requests.Session()
session.mount(url, TestHTTPAdapter())
proxies={"https":"socks5://localhost:8001"}
response = session.head(url=url, proxies=proxies, verify=False)
~~~
```
TLS1.2 is **KO** :slightly_frowning_face: :
```console
@term2$ ...
<<< TLS 1.3, Handshake [length 0034], Finished
...
>>> TLS 1.3, Handshake [length 00e9], NewSessionTicket
...
```
`requests` has the same behavior whether `pyopenssl` is present/used or not.
HTTP/HTTPS proxies not tested : sorry.
regards, lacsaP.
---
note that `httpie` works as expected :
```console
@term4$ https --verify no https://localhost:4433
HTTP/1.0 200 OK
Content-Length: 0
```
```console
@term2$ ...
<<< TLS 1.3, Handshake [length 0034], Finished
...
>>> TLS 1.3, Handshake [length 00e9], NewSessionTicket
...
```
```console
@term4$ https --ssl tls1.2 --verify no https://localhost:4433
HTTP/1.0 200 OK
Content-Length: 0
```
```console
@term2$ ...
>>> TLS 1.2, Handshake [length 0010], Finished
...
```
```console
@term4$ https --ssl tls1.2 --verify no --proxy https:socks5://localhost:8001 https://localhost:4433
HTTP/1.0 200 OK
Content-Length: 0
```
```console
@term2$ ...
>>> TLS 1.2, Handshake [length 0010], Finished
...
```
as well as `urllib3` :
```console
@term5$ python <<~~~
import urllib3
https = urllib3.PoolManager(cert_reqs='CERT_NONE')
r = https.request('GET', 'https://localhost:4433')
~~~
```
```console
@term2$ ...
<<< TLS 1.3, Handshake [length 0034], Finished
...
>>> TLS 1.3, Handshake [length 00e9], NewSessionTicket
...
```
```console
@term5$ python <<~~~
import ssl, urllib3
https = urllib3.PoolManager(cert_reqs='CERT_NONE', ssl_version=ssl.PROTOCOL_TLSv1_2)
r = https.request('GET', 'https://localhost:4433')
~~~
```
```console
@term2$ ...
>>> TLS 1.2, Handshake [length 0010], Finished
...
```
```console
@term5$ python <<~~~
import ssl
from urllib3.contrib.socks import SOCKSProxyManager
socks = SOCKSProxyManager('socks5h://localhost:8001/', cert_reqs='CERT_NONE', ssl_version=ssl.PROTOCOL_TLSv1_2)
r = socks.request('GET', 'https://localhost:4433')
~~~
```
```console
@term2$ ...
>>> TLS 1.2, Handshake [length 0010], Finished
...
``` | null | {
"+1": 1,
"-1": 0,
"confused": 0,
"eyes": 1,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 2,
"url": "https://api.github.com/repos/psf/requests/issues/6205/reactions"
} | https://api.github.com/repos/psf/requests/issues/6205/timeline | null | null | null | null | false | [] |
https://api.github.com/repos/psf/requests/issues/6204 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6204/labels{/name} | https://api.github.com/repos/psf/requests/issues/6204/comments | https://api.github.com/repos/psf/requests/issues/6204/events | https://github.com/psf/requests/pull/6204 | 1,319,697,280 | PR_kwDOABTKOs48MBDq | 6,204 | Remove Python 2 mention on `chardet` behavior | {
"avatar_url": "https://avatars.githubusercontent.com/u/901169?v=4",
"events_url": "https://api.github.com/users/DavidCain/events{/privacy}",
"followers_url": "https://api.github.com/users/DavidCain/followers",
"following_url": "https://api.github.com/users/DavidCain/following{/other_user}",
"gists_url": "https://api.github.com/users/DavidCain/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/DavidCain",
"id": 901169,
"login": "DavidCain",
"node_id": "MDQ6VXNlcjkwMTE2OQ==",
"organizations_url": "https://api.github.com/users/DavidCain/orgs",
"received_events_url": "https://api.github.com/users/DavidCain/received_events",
"repos_url": "https://api.github.com/users/DavidCain/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/DavidCain/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/DavidCain/subscriptions",
"type": "User",
"url": "https://api.github.com/users/DavidCain",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2022-07-27T15:01:44Z | 2023-07-29T00:03:08Z | 2022-07-27T17:22:21Z | CONTRIBUTOR | resolved | `requests` no longer supports Python 2. A recent commit, 8bce583b9547c7b82d44c8e97f37cf9a16cbe758
removed the `chardet` dependency for Python 2:
```diff
-'chardet>=3.0.2,<5; python_version < "3"',
```
We should edit the docs to remove mention of behavior on Py2. | {
"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/6204/reactions"
} | https://api.github.com/repos/psf/requests/issues/6204/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6204.diff",
"html_url": "https://github.com/psf/requests/pull/6204",
"merged_at": "2022-07-27T17:22:21Z",
"patch_url": "https://github.com/psf/requests/pull/6204.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6204"
} | true | [
"Thank you both for the extremely speedy review! It does look like I'll need a maintainer to kick off CI though."
] |
https://api.github.com/repos/psf/requests/issues/6203 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6203/labels{/name} | https://api.github.com/repos/psf/requests/issues/6203/comments | https://api.github.com/repos/psf/requests/issues/6203/events | https://github.com/psf/requests/issues/6203 | 1,314,046,956 | I_kwDOABTKOs5OUsPs | 6,203 | Unable capture the exception and Existing without control from application | {
"avatar_url": "https://avatars.githubusercontent.com/u/8638634?v=4",
"events_url": "https://api.github.com/users/gudipudipradeep/events{/privacy}",
"followers_url": "https://api.github.com/users/gudipudipradeep/followers",
"following_url": "https://api.github.com/users/gudipudipradeep/following{/other_user}",
"gists_url": "https://api.github.com/users/gudipudipradeep/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gudipudipradeep",
"id": 8638634,
"login": "gudipudipradeep",
"node_id": "MDQ6VXNlcjg2Mzg2MzQ=",
"organizations_url": "https://api.github.com/users/gudipudipradeep/orgs",
"received_events_url": "https://api.github.com/users/gudipudipradeep/received_events",
"repos_url": "https://api.github.com/users/gudipudipradeep/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gudipudipradeep/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gudipudipradeep/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gudipudipradeep",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2022-07-22T02:11:31Z | 2023-07-23T00:03:28Z | 2022-07-22T02:15:39Z | NONE | resolved | **Getting the following error frequently sometimes and even not able to capture inside the exception block to handle the error. Please provide help on the below issue.**
Jul 21 11:[2022-07-21 11:10:41,919] ERROR in resilientsession: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
Jul 21 11:Traceback (most recent call last):
Jul 21 11:File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/urllib3/connectionpool.py", line 703, in urlopen
Jul 21 11:httplib_response = self._make_request(
Jul 21 11:File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/urllib3/connectionpool.py", line 449, in _make_request
Jul 21 11:six.raise_from(e, None)
Jul 21 11:File "<string>", line 3, in raise_from
Jul 21 11:File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/urllib3/connectionpool.py", line 444, in _make_request
Jul 21 11:httplib_response = conn.getresponse()
Jul 21 11:File "/usr/lib64/python3.8/http/client.py", line 1347, in getresponse
Jul 21 11:response.begin()
Jul 21 11:File "/usr/lib64/python3.8/http/client.py", line 307, in begin
Jul 21 11:version, status, reason = self._read_status()
Jul 21 11:File "/usr/lib64/python3.8/http/client.py", line 268, in _read_status
Jul 21 11:line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
Jul 21 11:File "/usr/lib64/python3.8/socket.py", line 669, in readinto
Jul 21 11:return self._sock.recv_into(b)
Jul 21 11:File "/usr/lib64/python3.8/ssl.py", line 1241, in recv_into
Jul 21 11:return self.read(nbytes, buffer)
Jul 21 11:File "/usr/lib64/python3.8/ssl.py", line 1099, in read
Jul 21 11:return self._sslobj.read(len, buffer)
Jul 21 11:ConnectionResetError: [Errno 104] Connection reset by peer
Jul 21 11:During handling of the above exception, another exception occurred:
Jul 21 11:Traceback (most recent call last):
Jul 21 11:File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/requests/adapters.py", line 489, in send
Jul 21 11:resp = conn.urlopen(
Jul 21 11:File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/urllib3/connectionpool.py", line 785, in urlopen
Jul 21 11:retries = retries.increment(
Jul 21 11:File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment
Jul 21 11:raise six.reraise(type(error), error, _stacktrace)
Jul 21 11:File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise
Jul 21 11:raise value.with_traceback(tb)
Jul 21 11:File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/urllib3/connectionpool.py", line 703, in urlopen
Jul 21 11:httplib_response = self._make_request(
Jul 21 11:File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/urllib3/connectionpool.py", line 449, in _make_request
Jul 21 11:six.raise_from(e, None)
Jul 21 11:File "<string>", line 3, in raise_from
Jul 21 11:File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/urllib3/connectionpool.py", line 444, in _make_request
Jul 21 11:httplib_response = conn.getresponse()
Jul 21 11:File "/usr/lib64/python3.8/http/client.py", line 1347, in getresponse
Jul 21 11:response.begin()
Jul 21 11:File "/usr/lib64/python3.8/http/client.py", line 307, in begin
Jul 21 11:version, status, reason = self._read_status()
Jul 21 11:File "/usr/lib64/python3.8/http/client.py", line 268, in _read_status
Jul 21 11:line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
Jul 21 11:File "/usr/lib64/python3.8/socket.py", line 669, in readinto
Jul 21 11:return self._sock.recv_into(b)
Jul 21 11:File "/usr/lib64/python3.8/ssl.py", line 1241, in recv_into
Jul 21 11:return self.read(nbytes, buffer)
Jul 21 11:File "/usr/lib64/python3.8/ssl.py", line 1099, in read
Jul 21 11:return self._sslobj.read(len, buffer)
Jul 21 11:urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
Jul 21 11:During handling of the above exception, another exception occurred:
Jul 21 11:Traceback (most recent call last):
Jul 21 11:File "/var/app/current/src/resilientsession.py", line 34, in request
Jul 21 11:r = super(ResilientSession, self).request(method, url, **kwargs)
Jul 21 11:File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/requests/sessions.py", line 587, in request
Jul 21 11:resp = self.send(prep, **send_kwargs)
Jul 21 11:File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/requests/sessions.py", line 701, in send
Jul 21 11:r = adapter.send(request, **kwargs)
Jul 21 11:File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/requests/adapters.py", line 547, in send
Jul 21 11:raise ConnectionError(err, request=request)
Jul 21 11:requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
Jul 21 11:[2022-07-21 11:10:41,919] ERROR in resilientsession: Got recoverable error [ConnectionError] from POST https://qaecs-wwwwww.zzzzz.com/calculations/execute?request_id=input_XXXXX_XXXSanity_35, retry #1 in 0s
Jul 21 11:Traceback (most recent call last):
Jul 21 11:File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/urllib3/connectionpool.py", line 703, in urlopen
Jul 21 11:httplib_response = self._make_request(
Jul 21 11:File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/urllib3/connectionpool.py", line 449, in _make_request
Jul 21 11:six.raise_from(e, None)
Jul 21 11:File "<string>", line 3, in raise_from
Jul 21 11:File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/urllib3/connectionpool.py", line 444, in _make_request
Jul 21 11:httplib_response = conn.getresponse()
Jul 21 11:File "/usr/lib64/python3.8/http/client.py", line 1347, in getresponse
Jul 21 11:response.begin()
Jul 21 11:File "/usr/lib64/python3.8/http/client.py", line 307, in begin
Jul 21 11:version, status, reason = self._read_status()
Jul 21 11:File "/usr/lib64/python3.8/http/client.py", line 268, in _read_status
Jul 21 11:line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
Jul 21 11:File "/usr/lib64/python3.8/socket.py", line 669, in readinto
Jul 21 11:return self._sock.recv_into(b)
Jul 21 11:File "/usr/lib64/python3.8/ssl.py", line 1241, in recv_into
Jul 21 11:return self.read(nbytes, buffer)
Jul 21 11:File "/usr/lib64/python3.8/ssl.py", line 1099, in read
Jul 21 11:return self._sslobj.read(len, buffer)
Jul 21 11:ConnectionResetError: [Errno 104] Connection reset by peer
Jul 21 11:During handling of the above exception, another exception occurred:
Jul 21 11:Traceback (most recent call last):
Jul 21 11:File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/requests/adapters.py", line 489, in send
Jul 21 11:resp = conn.urlopen(
Jul 21 11:File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/urllib3/connectionpool.py", line 785, in urlopen
Jul 21 11:retries = retries.increment(
Jul 21 11:File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment
Jul 21 11:raise six.reraise(type(error), error, _stacktrace)
Jul 21 11:File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise
Jul 21 11:raise value.with_traceback(tb)
Jul 21 11:File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/urllib3/connectionpool.py", line 703, in urlopen
Jul 21 11:httplib_response = self._make_request(
Jul 21 11:File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/urllib3/connectionpool.py", line 449, in _make_request
Jul 21 11:six.raise_from(e, None)
Jul 21 11:File "<string>", line 3, in raise_from
Jul 21 11:File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/urllib3/connectionpool.py", line 444, in _make_request
Jul 21 11:httplib_response = conn.getresponse()
Jul 21 11:File "/usr/lib64/python3.8/http/client.py", line 1347, in getresponse
Jul 21 11:response.begin()
Jul 21 11:File "/usr/lib64/python3.8/http/client.py", line 307, in begin
Jul 21 11:version, status, reason = self._read_status()
Jul 21 11:File "/usr/lib64/python3.8/http/client.py", line 268, in _read_status
Jul 21 11:line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
Jul 21 11:File "/usr/lib64/python3.8/socket.py", line 669, in readinto
Jul 21 11:return self._sock.recv_into(b)
Jul 21 11:File "/usr/lib64/python3.8/ssl.py", line 1241, in recv_into
Jul 21 11:return self.read(nbytes, buffer)
Jul 21 11:File "/usr/lib64/python3.8/ssl.py", line 1099, in read
Jul 21 11:return self._sslobj.read(len, buffer)
Jul 21 11:urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
Jul 21 11:During handling of the above exception, another exception occurred:
Jul 21 11:Traceback (most recent call last):
Jul 21 11:File "/var/app/current/src/resilientsession.py", line 34, in request
Jul 21 11:r = super(ResilientSession, self).request(method, url, **kwargs)
Jul 21 11:File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/requests/sessions.py", line 587, in request
Jul 21 11:resp = self.send(prep, **send_kwargs)
Jul 21 11:File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/requests/sessions.py", line 701, in send
Jul 21 11:r = adapter.send(request, **kwargs)
Jul 21 11:File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/requests/adapters.py", line 547, in send
Jul 21 11:raise ConnectionError(err, request=request)
Jul 21 11:requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
**code**
from requests import Session
import time
import logging
import requests
from requests.exceptions import ConnectionError
from urllib3.exceptions import MaxRetryError, ProtocolError
class ResilientSession(Session):
RETRY_COUNT = 4
def request(self, method, url, **kwargs):
counter = 0
delay = 0
while counter < ResilientSession.RETRY_COUNT:
counter += 1
try:
r = super(ResilientSession, self).request(method, url, **kwargs)
if r.status_code in [ 502, 503, 504 ]:
delay = 10 * counter
logging.warn("Got recoverable error [%s] from %s %s, retry #%s in %ss" % (r.status_code, method, url, counter, delay))
time.sleep(delay)
continue
except (ConnectionResetError, ConnectionError, MaxRetryError, ProtocolError ) as e:
logging.exception(e)
logging.exception("Got recoverable error [%s] from %s %s, retry #%s in %ss" % (type(e).__name__, method, url, counter, delay))
time.sleep(delay)
if ResilientSession.RETRY_COUNT == counter: raise e
continue
# except (Exception, ) as e:
# logging.exception(e)
# logging.exception("Got unrecoverable error [%s] from %s %s, retry #%s in %ss" % (type(e).__name__, method, url, counter, delay))
# raise e
return r
C:\>python -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"charset_normalizer": {
"version": "2.0.10"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.3"
},
"implementation": {
"name": "CPython",
"version": "3.8.8"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.28.1"
},
"system_ssl": {
"version": "1010109f"
},
"urllib3": {
"version": "1.26.8"
},
"using_charset_normalizer": false,
"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/6203/reactions"
} | https://api.github.com/repos/psf/requests/issues/6203/timeline | null | not_planned | null | null | false | [
"Hi @gudipudipradeep, it looks like this is a request for help. The error being received is due to the server resetting the connection unexpectedly. Requests has no ability to affect this and we won't be able to provide assistance.\n\nWe'd recommend trying a platform like StackOverflow for questions like this."
] |
https://api.github.com/repos/psf/requests/issues/6202 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6202/labels{/name} | https://api.github.com/repos/psf/requests/issues/6202/comments | https://api.github.com/repos/psf/requests/issues/6202/events | https://github.com/psf/requests/pull/6202 | 1,312,814,194 | PR_kwDOABTKOs471MW1 | 6,202 | Add response object to JSONDecodeError | {
"avatar_url": "https://avatars.githubusercontent.com/u/507733?v=4",
"events_url": "https://api.github.com/users/bungoume/events{/privacy}",
"followers_url": "https://api.github.com/users/bungoume/followers",
"following_url": "https://api.github.com/users/bungoume/following{/other_user}",
"gists_url": "https://api.github.com/users/bungoume/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bungoume",
"id": 507733,
"login": "bungoume",
"node_id": "MDQ6VXNlcjUwNzczMw==",
"organizations_url": "https://api.github.com/users/bungoume/orgs",
"received_events_url": "https://api.github.com/users/bungoume/received_events",
"repos_url": "https://api.github.com/users/bungoume/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bungoume/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bungoume/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bungoume",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2022-07-21T07:36:49Z | 2023-08-17T00:03:09Z | 2022-07-21T12:51:11Z | NONE | resolved | Add response object to JSONDecodeError.
We used to use the following code, but since 2.27, errors on json parse failure are now caught as RequestException.
Since there is basically `response` in the `.json()` phase, we would like to add it in JSONDecodeError for convenience.
```python
def my_post(url, payload):
try:
res = requests.post(url, json=payload)
res.raise_for_status()
return res.json()
except requests.exceptions.RequestException as e:
logger.warning("Failed to send data %s", e.response.status_code)
except Exception as e:
...
```
```
AttributeError
'NoneType' object has no attribute 'status_code'
``` | {
"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/6202/reactions"
} | https://api.github.com/repos/psf/requests/issues/6202/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6202.diff",
"html_url": "https://github.com/psf/requests/pull/6202",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6202.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6202"
} | true | [
"No, thank you"
] |
https://api.github.com/repos/psf/requests/issues/6201 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6201/labels{/name} | https://api.github.com/repos/psf/requests/issues/6201/comments | https://api.github.com/repos/psf/requests/issues/6201/events | https://github.com/psf/requests/pull/6201 | 1,309,260,510 | PR_kwDOABTKOs47ozQU | 6,201 | Suppress context when requests.exceptions.JSONDecodeError is raised. | {
"avatar_url": "https://avatars.githubusercontent.com/u/118834?v=4",
"events_url": "https://api.github.com/users/mila/events{/privacy}",
"followers_url": "https://api.github.com/users/mila/followers",
"following_url": "https://api.github.com/users/mila/following{/other_user}",
"gists_url": "https://api.github.com/users/mila/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mila",
"id": 118834,
"login": "mila",
"node_id": "MDQ6VXNlcjExODgzNA==",
"organizations_url": "https://api.github.com/users/mila/orgs",
"received_events_url": "https://api.github.com/users/mila/received_events",
"repos_url": "https://api.github.com/users/mila/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mila/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mila/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mila",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2022-07-19T09:44:06Z | 2023-10-20T00:03:12Z | 2022-07-20T07:56:13Z | CONTRIBUTOR | resolved | When a JSON response cannot be parsed, requests catch json.JSONDecodeError (or simplejson.JSONDecodeError) and raise requests.exceptions.JSONDecodeError instead. Because this happens in an except block, unhandled exceptions were printed in a chain:
```
Traceback (most recent call last):
...
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
...
requests.exceptions.JSONDecodeError: [Errno Expecting value] ...
```
This seems unnecessary and it increases cognitive overhead whean examining errors.
As requests.exceptions.JSONDecodeError inherits json.JSONDecodeError and we copy all atrributes from the later to the former, `raise ... from None` seems more approriate than `raise ... from e`. | {
"avatar_url": "https://avatars.githubusercontent.com/u/118834?v=4",
"events_url": "https://api.github.com/users/mila/events{/privacy}",
"followers_url": "https://api.github.com/users/mila/followers",
"following_url": "https://api.github.com/users/mila/following{/other_user}",
"gists_url": "https://api.github.com/users/mila/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mila",
"id": 118834,
"login": "mila",
"node_id": "MDQ6VXNlcjExODgzNA==",
"organizations_url": "https://api.github.com/users/mila/orgs",
"received_events_url": "https://api.github.com/users/mila/received_events",
"repos_url": "https://api.github.com/users/mila/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mila/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mila/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mila",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6201/reactions"
} | https://api.github.com/repos/psf/requests/issues/6201/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6201.diff",
"html_url": "https://github.com/psf/requests/pull/6201",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6201.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6201"
} | true | [
"We don't suppress context anywhere else as far as I remember. I don't understand why it's more valuable here and less helpful elsewhere. (And, no, don't update every exception to suppress context)",
"Thank you @sigmavirus24, I see now that the error handing for JSON decoding is consistent with the rest of the li... |
https://api.github.com/repos/psf/requests/issues/6200 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6200/labels{/name} | https://api.github.com/repos/psf/requests/issues/6200/comments | https://api.github.com/repos/psf/requests/issues/6200/events | https://github.com/psf/requests/pull/6200 | 1,309,213,593 | PR_kwDOABTKOs47opLU | 6,200 | Rephrase an outdated comment mentioning Python 2. | {
"avatar_url": "https://avatars.githubusercontent.com/u/118834?v=4",
"events_url": "https://api.github.com/users/mila/events{/privacy}",
"followers_url": "https://api.github.com/users/mila/followers",
"following_url": "https://api.github.com/users/mila/following{/other_user}",
"gists_url": "https://api.github.com/users/mila/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mila",
"id": 118834,
"login": "mila",
"node_id": "MDQ6VXNlcjExODgzNA==",
"organizations_url": "https://api.github.com/users/mila/orgs",
"received_events_url": "https://api.github.com/users/mila/received_events",
"repos_url": "https://api.github.com/users/mila/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mila/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mila/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mila",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2022-07-19T09:06:14Z | 2023-08-28T00:03:22Z | 2022-07-20T23:13:36Z | CONTRIBUTOR | resolved | As a first-time contributor, I was confused when I run `make test` and saw "This runs all of the tests, on both Python 2 and Python 3." in console output. | {
"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/6200/reactions"
} | https://api.github.com/repos/psf/requests/issues/6200/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6200.diff",
"html_url": "https://github.com/psf/requests/pull/6200",
"merged_at": "2022-07-20T23:13:36Z",
"patch_url": "https://github.com/psf/requests/pull/6200.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6200"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/6199 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6199/labels{/name} | https://api.github.com/repos/psf/requests/issues/6199/comments | https://api.github.com/repos/psf/requests/issues/6199/events | https://github.com/psf/requests/pull/6199 | 1,309,202,441 | PR_kwDOABTKOs47omzi | 6,199 | Fix links in docs to the kenreitz.org domain, which expired. | {
"avatar_url": "https://avatars.githubusercontent.com/u/118834?v=4",
"events_url": "https://api.github.com/users/mila/events{/privacy}",
"followers_url": "https://api.github.com/users/mila/followers",
"following_url": "https://api.github.com/users/mila/following{/other_user}",
"gists_url": "https://api.github.com/users/mila/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mila",
"id": 118834,
"login": "mila",
"node_id": "MDQ6VXNlcjExODgzNA==",
"organizations_url": "https://api.github.com/users/mila/orgs",
"received_events_url": "https://api.github.com/users/mila/received_events",
"repos_url": "https://api.github.com/users/mila/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mila/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mila/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mila",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2022-07-19T08:57:07Z | 2024-01-13T00:03:37Z | 2023-01-11T22:11:22Z | CONTRIBUTOR | resolved | When I was studying Contributor’s Guide, I found that links to kenreitz.org are broken.
- "The Future of Python HTTP" was archived by Internet Archive, so I linked there.
- "Be cordial or be on your way" was not archived, so I removed the link.
- "A Kenneth Reitz Project." in a footer is broken too, but I did not touch that link. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6199/reactions"
} | https://api.github.com/repos/psf/requests/issues/6199/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6199.diff",
"html_url": "https://github.com/psf/requests/pull/6199",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6199.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6199"
} | true | [
"It appears the links may have been temporarily interrupted but are working presently."
] |
https://api.github.com/repos/psf/requests/issues/6198 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6198/labels{/name} | https://api.github.com/repos/psf/requests/issues/6198/comments | https://api.github.com/repos/psf/requests/issues/6198/events | https://github.com/psf/requests/issues/6198 | 1,304,179,023 | I_kwDOABTKOs5NvDFP | 6,198 | Using `format` as a query parameter for certain URLs causes `requests` to miss the `?` query string separator | {
"avatar_url": "https://avatars.githubusercontent.com/u/5019367?v=4",
"events_url": "https://api.github.com/users/multimeric/events{/privacy}",
"followers_url": "https://api.github.com/users/multimeric/followers",
"following_url": "https://api.github.com/users/multimeric/following{/other_user}",
"gists_url": "https://api.github.com/users/multimeric/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/multimeric",
"id": 5019367,
"login": "multimeric",
"node_id": "MDQ6VXNlcjUwMTkzNjc=",
"organizations_url": "https://api.github.com/users/multimeric/orgs",
"received_events_url": "https://api.github.com/users/multimeric/received_events",
"repos_url": "https://api.github.com/users/multimeric/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/multimeric/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/multimeric/subscriptions",
"type": "User",
"url": "https://api.github.com/users/multimeric",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2022-07-14T02:44:40Z | 2023-07-15T00:03:36Z | 2022-07-14T03:01:54Z | NONE | resolved | <!-- Summary. -->
Using `format` as a query parameter for certain URLs causes `requests` to miss the `?` query string separator
## Expected Result
I expect the `?` separator to be present whenever any query parameters are provided.
<!-- What you expected. -->
## Actual Result
The `?` separator is not present.
<!-- What happened instead. -->
## Reproduction Steps''
```python
>>> import requests
>>> requests.__version__
'2.28.1'
>>> requests.get("https://www.uniprot.org/uniprotkb/search", params={"format": "json"}).url
'https://rest.uniprot.org/uniprotkb/searchformat=json'
>>> requests.get("https://www.uniprot.org", params={"format": "json"}).url
'https://rest.uniprot.org/format=json'
>>> requests.get("https://www.uniprot.org/uniprotkb/search", params={"size": "500"}).url
'https://www.uniprot.org/uniprotkb/search?size=500'
>>> requests.get("https://www.google.com", params={"format": "json"}).url
'https://www.google.com/?format=json'
```
Note how the same issue happens in different subdomains of `uniprot.org` but that it doesn't happen with `google.com`
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "2.1.0"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.3"
},
"implementation": {
"name": "CPython",
"version": "3.9.7"
},
"platform": {
"release": "5.13.0-52-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.28.1"
},
"system_ssl": {
"version": "101010cf"
},
"urllib3": {
"version": "1.26.10"
},
"using_charset_normalizer": true,
"using_pyopenssl": false
}
```
<!-- This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). -->
| {
"avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4",
"events_url": "https://api.github.com/users/sethmlarson/events{/privacy}",
"followers_url": "https://api.github.com/users/sethmlarson/followers",
"following_url": "https://api.github.com/users/sethmlarson/following{/other_user}",
"gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sethmlarson",
"id": 18519037,
"login": "sethmlarson",
"node_id": "MDQ6VXNlcjE4NTE5MDM3",
"organizations_url": "https://api.github.com/users/sethmlarson/orgs",
"received_events_url": "https://api.github.com/users/sethmlarson/received_events",
"repos_url": "https://api.github.com/users/sethmlarson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sethmlarson",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6198/reactions"
} | https://api.github.com/repos/psf/requests/issues/6198/timeline | null | completed | null | null | false | [
"The service is returning the incorrect URL to be redirected to in the `Location` header:\r\n\r\n```python\r\nimport requests\r\n\r\nresp = requests.get(\r\n \"https://www.uniprot.org/uniprotkb/search\",\r\n params={\"format\": \"json\"},\r\n allow_redirects=False\r\n)\r\n\r\n# The response was sent to the right... |
https://api.github.com/repos/psf/requests/issues/6197 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6197/labels{/name} | https://api.github.com/repos/psf/requests/issues/6197/comments | https://api.github.com/repos/psf/requests/issues/6197/events | https://github.com/psf/requests/issues/6197 | 1,303,363,649 | I_kwDOABTKOs5Nr8BB | 6,197 | how to add parameters --groups X25519 | {
"avatar_url": "https://avatars.githubusercontent.com/u/1232444?v=4",
"events_url": "https://api.github.com/users/nmweizi/events{/privacy}",
"followers_url": "https://api.github.com/users/nmweizi/followers",
"following_url": "https://api.github.com/users/nmweizi/following{/other_user}",
"gists_url": "https://api.github.com/users/nmweizi/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nmweizi",
"id": 1232444,
"login": "nmweizi",
"node_id": "MDQ6VXNlcjEyMzI0NDQ=",
"organizations_url": "https://api.github.com/users/nmweizi/orgs",
"received_events_url": "https://api.github.com/users/nmweizi/received_events",
"repos_url": "https://api.github.com/users/nmweizi/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nmweizi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nmweizi/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nmweizi",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2022-07-13T12:26:14Z | 2023-07-14T00:03:50Z | 2022-07-13T14:36:33Z | NONE | resolved | - https://kjt.hebei.gov.cn need to use parameters --groups X25519 to be able to connect ssl.
- example
openssl s_client -connect kjt.hebei.gov.cn:443 --state **--groups X25519**
- requests how to add openssl parameters **--groups X25519**
| {
"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/6197/reactions"
} | https://api.github.com/repos/psf/requests/issues/6197/timeline | null | completed | null | null | false | [] |
https://api.github.com/repos/psf/requests/issues/6196 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6196/labels{/name} | https://api.github.com/repos/psf/requests/issues/6196/comments | https://api.github.com/repos/psf/requests/issues/6196/events | https://github.com/psf/requests/issues/6196 | 1,301,941,461 | I_kwDOABTKOs5NmgzV | 6,196 | Error Partially initialized module 'requests' has no attribute 'post'" | {
"avatar_url": "https://avatars.githubusercontent.com/u/7605129?v=4",
"events_url": "https://api.github.com/users/werowe/events{/privacy}",
"followers_url": "https://api.github.com/users/werowe/followers",
"following_url": "https://api.github.com/users/werowe/following{/other_user}",
"gists_url": "https://api.github.com/users/werowe/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/werowe",
"id": 7605129,
"login": "werowe",
"node_id": "MDQ6VXNlcjc2MDUxMjk=",
"organizations_url": "https://api.github.com/users/werowe/orgs",
"received_events_url": "https://api.github.com/users/werowe/received_events",
"repos_url": "https://api.github.com/users/werowe/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/werowe/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/werowe/subscriptions",
"type": "User",
"url": "https://api.github.com/users/werowe",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2022-07-12T11:41:49Z | 2022-07-12T15:13:29Z | 2022-07-12T15:13:23Z | NONE | null | If you have a file named token.py in your path you get the error:
**Error Partially initialized module 'requests' has no attribute 'post'"**
That is the case with Python 3.8.9 and Requests Version: 2.28.1 on Mac OS 12.4. | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6196/reactions"
} | https://api.github.com/repos/psf/requests/issues/6196/timeline | null | completed | null | null | false | [
"I don't believe we import anything directly that would cause that so it's likely an issue with a dependency it the standard libraries we rely on. Therefore, it's not a bug we can fix. Rename your file to not conflict with what (based on my memory, since I'm on my phone) is a standard library package.\n\nAlso you i... |
https://api.github.com/repos/psf/requests/issues/6195 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6195/labels{/name} | https://api.github.com/repos/psf/requests/issues/6195/comments | https://api.github.com/repos/psf/requests/issues/6195/events | https://github.com/psf/requests/pull/6195 | 1,301,092,133 | PR_kwDOABTKOs47NrPU | 6,195 | Adding native support for Bearer token authentication objects | {
"avatar_url": "https://avatars.githubusercontent.com/u/98620302?v=4",
"events_url": "https://api.github.com/users/Karien98/events{/privacy}",
"followers_url": "https://api.github.com/users/Karien98/followers",
"following_url": "https://api.github.com/users/Karien98/following{/other_user}",
"gists_url": "https://api.github.com/users/Karien98/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Karien98",
"id": 98620302,
"login": "Karien98",
"node_id": "U_kgDOBeDTjg",
"organizations_url": "https://api.github.com/users/Karien98/orgs",
"received_events_url": "https://api.github.com/users/Karien98/received_events",
"repos_url": "https://api.github.com/users/Karien98/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Karien98/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Karien98/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Karien98",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2022-07-11T18:51:11Z | 2023-07-12T00:03:14Z | 2022-07-11T19:41:31Z | NONE | resolved | added to auth.py:
class HTTPBearerTokenAuth(AuthBase):
def _bearer_token_auth_str(token):
added 1 test case to test_requests.py
All tests passed locally | {
"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/6195/reactions"
} | https://api.github.com/repos/psf/requests/issues/6195/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6195.diff",
"html_url": "https://github.com/psf/requests/pull/6195",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6195.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6195"
} | true | [
"I'm very excited for this new feature. Tests also passed locally for me. I'm happy to assist development on this one, please let me know if I can help.",
"Duplicate of #4437",
"@sigmavirus24 Thank you for your feedback. We apologize for not noticing https://github.com/psf/requests/issues/4437 , which we inadve... |
https://api.github.com/repos/psf/requests/issues/6194 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6194/labels{/name} | https://api.github.com/repos/psf/requests/issues/6194/comments | https://api.github.com/repos/psf/requests/issues/6194/events | https://github.com/psf/requests/issues/6194 | 1,300,197,366 | I_kwDOABTKOs5Nf2_2 | 6,194 | Incorrect work of requests | {
"avatar_url": "https://avatars.githubusercontent.com/u/2187893?v=4",
"events_url": "https://api.github.com/users/beqabeqa473/events{/privacy}",
"followers_url": "https://api.github.com/users/beqabeqa473/followers",
"following_url": "https://api.github.com/users/beqabeqa473/following{/other_user}",
"gists_url": "https://api.github.com/users/beqabeqa473/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/beqabeqa473",
"id": 2187893,
"login": "beqabeqa473",
"node_id": "MDQ6VXNlcjIxODc4OTM=",
"organizations_url": "https://api.github.com/users/beqabeqa473/orgs",
"received_events_url": "https://api.github.com/users/beqabeqa473/received_events",
"repos_url": "https://api.github.com/users/beqabeqa473/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/beqabeqa473/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/beqabeqa473/subscriptions",
"type": "User",
"url": "https://api.github.com/users/beqabeqa473",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2022-07-11T04:40:33Z | 2022-07-11T15:17:29Z | 2022-07-11T11:03:50Z | NONE | null | <!-- Summary. -->
For some reason, making request via requests library forces a site to return page for enterring captcha.
The same request made with urllib gives expected result.
## Expected Result
The same response as made with urllib, i.e. get a full page response
<!-- What you expected. -->
## Actual Result
Request made with requests caused to get a response with captcha
<!-- What happened instead. -->
## Reproduction Steps
```python
import requests
url = "https://yandex.ru/pogoda/tbilisi"
headers = {"Host": "yandex.ru"}
resp = requests.get(url, headers=headers, verify=False)
print(res.text
```
```python
import urllib.request
req = urllib.request.Request("https://yandex.ru/pogoda/tbilisi")
res = urllib.request.urlopen(req)
print(res.read()))
```
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "2.1.0"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.3"
},
"implementation": {
"name": "CPython",
"version": "3.7.9"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.28.1"
},
"system_ssl": {
"version": "1010107f"
},
"urllib3": {
"version": "1.26.9"
},
"using_charset_normalizer": true,
"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/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/6194/reactions"
} | https://api.github.com/repos/psf/requests/issues/6194/timeline | null | completed | null | null | false | [
"I suspect it is something related with ssl, because, when i decided to capture traffic from these two methods and compare, i was using httpdebugger and their certificate.\r\nIn this case everything worked as expected.",
"Hi @beqabeqa473, the service you're trying to connect to is performing user-agent fingerprin... |
https://api.github.com/repos/psf/requests/issues/6193 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6193/labels{/name} | https://api.github.com/repos/psf/requests/issues/6193/comments | https://api.github.com/repos/psf/requests/issues/6193/events | https://github.com/psf/requests/issues/6193 | 1,299,817,814 | I_kwDOABTKOs5NeaVW | 6,193 | SSLError: [SSL: BAD_ECPOINT] bad ecpoint (_ssl.c:997) | {
"avatar_url": "https://avatars.githubusercontent.com/u/1232444?v=4",
"events_url": "https://api.github.com/users/nmweizi/events{/privacy}",
"followers_url": "https://api.github.com/users/nmweizi/followers",
"following_url": "https://api.github.com/users/nmweizi/following{/other_user}",
"gists_url": "https://api.github.com/users/nmweizi/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nmweizi",
"id": 1232444,
"login": "nmweizi",
"node_id": "MDQ6VXNlcjEyMzI0NDQ=",
"organizations_url": "https://api.github.com/users/nmweizi/orgs",
"received_events_url": "https://api.github.com/users/nmweizi/received_events",
"repos_url": "https://api.github.com/users/nmweizi/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nmweizi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nmweizi/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nmweizi",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2022-07-10T03:26:06Z | 2022-07-10T22:32:41Z | 2022-07-10T13:16:27Z | NONE | null | - macos,python3.10,requests 2.28.1
- request
```
requests.get("https://kjt.hebei.gov.cn/www/index_ssl/index.html",verify=False,headers={"User-Agent":"firefox"})
```
- error info
```
SSLError: HTTPSConnectionPool(host='kjt.hebei.gov.cn', port=443): Max retries exceeded with url: /www/index_ssl/index.html (Caused by SSLError(SSLError(1, '[SSL: BAD_ECPOINT] bad ecpoint (_ssl.c:997)')))
```
- python3.10 -m requests.help
```
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "2.0.8"
},
"cryptography": {
"version": "36.0.0"
},
"idna": {
"version": "3.3"
},
"implementation": {
"name": "CPython",
"version": "3.10.5"
},
"platform": {
"release": "21.5.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "101010cf",
"version": "22.0.0"
},
"requests": {
"version": "2.28.1"
},
"system_ssl": {
"version": "1010111f"
},
"urllib3": {
"version": "1.26.7"
},
"using_charset_normalizer": true,
"using_pyopenssl": true
}
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6193/reactions"
} | https://api.github.com/repos/psf/requests/issues/6193/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.",
"may be? https://bugs.python.org/issue32882\r\nhow ... |
https://api.github.com/repos/psf/requests/issues/6192 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6192/labels{/name} | https://api.github.com/repos/psf/requests/issues/6192/comments | https://api.github.com/repos/psf/requests/issues/6192/events | https://github.com/psf/requests/pull/6192 | 1,298,956,810 | PR_kwDOABTKOs47Gr6i | 6,192 | Fix the popitem bug in cookies | {
"avatar_url": "https://avatars.githubusercontent.com/u/34425507?v=4",
"events_url": "https://api.github.com/users/kianelbo/events{/privacy}",
"followers_url": "https://api.github.com/users/kianelbo/followers",
"following_url": "https://api.github.com/users/kianelbo/following{/other_user}",
"gists_url": "https://api.github.com/users/kianelbo/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kianelbo",
"id": 34425507,
"login": "kianelbo",
"node_id": "MDQ6VXNlcjM0NDI1NTA3",
"organizations_url": "https://api.github.com/users/kianelbo/orgs",
"received_events_url": "https://api.github.com/users/kianelbo/received_events",
"repos_url": "https://api.github.com/users/kianelbo/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kianelbo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kianelbo/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kianelbo",
"user_view_type": "public"
} | [] | open | false | null | [] | {
"closed_at": null,
"closed_issues": 0,
"created_at": "2024-05-20T14:16: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/35",
"id": 11076316,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/35/labels",
"node_id": "MI_kwDOABTKOs4AqQLc",
"number": 35,
"open_issues": 3,
"state": "open",
"title": "2.33.0",
"updated_at": "2024-05-21T12:26:27Z",
"url": "https://api.github.com/repos/psf/requests/milestones/35"
} | 0 | 2022-07-08T12:27:41Z | 2024-05-20T14:17:03Z | null | NONE | null | Closes #6190 | 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/6192/reactions"
} | https://api.github.com/repos/psf/requests/issues/6192/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6192.diff",
"html_url": "https://github.com/psf/requests/pull/6192",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6192.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6192"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/6191 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6191/labels{/name} | https://api.github.com/repos/psf/requests/issues/6191/comments | https://api.github.com/repos/psf/requests/issues/6191/events | https://github.com/psf/requests/issues/6191 | 1,297,070,638 | I_kwDOABTKOs5NT7ou | 6,191 | [2.28.1] IncompleteRead errors on large file download using iter_content (working 2.28.0) | {
"avatar_url": "https://avatars.githubusercontent.com/u/22263247?v=4",
"events_url": "https://api.github.com/users/Moandco/events{/privacy}",
"followers_url": "https://api.github.com/users/Moandco/followers",
"following_url": "https://api.github.com/users/Moandco/following{/other_user}",
"gists_url": "https://api.github.com/users/Moandco/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Moandco",
"id": 22263247,
"login": "Moandco",
"node_id": "MDQ6VXNlcjIyMjYzMjQ3",
"organizations_url": "https://api.github.com/users/Moandco/orgs",
"received_events_url": "https://api.github.com/users/Moandco/received_events",
"repos_url": "https://api.github.com/users/Moandco/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Moandco/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Moandco/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Moandco",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2022-07-07T09:10:11Z | 2023-07-09T00:03:59Z | 2022-07-08T06:19:04Z | NONE | resolved | Receiving ChunkedEncodingErrors with IncompleteRead while receiving a reponse with a large binary using transfer-encoding: chunked.
## Expected Result
A response with a large binary body (500MB+) send using `transfer-encoding: chunked` with the appropriate header gets processed in steps using `inter_content` without error.
Behavior as it was in 28.0.0.
## Actual Result
The processing fails with a random number of missing bytes raising `ChunkedEncodingError (Connection Broken: IncompleteRead(X bytes read, Y bytes more expected))`
## Reproduction Steps
Send a request to an endpoint returning a large binary (500MB+) in the reponse body using transfer encoding chunked.
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": "5.0.0"
},
"charset_normalizer": {
"version": "2.1.0"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.3"
},
"implementation": {
"name": "CPython",
"version": "3.9.10"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.28.1"
},
"system_ssl": {
"version": "101010df"
},
"urllib3": {
"version": "1.26.9"
},
"using_charset_normalizer": false,
"using_pyopenssl": false
}
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/22263247?v=4",
"events_url": "https://api.github.com/users/Moandco/events{/privacy}",
"followers_url": "https://api.github.com/users/Moandco/followers",
"following_url": "https://api.github.com/users/Moandco/following{/other_user}",
"gists_url": "https://api.github.com/users/Moandco/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Moandco",
"id": 22263247,
"login": "Moandco",
"node_id": "MDQ6VXNlcjIyMjYzMjQ3",
"organizations_url": "https://api.github.com/users/Moandco/orgs",
"received_events_url": "https://api.github.com/users/Moandco/received_events",
"repos_url": "https://api.github.com/users/Moandco/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Moandco/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Moandco/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Moandco",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6191/reactions"
} | https://api.github.com/repos/psf/requests/issues/6191/timeline | null | completed | null | null | false | [
"Hi @Moandco, could you provide some more information on the issue?\r\n\r\nA few questions that are raised immediately are\r\n\r\na.) is this specific to a single server/service or broadly reproducible?\r\nb.) is this error happening consistently with every large download?\r\nc.) if it is consistent, downgrading im... |
https://api.github.com/repos/psf/requests/issues/6190 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6190/labels{/name} | https://api.github.com/repos/psf/requests/issues/6190/comments | https://api.github.com/repos/psf/requests/issues/6190/events | https://github.com/psf/requests/issues/6190 | 1,293,744,958 | I_kwDOABTKOs5NHPs- | 6,190 | requests.cookies.RequestsCookieJar: popitem() does not work | {
"avatar_url": "https://avatars.githubusercontent.com/u/4130991?v=4",
"events_url": "https://api.github.com/users/fireattack/events{/privacy}",
"followers_url": "https://api.github.com/users/fireattack/followers",
"following_url": "https://api.github.com/users/fireattack/following{/other_user}",
"gists_url": "https://api.github.com/users/fireattack/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/fireattack",
"id": 4130991,
"login": "fireattack",
"node_id": "MDQ6VXNlcjQxMzA5OTE=",
"organizations_url": "https://api.github.com/users/fireattack/orgs",
"received_events_url": "https://api.github.com/users/fireattack/received_events",
"repos_url": "https://api.github.com/users/fireattack/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/fireattack/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fireattack/subscriptions",
"type": "User",
"url": "https://api.github.com/users/fireattack",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 6 | 2022-07-05T03:39:54Z | 2022-11-16T15:53:28Z | null | NONE | null | `requests.cookies.RequestsCookieJar`'s `popitem()` method doesn't seem to work even if cookies is not empty.
## Expected Result
From [the doc](https://requests.readthedocs.io/en/latest/api/#requests.cookies.RequestsCookieJar.popitem):
>remove and return some (key, value) pair as a 2-tuple; but raise KeyError if D is empty.
(Also, I'm not sure what exactly is "D" here. I assume it means the cookies obj itself.)
## Actual Result
It always raises KeyError even when it's not empty.
## Reproduction Steps
```python
import requests
r = requests.get('https://google.com')
print(len(r.cookies)) # = 3
r.cookies.popitem()
```
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": "4.0.0"
},
"charset_normalizer": {
"version": "2.0.10"
},
"cryptography": {
"version": "3.4.8"
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.9.1"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "101010cf",
"version": "20.0.1"
},
"requests": {
"version": "2.28.1"
},
"system_ssl": {
"version": "1010107f"
},
"urllib3": {
"version": "1.26.3"
},
"using_charset_normalizer": false,
"using_pyopenssl": true
}
```
<!-- This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). -->
| null | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6190/reactions"
} | https://api.github.com/repos/psf/requests/issues/6190/timeline | null | null | null | null | false | [
"I found the issue and hopefully fixed it but I couldn't find the documentation entry, perhaps because `popitem` is not implemented explicitly in the code. Is there any way to improve the doc?",
"Correct @kianelbo support was not intended for that method but we can't use the mapping interface without it. To be fa... |
https://api.github.com/repos/psf/requests/issues/6189 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6189/labels{/name} | https://api.github.com/repos/psf/requests/issues/6189/comments | https://api.github.com/repos/psf/requests/issues/6189/events | https://github.com/psf/requests/issues/6189 | 1,292,029,103 | I_kwDOABTKOs5NAsyv | 6,189 | Werkzeug importing failed | {
"avatar_url": "https://avatars.githubusercontent.com/u/80721211?v=4",
"events_url": "https://api.github.com/users/Khabibulix/events{/privacy}",
"followers_url": "https://api.github.com/users/Khabibulix/followers",
"following_url": "https://api.github.com/users/Khabibulix/following{/other_user}",
"gists_url": "https://api.github.com/users/Khabibulix/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Khabibulix",
"id": 80721211,
"login": "Khabibulix",
"node_id": "MDQ6VXNlcjgwNzIxMjEx",
"organizations_url": "https://api.github.com/users/Khabibulix/orgs",
"received_events_url": "https://api.github.com/users/Khabibulix/received_events",
"repos_url": "https://api.github.com/users/Khabibulix/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Khabibulix/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Khabibulix/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Khabibulix",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2022-07-02T10:58:08Z | 2023-07-03T00:03:43Z | 2022-07-02T21:47:34Z | NONE | resolved | Heya to all,
I already check Internet before botherin you all. Here's the deal: i installed all the requirements.txt and i wanted to launch the tests, but i raise an _**ImportError**_ with _**werkzeug.wrappers**_. Here is the complete error:

Here is my Pip List:

So i upgraded Pip, i changed the version for werkzeug, i searched Google for answers but, the solutions that i found are not correct for my case. I'll be glad if someone could help me, i really want to:
- Run the tests
- Contribute to Requests
- Become the best programmer
But just not seeing that error will make me happy.
Thanks for reading and good day!
| {
"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/6189/reactions"
} | https://api.github.com/repos/psf/requests/issues/6189/timeline | null | completed | null | null | false | [
"Hello there,\r\n I've read your issue and the werkzeug code,\r\n there is a command in their code that might help you\r\n` .. versionchanged:: 2.0\r\n Combine ``BaseResponse`` and mixins into a single ``Response``\r\n class. Using the old classes is deprecated and will be removed\r\n in Wer... |
https://api.github.com/repos/psf/requests/issues/6188 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6188/labels{/name} | https://api.github.com/repos/psf/requests/issues/6188/comments | https://api.github.com/repos/psf/requests/issues/6188/events | https://github.com/psf/requests/pull/6188 | 1,289,126,381 | PR_kwDOABTKOs46lsGT | 6,188 | Fixed warnings message to suggest using secure protocol. | {
"avatar_url": "https://avatars.githubusercontent.com/u/370774?v=4",
"events_url": "https://api.github.com/users/slyapustin/events{/privacy}",
"followers_url": "https://api.github.com/users/slyapustin/followers",
"following_url": "https://api.github.com/users/slyapustin/following{/other_user}",
"gists_url": "https://api.github.com/users/slyapustin/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/slyapustin",
"id": 370774,
"login": "slyapustin",
"node_id": "MDQ6VXNlcjM3MDc3NA==",
"organizations_url": "https://api.github.com/users/slyapustin/orgs",
"received_events_url": "https://api.github.com/users/slyapustin/received_events",
"repos_url": "https://api.github.com/users/slyapustin/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/slyapustin/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/slyapustin/subscriptions",
"type": "User",
"url": "https://api.github.com/users/slyapustin",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2022-06-29T18:24:40Z | 2023-06-30T00:03:07Z | 2022-06-29T18:41:49Z | CONTRIBUTOR | resolved | Small update to suggest secure schema in the error message:
> Perhaps you meant https://
Instead of
> Perhaps you meant http:// | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6188/reactions"
} | https://api.github.com/repos/psf/requests/issues/6188/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6188.diff",
"html_url": "https://github.com/psf/requests/pull/6188",
"merged_at": "2022-06-29T18:41:49Z",
"patch_url": "https://github.com/psf/requests/pull/6188.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6188"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/6187 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6187/labels{/name} | https://api.github.com/repos/psf/requests/issues/6187/comments | https://api.github.com/repos/psf/requests/issues/6187/events | https://github.com/psf/requests/pull/6187 | 1,288,932,507 | PR_kwDOABTKOs46lBJ0 | 6,187 | refactor: prefer dictionary comphrension to loop | {
"avatar_url": "https://avatars.githubusercontent.com/u/947110?v=4",
"events_url": "https://api.github.com/users/kkirsche/events{/privacy}",
"followers_url": "https://api.github.com/users/kkirsche/followers",
"following_url": "https://api.github.com/users/kkirsche/following{/other_user}",
"gists_url": "https://api.github.com/users/kkirsche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kkirsche",
"id": 947110,
"login": "kkirsche",
"node_id": "MDQ6VXNlcjk0NzExMA==",
"organizations_url": "https://api.github.com/users/kkirsche/orgs",
"received_events_url": "https://api.github.com/users/kkirsche/received_events",
"repos_url": "https://api.github.com/users/kkirsche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kkirsche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kkirsche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kkirsche",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2022-06-29T15:53:20Z | 2024-07-30T00:03:47Z | 2023-07-30T01:55:18Z | CONTRIBUTOR | resolved | A dictionary comprehension can create the dictionary on one line, cutting out the clutter of declaring an empty dict and then adding items.
Squeezing code onto one line can make it more difficult to read, but for comprehensions this isn't the case. All of the elements that you need are nicely presented, and once you are used to the syntax it is actually more readable than the for loop version. Given the attribute names, this is still readable due to lack of conditional behavior.
Another point is that the assignment is now more of an atomic operation - we're declaring what `cookie_dict` is rather than giving instructions on how to build it. This makes the code read like more of a narrative, since going forward we will care more about what `cookie_dict` is than the details of its construction.
Finally comprehensions will usually execute more quickly than building the collection in a loop, which is another factor if performance is a consideration. As cookies are variable in quantity, this may be of value in this location | {
"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/6187/reactions"
} | https://api.github.com/repos/psf/requests/issues/6187/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6187.diff",
"html_url": "https://github.com/psf/requests/pull/6187",
"merged_at": "2023-07-30T01:55:18Z",
"patch_url": "https://github.com/psf/requests/pull/6187.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6187"
} | true | [
"Thanks for the PR @kkirsche."
] |
https://api.github.com/repos/psf/requests/issues/6186 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6186/labels{/name} | https://api.github.com/repos/psf/requests/issues/6186/comments | https://api.github.com/repos/psf/requests/issues/6186/events | https://github.com/psf/requests/pull/6186 | 1,288,922,045 | PR_kwDOABTKOs46k-4l | 6,186 | refactor: prefer f-strings to format where fits within black lengths | {
"avatar_url": "https://avatars.githubusercontent.com/u/947110?v=4",
"events_url": "https://api.github.com/users/kkirsche/events{/privacy}",
"followers_url": "https://api.github.com/users/kkirsche/followers",
"following_url": "https://api.github.com/users/kkirsche/following{/other_user}",
"gists_url": "https://api.github.com/users/kkirsche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kkirsche",
"id": 947110,
"login": "kkirsche",
"node_id": "MDQ6VXNlcjk0NzExMA==",
"organizations_url": "https://api.github.com/users/kkirsche/orgs",
"received_events_url": "https://api.github.com/users/kkirsche/received_events",
"repos_url": "https://api.github.com/users/kkirsche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kkirsche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kkirsche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kkirsche",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 0 | 2022-06-29T15:46:13Z | 2022-06-29T15:46:13Z | null | CONTRIBUTOR | null | Python added f-strings in version 3.6, with [PEP 498](https://www.python.org/dev/peps/pep-0498/). F-strings are a flexible and powerful way to format strings. They make the code shorter and more readable, since the code now looks more like the output.
F-Strings are also more performant than using `.format` (e.g. see [F-String Speed Considerations](https://realpython.com/lessons/f-strings-speed-considerations-performance/), [F-String Benchmarks](https://www.scivision.dev/python-f-string-speed/) for two quick examples) because the python runtime can insert the variables into the string while parsing rather than backtracking to insert them into the placeholders, reducing the number of times the lines need to be processed | 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/6186/reactions"
} | https://api.github.com/repos/psf/requests/issues/6186/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6186.diff",
"html_url": "https://github.com/psf/requests/pull/6186",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6186.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6186"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/6185 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6185/labels{/name} | https://api.github.com/repos/psf/requests/issues/6185/comments | https://api.github.com/repos/psf/requests/issues/6185/events | https://github.com/psf/requests/pull/6185 | 1,288,910,937 | PR_kwDOABTKOs46k8hC | 6,185 | refactor: use contextlib.suppress instead of empty except | {
"avatar_url": "https://avatars.githubusercontent.com/u/947110?v=4",
"events_url": "https://api.github.com/users/kkirsche/events{/privacy}",
"followers_url": "https://api.github.com/users/kkirsche/followers",
"following_url": "https://api.github.com/users/kkirsche/following{/other_user}",
"gists_url": "https://api.github.com/users/kkirsche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kkirsche",
"id": 947110,
"login": "kkirsche",
"node_id": "MDQ6VXNlcjk0NzExMA==",
"organizations_url": "https://api.github.com/users/kkirsche/orgs",
"received_events_url": "https://api.github.com/users/kkirsche/received_events",
"repos_url": "https://api.github.com/users/kkirsche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kkirsche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kkirsche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kkirsche",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 0 | 2022-06-29T15:37:24Z | 2022-06-29T15:37:24Z | null | CONTRIBUTOR | null | Use [contextlib](https://docs.python.org/3/library/contextlib.html)'s suppress method to silence a specific error, instead of passing in an exception handler.
The context manager slightly shortens the code and significantly clarifies the author's intention to ignore the specific errors. The standard library feature was introduced following a [discussion](https://bugs.python.org/issue15806), where the consensus was that
> A key benefit here is in the priming effect for readers... The with statement form makes it clear before you start reading the code that certain exceptions won't propagate. | 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/6185/reactions"
} | https://api.github.com/repos/psf/requests/issues/6185/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6185.diff",
"html_url": "https://github.com/psf/requests/pull/6185",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6185.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6185"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/6184 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6184/labels{/name} | https://api.github.com/repos/psf/requests/issues/6184/comments | https://api.github.com/repos/psf/requests/issues/6184/events | https://github.com/psf/requests/pull/6184 | 1,288,904,216 | PR_kwDOABTKOs46k7Ff | 6,184 | Replace bare exception handlers with contextlib.suppress | {
"avatar_url": "https://avatars.githubusercontent.com/u/947110?v=4",
"events_url": "https://api.github.com/users/kkirsche/events{/privacy}",
"followers_url": "https://api.github.com/users/kkirsche/followers",
"following_url": "https://api.github.com/users/kkirsche/following{/other_user}",
"gists_url": "https://api.github.com/users/kkirsche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kkirsche",
"id": 947110,
"login": "kkirsche",
"node_id": "MDQ6VXNlcjk0NzExMA==",
"organizations_url": "https://api.github.com/users/kkirsche/orgs",
"received_events_url": "https://api.github.com/users/kkirsche/received_events",
"repos_url": "https://api.github.com/users/kkirsche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kkirsche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kkirsche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kkirsche",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2022-06-29T15:32:08Z | 2023-06-30T00:03:08Z | 2022-06-29T15:32:40Z | CONTRIBUTOR | resolved | Use [contextlib](https://docs.python.org/3/library/contextlib.html)'s suppress method to silence a specific error, instead of passing in an exception handler.
The context manager slightly shortens the code and significantly clarifies the author's intention to ignore the specific errors. The standard library feature was introduced following a [discussion](https://bugs.python.org/issue15806), where the consensus was that
> A key benefit here is in the priming effect for readers... The with statement form makes it clear before you start reading the code that certain exceptions won't propagate. | {
"avatar_url": "https://avatars.githubusercontent.com/u/947110?v=4",
"events_url": "https://api.github.com/users/kkirsche/events{/privacy}",
"followers_url": "https://api.github.com/users/kkirsche/followers",
"following_url": "https://api.github.com/users/kkirsche/following{/other_user}",
"gists_url": "https://api.github.com/users/kkirsche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kkirsche",
"id": 947110,
"login": "kkirsche",
"node_id": "MDQ6VXNlcjk0NzExMA==",
"organizations_url": "https://api.github.com/users/kkirsche/orgs",
"received_events_url": "https://api.github.com/users/kkirsche/received_events",
"repos_url": "https://api.github.com/users/kkirsche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kkirsche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kkirsche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kkirsche",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6184/reactions"
} | https://api.github.com/repos/psf/requests/issues/6184/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6184.diff",
"html_url": "https://github.com/psf/requests/pull/6184",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6184.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6184"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/6183 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6183/labels{/name} | https://api.github.com/repos/psf/requests/issues/6183/comments | https://api.github.com/repos/psf/requests/issues/6183/events | https://github.com/psf/requests/issues/6183 | 1,288,777,792 | I_kwDOABTKOs5M0TBA | 6,183 | adapt `requests`' version range check to release 5.0.0 of `chardet` | {
"avatar_url": "https://avatars.githubusercontent.com/u/17925232?v=4",
"events_url": "https://api.github.com/users/christian-monch/events{/privacy}",
"followers_url": "https://api.github.com/users/christian-monch/followers",
"following_url": "https://api.github.com/users/christian-monch/following{/other_user}",
"gists_url": "https://api.github.com/users/christian-monch/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/christian-monch",
"id": 17925232,
"login": "christian-monch",
"node_id": "MDQ6VXNlcjE3OTI1MjMy",
"organizations_url": "https://api.github.com/users/christian-monch/orgs",
"received_events_url": "https://api.github.com/users/christian-monch/received_events",
"repos_url": "https://api.github.com/users/christian-monch/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/christian-monch/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/christian-monch/subscriptions",
"type": "User",
"url": "https://api.github.com/users/christian-monch",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2022-06-29T14:01:43Z | 2023-07-02T00:03:45Z | 2022-06-29T14:55:20Z | NONE | resolved | ## Summary
`chardet` version 5.0.0 was released on pypi on 25th of June 2022. If this version is picked up by your dependencies, `requests` version 2.28.0 will issue the following warning:
```
.../lib/python3.9/site-packages/requests/__init__.py:102: RequestsDependencyWarning: urllib3 (1.26.8) or chardet (5.0.0)/charset_normalizer (2.0.4) doesn't match a supported version!"
```
I am not sure whether version 5.0.0 of `chardet` is compatible with `requests`. According to the documentation, `requests` supports `chardet` version 4. It would be good to verify the compatibility with `chardet` version 5 and adapt the version range check accordingly
## Reproduction Steps
Install the latest version of `chardet`:
```shell
$ pip install --upgrade chardet
```
Import `requests` in python to trigger the warning:
```python
import requests
```
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": "5.0.0"
},
"charset_normalizer": {
"version": "2.0.12"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.3"
},
"implementation": {
"name": "CPython",
"version": "3.9.13"
},
"platform": {
"release": "5.3.18-150300.59.76-default",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.27.1"
},
"system_ssl": {
"version": "1010104f"
},
"urllib3": {
"version": "1.26.9"
},
"using_charset_normalizer": false,
"using_pyopenssl": false
}
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4",
"events_url": "https://api.github.com/users/sethmlarson/events{/privacy}",
"followers_url": "https://api.github.com/users/sethmlarson/followers",
"following_url": "https://api.github.com/users/sethmlarson/following{/other_user}",
"gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sethmlarson",
"id": 18519037,
"login": "sethmlarson",
"node_id": "MDQ6VXNlcjE4NTE5MDM3",
"organizations_url": "https://api.github.com/users/sethmlarson/orgs",
"received_events_url": "https://api.github.com/users/sethmlarson/received_events",
"repos_url": "https://api.github.com/users/sethmlarson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sethmlarson",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6183/reactions"
} | https://api.github.com/repos/psf/requests/issues/6183/timeline | null | completed | null | null | false | [
"Closing as a duplicate of https://github.com/psf/requests/issues/6177. Please search for open and closed issues before opening a new issue.",
"Thx, searched for an issue, but did not find it. Will search more intensely next time! ;-)\r\n"
] |
https://api.github.com/repos/psf/requests/issues/6182 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6182/labels{/name} | https://api.github.com/repos/psf/requests/issues/6182/comments | https://api.github.com/repos/psf/requests/issues/6182/events | https://github.com/psf/requests/pull/6182 | 1,288,122,152 | PR_kwDOABTKOs46iTiJ | 6,182 | v2.28.1 | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2022-06-29T03:22:56Z | 2023-01-11T23:22:35Z | 2022-06-29T15:09:12Z | MEMBER | off-topic | 2.28.1 (2022-06-29)
-------------------
**Improvements**
- Speed optimization in `iter_content` with transition to `yield from`. (#6170)
**Dependencies**
- Added support for chardet 5.0.0 (#6179)
- Added support for charset-normalizer 2.1.0 (#6169) | {
"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/6182/reactions"
} | https://api.github.com/repos/psf/requests/issues/6182/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6182.diff",
"html_url": "https://github.com/psf/requests/pull/6182",
"merged_at": "2022-06-29T15:09:12Z",
"patch_url": "https://github.com/psf/requests/pull/6182.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6182"
} | true | [
"I'm deferring the decisions on #6159 and #6167 until we see larger data points. They have 5 and 2 user engagements respectively which seems very low for the current 2.28.x adoption rate. For the time being, there are straight forward workarounds for both.",
"> I'm deferring the decisions on #6159 and #6167 until... |
https://api.github.com/repos/psf/requests/issues/6181 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6181/labels{/name} | https://api.github.com/repos/psf/requests/issues/6181/comments | https://api.github.com/repos/psf/requests/issues/6181/events | https://github.com/psf/requests/issues/6181 | 1,287,731,338 | I_kwDOABTKOs5MwTiK | 6,181 | Incorrect dependency warning about chardep v5.0.0 | {
"avatar_url": "https://avatars.githubusercontent.com/u/39027680?v=4",
"events_url": "https://api.github.com/users/drfunjohn/events{/privacy}",
"followers_url": "https://api.github.com/users/drfunjohn/followers",
"following_url": "https://api.github.com/users/drfunjohn/following{/other_user}",
"gists_url": "https://api.github.com/users/drfunjohn/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/drfunjohn",
"id": 39027680,
"login": "drfunjohn",
"node_id": "MDQ6VXNlcjM5MDI3Njgw",
"organizations_url": "https://api.github.com/users/drfunjohn/orgs",
"received_events_url": "https://api.github.com/users/drfunjohn/received_events",
"repos_url": "https://api.github.com/users/drfunjohn/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/drfunjohn/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/drfunjohn/subscriptions",
"type": "User",
"url": "https://api.github.com/users/drfunjohn",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2022-06-28T18:32:14Z | 2023-06-29T00:03:31Z | 2022-06-28T18:35:56Z | NONE | resolved | Warning about chardet version does not match requirements:
/usr/local/lib/python3.8/site-packages/requests/__init__.py:109: RequestsDependencyWarning: urllib3 (1.26.9) or chardet (5.0.0)/charset_normalizer (2.0.12) doesn't match a supported version! warnings.warn(
If install chardet==4.0.0 this warning does not appears.
root@wret:/# pipdeptree -p requests
requests==2.28.0
- certifi [required: >=2017.4.17, installed: 2022.6.15]
- charset-normalizer [required: ~=2.0.0, installed: 2.0.12]
- idna [required: >=2.5,<4, installed: 3.3]
- urllib3 [required: >=1.21.1,<1.27, installed: 1.26.9]
## Expected Result
No warning about dependency of chardep
## Actual Result
/usr/local/lib/python3.8/site-packages/requests/__init__.py:109: RequestsDependencyWarning: urllib3 (1.26.9) or chardet (5.0.0)/charset_normalizer (2.0.12) doesn't match a supported version! warnings.warn(
According pipdeptree requirements are match
## Reproduction Steps
python -m requests.help
## System Information
/usr/local/lib/python3.8/site-packages/requests/__init__.py:109: RequestsDependencyWarning: urllib3 (1.26.9) or chardet (5.0.0)/charset_normalizer (2.0.12) doesn't match a supported version!
warnings.warn(
{
"chardet": {
"version": "5.0.0"
},
"charset_normalizer": {
"version": "2.0.12"
},
"cryptography": {
"version": "37.0.2"
},
"idna": {
"version": "3.3"
},
"implementation": {
"name": "CPython",
"version": "3.8.13"
},
"platform": {
"release": "5.10.104-linuxkit",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "30000030",
"version": "22.0.0"
},
"requests": {
"version": "2.28.0"
},
"system_ssl": {
"version": "101010ef"
},
"urllib3": {
"version": "1.26.9"
},
"using_charset_normalizer": false,
"using_pyopenssl": true
}
Docker image:
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
| {
"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/6181/reactions"
} | https://api.github.com/repos/psf/requests/issues/6181/timeline | null | completed | null | null | false | [
"Hi @drfunjohn, please check open and closed issues before opening new ones. Dupe #6177."
] |
https://api.github.com/repos/psf/requests/issues/6180 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6180/labels{/name} | https://api.github.com/repos/psf/requests/issues/6180/comments | https://api.github.com/repos/psf/requests/issues/6180/events | https://github.com/psf/requests/pull/6180 | 1,287,460,168 | PR_kwDOABTKOs46gKXx | 6,180 | (Github Actions [Lint, CodeQL Analysis]) Update action versions | {
"avatar_url": "https://avatars.githubusercontent.com/u/77706434?v=4",
"events_url": "https://api.github.com/users/ArjunSharda/events{/privacy}",
"followers_url": "https://api.github.com/users/ArjunSharda/followers",
"following_url": "https://api.github.com/users/ArjunSharda/following{/other_user}",
"gists_url": "https://api.github.com/users/ArjunSharda/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ArjunSharda",
"id": 77706434,
"login": "ArjunSharda",
"node_id": "MDQ6VXNlcjc3NzA2NDM0",
"organizations_url": "https://api.github.com/users/ArjunSharda/orgs",
"received_events_url": "https://api.github.com/users/ArjunSharda/received_events",
"repos_url": "https://api.github.com/users/ArjunSharda/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ArjunSharda/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ArjunSharda/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ArjunSharda",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2022-06-28T14:43:01Z | 2024-07-30T00:03:46Z | 2023-07-30T01:57:46Z | NONE | resolved | Currently at the moment, Lint is behind by one version for this repository and CodeQL Analysis is behind by two versions. I've updated to the latest versions for them and have checked the repositories used in the files and have confirmed that the versions exists. | {
"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/6180/reactions"
} | https://api.github.com/repos/psf/requests/issues/6180/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6180.diff",
"html_url": "https://github.com/psf/requests/pull/6180",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6180.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6180"
} | true | [
"Hi @ArjunSharda,\r\n\r\nThanks for the PR. Typically, we don't accept misc infrastructure changes without notable benfits. This is to reduce PR noise and avoid incomplete updates. In the future, we'll likely constrain these files to dependabot/maintainers only.\r\n\r\nIt looks like none of the changes in setup-pyt... |
https://api.github.com/repos/psf/requests/issues/6179 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6179/labels{/name} | https://api.github.com/repos/psf/requests/issues/6179/comments | https://api.github.com/repos/psf/requests/issues/6179/events | https://github.com/psf/requests/pull/6179 | 1,284,783,194 | PR_kwDOABTKOs46XVub | 6,179 | Update Dependency with `chardet>=3.0.2,<6` | {
"avatar_url": "https://avatars.githubusercontent.com/u/780562?v=4",
"events_url": "https://api.github.com/users/hswong3i/events{/privacy}",
"followers_url": "https://api.github.com/users/hswong3i/followers",
"following_url": "https://api.github.com/users/hswong3i/following{/other_user}",
"gists_url": "https://api.github.com/users/hswong3i/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hswong3i",
"id": 780562,
"login": "hswong3i",
"node_id": "MDQ6VXNlcjc4MDU2Mg==",
"organizations_url": "https://api.github.com/users/hswong3i/orgs",
"received_events_url": "https://api.github.com/users/hswong3i/received_events",
"repos_url": "https://api.github.com/users/hswong3i/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hswong3i/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hswong3i/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hswong3i",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2022-06-26T03:02:50Z | 2023-07-19T00:03:32Z | 2022-06-28T02:25:59Z | CONTRIBUTOR | resolved | https://github.com/chardet/chardet/releases/tag/5.0.0 was released on 2022-06-25 with remove of Python 3.6 support, which also align with our Python > 3.6 requirement.
Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com> | {
"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/6179/reactions"
} | https://api.github.com/repos/psf/requests/issues/6179/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6179.diff",
"html_url": "https://github.com/psf/requests/pull/6179",
"merged_at": "2022-06-28T02:25:59Z",
"patch_url": "https://github.com/psf/requests/pull/6179.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6179"
} | true | [
"Thanks for the PR, @hswong3i. We’ll also need an update in the \\_\\_init\\_\\_.py for the version range. You can find an example [here](https://github.com/psf/requests/pull/5688/files).\r\n\r\nWe’ll also need to do some quick manual regression testing to verify there isn’t anything substantially breaking in the m... |
https://api.github.com/repos/psf/requests/issues/6178 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6178/labels{/name} | https://api.github.com/repos/psf/requests/issues/6178/comments | https://api.github.com/repos/psf/requests/issues/6178/events | https://github.com/psf/requests/issues/6178 | 1,284,755,036 | I_kwDOABTKOs5Mk85c | 6,178 | very buggy chat application | {
"avatar_url": "https://avatars.githubusercontent.com/u/102113349?v=4",
"events_url": "https://api.github.com/users/HiImCoder1818/events{/privacy}",
"followers_url": "https://api.github.com/users/HiImCoder1818/followers",
"following_url": "https://api.github.com/users/HiImCoder1818/following{/other_user}",
"gists_url": "https://api.github.com/users/HiImCoder1818/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/HiImCoder1818",
"id": 102113349,
"login": "HiImCoder1818",
"node_id": "U_kgDOBhYgRQ",
"organizations_url": "https://api.github.com/users/HiImCoder1818/orgs",
"received_events_url": "https://api.github.com/users/HiImCoder1818/received_events",
"repos_url": "https://api.github.com/users/HiImCoder1818/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/HiImCoder1818/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/HiImCoder1818/subscriptions",
"type": "User",
"url": "https://api.github.com/users/HiImCoder1818",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2022-06-26T00:26:37Z | 2023-06-27T00:03:34Z | 2022-06-26T00:55:24Z | NONE | resolved | I am making a chat application and using tkinter as my gui. The chat does work, but it is very buggy and sometimes doesn't send the message or sometimes repeats the message over and over. I have reviewed the code and can't find where the error is that is causing these bugs.
the code
chat.py
```
from threading import Thread
import time
from tkinter import *
import socket
class ChatRoom(object):
"""
The GUI of the main chat room.
- TK scroll bar and TK list box to display messages
- antiSpam function prevents user from spamming. message cooldown 1s
this is done to prevent server from breaking
"""
def __init__(self):
self.text = ""
self.text_boxY = 50
self.ip = socket.gethostbyname(socket.gethostname())
self.user = ""
self.isSpamming = False
self.chat = Tk()
self.chat.geometry("600x700")
self.scroll = Scrollbar(self.chat, width=370)
self.scroll.place(x=300, y=320, anchor=CENTER, height=620)
self.text_list = Listbox(self.chat, yscrollcommand=self.scroll.set, width=60)
self.text_list.place(x=300, y=320, anchor=CENTER, height=620)
self.chat_text = Entry(self.chat, width=40)
self.chat_text.place(x=400, y=660, anchor=E)
self.enter = Button(self.chat, text="enter", command=self.showText)
self.enter.place(x=470, y=660, anchor=W)
self.anti_spam = Thread(target=self.antiSpam)
self.anti_spam.start()
def start(self):
self.chat.mainloop()
def showText(self):
"""
self.ip - the private ip of the user. This is used to separate text messages
self.text - the text of the user texting
self.isSpamming - antispam feature to prevent server from breaking
"""
if not self.isSpamming:
self.text = self.chat_text.get()
#cannot send empty string
if self.text != "":
self.text_list.insert(END, f"{self.ip} - {self.text}")
self.text = ""
self.chat_text.delete(0, END)
def antiSpam(self):
"""
sets self.isSpamming variable to True when message is sent
cooldown 1s
"""
while True:
if self.text == "":
self.isSpamming = False
else:
self.isSpamming = True
time.sleep(1)
self.isSpamming = False
def getText(self):
"""return text input"""
return self.text
def putsText(self, msg):
""" add text to TK scrollbar """
self.text_list.insert(END, msg)
if __name__ == '__main__':
chat = ChatRoom()
```
client.py
```
import socket
from threading import Thread
import time
import chat
host = socket.gethostbyname(socket.gethostname())
port = 9000
addr = (host, port)
exit_msg = "quitx"
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client.connect(addr)
chat = chat.ChatRoom()
def get_msg():
"""
constantly checks for messages from server
then puts it onto TK scroll bar
"""
while True:
# client.recv is blocking
msg = client.recv(1024).decode()
chat.putsText(msg)
def send_msg():
"""
send message to server
if chat.text is empty, do nothing
if chat.text is the exit message, close the client and exit
if no invalid conditions are detected, the message is sent.
"""
while True:
if chat.text == "":
pass
elif chat.text == exit_msg:
client.close()
time.sleep(1)
exit()
else:
client.send(chat.text.encode())
sending = Thread(target=send_msg)
sending.start()
get = Thread(target=get_msg)
get.start()
chat.start()
```
server.py
```
from threading import Thread
import socket
host = "0.0.0.0"
port = 9000
exit_msg = "quitx"
addr = (host, port)
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
server.bind(addr)
# all connections with the server
clients = []
# listen for 3 connections only
server.listen(3)
def handle_clients():
"""
checks for incoming connections
then adds it to clients list
broadcast that that client has joined with there private ip
representing the user
"""
while True:
client, addr = server.accept()
clients.append(client)
broadcast_msg(f"{addr[0]} has joined", client)
def broadcast_msg(msg, client_sent):
"""
broadcast the message to all the clients
msg - the message that was sent from one client
client_sent - the client that sent the message
this parameter is to prevent the message from the sending
to the original sender
"""
for client in clients:
if client_sent == client:
pass
else:
# close the connection if msg equals to exit_msg (quitx)
if msg == exit_msg:
client.send(f"{client.getperrname()[0]} left".encode())
client.close()
else:
for client in clients:
client.send(msg.encode())
handle = Thread(target=handle_clients)
handle.daemon = True
handle.start()
while True:
for client in clients:
#client.recv is blocking.
msg = client.recv(1024).decode()
#when message is received, broadcast to all
#clients with client as the original sender
broadcast_msg(msg, client)
```
i'm using MacOS Python 3.8 conda environment (if this information helps) | {
"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/6178/reactions"
} | https://api.github.com/repos/psf/requests/issues/6178/timeline | null | not_planned | null | null | false | [
"Hi @HiImCoder1818,\n\nThis issue tracker is for defects in Requests, we won't be able to help debug your code unfortunately. You can try opening a question on a platform like StackOverflow if you need further assistance."
] |
https://api.github.com/repos/psf/requests/issues/6177 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6177/labels{/name} | https://api.github.com/repos/psf/requests/issues/6177/comments | https://api.github.com/repos/psf/requests/issues/6177/events | https://github.com/psf/requests/issues/6177 | 1,284,729,194 | I_kwDOABTKOs5Mk2lq | 6,177 | support chardet v5.0.0 | {
"avatar_url": "https://avatars.githubusercontent.com/u/13083856?v=4",
"events_url": "https://api.github.com/users/copdips/events{/privacy}",
"followers_url": "https://api.github.com/users/copdips/followers",
"following_url": "https://api.github.com/users/copdips/following{/other_user}",
"gists_url": "https://api.github.com/users/copdips/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/copdips",
"id": 13083856,
"login": "copdips",
"node_id": "MDQ6VXNlcjEzMDgzODU2",
"organizations_url": "https://api.github.com/users/copdips/orgs",
"received_events_url": "https://api.github.com/users/copdips/received_events",
"repos_url": "https://api.github.com/users/copdips/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/copdips/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/copdips/subscriptions",
"type": "User",
"url": "https://api.github.com/users/copdips",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 6 | 2022-06-25T22:15:14Z | 2023-06-30T00:03:06Z | 2022-06-28T02:38:11Z | NONE | resolved | <!-- Summary. -->
`chardet` just released [v5.0.0](https://github.com/chardet/chardet/releases/tag/5.0.0) which is not supported by the latest version (2.28.0) of requests:
https://github.com/psf/requests/blob/da9996fe4dc63356e9467d0a5e10df3d89a8528e/requests/__init__.py#L79
Could you please add the support for the v5.0.0 of chardet ? | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 6,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 6,
"url": "https://api.github.com/repos/psf/requests/issues/6177/reactions"
} | https://api.github.com/repos/psf/requests/issues/6177/timeline | null | completed | null | null | false | [
"Related to this issue, I'm wondering about why `chardet` is used at all in this case. If I understand correctly, if `chardet` can be imported it is always preferred over `charset_normalizer`, even if `requests` was not installed with the `use_chardet_on_py3` extra, which could happen if another package includes it... |
https://api.github.com/repos/psf/requests/issues/6176 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6176/labels{/name} | https://api.github.com/repos/psf/requests/issues/6176/comments | https://api.github.com/repos/psf/requests/issues/6176/events | https://github.com/psf/requests/issues/6176 | 1,284,524,026 | I_kwDOABTKOs5MkEf6 | 6,176 | [Debian Bullseye 11] Get calls take almost 3 minutes on some websites | {
"avatar_url": "https://avatars.githubusercontent.com/u/1296250?v=4",
"events_url": "https://api.github.com/users/willbprog127/events{/privacy}",
"followers_url": "https://api.github.com/users/willbprog127/followers",
"following_url": "https://api.github.com/users/willbprog127/following{/other_user}",
"gists_url": "https://api.github.com/users/willbprog127/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/willbprog127",
"id": 1296250,
"login": "willbprog127",
"node_id": "MDQ6VXNlcjEyOTYyNTA=",
"organizations_url": "https://api.github.com/users/willbprog127/orgs",
"received_events_url": "https://api.github.com/users/willbprog127/received_events",
"repos_url": "https://api.github.com/users/willbprog127/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/willbprog127/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/willbprog127/subscriptions",
"type": "User",
"url": "https://api.github.com/users/willbprog127",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2022-06-25T09:23:55Z | 2023-06-28T00:03:34Z | 2022-06-27T16:11:11Z | NONE | resolved | On Debian Linux Bullseye 11 AMD64, Requests.get() calls take almost 3 minutes on some websites.
I tried several websites, but these two are good contrasts:
`r = requests.get("https://www.pismotek.com")`
`r = requests.get("https://www.github.com")`
## Expected Result
When doing a `requests.get()` call, I expect that it should take one or two seconds for the call to complete if the website I'm trying to contact is reasonably responsive.
## Actual Result
Some websites cause `requests.get()` to take almost three minutes to complete.
## Reproduction Steps
This call causes a near three-minute wait until completion, and the website IS responsive and working well using other OSs:
```python
import requests
r = requests.get("https://www.pismotek.com")
```
I tried with `https://www.microsoft.com`, `https://www.youtube` as well as `https://www.apple.com` and they took a long time too.
This call only takes about one second:
```python
import requests
r = requests.get("https://www.github.com")
```
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": "4.0.0"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.9.2"
},
"platform": {
"release": "5.10.0-15-amd64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.25.1"
},
"system_ssl": {
"version": "101010ef"
},
"urllib3": {
"version": "1.26.5"
},
"using_pyopenssl": false
}
```
* Debian Bullseye 11 Linux - AMD 64
* Python 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110] on linux
### Wireshark pcapng files:
I did the best I could to filter out non-relevant data, but some could be there...
[requests-fail-pismotek-com.pcapng.tar.gz](https://github.com/psf/requests/files/8984259/requests-fail-pismotek-com.pcapng.tar.gz)
[requests-okay-github-com.pcapng.tar.gz](https://github.com/psf/requests/files/8984260/requests-okay-github-com.pcapng.tar.gz)
Thanks! :+1: | {
"avatar_url": "https://avatars.githubusercontent.com/u/1296250?v=4",
"events_url": "https://api.github.com/users/willbprog127/events{/privacy}",
"followers_url": "https://api.github.com/users/willbprog127/followers",
"following_url": "https://api.github.com/users/willbprog127/following{/other_user}",
"gists_url": "https://api.github.com/users/willbprog127/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/willbprog127",
"id": 1296250,
"login": "willbprog127",
"node_id": "MDQ6VXNlcjEyOTYyNTA=",
"organizations_url": "https://api.github.com/users/willbprog127/orgs",
"received_events_url": "https://api.github.com/users/willbprog127/received_events",
"repos_url": "https://api.github.com/users/willbprog127/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/willbprog127/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/willbprog127/subscriptions",
"type": "User",
"url": "https://api.github.com/users/willbprog127",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6176/reactions"
} | https://api.github.com/repos/psf/requests/issues/6176/timeline | null | completed | null | null | false | [
"Hello Will!\r\n\r\nIf you are having a interceptor running in the background (Such as WireShark or Fiddler etc) you will have to do:\r\n\r\n```python\r\nimport requests\r\n\r\nr = requests.get(\"https://www.pismotek.com\", verify=False)\r\n```\r\n\r\nor alternatively, try adding a timeout\r\n\r\n```python\r\nimpor... |
https://api.github.com/repos/psf/requests/issues/6175 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6175/labels{/name} | https://api.github.com/repos/psf/requests/issues/6175/comments | https://api.github.com/repos/psf/requests/issues/6175/events | https://github.com/psf/requests/pull/6175 | 1,283,199,804 | PR_kwDOABTKOs46SLpJ | 6,175 | Update Dependency with `charset_normalizer>=2.0.0` | {
"avatar_url": "https://avatars.githubusercontent.com/u/780562?v=4",
"events_url": "https://api.github.com/users/hswong3i/events{/privacy}",
"followers_url": "https://api.github.com/users/hswong3i/followers",
"following_url": "https://api.github.com/users/hswong3i/following{/other_user}",
"gists_url": "https://api.github.com/users/hswong3i/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hswong3i",
"id": 780562,
"login": "hswong3i",
"node_id": "MDQ6VXNlcjc4MDU2Mg==",
"organizations_url": "https://api.github.com/users/hswong3i/orgs",
"received_events_url": "https://api.github.com/users/hswong3i/received_events",
"repos_url": "https://api.github.com/users/hswong3i/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hswong3i/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hswong3i/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hswong3i",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2022-06-24T03:03:10Z | 2023-06-27T00:03:34Z | 2022-06-24T03:11:41Z | CONTRIBUTOR | resolved | https://github.com/Ousret/charset_normalizer/releases/tag/2.1.0 was released on 2022-06-20, with our current dependency with `charset_normalizer~=2.0.0` we couldn't upgrade to 2.1.0 accordingly.
Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com> | {
"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/6175/reactions"
} | https://api.github.com/repos/psf/requests/issues/6175/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6175.diff",
"html_url": "https://github.com/psf/requests/pull/6175",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6175.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6175"
} | true | [
"Thanks for the PR, @hswong3i. Unfortunately this is a duplicate of #6169.",
"@nateprewitt thank you for clarify and sorry for my miss. Looking forward for upstream solution get merged.\r\n\r\nIn between I give a quick dirty workaround for my packaging scripts, and it is now working with CentOS 8 + molecule 4.0.0... |
https://api.github.com/repos/psf/requests/issues/6174 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6174/labels{/name} | https://api.github.com/repos/psf/requests/issues/6174/comments | https://api.github.com/repos/psf/requests/issues/6174/events | https://github.com/psf/requests/issues/6174 | 1,280,937,580 | I_kwDOABTKOs5MWY5s | 6,174 | python -m pip install requests==2.27.1 instead installs everything in requirements.txt besides requests. | {
"avatar_url": "https://avatars.githubusercontent.com/u/85408331?v=4",
"events_url": "https://api.github.com/users/necrochancer/events{/privacy}",
"followers_url": "https://api.github.com/users/necrochancer/followers",
"following_url": "https://api.github.com/users/necrochancer/following{/other_user}",
"gists_url": "https://api.github.com/users/necrochancer/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/necrochancer",
"id": 85408331,
"login": "necrochancer",
"node_id": "MDQ6VXNlcjg1NDA4MzMx",
"organizations_url": "https://api.github.com/users/necrochancer/orgs",
"received_events_url": "https://api.github.com/users/necrochancer/received_events",
"repos_url": "https://api.github.com/users/necrochancer/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/necrochancer/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/necrochancer/subscriptions",
"type": "User",
"url": "https://api.github.com/users/necrochancer",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2022-06-22T21:22:49Z | 2023-06-23T00:03:31Z | 2022-06-22T23:17:35Z | NONE | resolved | python -m pip install requests==2.27.1 maybe python is thinking its installing the requested stuff? please 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/6174/reactions"
} | https://api.github.com/repos/psf/requests/issues/6174/timeline | null | completed | null | null | false | [
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here.\n\nWe aren't responsible for the behavior of pip"
] |
https://api.github.com/repos/psf/requests/issues/6173 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6173/labels{/name} | https://api.github.com/repos/psf/requests/issues/6173/comments | https://api.github.com/repos/psf/requests/issues/6173/events | https://github.com/psf/requests/issues/6173 | 1,280,400,489 | I_kwDOABTKOs5MUVxp | 6,173 | How can I use :authority in requests module | {
"avatar_url": "https://avatars.githubusercontent.com/u/67215274?v=4",
"events_url": "https://api.github.com/users/abirabedinkhan/events{/privacy}",
"followers_url": "https://api.github.com/users/abirabedinkhan/followers",
"following_url": "https://api.github.com/users/abirabedinkhan/following{/other_user}",
"gists_url": "https://api.github.com/users/abirabedinkhan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/abirabedinkhan",
"id": 67215274,
"login": "abirabedinkhan",
"node_id": "MDQ6VXNlcjY3MjE1Mjc0",
"organizations_url": "https://api.github.com/users/abirabedinkhan/orgs",
"received_events_url": "https://api.github.com/users/abirabedinkhan/received_events",
"repos_url": "https://api.github.com/users/abirabedinkhan/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/abirabedinkhan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/abirabedinkhan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/abirabedinkhan",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2022-06-22T15:44:33Z | 2023-06-23T00:03:31Z | 2022-06-22T16:30:13Z | NONE | resolved | Hello,
I am working on project that requires :authority header. When I put that it throws errors!!!
Please HELP ME!!!!!! | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6173/reactions"
} | https://api.github.com/repos/psf/requests/issues/6173/timeline | null | completed | null | null | false | [
"Hi @abirabedinkhan, this is a duplicate of #6167. Please check open and closed issues before opening new ones."
] |
https://api.github.com/repos/psf/requests/issues/6172 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6172/labels{/name} | https://api.github.com/repos/psf/requests/issues/6172/comments | https://api.github.com/repos/psf/requests/issues/6172/events | https://github.com/psf/requests/pull/6172 | 1,278,928,229 | PR_kwDOABTKOs46DhIL | 6,172 | Clarify setting proxies exceptions | {
"avatar_url": "https://avatars.githubusercontent.com/u/1461970?v=4",
"events_url": "https://api.github.com/users/RichieB2B/events{/privacy}",
"followers_url": "https://api.github.com/users/RichieB2B/followers",
"following_url": "https://api.github.com/users/RichieB2B/following{/other_user}",
"gists_url": "https://api.github.com/users/RichieB2B/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/RichieB2B",
"id": 1461970,
"login": "RichieB2B",
"node_id": "MDQ6VXNlcjE0NjE5NzA=",
"organizations_url": "https://api.github.com/users/RichieB2B/orgs",
"received_events_url": "https://api.github.com/users/RichieB2B/received_events",
"repos_url": "https://api.github.com/users/RichieB2B/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/RichieB2B/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/RichieB2B/subscriptions",
"type": "User",
"url": "https://api.github.com/users/RichieB2B",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 2 | 2022-06-21T19:12:01Z | 2024-10-25T16:49:28Z | null | CONTRIBUTOR | null | This adds an example for the `NO_PROXY` environment variable and explains making exceptions to the proxy settings using per-host proxy entries. | 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/6172/reactions"
} | https://api.github.com/repos/psf/requests/issues/6172/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6172.diff",
"html_url": "https://github.com/psf/requests/pull/6172",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6172.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6172"
} | true | [
"@nateprewitt Can this be merged please? This still [confuses](https://github.com/psf/requests/pull/5596#issuecomment-1403476580) many people.",
"Bumping this.\r\nI spent several days trying to sort out why a no_proxy setting wasn't working in a python system, and would have really loved to have this clarificatio... |
https://api.github.com/repos/psf/requests/issues/6171 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6171/labels{/name} | https://api.github.com/repos/psf/requests/issues/6171/comments | https://api.github.com/repos/psf/requests/issues/6171/events | https://github.com/psf/requests/pull/6171 | 1,277,912,127 | PR_kwDOABTKOs46AISb | 6,171 | Issue-6118: Prevent input argument mutation | {
"avatar_url": "https://avatars.githubusercontent.com/u/68326606?v=4",
"events_url": "https://api.github.com/users/venkat2150/events{/privacy}",
"followers_url": "https://api.github.com/users/venkat2150/followers",
"following_url": "https://api.github.com/users/venkat2150/following{/other_user}",
"gists_url": "https://api.github.com/users/venkat2150/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/venkat2150",
"id": 68326606,
"login": "venkat2150",
"node_id": "MDQ6VXNlcjY4MzI2NjA2",
"organizations_url": "https://api.github.com/users/venkat2150/orgs",
"received_events_url": "https://api.github.com/users/venkat2150/received_events",
"repos_url": "https://api.github.com/users/venkat2150/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/venkat2150/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/venkat2150/subscriptions",
"type": "User",
"url": "https://api.github.com/users/venkat2150",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2022-06-21T05:28:20Z | 2023-06-22T00:03:11Z | 2022-06-21T06:00:17Z | NONE | resolved | Input argument (proxy) is getting mutated and populated
with OS's environment proxy variables when sending requests.
Took care of other input args along with proxy, just to be safe. | {
"avatar_url": "https://avatars.githubusercontent.com/u/68326606?v=4",
"events_url": "https://api.github.com/users/venkat2150/events{/privacy}",
"followers_url": "https://api.github.com/users/venkat2150/followers",
"following_url": "https://api.github.com/users/venkat2150/following{/other_user}",
"gists_url": "https://api.github.com/users/venkat2150/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/venkat2150",
"id": 68326606,
"login": "venkat2150",
"node_id": "MDQ6VXNlcjY4MzI2NjA2",
"organizations_url": "https://api.github.com/users/venkat2150/orgs",
"received_events_url": "https://api.github.com/users/venkat2150/received_events",
"repos_url": "https://api.github.com/users/venkat2150/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/venkat2150/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/venkat2150/subscriptions",
"type": "User",
"url": "https://api.github.com/users/venkat2150",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6171/reactions"
} | https://api.github.com/repos/psf/requests/issues/6171/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6171.diff",
"html_url": "https://github.com/psf/requests/pull/6171",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6171.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6171"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/6170 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6170/labels{/name} | https://api.github.com/repos/psf/requests/issues/6170/comments | https://api.github.com/repos/psf/requests/issues/6170/events | https://github.com/psf/requests/pull/6170 | 1,276,893,423 | PR_kwDOABTKOs458pzV | 6,170 | Use yield from instead of looping yield | {
"avatar_url": "https://avatars.githubusercontent.com/u/947110?v=4",
"events_url": "https://api.github.com/users/kkirsche/events{/privacy}",
"followers_url": "https://api.github.com/users/kkirsche/followers",
"following_url": "https://api.github.com/users/kkirsche/following{/other_user}",
"gists_url": "https://api.github.com/users/kkirsche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kkirsche",
"id": 947110,
"login": "kkirsche",
"node_id": "MDQ6VXNlcjk0NzExMA==",
"organizations_url": "https://api.github.com/users/kkirsche/orgs",
"received_events_url": "https://api.github.com/users/kkirsche/received_events",
"repos_url": "https://api.github.com/users/kkirsche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kkirsche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kkirsche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kkirsche",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2022-06-20T13:01:10Z | 2023-06-30T00:03:08Z | 2022-06-29T02:08:26Z | CONTRIBUTOR | resolved | This merge request updates the stream yield functionality to use `yield from` instead of `yield` within a for loop. Because this is yielding from an iterable, we can use `yield from` which is not only slightly shorter but also on average 15% more performant than using `yield` inside of a loop. This is a result of some of the optimizations included as part of [PEP 380](https://peps.python.org/pep-0380/) | {
"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/6170/reactions"
} | https://api.github.com/repos/psf/requests/issues/6170/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6170.diff",
"html_url": "https://github.com/psf/requests/pull/6170",
"merged_at": "2022-06-29T02:08:26Z",
"patch_url": "https://github.com/psf/requests/pull/6170.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6170"
} | true | [
"Yep, part of splitting up https://github.com/psf/requests/pull/6165 to get past that...feedback"
] |
https://api.github.com/repos/psf/requests/issues/6169 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6169/labels{/name} | https://api.github.com/repos/psf/requests/issues/6169/comments | https://api.github.com/repos/psf/requests/issues/6169/events | https://github.com/psf/requests/pull/6169 | 1,276,503,543 | PR_kwDOABTKOs457WOD | 6,169 | Allow charset normalizer >=2 and <3 | {
"avatar_url": "https://avatars.githubusercontent.com/u/5688939?v=4",
"events_url": "https://api.github.com/users/frenzymadness/events{/privacy}",
"followers_url": "https://api.github.com/users/frenzymadness/followers",
"following_url": "https://api.github.com/users/frenzymadness/following{/other_user}",
"gists_url": "https://api.github.com/users/frenzymadness/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/frenzymadness",
"id": 5688939,
"login": "frenzymadness",
"node_id": "MDQ6VXNlcjU2ODg5Mzk=",
"organizations_url": "https://api.github.com/users/frenzymadness/orgs",
"received_events_url": "https://api.github.com/users/frenzymadness/received_events",
"repos_url": "https://api.github.com/users/frenzymadness/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/frenzymadness/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/frenzymadness/subscriptions",
"type": "User",
"url": "https://api.github.com/users/frenzymadness",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2022-06-20T07:39:37Z | 2023-06-30T00:03:09Z | 2022-06-29T02:01:43Z | CONTRIBUTOR | resolved | The current definition `charset_normalizer~=2.0.0` does not allow charset-normalizer 2.1.0 which has been released a couple of hours ago. The newer version seems to be compatible with requests and [the compatibility check](https://github.com/psf/requests/blob/da9996fe4dc63356e9467d0a5e10df3d89a8528e/requests/__init__.py#L80-L84) suggests that requests should allow versions up to 3.0. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 15,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 15,
"url": "https://api.github.com/repos/psf/requests/issues/6169/reactions"
} | https://api.github.com/repos/psf/requests/issues/6169/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6169.diff",
"html_url": "https://github.com/psf/requests/pull/6169",
"merged_at": "2022-06-29T02:01:43Z",
"patch_url": "https://github.com/psf/requests/pull/6169.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6169"
} | true | [
"All tox environments passed locally.",
"Similar and duplicated fix from https://github.com/psf/requests/pull/6175#issuecomment-1165150374:\r\n\r\n> In between I give a quick dirty workaround for my packaging scripts, and it is now working with CentOS 8 + molecule 4.0.0 + charset_normalizer 2.1.0 + requests 2.28.... |
https://api.github.com/repos/psf/requests/issues/6168 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6168/labels{/name} | https://api.github.com/repos/psf/requests/issues/6168/comments | https://api.github.com/repos/psf/requests/issues/6168/events | https://github.com/psf/requests/issues/6168 | 1,276,035,031 | I_kwDOABTKOs5MDr_X | 6,168 | redirect https://requests.readthedocs.io/en/master to https://requests.readthedocs.io/en/latest | {
"avatar_url": "https://avatars.githubusercontent.com/u/413772?v=4",
"events_url": "https://api.github.com/users/graingert/events{/privacy}",
"followers_url": "https://api.github.com/users/graingert/followers",
"following_url": "https://api.github.com/users/graingert/following{/other_user}",
"gists_url": "https://api.github.com/users/graingert/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/graingert",
"id": 413772,
"login": "graingert",
"node_id": "MDQ6VXNlcjQxMzc3Mg==",
"organizations_url": "https://api.github.com/users/graingert/orgs",
"received_events_url": "https://api.github.com/users/graingert/received_events",
"repos_url": "https://api.github.com/users/graingert/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/graingert/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/graingert/subscriptions",
"type": "User",
"url": "https://api.github.com/users/graingert",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2022-06-19T11:43:08Z | 2023-06-25T00:03:43Z | 2022-06-24T20:00:40Z | CONTRIBUTOR | resolved | the old https://requests.readthedocs.io/en/master page links to an old v2.26.0 with broken algolia search https://github.com/psf/requests/issues/5254 https://github.com/psf/requests/issues/6142 and is linked to by search engines and other documentation
https://www.google.com/search?q=requests+readthedocs
https://developer-portal.driver-vehicle-licensing.api.gov.uk/apis/vehicle-enquiry-service/code-examples.html#python-using-requests
https://github.com/search?q=requests.readthedocs.io%2Fen%2Fmaster&type=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/6168/reactions"
} | https://api.github.com/repos/psf/requests/issues/6168/timeline | null | completed | null | null | false | [
"Thanks for letting us know, @graingert. I've tried a few things with prefix redirects but they don't work as one might expect. I found a pattern for exact redirects that appears to have most URLs migrated to /en/latest. The base url without a trailing slash (https://requests.readthedocs.io/en/master) doesn't appea... |
https://api.github.com/repos/psf/requests/issues/6167 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6167/labels{/name} | https://api.github.com/repos/psf/requests/issues/6167/comments | https://api.github.com/repos/psf/requests/issues/6167/events | https://github.com/psf/requests/issues/6167 | 1,276,016,823 | I_kwDOABTKOs5MDni3 | 6,167 | InvalidHeader exception when trying to add a ":method" header field (breaking change in 2.28.0) | {
"avatar_url": "https://avatars.githubusercontent.com/u/107793741?v=4",
"events_url": "https://api.github.com/users/Alex8768765/events{/privacy}",
"followers_url": "https://api.github.com/users/Alex8768765/followers",
"following_url": "https://api.github.com/users/Alex8768765/following{/other_user}",
"gists_url": "https://api.github.com/users/Alex8768765/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Alex8768765",
"id": 107793741,
"login": "Alex8768765",
"node_id": "U_kgDOBmzNTQ",
"organizations_url": "https://api.github.com/users/Alex8768765/orgs",
"received_events_url": "https://api.github.com/users/Alex8768765/received_events",
"repos_url": "https://api.github.com/users/Alex8768765/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Alex8768765/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Alex8768765/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Alex8768765",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 16 | 2022-06-19T10:26:03Z | 2024-04-11T14:07:41Z | null | NONE | null | My app is making a POST request enforcing some specific header fields. Among them, I was able to explicitly enforce a ":method" header field. But since 2.28.0, this now raises the following error:
`requests.exceptions.InvalidHeader: Invalid leading whitespace, reserved character(s), or returncharacter(s) in header name: ':method'`
Enforcing this header field is possibly a widespread practice as this is part of the requirements for sending notifications through Apple's push notification servers.
| null | {
"+1": 3,
"-1": 0,
"confused": 0,
"eyes": 3,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 6,
"url": "https://api.github.com/repos/psf/requests/issues/6167/reactions"
} | https://api.github.com/repos/psf/requests/issues/6167/timeline | null | null | null | null | false | [
"Hi @Alex8768765,\r\n\r\nCan you please provide the info we originally requested in the issue template? The header you're using isn't valid in the HTTP spec, so it seems unlikely this would be widespread. Python itself rejects sending a header like this in our supported versions.\r\n\r\n```python\r\n>>> requests.__... |
https://api.github.com/repos/psf/requests/issues/6166 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6166/labels{/name} | https://api.github.com/repos/psf/requests/issues/6166/comments | https://api.github.com/repos/psf/requests/issues/6166/events | https://github.com/psf/requests/pull/6166 | 1,275,758,940 | PR_kwDOABTKOs455DPD | 6,166 | Add union operator support to CaseInsensitiveDict (PEP 584) | {
"avatar_url": "https://avatars.githubusercontent.com/u/24359380?v=4",
"events_url": "https://api.github.com/users/Cubicpath/events{/privacy}",
"followers_url": "https://api.github.com/users/Cubicpath/followers",
"following_url": "https://api.github.com/users/Cubicpath/following{/other_user}",
"gists_url": "https://api.github.com/users/Cubicpath/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Cubicpath",
"id": 24359380,
"login": "Cubicpath",
"node_id": "MDQ6VXNlcjI0MzU5Mzgw",
"organizations_url": "https://api.github.com/users/Cubicpath/orgs",
"received_events_url": "https://api.github.com/users/Cubicpath/received_events",
"repos_url": "https://api.github.com/users/Cubicpath/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Cubicpath/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Cubicpath/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Cubicpath",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 0 | 2022-06-18T10:46:20Z | 2022-06-18T20:53:16Z | null | NONE | null | Adds support for the `|` and `|=` operators for `CaseInsensitiveDict`.
This copies the functionality of `dict` from [PEP 584](https://peps.python.org/pep-0584). Even though this PEP was implemented in 3.9, the functionality implemented to `CaseInsensitiveDict` still works in all currently supported versions (3.7+).
This also brings a level of consistency with other Mapping types, i.e. `OrderedDict`, `MappingProxyType`, `ChainMap`, `WeakKeyDictionary`, and more have this as supported behavior.
The code itself is a slightly modified version of the [reference implementation](https://peps.python.org/pep-0584/#reference-implementation).
Example usage:
```python3
session = Session()
session.headers |= {'Accept', 'application/json'}
``` | 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/6166/reactions"
} | https://api.github.com/repos/psf/requests/issues/6166/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6166.diff",
"html_url": "https://github.com/psf/requests/pull/6166",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6166.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6166"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/6165 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6165/labels{/name} | https://api.github.com/repos/psf/requests/issues/6165/comments | https://api.github.com/repos/psf/requests/issues/6165/events | https://github.com/psf/requests/pull/6165 | 1,275,140,825 | PR_kwDOABTKOs452_KO | 6,165 | refactor: clean up various refactorings | {
"avatar_url": "https://avatars.githubusercontent.com/u/947110?v=4",
"events_url": "https://api.github.com/users/kkirsche/events{/privacy}",
"followers_url": "https://api.github.com/users/kkirsche/followers",
"following_url": "https://api.github.com/users/kkirsche/following{/other_user}",
"gists_url": "https://api.github.com/users/kkirsche/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kkirsche",
"id": 947110,
"login": "kkirsche",
"node_id": "MDQ6VXNlcjk0NzExMA==",
"organizations_url": "https://api.github.com/users/kkirsche/orgs",
"received_events_url": "https://api.github.com/users/kkirsche/received_events",
"repos_url": "https://api.github.com/users/kkirsche/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kkirsche/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kkirsche/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kkirsche",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2022-06-17T15:03:47Z | 2023-06-30T00:03:07Z | 2022-06-17T16:59:56Z | CONTRIBUTOR | resolved | 1. Use `contextlib.suppress` rather than empty `except`
2. Prefer f-strings to `.format` and `+`-based concatenation for improved performance.
3. Remove empty `elif` via refactoring.
4. Use `yield from` instead of `yield` for 15–20% performance gain (on average)
5. Generate `list()` rather than iteration
6. Prefer generators to looped iteration | {
"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/6165/reactions"
} | https://api.github.com/repos/psf/requests/issues/6165/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6165.diff",
"html_url": "https://github.com/psf/requests/pull/6165",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6165.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6165"
} | true | [
"Oops, accidentally applied a named expression. I'll fix that",
"Thanks for the effort but we do not accept arbitrary refactorings of numerous disparate places in the code that aren't related. This tends to invite floods if other questionable large scale refactorings. The refactoring is usually largely subjective... |
https://api.github.com/repos/psf/requests/issues/6164 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6164/labels{/name} | https://api.github.com/repos/psf/requests/issues/6164/comments | https://api.github.com/repos/psf/requests/issues/6164/events | https://github.com/psf/requests/issues/6164 | 1,274,897,284 | I_kwDOABTKOs5L_WOE | 6,164 | How to write python script setting system-wide http proxy using requests | {
"avatar_url": "https://avatars.githubusercontent.com/u/52833272?v=4",
"events_url": "https://api.github.com/users/1nrho12/events{/privacy}",
"followers_url": "https://api.github.com/users/1nrho12/followers",
"following_url": "https://api.github.com/users/1nrho12/following{/other_user}",
"gists_url": "https://api.github.com/users/1nrho12/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/1nrho12",
"id": 52833272,
"login": "1nrho12",
"node_id": "MDQ6VXNlcjUyODMzMjcy",
"organizations_url": "https://api.github.com/users/1nrho12/orgs",
"received_events_url": "https://api.github.com/users/1nrho12/received_events",
"repos_url": "https://api.github.com/users/1nrho12/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/1nrho12/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/1nrho12/subscriptions",
"type": "User",
"url": "https://api.github.com/users/1nrho12",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2022-06-17T11:06:52Z | 2023-06-18T00:03:26Z | 2022-06-17T18:13:18Z | NONE | resolved | Hello,
I've written a Python script exporting http proxy:
```
import os
proxy = "http://proxy:port"
os.environ['http_proxy'] = proxy
os.environ['HTTP_PROXY'] = proxy
```
But the thing is that I want to set the http proxy on system wide without exporting the environment variables using the requests library.
How to do that? I am Python newbie.. Please help. | {
"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/6164/reactions"
} | https://api.github.com/repos/psf/requests/issues/6164/timeline | null | completed | null | null | false | [
"I am using macOS by the way.",
"I don't have a mac to test this but I did find this answer from [stackoverflow](https://stackoverflow.com/a/39934154).\r\nAccording to that I would set the proxy like this:\r\n`os.system(\"networksetup -setwebproxy Ethernet {} {}\".format(url, port))`\r\nYou can check the [network... |
https://api.github.com/repos/psf/requests/issues/6163 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6163/labels{/name} | https://api.github.com/repos/psf/requests/issues/6163/comments | https://api.github.com/repos/psf/requests/issues/6163/events | https://github.com/psf/requests/pull/6163 | 1,270,986,204 | PR_kwDOABTKOs45pJ-l | 6,163 | Update README.md (some better wording) | {
"avatar_url": "https://avatars.githubusercontent.com/u/77706434?v=4",
"events_url": "https://api.github.com/users/ArjunSharda/events{/privacy}",
"followers_url": "https://api.github.com/users/ArjunSharda/followers",
"following_url": "https://api.github.com/users/ArjunSharda/following{/other_user}",
"gists_url": "https://api.github.com/users/ArjunSharda/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ArjunSharda",
"id": 77706434,
"login": "ArjunSharda",
"node_id": "MDQ6VXNlcjc3NzA2NDM0",
"organizations_url": "https://api.github.com/users/ArjunSharda/orgs",
"received_events_url": "https://api.github.com/users/ArjunSharda/received_events",
"repos_url": "https://api.github.com/users/ArjunSharda/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ArjunSharda/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ArjunSharda/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ArjunSharda",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2022-06-14T15:30:57Z | 2023-06-15T00:03:12Z | 2022-06-14T15:38:04Z | NONE | resolved | null | {
"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/6163/reactions"
} | https://api.github.com/repos/psf/requests/issues/6163/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6163.diff",
"html_url": "https://github.com/psf/requests/pull/6163",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6163.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6163"
} | true | [
"Hi @ajsharda17, thanks for the PR! Unfortunately, we don't accept PRs with stylistic changes to documentation due to their subjective nature. They often result in additional churn because there is rarely consensus on what constitutes \"better\". We do appreciate the initiative though!"
] |
https://api.github.com/repos/psf/requests/issues/6162 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6162/labels{/name} | https://api.github.com/repos/psf/requests/issues/6162/comments | https://api.github.com/repos/psf/requests/issues/6162/events | https://github.com/psf/requests/pull/6162 | 1,268,321,914 | PR_kwDOABTKOs45galI | 6,162 | Fix HTTPS websites with system-wide HTTP proxy on Windows | {
"avatar_url": "https://avatars.githubusercontent.com/u/3054729?v=4",
"events_url": "https://api.github.com/users/ValdikSS/events{/privacy}",
"followers_url": "https://api.github.com/users/ValdikSS/followers",
"following_url": "https://api.github.com/users/ValdikSS/following{/other_user}",
"gists_url": "https://api.github.com/users/ValdikSS/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ValdikSS",
"id": 3054729,
"login": "ValdikSS",
"node_id": "MDQ6VXNlcjMwNTQ3Mjk=",
"organizations_url": "https://api.github.com/users/ValdikSS/orgs",
"received_events_url": "https://api.github.com/users/ValdikSS/received_events",
"repos_url": "https://api.github.com/users/ValdikSS/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ValdikSS/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ValdikSS/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ValdikSS",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 2 | 2022-06-11T16:42:34Z | 2022-07-18T12:10:06Z | null | NONE | null | Due to urllib bug, requests fails to open any HTTPS websites on Windows
if there's system-wide HTTP proxy configured. This is because urllib
incorrectly prepends the protocol to the proxy host and port, as in:
```
{'http': 'http://host:port',
'https': 'https://host:port',
'ftp': 'ftp://host:port'}
```
Such configuration forces urllib3 to use HTTPS proxy (Secure Web Proxy,
also known as TLS Proxy) for HTTPS URLs, which the configured proxy
most likely does not support.
Detect incorrect behavior and rewrite the protocol to http. | 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/6162/reactions"
} | https://api.github.com/repos/psf/requests/issues/6162/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6162.diff",
"html_url": "https://github.com/psf/requests/pull/6162",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6162.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6162"
} | true | [
"Issue #6139",
"Could anyone take a look at this merge request please?"
] |
https://api.github.com/repos/psf/requests/issues/6161 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6161/labels{/name} | https://api.github.com/repos/psf/requests/issues/6161/comments | https://api.github.com/repos/psf/requests/issues/6161/events | https://github.com/psf/requests/issues/6161 | 1,268,146,429 | I_kwDOABTKOs5LlmD9 | 6,161 | >  | {
"avatar_url": "https://avatars.githubusercontent.com/u/107268993?v=4",
"events_url": "https://api.github.com/users/7Kyra/events{/privacy}",
"followers_url": "https://api.github.com/users/7Kyra/followers",
"following_url": "https://api.github.com/users/7Kyra/following{/other_user}",
"gists_url": "https://api.github.com/users/7Kyra/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/7Kyra",
"id": 107268993,
"login": "7Kyra",
"node_id": "U_kgDOBmTLgQ",
"organizations_url": "https://api.github.com/users/7Kyra/orgs",
"received_events_url": "https://api.github.com/users/7Kyra/received_events",
"repos_url": "https://api.github.com/users/7Kyra/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/7Kyra/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/7Kyra/subscriptions",
"type": "User",
"url": "https://api.github.com/users/7Kyra",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2022-06-11T03:10:10Z | 2023-06-12T00:03:09Z | 2022-06-11T03:17:10Z | NONE | resolved | null | {
"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/6161/reactions"
} | https://api.github.com/repos/psf/requests/issues/6161/timeline | null | completed | null | null | false | [
"Hi @7Kyra, this isn't an issue with Requests but a general Python question. You'll need to ensure the key you're retrieving exists. If you have further questions please open a question on [StackOverflow](https://stackoverflow.com)."
] |
https://api.github.com/repos/psf/requests/issues/6160 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6160/labels{/name} | https://api.github.com/repos/psf/requests/issues/6160/comments | https://api.github.com/repos/psf/requests/issues/6160/events | https://github.com/psf/requests/issues/6160 | 1,266,808,359 | I_kwDOABTKOs5LgfYn | 6,160 | Ability/option to automatically handle `Retry-After` in responses. | {
"avatar_url": "https://avatars.githubusercontent.com/u/388671?v=4",
"events_url": "https://api.github.com/users/stevecj/events{/privacy}",
"followers_url": "https://api.github.com/users/stevecj/followers",
"following_url": "https://api.github.com/users/stevecj/following{/other_user}",
"gists_url": "https://api.github.com/users/stevecj/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/stevecj",
"id": 388671,
"login": "stevecj",
"node_id": "MDQ6VXNlcjM4ODY3MQ==",
"organizations_url": "https://api.github.com/users/stevecj/orgs",
"received_events_url": "https://api.github.com/users/stevecj/received_events",
"repos_url": "https://api.github.com/users/stevecj/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/stevecj/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/stevecj/subscriptions",
"type": "User",
"url": "https://api.github.com/users/stevecj",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2022-06-10T00:35:07Z | 2023-06-11T00:03:25Z | 2022-06-10T00:48:20Z | NONE | resolved | I am aware that "Requests is not accepting feature requests at this time." but am asking anyway.
Currently, there are many APIs that use the `Retry-After` header for throttling, but API client code generally does not take that into account. When thinking about how I would suggest adding throttling to atlassian-python-api, I realized that, just like following of redirects, this might make more sense to handle at a lower level in the Requests library.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6160/reactions"
} | https://api.github.com/repos/psf/requests/issues/6160/timeline | null | completed | null | null | false | [
"Hi @stevecj, this is already possible in Requests. We don't implement any of the Retry behavior, that comes from urllib3.\r\n\r\nYou can see in our adapter that we take a [`max_retries`](https://github.com/psf/requests/blob/2a6f290bc09324406708a4d404a88a45d848ddf9/requests/adapters.py#L140) argument that take an i... |
https://api.github.com/repos/psf/requests/issues/6159 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6159/labels{/name} | https://api.github.com/repos/psf/requests/issues/6159/comments | https://api.github.com/repos/psf/requests/issues/6159/events | https://github.com/psf/requests/issues/6159 | 1,266,593,022 | I_kwDOABTKOs5Lfqz- | 6,159 | Breaking change in 2.28.0 when using string enums as Headers (working in v2.27.1) | {
"avatar_url": "https://avatars.githubusercontent.com/u/37800834?v=4",
"events_url": "https://api.github.com/users/bonastreyair/events{/privacy}",
"followers_url": "https://api.github.com/users/bonastreyair/followers",
"following_url": "https://api.github.com/users/bonastreyair/following{/other_user}",
"gists_url": "https://api.github.com/users/bonastreyair/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bonastreyair",
"id": 37800834,
"login": "bonastreyair",
"node_id": "MDQ6VXNlcjM3ODAwODM0",
"organizations_url": "https://api.github.com/users/bonastreyair/orgs",
"received_events_url": "https://api.github.com/users/bonastreyair/received_events",
"repos_url": "https://api.github.com/users/bonastreyair/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bonastreyair/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bonastreyair/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bonastreyair",
"user_view_type": "public"
} | [] | closed | true | null | [] | {
"closed_at": "2023-05-22T03:37:11Z",
"closed_issues": 3,
"created_at": "2022-11-16T21:23:42Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
},
"description": "",
"due_on": null,
"html_url": "https://github.com/psf/requests/milestone/31",
"id": 8662889,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/31/labels",
"node_id": "MI_kwDOABTKOs4AhC9p",
"number": 31,
"open_issues": 0,
"state": "closed",
"title": "2.29.0",
"updated_at": "2023-05-22T03:37:11Z",
"url": "https://api.github.com/repos/psf/requests/milestones/31"
} | 18 | 2022-06-09T20:00:51Z | 2024-03-03T00:03:31Z | 2023-03-03T20:39:04Z | NONE | resolved | When using string enums as key values for the `headers` dict parameter with `requests.get()` function in `v2.28.0` it raises an `InvalidHeader` error but using previous version `v2.27.1` works well without any error. It seems there was an unexpected breaking change with that release.
## Expected Result
Dict keys for the headers parameter when using `requests.get()` are still valid if a string enum is used.
## Actual Result
Instead it raises an `InvalidHeader` error stating that:
> Header must be of type `str` or `bytes`, not `enum`.
```python
Traceback (most recent call last):
File "/home/yair/PycharmProjects/tests/requests_error.py", line 9, in <module>
requests.get("http://URL", headers={CustomEnum.TRACE_ID: "90e85293-afd1-4b48-adf0-fa6daf02359e"})
File "/home/yair/.local/lib/python3.8/site-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "/home/yair/.local/lib/python3.8/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/home/yair/.local/lib/python3.8/site-packages/requests/sessions.py", line 573, in request
prep = self.prepare_request(req)
File "/home/yair/.local/lib/python3.8/site-packages/requests/sessions.py", line 484, in prepare_request
p.prepare(
File "/home/yair/.local/lib/python3.8/site-packages/requests/models.py", line 369, in prepare
self.prepare_headers(headers)
File "/home/yair/.local/lib/python3.8/site-packages/requests/models.py", line 491, in prepare_headers
check_header_validity(header)
File "/home/yair/.local/lib/python3.8/site-packages/requests/utils.py", line 1037, in check_header_validity
raise InvalidHeader(
requests.exceptions.InvalidHeader: Header part (<CustomEnum.TRACE_ID: 'X-B3-TraceId'>) from {<CustomEnum.TRACE_ID: 'X-B3-TraceId'>: '90e85293-afd1-4b48-adf0-fa6daf02359e'} must be of type str or bytes, not <enum 'CustomEnum'>
```
## Reproduction Steps
```python
from enum import Enum
import requests
class CustomEnum(str, Enum):
TRACE_ID = "X-B3-TraceId"
requests.get("http://URL", headers={CustomEnum.TRACE_ID: "90e85293-afd1-4b48-adf0-fa6daf02359e"})
```
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": "3.0.4"
},
"charset_normalizer": {
"version": "2.0.4"
},
"cryptography": {
"version": "2.8"
},
"idna": {
"version": "3.2"
},
"implementation": {
"name": "CPython",
"version": "3.8.10"
},
"platform": {
"release": "5.13.0-48-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010106f",
"version": "19.0.0"
},
"requests": {
"version": "2.28.0"
},
"system_ssl": {
"version": "1010106f"
},
"urllib3": {
"version": "1.26.6"
},
"using_charset_normalizer": false,
"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/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": 6,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 6,
"url": "https://api.github.com/repos/psf/requests/issues/6159/reactions"
} | https://api.github.com/repos/psf/requests/issues/6159/timeline | null | completed | null | null | false | [
"I know it is easily solvable by making use of the `CustomEnum.TRACE_ID.value` to use the stored string instead of using the enum directly with `CustomEnum.TRACE_ID`... but it worked before with v2.27.1, so it feels like an unexpected breaking change... :eyes: ",
"Thanks for the report, @bonastreyair! So I think ... |
https://api.github.com/repos/psf/requests/issues/6158 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6158/labels{/name} | https://api.github.com/repos/psf/requests/issues/6158/comments | https://api.github.com/repos/psf/requests/issues/6158/events | https://github.com/psf/requests/issues/6158 | 1,266,333,457 | I_kwDOABTKOs5LercR | 6,158 | 2.28.0: sphinx warnings `reference target not found` | {
"avatar_url": "https://avatars.githubusercontent.com/u/31284574?v=4",
"events_url": "https://api.github.com/users/kloczek/events{/privacy}",
"followers_url": "https://api.github.com/users/kloczek/followers",
"following_url": "https://api.github.com/users/kloczek/following{/other_user}",
"gists_url": "https://api.github.com/users/kloczek/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kloczek",
"id": 31284574,
"login": "kloczek",
"node_id": "MDQ6VXNlcjMxMjg0NTc0",
"organizations_url": "https://api.github.com/users/kloczek/orgs",
"received_events_url": "https://api.github.com/users/kloczek/received_events",
"repos_url": "https://api.github.com/users/kloczek/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kloczek/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kloczek/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kloczek",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 1 | 2022-06-09T15:43:13Z | 2022-06-09T15:48:06Z | null | NONE | null | On building my packages I'm using `sphinx-build` command with `-n` switch which shows warmings about missing references. These are not critical issues.
Here is the output with warnings:
<details>
```console
+ /usr/bin/sphinx-build -n -T -b man docs build/sphinx/man
Running Sphinx v5.0.1
WARNING: Invalid configuration value found: 'language = None'. Update your configuration to a valid langauge code. Falling back to 'en' (English).
making output directory... done
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
loading intersphinx inventory from https://urllib3.readthedocs.io/en/latest/objects.inv...
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: [new config] 15 added, 0 changed, 0 removed
reading sources... [100%] user/quickstart
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-requests.3 { user/install user/quickstart user/advanced user/authentication community/recommended community/faq community/out-there community/support community/vulnerabilities community/release-process community/updates api dev/contributing dev/authors } /home/tkloczko/rpmbuild/BUILD/requests-2.28.0/requests/models.py:docstring of requests.models.Response.json:: WARNING: py:exc reference target not found: requests.exceptions.JSONDecodeError
/home/tkloczko/rpmbuild/BUILD/requests-2.28.0/requests/adapters.py:docstring of requests.adapters.BaseAdapter.send:3: WARNING: py:class reference target not found: PreparedRequest
/home/tkloczko/rpmbuild/BUILD/requests-2.28.0/requests/adapters.py:docstring of requests.adapters.HTTPAdapter:3: WARNING: py:class reference target not found: Session
/home/tkloczko/rpmbuild/BUILD/requests-2.28.0/requests/adapters.py:docstring of requests.adapters.HTTPAdapter.add_headers:9: WARNING: py:class reference target not found: PreparedRequest
/home/tkloczko/rpmbuild/BUILD/requests-2.28.0/requests/adapters.py:docstring of requests.adapters.HTTPAdapter.build_response:6: WARNING: py:class reference target not found: PreparedRequest
/home/tkloczko/rpmbuild/BUILD/requests-2.28.0/requests/adapters.py:docstring of requests.adapters.HTTPAdapter.get_connection:: WARNING: py:class reference target not found: urllib3.ConnectionPool
/home/tkloczko/rpmbuild/BUILD/requests-2.28.0/requests/adapters.py:docstring of requests.adapters.HTTPAdapter.request_url:10: WARNING: py:class reference target not found: PreparedRequest
/home/tkloczko/rpmbuild/BUILD/requests-2.28.0/requests/adapters.py:docstring of requests.adapters.HTTPAdapter.send:3: WARNING: py:class reference target not found: PreparedRequest
/home/tkloczko/rpmbuild/BUILD/requests-2.28.0/requests/adapters.py:docstring of requests.adapters.HTTPAdapter.send:: WARNING: py:class reference target not found: urllib3 Timeout object
/home/tkloczko/rpmbuild/BUILD/requests-2.28.0/requests/utils.py:docstring of requests.utils.add_dict_to_cookiejar:: WARNING: py:class reference target not found: CookieJar
/home/tkloczko/rpmbuild/BUILD/requests-2.28.0/requests/cookies.py:docstring of requests.cookies.cookiejar_from_dict:: WARNING: py:class reference target not found: CookieJar
/home/tkloczko/rpmbuild/BUILD/requests-2.28.0/requests/cookies.py:docstring of collections.abc.MutableMapping.pop:: WARNING: py:class reference target not found: v, remove specified key and return the corresponding value.
/home/tkloczko/rpmbuild/BUILD/requests-2.28.0/requests/cookies.py:docstring of collections.abc.MutableMapping.popitem:: WARNING: py:class reference target not found: (k, v), remove and return some (key, value) pair
/home/tkloczko/rpmbuild/BUILD/requests-2.28.0/requests/cookies.py:docstring of collections.abc.MutableMapping.setdefault:: WARNING: py:class reference target not found: D.get(k,d), also set D[k]=d if k not in D
done
build succeeded, 15 warnings.
```
</details>
You can peak on fixes that kind of issues in other projects
https://github.com/latchset/jwcrypto/pull/289
https://github.com/click-contrib/sphinx-click/commit/abc31069
https://github.com/latchset/jwcrypto/pull/289
https://github.com/RDFLib/rdflib-sqlalchemy/issues/95
https://github.com/sissaschool/elementpath/commit/bf869d9e
https://github.com/jaraco/cssutils/issues/21
| 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/6158/reactions"
} | https://api.github.com/repos/psf/requests/issues/6158/timeline | null | null | null | null | false | [
"Thanks @kloczek, we'll take a look."
] |
https://api.github.com/repos/psf/requests/issues/6157 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6157/labels{/name} | https://api.github.com/repos/psf/requests/issues/6157/comments | https://api.github.com/repos/psf/requests/issues/6157/events | https://github.com/psf/requests/pull/6157 | 1,264,170,750 | PR_kwDOABTKOs45Sh2j | 6,157 | Add GitHub action to automate linting | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2022-06-08T04:19:31Z | 2023-06-09T00:03:12Z | 2022-06-08T19:11:11Z | MEMBER | resolved | This was intended to be a follow up to #6095 but got lost in the shuffle post PyCon. It's currently failing on a single line change that's addressed in #6154. Once that's merged this should be ready to merge and ensure we don't introduce any future inconsistencies. | {
"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/6157/reactions"
} | https://api.github.com/repos/psf/requests/issues/6157/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6157.diff",
"html_url": "https://github.com/psf/requests/pull/6157",
"merged_at": "2022-06-08T19:11:11Z",
"patch_url": "https://github.com/psf/requests/pull/6157.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6157"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/6156 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6156/labels{/name} | https://api.github.com/repos/psf/requests/issues/6156/comments | https://api.github.com/repos/psf/requests/issues/6156/events | https://github.com/psf/requests/pull/6156 | 1,264,164,254 | PR_kwDOABTKOs45SghV | 6,156 | v2.28.0 | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2022-06-08T04:10:18Z | 2023-06-10T00:03:21Z | 2022-06-09T14:42:10Z | MEMBER | resolved | 2.28.0 (2022-06-09)
-------------------
**Deprecations**
- ⚠️ Requests has officially dropped support for Python 2.7. ⚠️ (#6091)
- Requests has officially dropped support for Python 3.6 (including pypy3). (#6091)
**Improvements**
- Wrap JSON parsing issues in Request's JSONDecodeError for payloads without
an encoding to make `json()` API consistent. (#6097)
- Parse header components consistently, raising an InvalidHeader error in
all invalid cases. (#6154)
- Added provisional 3.11 support with current beta build. (#6155)
- Requests got a makeover and we decided to paint it black. (#6095)
**Bugfixes**
- Fixed bug where setting `CURL_CA_BUNDLE` to an empty string would disable
cert verification. All Requests 2.x versions before 2.28.0 are affected. (#6074)
- Fixed urllib3 exception leak, wrapping `urllib3.exceptions.SSLError` with
`requests.exceptions.SSLError` for `content` and `iter_content`. (#6057)
- Fixed issue where invalid Windows registry entires caused proxy resolution
to raise an exception rather than ignoring the entry. (#6149)
- Fixed issue where entire payload could be included in the error message for
JSONDecodeError. (#6079 | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 1,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/6156/reactions"
} | https://api.github.com/repos/psf/requests/issues/6156/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6156.diff",
"html_url": "https://github.com/psf/requests/pull/6156",
"merged_at": "2022-06-09T14:42:10Z",
"patch_url": "https://github.com/psf/requests/pull/6156.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6156"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/6155 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6155/labels{/name} | https://api.github.com/repos/psf/requests/issues/6155/comments | https://api.github.com/repos/psf/requests/issues/6155/events | https://github.com/psf/requests/pull/6155 | 1,264,159,628 | PR_kwDOABTKOs45SfkJ | 6,155 | Run 3.11 CI on all platforms | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2022-06-08T04:03:55Z | 2023-06-09T00:03:13Z | 2022-06-08T16:12:53Z | MEMBER | resolved | Start testing 3.11-dev on both Windows and macOS since we're publishing 2.28.0 claiming support for 3.11 with our trove classifier. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6155/reactions"
} | https://api.github.com/repos/psf/requests/issues/6155/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6155.diff",
"html_url": "https://github.com/psf/requests/pull/6155",
"merged_at": "2022-06-08T16:12:53Z",
"patch_url": "https://github.com/psf/requests/pull/6155.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6155"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/6154 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6154/labels{/name} | https://api.github.com/repos/psf/requests/issues/6154/comments | https://api.github.com/repos/psf/requests/issues/6154/events | https://github.com/psf/requests/pull/6154 | 1,264,158,603 | PR_kwDOABTKOs45SfWI | 6,154 | Add validation for header name | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2022-06-08T04:02:40Z | 2023-06-09T00:03:13Z | 2022-06-08T18:03:56Z | MEMBER | resolved | Following up on #6083, this refactors our header validation function from 2.11.0 to consider the header name. We'd originally avoided adding header name validation because we wanted to limit the change scope to header splitting with new lines. Since then the standard library has made similar changes to ours and now raises a ValueError in `http.client`. This gives us inconsistent errors depending on which portion of the header you provide a bad value.
```python
>>> requests.get("https://httpbin.org/get", headers={":bad": "header"})
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/nateprewitt/Work/OpenSource/requests/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "/Users/nateprewitt/Work/OpenSource/requests/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/Users/nateprewitt/Work/OpenSource/requests/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/Users/nateprewitt/Work/OpenSource/requests/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/Users/nateprewitt/Work/OpenSource/requests/requests/adapters.py", line 489, in send
resp = conn.urlopen(
File "/Users/nateprewitt/Work/OpenSource/urllib3/src/urllib3/connectionpool.py", line 727, in urlopen
httplib_response = self._make_request(
File "/Users/nateprewitt/Work/OpenSource/urllib3/src/urllib3/connectionpool.py", line 433, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/Users/nateprewitt/Work/OpenSource/urllib3/src/urllib3/connection.py", line 309, in request
super().request(method, url, body=body, headers=headers)
File "/Users/nateprewitt/.pyenv/versions/3.10.4/lib/python3.10/http/client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/Users/nateprewitt/.pyenv/versions/3.10.4/lib/python3.10/http/client.py", line 1323, in _send_request
self.putheader(hdr, value)
File "/Users/nateprewitt/Work/OpenSource/urllib3/src/urllib3/connection.py", line 274, in putheader
super().putheader(header, *values)
File "/Users/nateprewitt/.pyenv/versions/3.10.4/lib/python3.10/http/client.py", line 1250, in putheader
raise ValueError('Invalid header name %r' % (header,))
ValueError: Invalid header name b':bad'
```
This PR ports the [validation scheme](https://github.com/python/cpython/blob/6b9122483f1f26afb0c41bd676f9754ffe726e18/Lib/http/client.py#L139) from http.client for header names and ensures we raise an `InvalidHeader` error consistently in all supported versions. | {
"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/6154/reactions"
} | https://api.github.com/repos/psf/requests/issues/6154/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6154.diff",
"html_url": "https://github.com/psf/requests/pull/6154",
"merged_at": "2022-06-08T18:03:56Z",
"patch_url": "https://github.com/psf/requests/pull/6154.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6154"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/6153 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6153/labels{/name} | https://api.github.com/repos/psf/requests/issues/6153/comments | https://api.github.com/repos/psf/requests/issues/6153/events | https://github.com/psf/requests/issues/6153 | 1,263,071,144 | I_kwDOABTKOs5LSO-o | 6,153 | Strange difference between passing proxy as None vs an empty string | {
"avatar_url": "https://avatars.githubusercontent.com/u/3709570?v=4",
"events_url": "https://api.github.com/users/xjcl/events{/privacy}",
"followers_url": "https://api.github.com/users/xjcl/followers",
"following_url": "https://api.github.com/users/xjcl/following{/other_user}",
"gists_url": "https://api.github.com/users/xjcl/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/xjcl",
"id": 3709570,
"login": "xjcl",
"node_id": "MDQ6VXNlcjM3MDk1NzA=",
"organizations_url": "https://api.github.com/users/xjcl/orgs",
"received_events_url": "https://api.github.com/users/xjcl/received_events",
"repos_url": "https://api.github.com/users/xjcl/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/xjcl/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/xjcl/subscriptions",
"type": "User",
"url": "https://api.github.com/users/xjcl",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 8 | 2022-06-07T10:25:12Z | 2023-06-17T00:03:18Z | 2022-06-08T18:22:34Z | NONE | resolved | At work we have to deal with an annoying proxy server when making automated HTTP requests, e.g. in Python. To deal with this we usually add `proxies={"http": None, "https": None}` to any request, but recently this started breaking down when we started receiving HTTP redirects (301 Moved Permanently). After struggling with this issue by trying out different versions of dependencies, we finally figured out that passing an empty string vs None produced different behavior, with the behavior of None being strictly worse.
## Reproduction Steps
To reproduce this you need some kind of proxy server setup, I cannot give instructions on how to achieve this.
Code snippet "empty string":
```python
requests.get("https://pypi.org/pypi/pillow/9.0.0/json", proxies={"http": "", "https": ""})
```
Code snippet "None":
```python
requests.get("https://pypi.org/pypi/pillow/9.0.0/json", proxies={"http": None, "https": None})
```
Code snippet "(no proxies)":
```python
requests.get("https://pypi.org/pypi/pillow/9.0.0/json")
```
## Expected Result
Using uppercase Pillow should result in a successful HTTP request (200).
Using lowercase pillow should result in a redirect to uppercase Pillow (301) which `requests` resolves with a second GET that is successful (200).
## Actual Result
Unexpected result in italic:
| | Pillow | pillow |
| ------------- |:-------------:|:-----:|
| empty string | OK | OK |
| None | OK | _SSLError_ |
| (no proxies) | SSLError | SSLError |
I will shorten the actual very long set of 3 tracebacks we receive to:
```
File "...\python\lib\ssl.py", line 1139, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1076)
During handling of the above exception, another exception occurred:
File: "...\site-packages\urllib3\util\retry.py", line 573, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(...): Max retries exceeded with url: ...
During handling of the above exception, another exception occurred:
File "..\site-packages\requests\adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exception.SSLError: HTTPSConnectionPool(...): Max retries exceeded with url: ...
```
It is not surprising that we get an SSLError when using no proxy parameter, but I find it odd that there is a semantic difference between passing `None` and `""`, (empty string), and could not find any documentation referencing that difference.
Further reading on StackOverflow: https://stackoverflow.com/a/72529216/2111778
## System Information
- chardet 4.0.0
- cryptography absent
- idna 2.10
- implementation CPython 3.7.7
- platform Windows 10
- pyOpenSSL absent
- requests 2.25.1
- system_ssl 1010104f
- urllib3 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/6153/reactions"
} | https://api.github.com/repos/psf/requests/issues/6153/timeline | null | completed | null | null | false | [
"Stepping through the code with breakpoints I noticed a difference in the function \"rebuild_proxies\" which seems to get called when a redirect occurs. In the empty string case we already have \"\" defined as http(s) proxy so nothing gets overwritten. In the None case the keys for http(s) proxies are absent so the... |
https://api.github.com/repos/psf/requests/issues/6151 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6151/labels{/name} | https://api.github.com/repos/psf/requests/issues/6151/comments | https://api.github.com/repos/psf/requests/issues/6151/events | https://github.com/psf/requests/pull/6151 | 1,257,122,890 | PR_kwDOABTKOs4464Kq | 6,151 | Use SPDX License ID correctly | {
"avatar_url": "https://avatars.githubusercontent.com/u/56723830?v=4",
"events_url": "https://api.github.com/users/dmholtz/events{/privacy}",
"followers_url": "https://api.github.com/users/dmholtz/followers",
"following_url": "https://api.github.com/users/dmholtz/following{/other_user}",
"gists_url": "https://api.github.com/users/dmholtz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dmholtz",
"id": 56723830,
"login": "dmholtz",
"node_id": "MDQ6VXNlcjU2NzIzODMw",
"organizations_url": "https://api.github.com/users/dmholtz/orgs",
"received_events_url": "https://api.github.com/users/dmholtz/received_events",
"repos_url": "https://api.github.com/users/dmholtz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dmholtz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dmholtz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dmholtz",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 9 | 2022-06-01T21:51:16Z | 2023-06-03T00:02:53Z | 2022-06-02T16:13:51Z | NONE | resolved | [Software Package Data Exchange (SPDX)](https://spdx.org/) is an open standard for communication software bill of material information.
According to the [SPDX License List](https://spdx.org/licenses) `Apache-2.0` is an unambiguous short identifier for the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0), which holds for the requests project.
This PR proposes to use this SPDX Identifier rather than `Apache 2.0` (without hyphen). Note that the proposed change does not change the license of the project but rather declares it unambiguously in a machine-readable format. As a result, the packaged version on PyPi will also be updated once requests is built again and all metadata crawlers will benefit from the change. | {
"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/6151/reactions"
} | https://api.github.com/repos/psf/requests/issues/6151/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6151.diff",
"html_url": "https://github.com/psf/requests/pull/6151",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6151.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6151"
} | true | [
"I'm relatively indifferent. I can't find any notable Python packages using Apache 2.0 with this approach, they're all using `Apache 2.0`. It's hard to tell if this is an alternatively established standard, or if everyone has been copying us. I'll need to do a little more digging before we merge this.",
"`__licen... |
https://api.github.com/repos/psf/requests/issues/6150 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6150/labels{/name} | https://api.github.com/repos/psf/requests/issues/6150/comments | https://api.github.com/repos/psf/requests/issues/6150/events | https://github.com/psf/requests/pull/6150 | 1,256,611,057 | PR_kwDOABTKOs445BqS | 6,150 | Reduce lock thread runs to daily | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2022-06-01T17:35:28Z | 2023-06-02T00:03:16Z | 2022-06-01T17:51:04Z | MEMBER | resolved | We moved the lock thread GH action to hourly to push through our initial backlog and never updated it. We're wasting a lot of compute and cluttering our action log with the existing settings. This PR will reduce the job to only run once a day going forward. We'll also update the action from v2 to v3 while we're here. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6150/reactions"
} | https://api.github.com/repos/psf/requests/issues/6150/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6150.diff",
"html_url": "https://github.com/psf/requests/pull/6150",
"merged_at": "2022-06-01T17:51:04Z",
"patch_url": "https://github.com/psf/requests/pull/6150.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6150"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/6149 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6149/labels{/name} | https://api.github.com/repos/psf/requests/issues/6149/comments | https://api.github.com/repos/psf/requests/issues/6149/events | https://github.com/psf/requests/pull/6149 | 1,256,335,834 | PR_kwDOABTKOs444DV6 | 6,149 | Tolerate bad registry entries in Windows proxy settings | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2022-06-01T15:48:19Z | 2023-06-02T00:03:17Z | 2022-06-01T17:36:26Z | MEMBER | resolved | This PR will address #6104. Requests will now handle bad registry entries more gracefully when checking proxy settings from the host. When invalid entries are encountered, the ProxyEnabled setting will be ignored as if they didn't exist rather than throwing an exception. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6149/reactions"
} | https://api.github.com/repos/psf/requests/issues/6149/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6149.diff",
"html_url": "https://github.com/psf/requests/pull/6149",
"merged_at": "2022-06-01T17:36:26Z",
"patch_url": "https://github.com/psf/requests/pull/6149.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6149"
} | true | [
"Looks like 3.11 test failure is related to https://github.com/pytest-dev/pytest/issues/10008."
] |
https://api.github.com/repos/psf/requests/issues/6148 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6148/labels{/name} | https://api.github.com/repos/psf/requests/issues/6148/comments | https://api.github.com/repos/psf/requests/issues/6148/events | https://github.com/psf/requests/issues/6148 | 1,254,684,336 | I_kwDOABTKOs5KyPaw | 6,148 | <removed> | {
"avatar_url": "https://avatars.githubusercontent.com/u/76781560?v=4",
"events_url": "https://api.github.com/users/CanoBot/events{/privacy}",
"followers_url": "https://api.github.com/users/CanoBot/followers",
"following_url": "https://api.github.com/users/CanoBot/following{/other_user}",
"gists_url": "https://api.github.com/users/CanoBot/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/CanoBot",
"id": 76781560,
"login": "CanoBot",
"node_id": "MDQ6VXNlcjc2NzgxNTYw",
"organizations_url": "https://api.github.com/users/CanoBot/orgs",
"received_events_url": "https://api.github.com/users/CanoBot/received_events",
"repos_url": "https://api.github.com/users/CanoBot/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/CanoBot/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/CanoBot/subscriptions",
"type": "User",
"url": "https://api.github.com/users/CanoBot",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2022-06-01T02:03:40Z | 2022-06-01T02:18:53Z | 2022-06-01T02:07:30Z | NONE | null | Please refer to our [Stack Overflow tag](https://stackoverflow.com/questions/tagged/python-requests) for guidance.
usuario@host:~$ cat /tmp/a este es un archivo de texto simple. usuario@host:~$ python xorfile.py /tmp/a Sup3rS3cr3t archivo borrado usuario@host:~$ cat /tmp/a <... algunos caracteres no imprimibles...> usuario@host:~$ python xorfile.py /tmp/a Sup3rS3cr3t archivo borrado usuario@host:~$ cat /tmp/a este es un archivo de texto simple. usuario@host:~$ | {
"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/6148/reactions"
} | https://api.github.com/repos/psf/requests/issues/6148/timeline | null | completed | null | null | false | [
"46ccf99e | xxd -r -p > image1.jpg; file image.jpg\nimage1.jpg: JPEG image data\n$ python XOR-hex.py hex 46ccf9ab | xxd -r -p > image2.jpg; file image.jpg\nimage.jpg: JPEG image data\n$ python XOR-hex.py hex 46ccf9a571f0ffb17e41cb84 | xxd -r -p > image3.jpg; file image3.jpg\nimage3.jpg: JPEG image data, JFIF standa... |
https://api.github.com/repos/psf/requests/issues/6147 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6147/labels{/name} | https://api.github.com/repos/psf/requests/issues/6147/comments | https://api.github.com/repos/psf/requests/issues/6147/events | https://github.com/psf/requests/issues/6147 | 1,253,757,614 | I_kwDOABTKOs5KutKu | 6,147 | $ git clone git://github.com/psf/requests.git | {
"avatar_url": "https://avatars.githubusercontent.com/u/76781560?v=4",
"events_url": "https://api.github.com/users/CanoBot/events{/privacy}",
"followers_url": "https://api.github.com/users/CanoBot/followers",
"following_url": "https://api.github.com/users/CanoBot/following{/other_user}",
"gists_url": "https://api.github.com/users/CanoBot/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/CanoBot",
"id": 76781560,
"login": "CanoBot",
"node_id": "MDQ6VXNlcjc2NzgxNTYw",
"organizations_url": "https://api.github.com/users/CanoBot/orgs",
"received_events_url": "https://api.github.com/users/CanoBot/received_events",
"repos_url": "https://api.github.com/users/CanoBot/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/CanoBot/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/CanoBot/subscriptions",
"type": "User",
"url": "https://api.github.com/users/CanoBot",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2022-05-31T11:56:04Z | 2022-05-31T12:26:27Z | 2022-05-31T12:26:24Z | NONE | null | null | {
"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/6147/reactions"
} | https://api.github.com/repos/psf/requests/issues/6147/timeline | null | completed | null | null | false | [
"$ python -m pip install requests\n"
] |
https://api.github.com/repos/psf/requests/issues/6146 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6146/labels{/name} | https://api.github.com/repos/psf/requests/issues/6146/comments | https://api.github.com/repos/psf/requests/issues/6146/events | https://github.com/psf/requests/pull/6146 | 1,252,544,146 | PR_kwDOABTKOs44rF2N | 6,146 | Create Salhazry 4456 | {
"avatar_url": "https://avatars.githubusercontent.com/u/87732583?v=4",
"events_url": "https://api.github.com/users/Salhazry/events{/privacy}",
"followers_url": "https://api.github.com/users/Salhazry/followers",
"following_url": "https://api.github.com/users/Salhazry/following{/other_user}",
"gists_url": "https://api.github.com/users/Salhazry/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Salhazry",
"id": 87732583,
"login": "Salhazry",
"node_id": "MDQ6VXNlcjg3NzMyNTgz",
"organizations_url": "https://api.github.com/users/Salhazry/orgs",
"received_events_url": "https://api.github.com/users/Salhazry/received_events",
"repos_url": "https://api.github.com/users/Salhazry/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Salhazry/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Salhazry/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Salhazry",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2022-05-30T10:38:31Z | 2022-05-30T14:17:55Z | 2022-05-30T14:17:50Z | NONE | spam | <a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/80x15.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>. | {
"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/6146/reactions"
} | https://api.github.com/repos/psf/requests/issues/6146/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6146.diff",
"html_url": "https://github.com/psf/requests/pull/6146",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6146.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6146"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/6145 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6145/labels{/name} | https://api.github.com/repos/psf/requests/issues/6145/comments | https://api.github.com/repos/psf/requests/issues/6145/events | https://github.com/psf/requests/issues/6145 | 1,251,965,071 | I_kwDOABTKOs5Kn3iP | 6,145 | timeout parameter not applied to initial connection | {
"avatar_url": "https://avatars.githubusercontent.com/u/26042712?v=4",
"events_url": "https://api.github.com/users/chatumao/events{/privacy}",
"followers_url": "https://api.github.com/users/chatumao/followers",
"following_url": "https://api.github.com/users/chatumao/following{/other_user}",
"gists_url": "https://api.github.com/users/chatumao/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/chatumao",
"id": 26042712,
"login": "chatumao",
"node_id": "MDQ6VXNlcjI2MDQyNzEy",
"organizations_url": "https://api.github.com/users/chatumao/orgs",
"received_events_url": "https://api.github.com/users/chatumao/received_events",
"repos_url": "https://api.github.com/users/chatumao/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/chatumao/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/chatumao/subscriptions",
"type": "User",
"url": "https://api.github.com/users/chatumao",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2022-05-29T18:56:10Z | 2023-05-30T00:02:52Z | 2022-05-29T21:45:44Z | NONE | resolved | If specifying the timeout parameter to requests.get(), an exception is raised after the specified timeout. If the code is executed without an internet connection, an exception is raised immediately. Python is at 3.10.
## Expected Result
It feels like the timeout should apply to this scenario as well.
## Actual Result
<!-- What happened instead. -->
## Reproduction Steps
```python
import requests
```
## System Information
$ python -m requests.help
```json
{
"paste": "here"
}
```
<!-- This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). -->
| {
"avatar_url": "https://avatars.githubusercontent.com/u/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/6145/reactions"
} | https://api.github.com/repos/psf/requests/issues/6145/timeline | null | completed | null | null | false | [
"Hi @chatumao, the timeout is for reads and connections. This isn't a wall clock, as specified in the docs, it's for each operation. If we cannot connect (and therefore cannot read), there's nothing for the timeout to apply to which is why we fail immediately.\n\nI don't believe we intend to change this behavior at... |
https://api.github.com/repos/psf/requests/issues/6144 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6144/labels{/name} | https://api.github.com/repos/psf/requests/issues/6144/comments | https://api.github.com/repos/psf/requests/issues/6144/events | https://github.com/psf/requests/pull/6144 | 1,249,964,146 | PR_kwDOABTKOs44iqQy | 6,144 | Cleanup the docs sidebar | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2022-05-26T19:33:40Z | 2023-05-27T00:03:06Z | 2022-05-26T19:45:57Z | MEMBER | resolved | This PR should address some of the issues raised in #6142. The translation guides are mostly 10+ years out of date at this point. We're going to remove them from the sidebar for now since they're providing limited value.
We're also removing the algolia search bar as it's not functioning as intended. Several features have been added to RTD since we introduced algolia, and there's better options at this point. We may look at adding something like [this](https://docs.readthedocs.io/en/stable/guides/advanced-search.html) in a future PR, but for now the quicksearch at the bottom of the sidebar should be sufficient. | {
"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/6144/reactions"
} | https://api.github.com/repos/psf/requests/issues/6144/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6144.diff",
"html_url": "https://github.com/psf/requests/pull/6144",
"merged_at": "2022-05-26T19:45:57Z",
"patch_url": "https://github.com/psf/requests/pull/6144.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6144"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/6143 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6143/labels{/name} | https://api.github.com/repos/psf/requests/issues/6143/comments | https://api.github.com/repos/psf/requests/issues/6143/events | https://github.com/psf/requests/issues/6143 | 1,249,431,165 | I_kwDOABTKOs5KeM59 | 6,143 | No module named 'urllib3.exceptions' | {
"avatar_url": "https://avatars.githubusercontent.com/u/83945407?v=4",
"events_url": "https://api.github.com/users/doraspocket/events{/privacy}",
"followers_url": "https://api.github.com/users/doraspocket/followers",
"following_url": "https://api.github.com/users/doraspocket/following{/other_user}",
"gists_url": "https://api.github.com/users/doraspocket/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/doraspocket",
"id": 83945407,
"login": "doraspocket",
"node_id": "MDQ6VXNlcjgzOTQ1NDA3",
"organizations_url": "https://api.github.com/users/doraspocket/orgs",
"received_events_url": "https://api.github.com/users/doraspocket/received_events",
"repos_url": "https://api.github.com/users/doraspocket/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/doraspocket/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/doraspocket/subscriptions",
"type": "User",
"url": "https://api.github.com/users/doraspocket",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2022-05-26T11:10:13Z | 2023-05-27T00:03:04Z | 2022-05-26T20:17:26Z | NONE | resolved | from .exceptions import RequestsDependencyWarning
File "/Users/ericli/venvs/venv3.10.3/lib/python3.10/site-packages/requests/exceptions.py", line 9, in <module>
from urllib3.exceptions import HTTPError as BaseHTTPError
ModuleNotFoundError: No module named 'urllib3.exceptions'; 'urllib3' is not a package | {
"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/6143/reactions"
} | https://api.github.com/repos/psf/requests/issues/6143/timeline | null | completed | null | null | false | [
"Hi,\r\nI'm using venv, and has already installed requests, but when I was trying to import requests, It always got the error,\r\n\r\nNo module named 'urllib3.exceptions'\r\n\r\n(venv3.10.3) ➜ pyspider-urllib git:(main) ✗ pip list\r\nPackage Version\r\n------------------ -----------\r\ncertifi ... |
https://api.github.com/repos/psf/requests/issues/6142 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6142/labels{/name} | https://api.github.com/repos/psf/requests/issues/6142/comments | https://api.github.com/repos/psf/requests/issues/6142/events | https://github.com/psf/requests/issues/6142 | 1,249,190,952 | I_kwDOABTKOs5KdSQo | 6,142 | Parts of the documentation still link to python-requests.org | {
"avatar_url": "https://avatars.githubusercontent.com/u/8050853?v=4",
"events_url": "https://api.github.com/users/domdfcoding/events{/privacy}",
"followers_url": "https://api.github.com/users/domdfcoding/followers",
"following_url": "https://api.github.com/users/domdfcoding/following{/other_user}",
"gists_url": "https://api.github.com/users/domdfcoding/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/domdfcoding",
"id": 8050853,
"login": "domdfcoding",
"node_id": "MDQ6VXNlcjgwNTA4NTM=",
"organizations_url": "https://api.github.com/users/domdfcoding/orgs",
"received_events_url": "https://api.github.com/users/domdfcoding/received_events",
"repos_url": "https://api.github.com/users/domdfcoding/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/domdfcoding/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/domdfcoding/subscriptions",
"type": "User",
"url": "https://api.github.com/users/domdfcoding",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2022-05-26T07:11:01Z | 2023-05-27T00:03:05Z | 2022-05-26T19:49:29Z | NONE | resolved | Follow up to #6140 (which is locked)
In the sidebar the links to the docs in different languages point to e.g. `fr.python-requests.org`. These are specified in these files:
* https://github.com/psf/requests/blob/79f2ec3acc4e24fef6e6ce31ad7b1d4e2f77be31/docs/_templates/sidebarintro.html#L65
* https://github.com/psf/requests/blob/79f2ec3acc4e24fef6e6ce31ad7b1d4e2f77be31/docs/_templates/sidebarlogo.html#L60
While there are translations of the docs on readthedocs, at least [the German docs](https://requests.readthedocs.io/de/latest/) are woefully out of date. It might be better just to remove that section of the sidebar entirely.
----------------
The search box in the sidebar (which uses algolia search) has its links pointing to pages under `https://2.python-requests.org/en/master`. I can't find where this is configured. As it stands the search is non-functional. | {
"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/6142/reactions"
} | https://api.github.com/repos/psf/requests/issues/6142/timeline | null | completed | null | null | false | [
"Thanks for bringing this to our attention @domdfcoding. I've added #6144 which will be the first step in improving some of this. Many of those translations are now 8-10 years old, and given no one has volunteered to make updates in that window, I believe they're likely to remain that way.\r\n\r\nI've removed the t... |
https://api.github.com/repos/psf/requests/issues/6141 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6141/labels{/name} | https://api.github.com/repos/psf/requests/issues/6141/comments | https://api.github.com/repos/psf/requests/issues/6141/events | https://github.com/psf/requests/issues/6141 | 1,245,888,801 | I_kwDOABTKOs5KQsEh | 6,141 | Session favors environment variable (CURL_CA_BUNDLE) over instance attribute | {
"avatar_url": "https://avatars.githubusercontent.com/u/4758960?v=4",
"events_url": "https://api.github.com/users/hugocarr/events{/privacy}",
"followers_url": "https://api.github.com/users/hugocarr/followers",
"following_url": "https://api.github.com/users/hugocarr/following{/other_user}",
"gists_url": "https://api.github.com/users/hugocarr/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hugocarr",
"id": 4758960,
"login": "hugocarr",
"node_id": "MDQ6VXNlcjQ3NTg5NjA=",
"organizations_url": "https://api.github.com/users/hugocarr/orgs",
"received_events_url": "https://api.github.com/users/hugocarr/received_events",
"repos_url": "https://api.github.com/users/hugocarr/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hugocarr/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hugocarr/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hugocarr",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2022-05-24T02:17:07Z | 2023-05-25T00:02:57Z | 2022-05-24T05:10:23Z | NONE | resolved | When setting the `CURL_CA_BUNDLE` environment variable, it overrides the `session.verify` attribute. It's unclear if this is expected behavior, but I thought it might be worth opening an issue as it caught me off guard.
## Expected Result
```python
import requests
import os
os.environ["CURL_CA_BUNDLE"] = "/tmp/a_cert"
s = requests.Session()
s.verify = "/tmp/another_cert"
# expected to be called with "/tmp/another_cert"
s.get("https://my_route")
```
## Actual Result
```python
# actually gets called with "/tmp/a_cert"
s.get("https://my_route")
```
## Reproduction Steps
Requires using `pdb` to step into
```python
import requests
import os
os.environ["CURL_CA_BUNDLE"] = "/tmp/a_cert"
s = requests.Session()
s.verify = "/tmp/another_cert"
# gets called with "/tmp/a_cert"
breakpoint()
s.get("https://my_route")
```
If you step into `/requests/sessions.py`
```
515 prep = self.prepare_request(req)
516
517 proxies = proxies or {}
518
519 settings = self.merge_environment_settings(
520 prep.url, proxies, stream, verify, cert
521 )
522
523 # Send the request.
524 send_kwargs = {
525 'timeout': timeout,
526 'allow_redirects': allow_redirects,
527 }
528 send_kwargs.update(settings)
529 -> resp = self.send(prep, **send_kwargs)
530
531 return resp
(Pdb) send_kwargs
{'timeout': None, 'allow_redirects': True, 'verify': '/tmp/a_cert', 'proxies': OrderedDict(), 'stream': False, 'cert': None}
```
You can see that the request is going to be sent with the certificate from the environment, instead of the one set in the object.
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "2.0.12"
},
"cryptography": {
"version": "37.0.2"
},
"idna": {
"version": "3.3"
},
"implementation": {
"name": "CPython",
"version": "3.8.13"
},
"platform": {
"release": "21.4.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "30000030",
"version": "22.0.0"
},
"requests": {
"version": "2.27.1"
},
"system_ssl": {
"version": "101010ff"
},
"urllib3": {
"version": "1.26.9"
},
"using_charset_normalizer": true,
"using_pyopenssl": true
}
```
<!-- This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). -->
| {
"avatar_url": "https://avatars.githubusercontent.com/u/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/6141/reactions"
} | https://api.github.com/repos/psf/requests/issues/6141/timeline | null | completed | null | null | false | [
"Hi @hugocarr, thanks for the issue. It appears this is a dupe of #3829 and #2018. This is the current behavior and it's known. We won't be changing it though until the next major release due to it being breaking. I'll resolve this in favor of the originals.",
"Gotcha, https://github.com/psf/requests/issues/3829 ... |
https://api.github.com/repos/psf/requests/issues/6140 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6140/labels{/name} | https://api.github.com/repos/psf/requests/issues/6140/comments | https://api.github.com/repos/psf/requests/issues/6140/events | https://github.com/psf/requests/issues/6140 | 1,244,638,913 | I_kwDOABTKOs5KL67B | 6,140 | python-requests.org domain suspended. | {
"avatar_url": "https://avatars.githubusercontent.com/u/227768?v=4",
"events_url": "https://api.github.com/users/brunns/events{/privacy}",
"followers_url": "https://api.github.com/users/brunns/followers",
"following_url": "https://api.github.com/users/brunns/following{/other_user}",
"gists_url": "https://api.github.com/users/brunns/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/brunns",
"id": 227768,
"login": "brunns",
"node_id": "MDQ6VXNlcjIyNzc2OA==",
"organizations_url": "https://api.github.com/users/brunns/orgs",
"received_events_url": "https://api.github.com/users/brunns/received_events",
"repos_url": "https://api.github.com/users/brunns/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/brunns/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/brunns/subscriptions",
"type": "User",
"url": "https://api.github.com/users/brunns",
"user_view_type": "public"
} | [] | open | true | null | [] | null | 12 | 2022-05-23T06:19:30Z | 2022-06-16T16:52:56Z | null | NONE | resolved | http://python-requests.org/ is showing:
<img width="824" alt="Screenshot 2022-05-23 at 07 15 12" src="https://user-images.githubusercontent.com/227768/169755158-3c2b0013-b869-4a84-93f3-7bddeabd9548.png">
It's the same case for subdomains, including docs.python-requests.org, which is breaking the building of sphinx documentation which refer to `requests` docs: see https://github.com/brunns/mbtest/runs/6549875114?check_suite_focus=true#step:9:31 for an example.
| null | {
"+1": 12,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 12,
"url": "https://api.github.com/repos/psf/requests/issues/6140/reactions"
} | https://api.github.com/repos/psf/requests/issues/6140/timeline | null | null | null | null | false | [
"Hi @brunns, thanks for bringing this to our attention. The domain is still owned by Kenneth and the maintainers haven't had access to it in quite some time.\n\nWe'll reach out to Kenneth regarding the domain verification. I wanted to quickly confirm though that https://docs.python-requests.org _is_ working for you... |
https://api.github.com/repos/psf/requests/issues/6139 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6139/labels{/name} | https://api.github.com/repos/psf/requests/issues/6139/comments | https://api.github.com/repos/psf/requests/issues/6139/events | https://github.com/psf/requests/issues/6139 | 1,244,044,304 | I_kwDOABTKOs5KJpwQ | 6,139 | Misusing of system-wide proxy on Windows / HTTPS connections over system-wide proxy on Windows do not work | {
"avatar_url": "https://avatars.githubusercontent.com/u/3054729?v=4",
"events_url": "https://api.github.com/users/ValdikSS/events{/privacy}",
"followers_url": "https://api.github.com/users/ValdikSS/followers",
"following_url": "https://api.github.com/users/ValdikSS/following{/other_user}",
"gists_url": "https://api.github.com/users/ValdikSS/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ValdikSS",
"id": 3054729,
"login": "ValdikSS",
"node_id": "MDQ6VXNlcjMwNTQ3Mjk=",
"organizations_url": "https://api.github.com/users/ValdikSS/orgs",
"received_events_url": "https://api.github.com/users/ValdikSS/received_events",
"repos_url": "https://api.github.com/users/ValdikSS/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ValdikSS/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ValdikSS/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ValdikSS",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 2 | 2022-05-21T17:47:26Z | 2022-06-11T15:44:35Z | null | NONE | null | <!-- Summary. -->
On Windows 10 and 11, if a system-wide proxy is configured in the OS settings, Requests won't load HTTPS websites.
Instead of the regular CONNECT header, Requests sends TLS request to the proxy server (ip and port). The TLS ClientHello does not have Server Name Indication field, that's why I assume that Requests misinterprets the proxy as a Secure Web Proxy (a regular proxy with TLS encapsulation on top), which Windows does not support.
## Expected Result
If system-wide proxy is configured in Windows, Requests sends CONNECT header to the proxy server when HTTPS website is requested.
## Actual Result
If system-wide proxy is configured in Windows, Requests sends TLS request to the proxy address when HTTPS website is requested.
## Reproduction Steps
1. Configure system-wide proxy on Windows
2.
```python
import requests
requests.get("https://w3.org/")
```
Result:
My proxy does not respond to the packets it does not understand, and I receive the following error:
`HTTPSConnectionPool(host='w3.org, port=443): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', timeout('_ssl.c:1114: The handshake operation timed out')))`
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "2.0.12"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.3"
},
"implementation": {
"name": "CPython",
"version": "3.10.4"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.27.1"
},
"system_ssl": {
"version": "101010ef"
},
"urllib3": {
"version": "1.26.9"
},
"using_charset_normalizer": true,
"using_pyopenssl": false
}
```
<!-- This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). -->
| null | {
"+1": 1,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/6139/reactions"
} | https://api.github.com/repos/psf/requests/issues/6139/timeline | null | null | null | null | false | [
"This is a Python's urllib bug, which is triggered by newer urllib3 version, thus affecting requests.\r\n\r\nhttps://bugs.python.org/issue42627\r\nhttps://github.com/python/cpython/issues/86793\r\nhttps://github.com/python/cpython/commit/9743524fc14db39e2f309cf3d372c7e8e18fc93a\r\n\r\n>This bug has existed for a ve... |
https://api.github.com/repos/psf/requests/issues/6138 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6138/labels{/name} | https://api.github.com/repos/psf/requests/issues/6138/comments | https://api.github.com/repos/psf/requests/issues/6138/events | https://github.com/psf/requests/issues/6138 | 1,243,882,843 | I_kwDOABTKOs5KJCVb | 6,138 | Does it can visit with IPV6 successfully without hard code interface name in urllib3/util/connection.py - create_connection ? | {
"avatar_url": "https://avatars.githubusercontent.com/u/29194147?v=4",
"events_url": "https://api.github.com/users/k870611/events{/privacy}",
"followers_url": "https://api.github.com/users/k870611/followers",
"following_url": "https://api.github.com/users/k870611/following{/other_user}",
"gists_url": "https://api.github.com/users/k870611/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/k870611",
"id": 29194147,
"login": "k870611",
"node_id": "MDQ6VXNlcjI5MTk0MTQ3",
"organizations_url": "https://api.github.com/users/k870611/orgs",
"received_events_url": "https://api.github.com/users/k870611/received_events",
"repos_url": "https://api.github.com/users/k870611/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/k870611/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/k870611/subscriptions",
"type": "User",
"url": "https://api.github.com/users/k870611",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2022-05-21T06:04:08Z | 2023-06-11T00:03:26Z | 2022-06-07T21:05:33Z | NONE | resolved | Dear Requests
My OS is CentOS 72, with requests 2.27.1, Python3.9.0, I want to visit my page by Ipv6, but it return 400 - Bad Request
Code is
```
>>> import requests
>>> requests.packages.urllib3.disable_warnings()
>>> url = 'https://[fe80::2ac1:3cff:fe89:a728%enp0s3]/#login'
>>> res = requests.get(url, verify=False)
>>> res.status_code
400
```
Then I change url to https://[fe80::2ac1:3cff:fe89:a728]/#login, urllib3 will raise OSError: [Errno 22] Invalid argument
So I hard code interface name in urllib3/util/connection.py - create_connection like this
```
family = allowed_gai_family()
print('Before Change: {0}'.format(host))
host = '{0}%enp0s3'.format(host)
print('After Change: {0}'.format(host))
```
It can visit successfully
```
>>> import requests
>>> requests.packages.urllib3.disable_warnings()
>>> url = 'https://[fe80::2ac1:3cff:fe89:a728]/#login'
>>> res = requests.get(url, verify=False)
Before Change: fe80::2ac1:3cff:fe89:a728
After Change: fe80::2ac1:3cff:fe89:a728%enp0s3
>>> res.status_code
200
```
Does it can work without hard code interface name in create_connect ??
Thanks and best regard. | {
"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/6138/reactions"
} | https://api.github.com/repos/psf/requests/issues/6138/timeline | null | completed | null | null | false | [
"Hi @k870611, it sounds like you're attempting to use an ipv6 address with a zone identifier? This is currently missing functionality in urllib3 (and Requests). I'm going to resolve this in favor of the upstream tracking issue (urllib3/urllib3#1641). It's currently providing a $500 bounty for an accepted contributi... |
https://api.github.com/repos/psf/requests/issues/6137 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6137/labels{/name} | https://api.github.com/repos/psf/requests/issues/6137/comments | https://api.github.com/repos/psf/requests/issues/6137/events | https://github.com/psf/requests/pull/6137 | 1,242,045,051 | PR_kwDOABTKOs44Imhi | 6,137 | Allow tests to run if HTTP proxy env variables are already present, | {
"avatar_url": "https://avatars.githubusercontent.com/u/4038023?v=4",
"events_url": "https://api.github.com/users/ogayot/events{/privacy}",
"followers_url": "https://api.github.com/users/ogayot/followers",
"following_url": "https://api.github.com/users/ogayot/following{/other_user}",
"gists_url": "https://api.github.com/users/ogayot/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ogayot",
"id": 4038023,
"login": "ogayot",
"node_id": "MDQ6VXNlcjQwMzgwMjM=",
"organizations_url": "https://api.github.com/users/ogayot/orgs",
"received_events_url": "https://api.github.com/users/ogayot/received_events",
"repos_url": "https://api.github.com/users/ogayot/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ogayot/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ogayot/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ogayot",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 0 | 2022-05-19T16:43:48Z | 2022-05-19T16:43:48Z | null | CONTRIBUTOR | null | Hello,
The following tests fail if HTTP proxy environment variables are already set:
```
FAILED tests/test_requests.py::TestRequests::test_mixed_case_scheme_acceptable
FAILED tests/test_requests.py::TestRequests::test_HTTP_302_ALLOW_REDIRECT_GET
FAILED tests/test_requests.py::TestRequests::test_errors[http://doesnotexist.google.com-ConnectionError]
FAILED tests/test_requests.py::TestRequests::test_respect_proxy_env_on_send_self_prepared_request
FAILED tests/test_requests.py::TestRequests::test_respect_proxy_env_on_send_session_prepared_request
FAILED tests/test_requests.py::TestRequests::test_respect_proxy_env_on_send_with_redirects
FAILED tests/test_requests.py::TestRequests::test_respect_proxy_env_on_get - ...
FAILED tests/test_requests.py::TestRequests::test_respect_proxy_env_on_request
```
The variables affecting the tests are:
* `http_proxy` (and `https_proxy` potentially)
* `no_proxy`
Fixed by overriding their value if they are already present in the environment.
The `override_environ` function would fail if attempting to delete a variable that is not in the environment. Added a `suppress(KeyError)` construct around the `del` instruction to fix it.
Thanks,
Oilvier | 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/6137/reactions"
} | https://api.github.com/repos/psf/requests/issues/6137/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6137.diff",
"html_url": "https://github.com/psf/requests/pull/6137",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6137.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6137"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/6136 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6136/labels{/name} | https://api.github.com/repos/psf/requests/issues/6136/comments | https://api.github.com/repos/psf/requests/issues/6136/events | https://github.com/psf/requests/pull/6136 | 1,241,994,247 | PR_kwDOABTKOs44IbqJ | 6,136 | Fix output of test_lowlevel tests in case of timeout | {
"avatar_url": "https://avatars.githubusercontent.com/u/4038023?v=4",
"events_url": "https://api.github.com/users/ogayot/events{/privacy}",
"followers_url": "https://api.github.com/users/ogayot/followers",
"following_url": "https://api.github.com/users/ogayot/following{/other_user}",
"gists_url": "https://api.github.com/users/ogayot/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ogayot",
"id": 4038023,
"login": "ogayot",
"node_id": "MDQ6VXNlcjQwMzgwMjM=",
"organizations_url": "https://api.github.com/users/ogayot/orgs",
"received_events_url": "https://api.github.com/users/ogayot/received_events",
"repos_url": "https://api.github.com/users/ogayot/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ogayot/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ogayot/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ogayot",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2022-05-19T15:58:16Z | 2023-06-09T00:03:14Z | 2022-06-08T16:02:42Z | CONTRIBUTOR | resolved | Hello,
The tests in `test_lowlevel.py` use the `testserver.server.Server` thread object.
When using the object as a context manager, we wait until the server thread is ready with a timeout.
Unfortunately, if the timeout is reached, we would not propagate the error. Instead, we would return from the `__enter__` method and access the `with` body with an uninitialized value for `port` (i.e., `port = 0`).
Therefore, the tests would fail with:
```
E urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7fc3a3e30a90>: Failed to establish a new connection: [Errno 111] Connection refused
/usr/lib/python3/dist-packages/urllib3/connection.py:181: NewConnectionError
```
Reading this error does not make it obvious that this is the result of a timeout.
Fixed by raising an error in case of timeout, which makes it more obvious:
```
if not self.ready_event.wait(self.WAIT_EVENT_TIMEOUT):
> raise RuntimeError("Timeout waiting for server to be ready.")
E RuntimeError: Timeout waiting for server to be ready.
tests/testserver/server.py:119: RuntimeError
```
_The reason why I had a timeout on my end was because my environment was not resolving "localhost" as it should have. Requests were going through the DNS and therefore ended-up hitting the timeout_
_The name resolution taking forever was happening during this instruction (where `self.host` is `localhost`):_
```
sock.bind((self.host, self.port))
```
Thanks,
Olivier | {
"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/6136/reactions"
} | https://api.github.com/repos/psf/requests/issues/6136/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6136.diff",
"html_url": "https://github.com/psf/requests/pull/6136",
"merged_at": "2022-06-08T16:02:42Z",
"patch_url": "https://github.com/psf/requests/pull/6136.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6136"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/6135 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6135/labels{/name} | https://api.github.com/repos/psf/requests/issues/6135/comments | https://api.github.com/repos/psf/requests/issues/6135/events | https://github.com/psf/requests/issues/6135 | 1,240,431,975 | I_kwDOABTKOs5J731n | 6,135 | Make requests work for pyright in strict mode | {
"avatar_url": "https://avatars.githubusercontent.com/u/6827922?v=4",
"events_url": "https://api.github.com/users/brandonchinn178/events{/privacy}",
"followers_url": "https://api.github.com/users/brandonchinn178/followers",
"following_url": "https://api.github.com/users/brandonchinn178/following{/other_user}",
"gists_url": "https://api.github.com/users/brandonchinn178/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/brandonchinn178",
"id": 6827922,
"login": "brandonchinn178",
"node_id": "MDQ6VXNlcjY4Mjc5MjI=",
"organizations_url": "https://api.github.com/users/brandonchinn178/orgs",
"received_events_url": "https://api.github.com/users/brandonchinn178/received_events",
"repos_url": "https://api.github.com/users/brandonchinn178/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/brandonchinn178/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/brandonchinn178/subscriptions",
"type": "User",
"url": "https://api.github.com/users/brandonchinn178",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2022-05-18T19:37:24Z | 2023-05-19T00:03:05Z | 2022-05-18T19:43:53Z | NONE | resolved | Running pyright in strict mode errors currently for requests function calls:
```
48:19 - error: Type of "post" is partially unknown
Type of "post" is "(url: str | bytes, data: str | bytes | MutableMapping[str, Any] | Iterable[Tuple[Text, str | None]] | IO[AnyStr] | None = ..., json: Any | None = ..., **kwargs) -> Response" (reportUnknownMemberType)
59:18 - error: Type of "json" is partially unknown
Type of "json" is "(**kwargs) -> Any" (reportUnknownMemberType)
```
## Expected Result
Basic usage of `requests` should pass strict typechecking
## Actual Result
Failure
## Reproduction Steps
```python
# pyright: strict
import requests
r = requests.post("http://httpbin.org/post", json={"a": 1})
print(r.json())
```
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "2.0.12"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.3"
},
"implementation": {
"name": "CPython",
"version": "3.9.12"
},
"platform": {
"release": "19.6.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.27.1"
},
"system_ssl": {
"version": "101010ff"
},
"urllib3": {
"version": "1.26.9"
},
"using_charset_normalizer": true,
"using_pyopenssl": false
}
```
<!-- This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). -->
| {
"avatar_url": "https://avatars.githubusercontent.com/u/6827922?v=4",
"events_url": "https://api.github.com/users/brandonchinn178/events{/privacy}",
"followers_url": "https://api.github.com/users/brandonchinn178/followers",
"following_url": "https://api.github.com/users/brandonchinn178/following{/other_user}",
"gists_url": "https://api.github.com/users/brandonchinn178/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/brandonchinn178",
"id": 6827922,
"login": "brandonchinn178",
"node_id": "MDQ6VXNlcjY4Mjc5MjI=",
"organizations_url": "https://api.github.com/users/brandonchinn178/orgs",
"received_events_url": "https://api.github.com/users/brandonchinn178/received_events",
"repos_url": "https://api.github.com/users/brandonchinn178/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/brandonchinn178/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/brandonchinn178/subscriptions",
"type": "User",
"url": "https://api.github.com/users/brandonchinn178",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6135/reactions"
} | https://api.github.com/repos/psf/requests/issues/6135/timeline | null | completed | null | null | false | [
"Hi @brandonchinn178, we don't provide any typing information in requests currently. This is either being derived from pyright or a type stubbing implementation. Neither of those are in our control, so you may need to direct this elsewhere.",
"ah yes, sorry, thanks!\r\n\r\nMoved to https://github.com/python/types... |
https://api.github.com/repos/psf/requests/issues/6133 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6133/labels{/name} | https://api.github.com/repos/psf/requests/issues/6133/comments | https://api.github.com/repos/psf/requests/issues/6133/events | https://github.com/psf/requests/pull/6133 | 1,235,435,125 | PR_kwDOABTKOs43y7L5 | 6,133 | Update utils.py | {
"avatar_url": "https://avatars.githubusercontent.com/u/73458493?v=4",
"events_url": "https://api.github.com/users/davidshivaji/events{/privacy}",
"followers_url": "https://api.github.com/users/davidshivaji/followers",
"following_url": "https://api.github.com/users/davidshivaji/following{/other_user}",
"gists_url": "https://api.github.com/users/davidshivaji/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/davidshivaji",
"id": 73458493,
"login": "davidshivaji",
"node_id": "MDQ6VXNlcjczNDU4NDkz",
"organizations_url": "https://api.github.com/users/davidshivaji/orgs",
"received_events_url": "https://api.github.com/users/davidshivaji/received_events",
"repos_url": "https://api.github.com/users/davidshivaji/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/davidshivaji/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/davidshivaji/subscriptions",
"type": "User",
"url": "https://api.github.com/users/davidshivaji",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2022-05-13T16:10:31Z | 2023-05-14T00:03:10Z | 2022-05-13T16:36:14Z | CONTRIBUTOR | resolved | null | {
"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/6133/reactions"
} | https://api.github.com/repos/psf/requests/issues/6133/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6133.diff",
"html_url": "https://github.com/psf/requests/pull/6133",
"merged_at": "2022-05-13T16:36:14Z",
"patch_url": "https://github.com/psf/requests/pull/6133.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6133"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/6132 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6132/labels{/name} | https://api.github.com/repos/psf/requests/issues/6132/comments | https://api.github.com/repos/psf/requests/issues/6132/events | https://github.com/psf/requests/issues/6132 | 1,233,837,215 | I_kwDOABTKOs5Jityf | 6,132 | How to handle this issue ? - [Errno 110] Connection timed out') - Max retries exceeded with url - HTTPSConnectionPool(host=..., port=443 | {
"avatar_url": "https://avatars.githubusercontent.com/u/62699983?v=4",
"events_url": "https://api.github.com/users/juandavidbriceno/events{/privacy}",
"followers_url": "https://api.github.com/users/juandavidbriceno/followers",
"following_url": "https://api.github.com/users/juandavidbriceno/following{/other_user}",
"gists_url": "https://api.github.com/users/juandavidbriceno/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/juandavidbriceno",
"id": 62699983,
"login": "juandavidbriceno",
"node_id": "MDQ6VXNlcjYyNjk5OTgz",
"organizations_url": "https://api.github.com/users/juandavidbriceno/orgs",
"received_events_url": "https://api.github.com/users/juandavidbriceno/received_events",
"repos_url": "https://api.github.com/users/juandavidbriceno/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/juandavidbriceno/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/juandavidbriceno/subscriptions",
"type": "User",
"url": "https://api.github.com/users/juandavidbriceno",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2022-05-12T11:22:50Z | 2023-05-13T00:02:53Z | 2022-05-12T15:26:05Z | NONE | resolved | Good evening,
After having searched in stackoverflow for answers to my question, I was not able to find any solution. Currently I'm trying to use the request package to retrieve environmental data from a gobernment site by using url get requests. When I do the request through postman it works, but surprisingly with my python (jupyter notebook) scripts it does not.
It was working perfectly before but after starting using sessions ( s = requests.Session()) then it began to produce problems.
This is the code:
s = requests.Session()
my_uri = '.....'
r_metadata= s.get(my_uri, headers={'Authorization': 'ApiToken ..............'})
print(r_metadata.status_code)
---------------------------------------------------------------------------------------------------------
This is the error encounter:
HTTPSConnectionPool(host='.....', port=443): Max retries exceeded with url: ....... (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ff8256a0310>: Failed to establish a new connection: [Errno 110] Connection timed out')
------------------------------------------------------------------------------------
What I think is that these persistent session from requests are still alive, and for that reason the third party server from which I'm trying to get the data, dont allow me to enter anymore and take the information(Max retries exceeded with url:).
Would you mind giving me a suggestion or solution?.
Cordially,
Juan David Briceno Guerrero | {
"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/6132/reactions"
} | https://api.github.com/repos/psf/requests/issues/6132/timeline | null | completed | null | null | false | [
"Hi @juandavidbriceno, what you're observing is likely intentional behavior from the website to prevent web scraping. Requests often ends up on fingerprinting lists which CDNs or websites can use to prevent programmatic access. The service is refusing to respond within the default connection timeout, which implies ... |
https://api.github.com/repos/psf/requests/issues/6131 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6131/labels{/name} | https://api.github.com/repos/psf/requests/issues/6131/comments | https://api.github.com/repos/psf/requests/issues/6131/events | https://github.com/psf/requests/issues/6131 | 1,232,797,065 | I_kwDOABTKOs5Jev2J | 6,131 | Incorrectly strips trailing dot from absolute hostnames, causing TooManyRedirects | {
"avatar_url": "https://avatars.githubusercontent.com/u/7227064?v=4",
"events_url": "https://api.github.com/users/ccazabon/events{/privacy}",
"followers_url": "https://api.github.com/users/ccazabon/followers",
"following_url": "https://api.github.com/users/ccazabon/following{/other_user}",
"gists_url": "https://api.github.com/users/ccazabon/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ccazabon",
"id": 7227064,
"login": "ccazabon",
"node_id": "MDQ6VXNlcjcyMjcwNjQ=",
"organizations_url": "https://api.github.com/users/ccazabon/orgs",
"received_events_url": "https://api.github.com/users/ccazabon/received_events",
"repos_url": "https://api.github.com/users/ccazabon/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ccazabon/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ccazabon/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ccazabon",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 1 | 2022-05-11T15:01:22Z | 2022-06-16T21:38:11Z | null | NONE | null | requests appears to be incorrectly stripping the trailing dot on absolute hostnames (i.e. explicitly marked as in the root DNS namespace) in URLs when constructing the Host: request header, like `pyropus.ca.`. This causes redirect loops when the site chooses the absolute hostname as canonical and redirects requests without the trailing dot.
The example site redirects requests with a host header of `Host: pyropus.ca` to the same URL with the host name changed to the canonical absolute version:
```
HTTP/1.1 301 Moved Permanently
[...]
Location: https://pyropus.ca./
```
requests then strips the dot and resends the request, resulting in a redirect loop.
The trailing dot needs to be stripped from the SNI header for https requests (required by TLS/etc spec) but it should not be stripped from the Host: header value.
When fixing the SNI trailing dot issue, curl had this bug because they changed it to also affect the Host: header value, but they've fixed it by reverting that part of the change:
https://github.com/curl/curl/issues/8290
Many other common user agents that I've tested handle this properly:
* all GUI browers, to my knowledge, preserve the absolute domain name in the Host: header - I've tested Firefox, Chromium, Vivaldi, Konqueror, and Safari
* wget also preserves the absolute domain name on redirect URLs
* curl is now fixed and handles it
A few less common ones have the same buggy behaviour, or did -- I haven't re-checked:
* lynx, links, and elinks handle it like curl, erroring out on a redirect loop
## Expected Result
Successful 200 response with content.
## Actual Result
```python
Traceback (most recent call last):
File "<string>", line 1, in <module>
File ".../test/.venv/lib/python3.9/site-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File ".../test/.venv/lib/python3.9/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File ".../test/.venv/lib/python3.9/site-packages/requests/sessions.py", line 529, in request
resp = self.send(prep, **send_kwargs)
File ".../test/.venv/lib/python3.9/site-packages/requests/sessions.py", line 667, in send
history = [resp for resp in gen]
File ".../test/.venv/lib/python3.9/site-packages/requests/sessions.py", line 667, in <listcomp>
history = [resp for resp in gen]
File ".../test/.venv/lib/python3.9/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
requests.get("https://pyropus.ca./")
```
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "2.0.12"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.3"
},
"implementation": {
"name": "CPython",
"version": "3.9.2"
},
"platform": {
"release": "5.17.5",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.27.1"
},
"system_ssl": {
"version": "101010bf"
},
"urllib3": {
"version": "1.26.9"
},
"using_charset_normalizer": true,
"using_pyopenssl": false
}
```
Edit: added a couple words to the summary to clarify. | 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/6131/reactions"
} | https://api.github.com/repos/psf/requests/issues/6131/timeline | null | null | null | null | false | [
"```py\r\n @property\r\n def host(self):\r\n \"\"\"\r\n Getter method to remove any trailing dots that indicate the hostname is an FQDN.\r\n\r\n In general, SSL certificates don't include the trailing dot indicating a\r\n fully-qualified domain name, and thus, they don't validate p... |
https://api.github.com/repos/psf/requests/issues/6125 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6125/labels{/name} | https://api.github.com/repos/psf/requests/issues/6125/comments | https://api.github.com/repos/psf/requests/issues/6125/events | https://github.com/psf/requests/pull/6125 | 1,229,807,885 | PR_kwDOABTKOs43ge0- | 6,125 | Use proxy from string | {
"avatar_url": "https://avatars.githubusercontent.com/u/53352199?v=4",
"events_url": "https://api.github.com/users/el1s7/events{/privacy}",
"followers_url": "https://api.github.com/users/el1s7/followers",
"following_url": "https://api.github.com/users/el1s7/following{/other_user}",
"gists_url": "https://api.github.com/users/el1s7/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/el1s7",
"id": 53352199,
"login": "el1s7",
"node_id": "MDQ6VXNlcjUzMzUyMTk5",
"organizations_url": "https://api.github.com/users/el1s7/orgs",
"received_events_url": "https://api.github.com/users/el1s7/received_events",
"repos_url": "https://api.github.com/users/el1s7/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/el1s7/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/el1s7/subscriptions",
"type": "User",
"url": "https://api.github.com/users/el1s7",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2022-05-09T14:22:24Z | 2023-05-10T00:02:59Z | 2022-05-09T14:44:01Z | NONE | resolved | I find myself making a dict everytime I want to test some proxy, which is unnecessary. Simply create the proxies dict from the string, in case a string supplied. | {
"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/6125/reactions"
} | https://api.github.com/repos/psf/requests/issues/6125/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6125.diff",
"html_url": "https://github.com/psf/requests/pull/6125",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6125.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6125"
} | true | [
"Hi @el1s7, thanks for the PR. The dictionary is our established interface for proxies though, and we aren't making any modifications to the top-level APIs at this time. I think we'll have to pass on this PR."
] |
https://api.github.com/repos/psf/requests/issues/6124 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6124/labels{/name} | https://api.github.com/repos/psf/requests/issues/6124/comments | https://api.github.com/repos/psf/requests/issues/6124/events | https://github.com/psf/requests/issues/6124 | 1,228,827,967 | I_kwDOABTKOs5JPm0_ | 6,124 | Requests taking too long or stucking ( GNU-Linux ) | {
"avatar_url": "https://avatars.githubusercontent.com/u/17380530?v=4",
"events_url": "https://api.github.com/users/CarloCattano/events{/privacy}",
"followers_url": "https://api.github.com/users/CarloCattano/followers",
"following_url": "https://api.github.com/users/CarloCattano/following{/other_user}",
"gists_url": "https://api.github.com/users/CarloCattano/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/CarloCattano",
"id": 17380530,
"login": "CarloCattano",
"node_id": "MDQ6VXNlcjE3MzgwNTMw",
"organizations_url": "https://api.github.com/users/CarloCattano/orgs",
"received_events_url": "https://api.github.com/users/CarloCattano/received_events",
"repos_url": "https://api.github.com/users/CarloCattano/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/CarloCattano/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/CarloCattano/subscriptions",
"type": "User",
"url": "https://api.github.com/users/CarloCattano",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2022-05-08T08:36:26Z | 2023-05-09T00:03:36Z | 2022-05-08T17:15:26Z | NONE | resolved | requests are taking more than 1 minute to process if they succeed at all on 2 of my linux machines at home .
On windows a simple :
```
>>> import requests as r
>>> r.get("http://google.com")
```
takes miliseconds ,
on debian bullseye takes more than 1 minute for simple requests,
and sometimes they are "freezing"
Any hints on how to debug this welcome.
I just upgraded to latest and still the issue persist | {
"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/6124/reactions"
} | https://api.github.com/repos/psf/requests/issues/6124/timeline | null | completed | null | null | false | [
"This isn't debuggable without a packet capture or logs, can you provide those? You can use Wireshark to capture packets and look at the timings.",
"I added a small timeout and its fixed now. Thanks for the hint"
] |
https://api.github.com/repos/psf/requests/issues/6123 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6123/labels{/name} | https://api.github.com/repos/psf/requests/issues/6123/comments | https://api.github.com/repos/psf/requests/issues/6123/events | https://github.com/psf/requests/pull/6123 | 1,228,062,318 | PR_kwDOABTKOs43bOhw | 6,123 | Fix error caused by invalid charset in response headers | {
"avatar_url": "https://avatars.githubusercontent.com/u/50599779?v=4",
"events_url": "https://api.github.com/users/deosrc/events{/privacy}",
"followers_url": "https://api.github.com/users/deosrc/followers",
"following_url": "https://api.github.com/users/deosrc/following{/other_user}",
"gists_url": "https://api.github.com/users/deosrc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/deosrc",
"id": 50599779,
"login": "deosrc",
"node_id": "MDQ6VXNlcjUwNTk5Nzc5",
"organizations_url": "https://api.github.com/users/deosrc/orgs",
"received_events_url": "https://api.github.com/users/deosrc/received_events",
"repos_url": "https://api.github.com/users/deosrc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/deosrc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/deosrc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/deosrc",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 2 | 2022-05-06T16:22:35Z | 2022-05-09T09:14:37Z | null | NONE | null | Ran into an error where we were having an exception raised from the requests library: `'bool' object has no attribute 'strip'`
Seems the server was returning an empty charset value in the Content-Type response header of `application/json;charset`. This was causing the line below to default the value to a boolean `True`:
https://github.com/psf/requests/blob/2a6f290bc09324406708a4d404a88a45d848ddf9/requests/utils.py#L524-L529
This meant that attempting format the charset on the line below, the value was a boolean rather than a string:
https://github.com/psf/requests/blob/2a6f290bc09324406708a4d404a88a45d848ddf9/requests/utils.py#L545-L548
This change adds a type check so that the charset is ignored if a value is not provided. The unit test has been modified for coverage, along with expanding the other test scenarios slightly. | 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/6123/reactions"
} | https://api.github.com/repos/psf/requests/issues/6123/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6123.diff",
"html_url": "https://github.com/psf/requests/pull/6123",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6123.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6123"
} | true | [
"Thanks for the PR, @deosrc! You've chosen an interesting time to raise this. We're currently working on options for typing in Requests and this was a case where there actually appears to be a bug in the code. Note that the response the server is giving you is not a valid response though and should be fixed on thei... |
https://api.github.com/repos/psf/requests/issues/6122 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6122/labels{/name} | https://api.github.com/repos/psf/requests/issues/6122/comments | https://api.github.com/repos/psf/requests/issues/6122/events | https://github.com/psf/requests/pull/6122 | 1,226,490,072 | PR_kwDOABTKOs43WFID | 6,122 | Request with data which consists of empty values only sends bad request | {
"avatar_url": "https://avatars.githubusercontent.com/u/20498421?v=4",
"events_url": "https://api.github.com/users/romanyakovlev/events{/privacy}",
"followers_url": "https://api.github.com/users/romanyakovlev/followers",
"following_url": "https://api.github.com/users/romanyakovlev/following{/other_user}",
"gists_url": "https://api.github.com/users/romanyakovlev/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/romanyakovlev",
"id": 20498421,
"login": "romanyakovlev",
"node_id": "MDQ6VXNlcjIwNDk4NDIx",
"organizations_url": "https://api.github.com/users/romanyakovlev/orgs",
"received_events_url": "https://api.github.com/users/romanyakovlev/received_events",
"repos_url": "https://api.github.com/users/romanyakovlev/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/romanyakovlev/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/romanyakovlev/subscriptions",
"type": "User",
"url": "https://api.github.com/users/romanyakovlev",
"user_view_type": "public"
} | [
{
"color": "e10c02",
"default": false,
"description": null,
"id": 117744,
"name": "Bug",
"node_id": "MDU6TGFiZWwxMTc3NDQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Bug"
}
] | open | false | null | [] | null | 16 | 2022-05-05T10:28:39Z | 2023-06-24T16:24:36Z | null | NONE | null | Case - request with data which consists of empty values only
```python
get('http://localhost:80', data={'foo': None})
```
Response in nginx:
```
172.17.0.1 - - [05/May/2022:19:34:30 +0000] "GET / HTTP/1.1" 200 615 "-" "python-requests/2.27.1" "-"
172.17.0.1 - - [05/May/2022:19:34:30 +0000] "0" 400 157 "-" "-" "-"
```
So it sends second request with bad status code.
Here https://github.com/psf/requests/blob/main/requests/models.py#L576 `length` will be `0` so there is no `Content-Length: 0` header in request.
The problem occurs there https://github.com/psf/requests/blob/main/requests/adapters.py#L471 .
Because `request.body` is `''` and 'Content-Length' not in `request.headers` it counts as `chunk=True`.
Because of that it acts like it has `Transfer-Encoding: chunked` header, and here https://github.com/psf/requests/blob/main/requests/adapters.py#L523-L528 it does not send nothing but `low_conn.send(b'0\r\n\r\n')`.
I guess thats why It has bad request like this:
```
apache_1 | 172.21.0.1 - - [05/May/2022:23:05:44 +0000] "0" 400 226
```
The same behavior is happening on POST request.
```python
post('http://localhost:80', data={'foo': None})
```
gives:
```
apache_1 | 172.21.0.1 - - [05/May/2022:23:05:44 +0000] "POST / HTTP/1.1" 200 45
apache_1 | 172.21.0.1 - - [05/May/2022:23:05:44 +0000] "0" 400 226
```
The raw request will be something like this:
```python
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("localhost", 80))
s.send(
b'GET / HTTP/1.1\r\n'
b'Host: localhost:80\r\n'
b'User-Agent: python-requests/2.27.1\r\n'
b'Accept-Encoding: gzip, deflate, br\r\n'
b'Accept: */*\r\n'
b'Connection: keep-alive\r\n'
b'\r\n'
b'0\r\n\r\n' # this thing is added here https://github.com/psf/requests/blob/main/requests/adapters.py#L528
)
response = s.recv(4096)
print(response)
```
so `0\r\n\r\n` is the reason of
`apache_1 | 172.21.0.1 - - [05/May/2022:23:05:44 +0000] "0" 400 226`
This PR fixes the problem. Tests for this case are created.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/20498421?v=4",
"events_url": "https://api.github.com/users/romanyakovlev/events{/privacy}",
"followers_url": "https://api.github.com/users/romanyakovlev/followers",
"following_url": "https://api.github.com/users/romanyakovlev/following{/other_user}",
"gists_url": "https://api.github.com/users/romanyakovlev/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/romanyakovlev",
"id": 20498421,
"login": "romanyakovlev",
"node_id": "MDQ6VXNlcjIwNDk4NDIx",
"organizations_url": "https://api.github.com/users/romanyakovlev/orgs",
"received_events_url": "https://api.github.com/users/romanyakovlev/received_events",
"repos_url": "https://api.github.com/users/romanyakovlev/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/romanyakovlev/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/romanyakovlev/subscriptions",
"type": "User",
"url": "https://api.github.com/users/romanyakovlev",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6122/reactions"
} | https://api.github.com/repos/psf/requests/issues/6122/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6122.diff",
"html_url": "https://github.com/psf/requests/pull/6122",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6122.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6122"
} | true | [
"Hi @romanyakovlev, can you provide some more information about why you believe this needs to be changed? The original input data _is_ `application/x-www-form-urlencoded`, it just happens that the serialized version is an empty string in this case.\r\n\r\nI don't believe there's any specification implying you shoul... |
https://api.github.com/repos/psf/requests/issues/6121 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6121/labels{/name} | https://api.github.com/repos/psf/requests/issues/6121/comments | https://api.github.com/repos/psf/requests/issues/6121/events | https://github.com/psf/requests/pull/6121 | 1,224,967,907 | PR_kwDOABTKOs43RSRs | 6,121 | Add and use new exception when redirect url is invalid | {
"avatar_url": "https://avatars.githubusercontent.com/u/38295919?v=4",
"events_url": "https://api.github.com/users/setla/events{/privacy}",
"followers_url": "https://api.github.com/users/setla/followers",
"following_url": "https://api.github.com/users/setla/following{/other_user}",
"gists_url": "https://api.github.com/users/setla/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/setla",
"id": 38295919,
"login": "setla",
"node_id": "MDQ6VXNlcjM4Mjk1OTE5",
"organizations_url": "https://api.github.com/users/setla/orgs",
"received_events_url": "https://api.github.com/users/setla/received_events",
"repos_url": "https://api.github.com/users/setla/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/setla/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/setla/subscriptions",
"type": "User",
"url": "https://api.github.com/users/setla",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2022-05-04T06:23:48Z | 2024-07-30T00:03:46Z | 2023-07-30T01:58:42Z | NONE | resolved | Feature described in issue https://github.com/psf/requests/issues/6120
new `InvalidRedirectURL` inherits `InvalidURL, InvalidSchema, LocationParseError` for backward compatibility | {
"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/6121/reactions"
} | https://api.github.com/repos/psf/requests/issues/6121/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6121.diff",
"html_url": "https://github.com/psf/requests/pull/6121",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6121.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6121"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/6120 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6120/labels{/name} | https://api.github.com/repos/psf/requests/issues/6120/comments | https://api.github.com/repos/psf/requests/issues/6120/events | https://github.com/psf/requests/issues/6120 | 1,224,967,057 | I_kwDOABTKOs5JA4OR | 6,120 | New exception when redirect url is invalid | {
"avatar_url": "https://avatars.githubusercontent.com/u/38295919?v=4",
"events_url": "https://api.github.com/users/setla/events{/privacy}",
"followers_url": "https://api.github.com/users/setla/followers",
"following_url": "https://api.github.com/users/setla/following{/other_user}",
"gists_url": "https://api.github.com/users/setla/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/setla",
"id": 38295919,
"login": "setla",
"node_id": "MDQ6VXNlcjM4Mjk1OTE5",
"organizations_url": "https://api.github.com/users/setla/orgs",
"received_events_url": "https://api.github.com/users/setla/received_events",
"repos_url": "https://api.github.com/users/setla/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/setla/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/setla/subscriptions",
"type": "User",
"url": "https://api.github.com/users/setla",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 0 | 2022-05-04T06:22:32Z | 2022-05-04T06:22:32Z | null | NONE | null | Currently when redirect response with invalid redirect URL is returned, we receive the same error (`InvalidURL, InvalidSchema, LocationParseError`) as when passing wrong URL that is used for first request in chain. It would be good to have those cases separated (e.g. to try fix it in custom way) | 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/6120/reactions"
} | https://api.github.com/repos/psf/requests/issues/6120/timeline | null | null | null | null | false | [] |
https://api.github.com/repos/psf/requests/issues/6119 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6119/labels{/name} | https://api.github.com/repos/psf/requests/issues/6119/comments | https://api.github.com/repos/psf/requests/issues/6119/events | https://github.com/psf/requests/pull/6119 | 1,223,720,741 | PR_kwDOABTKOs43NWbG | 6,119 | Avoid mutation of proxies input argument | {
"avatar_url": "https://avatars.githubusercontent.com/u/1335341?v=4",
"events_url": "https://api.github.com/users/milanboers/events{/privacy}",
"followers_url": "https://api.github.com/users/milanboers/followers",
"following_url": "https://api.github.com/users/milanboers/following{/other_user}",
"gists_url": "https://api.github.com/users/milanboers/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/milanboers",
"id": 1335341,
"login": "milanboers",
"node_id": "MDQ6VXNlcjEzMzUzNDE=",
"organizations_url": "https://api.github.com/users/milanboers/orgs",
"received_events_url": "https://api.github.com/users/milanboers/received_events",
"repos_url": "https://api.github.com/users/milanboers/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/milanboers/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/milanboers/subscriptions",
"type": "User",
"url": "https://api.github.com/users/milanboers",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2022-05-03T05:57:40Z | 2023-05-04T00:03:14Z | 2022-05-03T15:05:37Z | NONE | resolved | Resolves #6118
Makes sure that the input argument to `proxies` is not mutated. | {
"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/6119/reactions"
} | https://api.github.com/repos/psf/requests/issues/6119/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6119.diff",
"html_url": "https://github.com/psf/requests/pull/6119",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/6119.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6119"
} | true | [
"I've responded in the original issue (https://github.com/psf/requests/issues/6118#issuecomment-1116207174) with reasoning, but we don't intend to accept this at this time."
] |
https://api.github.com/repos/psf/requests/issues/6118 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6118/labels{/name} | https://api.github.com/repos/psf/requests/issues/6118/comments | https://api.github.com/repos/psf/requests/issues/6118/events | https://github.com/psf/requests/issues/6118 | 1,223,719,666 | I_kwDOABTKOs5I8Hry | 6,118 | `proxies` input argument is mutated | {
"avatar_url": "https://avatars.githubusercontent.com/u/1335341?v=4",
"events_url": "https://api.github.com/users/milanboers/events{/privacy}",
"followers_url": "https://api.github.com/users/milanboers/followers",
"following_url": "https://api.github.com/users/milanboers/following{/other_user}",
"gists_url": "https://api.github.com/users/milanboers/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/milanboers",
"id": 1335341,
"login": "milanboers",
"node_id": "MDQ6VXNlcjEzMzUzNDE=",
"organizations_url": "https://api.github.com/users/milanboers/orgs",
"received_events_url": "https://api.github.com/users/milanboers/received_events",
"repos_url": "https://api.github.com/users/milanboers/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/milanboers/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/milanboers/subscriptions",
"type": "User",
"url": "https://api.github.com/users/milanboers",
"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 | 2022-05-03T05:54:56Z | 2023-03-09T05:57:50Z | null | NONE | null | The input argument to `proxies` is mutated when environment proxy variables are present. See the reproduction steps.
This may be different than what users are expecting. It can lead to unexpected behavior when re-using the argument that was passed.
## Expected Result
No mutation of the input argument:
```
>>> proxies = {'dummy': 'dummy'}
>>> os.environ['http_proxy'] = 'http://dummy'
>>> requests.get('https://python.org',proxies=proxies)
<Response [200]>
>>> proxies
{'dummy': 'dummy'}
```
## Actual Result / Reproduction steps
```
>>> proxies = {'dummy': 'dummy'}
>>> os.environ['http_proxy'] = 'http://dummy'
>>> requests.get('https://python.org',proxies=proxies)
<Response [200]>
>>> proxies
{'dummy': 'dummy', 'http': 'http://dummy'}
```
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "2.0.12"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.3"
},
"implementation": {
"name": "CPython",
"version": "3.10.4"
},
"platform": {
"release": "5.10.102.1-microsoft-standard-WSL2",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.27.1"
},
"system_ssl": {
"version": "30000020"
},
"urllib3": {
"version": "1.26.9"
},
"using_charset_normalizer": true,
"using_pyopenssl": false
}
```
<!-- This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). -->
| {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6118/reactions"
} | https://api.github.com/repos/psf/requests/issues/6118/timeline | null | null | null | null | false | [
"Hi @milanboers, the behavior you're seeing is documented and standard across other HTTP tools, so I'm not sure it's broadly unexpected. We can't remove this behavior since a significant portion of users rely on it. If you don't want this functionality, you can set `trust_env` to False to disable this as documented... |
https://api.github.com/repos/psf/requests/issues/6117 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6117/labels{/name} | https://api.github.com/repos/psf/requests/issues/6117/comments | https://api.github.com/repos/psf/requests/issues/6117/events | https://github.com/psf/requests/issues/6117 | 1,221,683,176 | I_kwDOABTKOs5I0Wfo | 6,117 | Cookies are not persisted to the passed CookieJar | {
"avatar_url": "https://avatars.githubusercontent.com/u/5687998?v=4",
"events_url": "https://api.github.com/users/verhovsky/events{/privacy}",
"followers_url": "https://api.github.com/users/verhovsky/followers",
"following_url": "https://api.github.com/users/verhovsky/following{/other_user}",
"gists_url": "https://api.github.com/users/verhovsky/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/verhovsky",
"id": 5687998,
"login": "verhovsky",
"node_id": "MDQ6VXNlcjU2ODc5OTg=",
"organizations_url": "https://api.github.com/users/verhovsky/orgs",
"received_events_url": "https://api.github.com/users/verhovsky/received_events",
"repos_url": "https://api.github.com/users/verhovsky/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/verhovsky/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/verhovsky/subscriptions",
"type": "User",
"url": "https://api.github.com/users/verhovsky",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2022-04-30T01:14:22Z | 2023-05-01T00:03:15Z | 2022-04-30T16:20:10Z | CONTRIBUTOR | resolved | ## Expected Result
When passing a CookieJar object to requests, I (and [other people on Stack Overflow](https://stackoverflow.com/a/6930182)) expected any cookies sent by the server to appear in the CookieJar object.
## Actual Result
The server sends cookies, I can see them with `resp.cookies` but the CookieJar stays the same.
## Reproduction Steps
```python
import requests
from http.cookiejar import CookieJar, Cookie
jar = CookieJar()
resp = requests.get('https://www.google.com', cookies=jar)
print(resp.cookies)
print(jar) # stays empty
```
I also tried passing in a CookieJar with at least one Cookie
```python
some_cookie = Cookie(None, 'asdf', None, '80', '80', 'www.foo.bar', None, None, '/', None, False, False, 'TestCookie', None, None, None)
jar.set_cookie(some_cookie)
print(len(jar)) # 1
resp = requests.get('https://www.google.com', cookies=jar)
print(len(jar)) # still 1
```
I also tried passing a `RequestsCookieJar`, with the same effect.
## Did this work before?
Yes, after spinning up Debian 9 on Vultr and then running
```sh
sudo apt install python3-pip python-pip
```
using these commands
```sh
python2 -m pip uninstall -y requests
python2 -m pip install requests==0.14.2
python2 -c "import requests; from cookielib import CookieJar; jar = CookieJar(); resp = requests.get('https://www.google.com', cookies=jar); print(len(jar))"
```
I have confirmed that this worked how I expect on Python 2 + Requests 0.6.0, 0.7.0 and 0.14.2 but stoped working in 1.0.0. I couldn't get those old versions of Requests to install on the Python 3.5 that comes with Debian 9.
## Why this happens
I think before, the Session's cookies were copied into the passed CookieJar object
https://github.com/psf/requests/blob/63243b1e3b435c7736acf1e51c0f6fa6666d861d/requests/sessions.py#L184
https://github.com/psf/requests/blob/63243b1e3b435c7736acf1e51c0f6fa6666d861d/requests/sessions.py#L208-L210
whereas now
https://github.com/psf/requests/blob/2a6f290bc09324406708a4d404a88a45d848ddf9/requests/sessions.py#L474-L476
a new `RequestsCookieJar` object is created from the `CookieJar` instead of it being used directly. | {
"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/6117/reactions"
} | https://api.github.com/repos/psf/requests/issues/6117/timeline | null | completed | null | null | false | [
"I can't reproduce this\r\n\r\n```\r\n❯ python\r\nPython 3.10.4 (main, Mar 25 2022, 00:00:00) [GCC 11.2.1 20220127 (Red Hat 11.2.1-9)] on linux\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import requests\r\n>>> from http.cookiejar import CookieJar, Cookie\r\n>>>\r\n>>> j... |
https://api.github.com/repos/psf/requests/issues/6116 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6116/labels{/name} | https://api.github.com/repos/psf/requests/issues/6116/comments | https://api.github.com/repos/psf/requests/issues/6116/events | https://github.com/psf/requests/pull/6116 | 1,221,553,985 | PR_kwDOABTKOs43GfhA | 6,116 | Add .git-blame-ignore-revs | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2022-04-29T21:21:44Z | 2023-04-30T00:03:01Z | 2022-04-29T21:39:22Z | MEMBER | resolved | Follow up to #6095 to add a .git-blame-ignore-revs file. This allows us to strip large cosmetic commits from the git blame history to help keep the information relevant to actual logic changes. | {
"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/6116/reactions"
} | https://api.github.com/repos/psf/requests/issues/6116/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/6116.diff",
"html_url": "https://github.com/psf/requests/pull/6116",
"merged_at": "2022-04-29T21:39:22Z",
"patch_url": "https://github.com/psf/requests/pull/6116.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/6116"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/6115 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6115/labels{/name} | https://api.github.com/repos/psf/requests/issues/6115/comments | https://api.github.com/repos/psf/requests/issues/6115/events | https://github.com/psf/requests/issues/6115 | 1,220,894,214 | I_kwDOABTKOs5IxV4G | 6,115 | Still cannot prevent requests library from encoding | {
"avatar_url": "https://avatars.githubusercontent.com/u/4678285?v=4",
"events_url": "https://api.github.com/users/LudiusMaximus/events{/privacy}",
"followers_url": "https://api.github.com/users/LudiusMaximus/followers",
"following_url": "https://api.github.com/users/LudiusMaximus/following{/other_user}",
"gists_url": "https://api.github.com/users/LudiusMaximus/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/LudiusMaximus",
"id": 4678285,
"login": "LudiusMaximus",
"node_id": "MDQ6VXNlcjQ2NzgyODU=",
"organizations_url": "https://api.github.com/users/LudiusMaximus/orgs",
"received_events_url": "https://api.github.com/users/LudiusMaximus/received_events",
"repos_url": "https://api.github.com/users/LudiusMaximus/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/LudiusMaximus/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/LudiusMaximus/subscriptions",
"type": "User",
"url": "https://api.github.com/users/LudiusMaximus",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 11 | 2022-04-29T13:58:44Z | 2024-01-27T10:03:48Z | null | NONE | null | I have the same problem as https://github.com/psf/requests/issues/5964, but the solution does not work for me.
I need to send unescaped URL requestes to a server. The purpose is to evoke response code 400 to test the firewall configuration.
## Expected Result
The following code should (according to https://github.com/psf/requests/issues/5964) send the unescaped URL:
```
import requests
s = requests.Session()
# Using Burp Suite Proxy to examine request being sent.
s.proxies = {
"http" : "http://127.0.0.1:8080",
"https" : "http://127.0.0.1:8080",
}
# Do not verify certificate.
s.verify = False
# Solution from https://github.com/psf/requests/issues/5964
base_url = 'https://www.example.com/search'
query = '?date_range=2017-01-01|2017-03-01'
req = requests.Request('GET', base_url)
p = req.prepare()
p.url += query
resp = s.send(p)
print(resp.request.url)
```
## Actual Result
The `print(resp.request.url)` prints `https://www.example.com/search?date_range=2017-01-01|2017-03-01` as expected.
But what is really transmitted is the escaped URL, `https://www.example.com/search?date_range=2017-01-01%7C2017-03-01` as seen in this Burp Suite screenshot:

## Reproduction Steps
Use the python code above and a way of choice to capture the actual response being sent (e.g. Burp Suite proxy).
You can also use curl to send an actually unescaped response:
`curl "https://www.example.com/search?date_range=2017-01-01|2017-03-01" -x 127.0.0.1:8080 --insecure`

## System Information
$ python -m requests.help
```json
{
{
"chardet": {
"version": "3.0.4"
},
"charset_normalizer": {
"version": "2.0.12"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.8.10"
},
"platform": {
"release": "5.14.0-1034-oem",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.27.1"
},
"system_ssl": {
"version": "1010106f"
},
"urllib3": {
"version": "1.25.8"
},
"using_charset_normalizer": false,
"using_pyopenssl": false
}
```
| null | {
"+1": 1,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/6115/reactions"
} | https://api.github.com/repos/psf/requests/issues/6115/timeline | null | null | null | null | false | [
"Hmm, so this appears to actually be a breakage introduced by this PR in urllib3 1.26.0. Requests is still forwarding the unencoded URL but [urllib3 now unilaterally enforces encoding](https://github.com/urllib3/urllib3/commit/691679f738ae098ce024aeae90cfdd8013b8e1e7#diff-2d5453550bf56a4666a88e9262248cea2f8ef233869... |
https://api.github.com/repos/psf/requests/issues/6114 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6114/labels{/name} | https://api.github.com/repos/psf/requests/issues/6114/comments | https://api.github.com/repos/psf/requests/issues/6114/events | https://github.com/psf/requests/issues/6114 | 1,220,587,026 | I_kwDOABTKOs5IwK4S | 6,114 | How to implement oauth token on requests library? | {
"avatar_url": "https://avatars.githubusercontent.com/u/5903577?v=4",
"events_url": "https://api.github.com/users/NSH531/events{/privacy}",
"followers_url": "https://api.github.com/users/NSH531/followers",
"following_url": "https://api.github.com/users/NSH531/following{/other_user}",
"gists_url": "https://api.github.com/users/NSH531/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/NSH531",
"id": 5903577,
"login": "NSH531",
"node_id": "MDQ6VXNlcjU5MDM1Nzc=",
"organizations_url": "https://api.github.com/users/NSH531/orgs",
"received_events_url": "https://api.github.com/users/NSH531/received_events",
"repos_url": "https://api.github.com/users/NSH531/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/NSH531/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/NSH531/subscriptions",
"type": "User",
"url": "https://api.github.com/users/NSH531",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2022-04-29T11:30:43Z | 2022-04-29T17:08:06Z | 2022-04-29T14:19:51Z | NONE | null | Thanks
netanel.cyber@gmail.com | {
"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/6114/reactions"
} | https://api.github.com/repos/psf/requests/issues/6114/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'm sorry but the [stackoverflow's](http://Stackov... |
https://api.github.com/repos/psf/requests/issues/6113 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6113/labels{/name} | https://api.github.com/repos/psf/requests/issues/6113/comments | https://api.github.com/repos/psf/requests/issues/6113/events | https://github.com/psf/requests/issues/6113 | 1,218,374,934 | I_kwDOABTKOs5Inu0W | 6,113 | Git.io deprecation notice | {
"avatar_url": "https://avatars.githubusercontent.com/u/99484857?v=4",
"events_url": "https://api.github.com/users/npmmirror/events{/privacy}",
"followers_url": "https://api.github.com/users/npmmirror/followers",
"following_url": "https://api.github.com/users/npmmirror/following{/other_user}",
"gists_url": "https://api.github.com/users/npmmirror/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/npmmirror",
"id": 99484857,
"login": "npmmirror",
"node_id": "U_kgDOBe4EuQ",
"organizations_url": "https://api.github.com/users/npmmirror/orgs",
"received_events_url": "https://api.github.com/users/npmmirror/received_events",
"repos_url": "https://api.github.com/users/npmmirror/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/npmmirror/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/npmmirror/subscriptions",
"type": "User",
"url": "https://api.github.com/users/npmmirror",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2022-04-28T08:21:40Z | 2023-04-29T00:02:48Z | 2022-04-28T14:28:14Z | NONE | resolved |
Hello, I've found that some of your files in this repo is still using https://git.io/, and this service will be discontinued in the future. (ref: [Git.io deprecation](https://github.blog/changelog/2022-04-25-git-io-deprecation/))
Theses files are: .github/workflows/codeql-analysis.yml
> This is an automated message from NPMMirror(https://github.com/npmmirror), a bot developed by Nova Kwok(https://github.com/n0vad3v).
| {
"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/6113/reactions"
} | https://api.github.com/repos/psf/requests/issues/6113/timeline | null | completed | null | null | false | [
"For reference the line being flagged is a comment from the original source of this action, it's not used in the code itself.\n\nGiven there's no impact on our infrastructure, I'm going to leave the comment in place as it appears the resource will remain available as read-only."
] |
https://api.github.com/repos/psf/requests/issues/6112 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6112/labels{/name} | https://api.github.com/repos/psf/requests/issues/6112/comments | https://api.github.com/repos/psf/requests/issues/6112/events | https://github.com/psf/requests/issues/6112 | 1,216,310,196 | I_kwDOABTKOs5If2u0 | 6,112 | What is the correct way to pass the proxy username and proxy password ? | {
"avatar_url": "https://avatars.githubusercontent.com/u/33820064?v=4",
"events_url": "https://api.github.com/users/pghole/events{/privacy}",
"followers_url": "https://api.github.com/users/pghole/followers",
"following_url": "https://api.github.com/users/pghole/following{/other_user}",
"gists_url": "https://api.github.com/users/pghole/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pghole",
"id": 33820064,
"login": "pghole",
"node_id": "MDQ6VXNlcjMzODIwMDY0",
"organizations_url": "https://api.github.com/users/pghole/orgs",
"received_events_url": "https://api.github.com/users/pghole/received_events",
"repos_url": "https://api.github.com/users/pghole/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pghole/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pghole/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pghole",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2022-04-26T18:12:02Z | 2023-04-28T00:03:31Z | 2022-04-26T18:31:01Z | NONE | resolved | Hey,
After reading and trying out many things, I am confused how the proxy username and password is passed in the follows -
proxy = {'https' : 'http://{username}:{password}@host:port',
'http': 'http://{username}:{password}@host:port' }
requests.get(url, proxies=proxy)
1. Do I have to use quote() from urllib.parse to encode the username and password before making the proxy dict ?
2. My username , password having "@" sign works fine without encoding, Still do I have to encode for any other chars ?
Version
requests = 2.20.0
urllib3 = 1.24.2
| {
"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/6112/reactions"
} | https://api.github.com/repos/psf/requests/issues/6112/timeline | null | completed | null | null | false | [
"Hi @pghole,\r\n\r\nIt's not clear from the post if you're encountering an issue or asking for general information about URL syntax. You can find the relevant information on URL syntax in the [RFC](https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.1). Requests will simply proxy along whatever characters you... |
https://api.github.com/repos/psf/requests/issues/6111 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6111/labels{/name} | https://api.github.com/repos/psf/requests/issues/6111/comments | https://api.github.com/repos/psf/requests/issues/6111/events | https://github.com/psf/requests/issues/6111 | 1,214,768,448 | I_kwDOABTKOs5IZ-VA | 6,111 | Requests retry status_forcelist is worked when 404 is occured, but shows no "retrying" logs | {
"avatar_url": "https://avatars.githubusercontent.com/u/88309796?v=4",
"events_url": "https://api.github.com/users/muhammad-asn/events{/privacy}",
"followers_url": "https://api.github.com/users/muhammad-asn/followers",
"following_url": "https://api.github.com/users/muhammad-asn/following{/other_user}",
"gists_url": "https://api.github.com/users/muhammad-asn/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/muhammad-asn",
"id": 88309796,
"login": "muhammad-asn",
"node_id": "MDQ6VXNlcjg4MzA5Nzk2",
"organizations_url": "https://api.github.com/users/muhammad-asn/orgs",
"received_events_url": "https://api.github.com/users/muhammad-asn/received_events",
"repos_url": "https://api.github.com/users/muhammad-asn/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/muhammad-asn/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/muhammad-asn/subscriptions",
"type": "User",
"url": "https://api.github.com/users/muhammad-asn",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2022-04-25T16:37:04Z | 2023-04-26T00:03:03Z | 2022-04-25T16:44:23Z | NONE | resolved | Hello everyone I want to ask, I have 2 webserver called it `172.10.10.1:8080` and `172.10.10.2:8080` that serve a static object like (image, gif, video).
But sometimes it occurs `404` from the server side, here's the example using `curl`
Try number 1
```
curl -I http://172.10.10.1:8080/image_1.jpg
HTTP/1.1 404 Not Found
Server: nginx/1.16.1
Date: Mon, 25 Apr 2022 16:28:27 GMT
Content-Length: 25
Connection: keep-alive
```
Try number 2
```
curl -I http://172.10.10.1:8080/image_1.jpg
HTTP/1.1 404 Not Found
Server: nginx/1.16.1
Date: Mon, 25 Apr 2022 16:28:27 GMT
Content-Length: 25
Connection: keep-alive
```
Try number 3
```
curl -I http://172.10.10.1:8080/image_1.jpg
HTTP/1.1 200 OK
Server: nginx/1.16.1
Date: Mon, 25 Apr 2022 16:29:24 GMT
Content-Length: 125330
Connection: keep-alive
Last-Modified: Fri, 15 Nov 2013 22:17:36 GMT
Accept-Ranges: bytes
```
To handle the issue I have to use the `retry` mechanism, here's the code example
```
def retry_session(retries=5, backoff_factor=0.3, session=None, status_forcelist=[404, 500, 502, 503, 504]):
'''
Retry mechanism
- {backoff factor} * (2 ** ({number of total retries} - 1))
'''
session = session or requests.Session()
retries = Retry(
total=retries,
backoff_factor=backoff_factor,
allowed_methods=["HEAD", "GET"],
status_forcelist=status_forcelist
)
session.mount('http://', HTTPAdapter(max_retries=retries))
return session
```
And here's my question
**Why if I remove the `404` from the status_forcelist sometimes it shows except requests.exceptions.HTTPError, but if I add it on status_forcelist it shows no retrying logs and the requests is success?**
Thank you. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6111/reactions"
} | https://api.github.com/repos/psf/requests/issues/6111/timeline | null | completed | null | null | false | [
"Hi @muhammad-asn, this appears to be a request for assistance. The Retry object is handled by urllib3 and you can find the documentation [here](https://urllib3.readthedocs.io/en/1.26.9/reference/urllib3.util.html). Requests will throw an HTTPError if the final output from the response has an issue. That would mean... |
https://api.github.com/repos/psf/requests/issues/6110 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6110/labels{/name} | https://api.github.com/repos/psf/requests/issues/6110/comments | https://api.github.com/repos/psf/requests/issues/6110/events | https://github.com/psf/requests/issues/6110 | 1,209,453,328 | I_kwDOABTKOs5IFssQ | 6,110 | Cookies that include a port flag set to 443 aren't stored if they came from an https location without the 443 port in the URI | {
"avatar_url": "https://avatars.githubusercontent.com/u/2392229?v=4",
"events_url": "https://api.github.com/users/fjcuadrado/events{/privacy}",
"followers_url": "https://api.github.com/users/fjcuadrado/followers",
"following_url": "https://api.github.com/users/fjcuadrado/following{/other_user}",
"gists_url": "https://api.github.com/users/fjcuadrado/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/fjcuadrado",
"id": 2392229,
"login": "fjcuadrado",
"node_id": "MDQ6VXNlcjIzOTIyMjk=",
"organizations_url": "https://api.github.com/users/fjcuadrado/orgs",
"received_events_url": "https://api.github.com/users/fjcuadrado/received_events",
"repos_url": "https://api.github.com/users/fjcuadrado/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/fjcuadrado/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fjcuadrado/subscriptions",
"type": "User",
"url": "https://api.github.com/users/fjcuadrado",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 4 | 2022-04-20T09:56:08Z | 2022-05-01T12:47:35Z | null | NONE | null | When performing a request to an https location that doesn't include a port explicitly (for example: `https://localhost`) and that location returns a cookie that includes a `port` flag set to `443`, that cookie isn't stored into the cookie jar. However, this kind of cookie is stored into the cookie jar, when the port is set explicitly in the https location (for example: `https://localhost:443`).
## Expected Result
A cookie that includes a `port` flag set to `443` should be stored into the cookie jar when the request is performed to an https location that doesn't include a port.
## Reproduction Steps
I hope you don't mind that I've moved the Actual Result below this section. I did it because I've written a test-suite to reproduce the issue and the result of running that test-suite has been pasted in the Actual Result section.
```python
import http
import pytest
import requests
from io import BytesIO
from urllib3.response import HTTPHeaderDict, HTTPResponse
class OriginalResponseShim:
def __init__(self, headers):
self.msg = headers
def isclosed(self):
return True
def close(self):
return
def make_http_response(
method,
url,
status=requests.codes.ok,
headers=None
):
http_headers = HTTPHeaderDict()
if headers is not None:
http_headers.extend(headers)
def _make_http_response(adapter, request, *args, **kwargs):
http_response = HTTPResponse(
status=status,
reason=http.client.responses.get(status, None),
body=BytesIO(b''),
headers=http_headers,
original_response=OriginalResponseShim(http_headers),
preload_content=False,
)
return adapter.build_response(request, http_response)
return _make_http_response
class TestCookies:
@pytest.mark.parametrize('url', [
'http://localhost',
'http://localhost:80',
'http://localhost:8080',
'https://localhost',
'https://localhost:443',
'https://localhost:8080',
])
def test_cookie_without_port(self, mocker, url):
mocker.patch(
'requests.adapters.HTTPAdapter.send',
new=make_http_response(
'GET',
url,
headers={
'set-cookie': 'cookie=value',
},
)
)
session = requests.Session()
resp = session.request('GET', url)
assert resp.status_code == requests.codes.ok
assert 'set-cookie' in resp.headers
assert 'cookie' in session.cookies
cookie = next(iter(session.cookies))
assert cookie.name == 'cookie'
assert cookie.value == 'value'
assert cookie.port is None
@pytest.mark.parametrize('url, port', [
('http://localhost', 80),
('http://localhost:80', 80),
('http://localhost:443', 443),
('http://localhost:8080', 8080),
('https://localhost', 443),
('https://localhost:80', 80),
('https://localhost:443', 443),
('https://localhost:8080', 8080),
])
def test_cookie_with_port(self, mocker, url, port):
mocker.patch(
'requests.adapters.HTTPAdapter.send',
new=make_http_response(
'GET',
url,
headers={
'set-cookie': f'cookie=value; port={port}',
},
)
)
session = requests.Session()
resp = session.request('GET', url)
assert resp.status_code == requests.codes.ok
assert 'set-cookie' in resp.headers
assert 'cookie' in session.cookies
cookie = next(iter(session.cookies))
assert cookie.name == 'cookie'
assert cookie.value == 'value'
assert cookie.port == f'{port}'
```
## Actual Result
```================================== test session starts ===================================
platform darwin -- Python 3.10.2, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /Users/fran/code/requests, configfile: pytest.ini
plugins: httpbin-1.0.0, mock-2.0.0, cov-3.0.0
collected 14 items
tests/test_cookies.py ..........F... [100%]
======================================== FAILURES ========================================
________________ TestCookies.test_cookie_with_port[https://localhost-443] ________________
self = <tests.test_cookies.TestCookies object at 0x10e309ff0>
mocker = <pytest_mock.plugin.MockFixture object at 0x10e30a290>, url = 'https://localhost'
port = 443
@pytest.mark.parametrize('url, port', [
('http://localhost', 80),
('http://localhost:80', 80),
('http://localhost:443', 443),
('http://localhost:8080', 8080),
('https://localhost', 443),
('https://localhost:80', 80),
('https://localhost:443', 443),
('https://localhost:8080', 8080),
])
def test_cookie_with_port(self, mocker, url, port):
mocker.patch(
'requests.adapters.HTTPAdapter.send',
new=make_http_response(
'GET',
url,
headers={
'set-cookie': f'cookie=value; port={port}',
},
)
)
session = requests.Session()
resp = session.request('GET', url)
assert resp.status_code == requests.codes.ok
assert 'set-cookie' in resp.headers
> assert 'cookie' in session.cookies
E AssertionError: assert 'cookie' in <RequestsCookieJar[]>
E + where <RequestsCookieJar[]> = <requests.sessions.Session object at 0x10e309b10>.cookies
tests/test_cookies.py:105: AssertionError
```
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "2.0.12"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.3"
},
"implementation": {
"name": "CPython",
"version": "3.10.2"
},
"platform": {
"release": "21.4.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.27.1"
},
"system_ssl": {
"version": "101010ef"
},
"urllib3": {
"version": "1.26.9"
},
"using_charset_normalizer": true,
"using_pyopenssl": false
}
```
<!-- This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). -->
| null | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6110/reactions"
} | https://api.github.com/repos/psf/requests/issues/6110/timeline | null | null | null | null | false | [
"Also I wrote the following workaround to fix the issue:\r\n\r\n```diff\r\ndiff --git a/requests/cookies.py b/requests/cookies.py\r\nindex 56fccd9c..afe6f597 100644\r\n--- a/requests/cookies.py\r\n+++ b/requests/cookies.py\r\n@@ -43,7 +43,13 @@ class MockRequest(object):\r\n return self.type\r\n\r\n def... |
https://api.github.com/repos/psf/requests/issues/6109 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/6109/labels{/name} | https://api.github.com/repos/psf/requests/issues/6109/comments | https://api.github.com/repos/psf/requests/issues/6109/events | https://github.com/psf/requests/issues/6109 | 1,206,384,105 | I_kwDOABTKOs5H5_Xp | 6,109 | Custom SSL context is ignored when using proxy | {
"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 | 2 | 2022-04-17T14:03:31Z | 2023-04-18T00:03:01Z | 2022-04-17T15:17:28Z | NONE | resolved | ## Summary
I'm using a custom HTTPAdapter to bypass TLS fingerprinting. Without a proxy, everything works fine. However, when using a proxy, the custom cipher settings appear to be ignored and it falls back to the default `requests` SSL context.
I have confirmed this with multiple non-intercepting HTTP and HTTPS proxies, and fact that the fingerprint is identical to the default `requests` one every time (despite Python or `requests` not being involved in the proxy software at all) confirms that this is not an issue with my proxy.
## Expected Result
The custom SSL context settings should be respected.
## Actual Result
The custom SSL context settings are ignored and the defaults are used.
## Reproduction Steps
```python
#!/usr/bin/env python3
import ssl
import requests
PROXY = 'REDACTED'
class TLSFPBypassAdapter(requests.adapters.HTTPAdapter):
def init_poolmanager(self, *args, **kwargs):
print('TLSFPBypassAdapter.init_poolmanager called')
ctx = ssl.create_default_context()
ctx.set_ciphers('ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:AES256-SHA')
ctx.check_hostname = False # For some reason, this is needed to avoid a verification error
kwargs['ssl_context'] = ctx
return super().init_poolmanager(*args, **kwargs)
def get_tls_fingerprint(session):
return session.get('https://tls.browserleaks.com/json').json()['ja3_hash']
print('Default SSL context:')
session1 = requests.Session()
print(get_tls_fingerprint(session1))
print()
print('Default SSL context + proxy:')
session2 = requests.Session()
session2.proxies.update({'all': PROXY})
print(get_tls_fingerprint(session2))
print()
print('Custom SSL context:')
session3 = requests.Session()
session3.mount('http://', TLSFPBypassAdapter())
session3.mount('https://', TLSFPBypassAdapter())
print(get_tls_fingerprint(session3))
print()
print('Custom SSL context + proxy:')
session4 = requests.Session()
session4.mount('http://', TLSFPBypassAdapter())
session4.mount('https://', TLSFPBypassAdapter())
session4.proxies.update({'all': PROXY})
print(get_tls_fingerprint(session4))
```
Output:
```
Default SSL context:
e85f4ba10180c530d8c0dc5577f88413
Default SSL context + proxy:
e85f4ba10180c530d8c0dc5577f88413
Custom SSL context:
TLSFPBypassAdapter.init_poolmanager called
TLSFPBypassAdapter.init_poolmanager called
5a923e30925d6e3fe0dd6ff098905a01
Custom SSL context + proxy:
TLSFPBypassAdapter.init_poolmanager called
TLSFPBypassAdapter.init_poolmanager called
e85f4ba10180c530d8c0dc5577f88413
```
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "2.0.12"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "3.3"
},
"implementation": {
"name": "CPython",
"version": "3.10.4"
},
"platform": {
"release": "4.19.0-18-amd64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.27.1"
},
"system_ssl": {
"version": "101010ef"
},
"urllib3": {
"version": "1.26.9"
},
"using_charset_normalizer": true,
"using_pyopenssl": false
}
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/6109/reactions"
} | https://api.github.com/repos/psf/requests/issues/6109/timeline | null | completed | null | null | false | [
"You're not telling urllib3 to use that SSL context with the proxy, you'll want to look at https://github.com/psf/requests/blob/2d5517682b3b38547634d153cea43d48fbc8cdb5/requests/adapters.py#L167",
"Thanks, that fixed it."
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.