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/5698 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5698/labels{/name} | https://api.github.com/repos/psf/requests/issues/5698/comments | https://api.github.com/repos/psf/requests/issues/5698/events | https://github.com/psf/requests/pull/5698 | 771,520,124 | MDExOlB1bGxSZXF1ZXN0NTQzMDIxOTQ3 | 5,698 | Pin GHA to Ubuntu 20.10 | {
"avatar_url": "https://avatars.githubusercontent.com/u/59408894?v=4",
"events_url": "https://api.github.com/users/shelld3v/events{/privacy}",
"followers_url": "https://api.github.com/users/shelld3v/followers",
"following_url": "https://api.github.com/users/shelld3v/following{/other_user}",
"gists_url": "https://api.github.com/users/shelld3v/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shelld3v",
"id": 59408894,
"login": "shelld3v",
"node_id": "MDQ6VXNlcjU5NDA4ODk0",
"organizations_url": "https://api.github.com/users/shelld3v/orgs",
"received_events_url": "https://api.github.com/users/shelld3v/received_events",
"repos_url": "https://api.github.com/users/shelld3v/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shelld3v/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shelld3v/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shelld3v",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2020-12-20T05:46:52Z | 2021-08-27T00:08:53Z | 2020-12-20T11:34:28Z | NONE | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/59408894?v=4",
"events_url": "https://api.github.com/users/shelld3v/events{/privacy}",
"followers_url": "https://api.github.com/users/shelld3v/followers",
"following_url": "https://api.github.com/users/shelld3v/following{/other_user}",
"gists_url": "https://api.github.com/users/shelld3v/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shelld3v",
"id": 59408894,
"login": "shelld3v",
"node_id": "MDQ6VXNlcjU5NDA4ODk0",
"organizations_url": "https://api.github.com/users/shelld3v/orgs",
"received_events_url": "https://api.github.com/users/shelld3v/received_events",
"repos_url": "https://api.github.com/users/shelld3v/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shelld3v/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shelld3v/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shelld3v",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5698/reactions"
} | https://api.github.com/repos/psf/requests/issues/5698/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5698.diff",
"html_url": "https://github.com/psf/requests/pull/5698",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5698.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5698"
} | true | [] | |
https://api.github.com/repos/psf/requests/issues/5697 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5697/labels{/name} | https://api.github.com/repos/psf/requests/issues/5697/comments | https://api.github.com/repos/psf/requests/issues/5697/events | https://github.com/psf/requests/pull/5697 | 771,511,818 | MDExOlB1bGxSZXF1ZXN0NTQzMDE2MTQy | 5,697 | Create check-pep8.yml | {
"avatar_url": "https://avatars.githubusercontent.com/u/59408894?v=4",
"events_url": "https://api.github.com/users/shelld3v/events{/privacy}",
"followers_url": "https://api.github.com/users/shelld3v/followers",
"following_url": "https://api.github.com/users/shelld3v/following{/other_user}",
"gists_url": "https://api.github.com/users/shelld3v/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shelld3v",
"id": 59408894,
"login": "shelld3v",
"node_id": "MDQ6VXNlcjU5NDA4ODk0",
"organizations_url": "https://api.github.com/users/shelld3v/orgs",
"received_events_url": "https://api.github.com/users/shelld3v/received_events",
"repos_url": "https://api.github.com/users/shelld3v/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shelld3v/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shelld3v/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shelld3v",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2020-12-20T04:41:32Z | 2021-08-27T00:08:55Z | 2020-12-20T11:35:18Z | NONE | resolved | Create check-pep8.yml | {
"avatar_url": "https://avatars.githubusercontent.com/u/59408894?v=4",
"events_url": "https://api.github.com/users/shelld3v/events{/privacy}",
"followers_url": "https://api.github.com/users/shelld3v/followers",
"following_url": "https://api.github.com/users/shelld3v/following{/other_user}",
"gists_url": "https://api.github.com/users/shelld3v/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shelld3v",
"id": 59408894,
"login": "shelld3v",
"node_id": "MDQ6VXNlcjU5NDA4ODk0",
"organizations_url": "https://api.github.com/users/shelld3v/orgs",
"received_events_url": "https://api.github.com/users/shelld3v/received_events",
"repos_url": "https://api.github.com/users/shelld3v/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shelld3v/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shelld3v/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shelld3v",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5697/reactions"
} | https://api.github.com/repos/psf/requests/issues/5697/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5697.diff",
"html_url": "https://github.com/psf/requests/pull/5697",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5697.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5697"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/5696 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5696/labels{/name} | https://api.github.com/repos/psf/requests/issues/5696/comments | https://api.github.com/repos/psf/requests/issues/5696/events | https://github.com/psf/requests/pull/5696 | 771,267,812 | MDExOlB1bGxSZXF1ZXN0NTQyODUyMzk4 | 5,696 | Document that the timeout can be an int | {
"avatar_url": "https://avatars.githubusercontent.com/u/29556373?v=4",
"events_url": "https://api.github.com/users/JustAnotherArchivist/events{/privacy}",
"followers_url": "https://api.github.com/users/JustAnotherArchivist/followers",
"following_url": "https://api.github.com/users/JustAnotherArchivist/following{/other_user}",
"gists_url": "https://api.github.com/users/JustAnotherArchivist/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JustAnotherArchivist",
"id": 29556373,
"login": "JustAnotherArchivist",
"node_id": "MDQ6VXNlcjI5NTU2Mzcz",
"organizations_url": "https://api.github.com/users/JustAnotherArchivist/orgs",
"received_events_url": "https://api.github.com/users/JustAnotherArchivist/received_events",
"repos_url": "https://api.github.com/users/JustAnotherArchivist/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JustAnotherArchivist/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JustAnotherArchivist/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JustAnotherArchivist",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2020-12-19T01:12:57Z | 2021-11-29T12:36:10Z | 2021-11-28T14:21:10Z | NONE | resolved | Requests simply delegates to `urllib3.util.Timeout`, and urllib3 has of course supported ints for a very long time – at least Sept 2013 per the docstring changes, but likely much longer than that. The [timeout section in the advanced docs](https://github.com/psf/requests/blob/c2b307dbefe21177af03f9feb37181a89a799fcc/docs/user/advanced.rst#timeouts) actually has an example that uses an int, but the API docs (via function docstrings) don't mention this so far. | {
"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/5696/reactions"
} | https://api.github.com/repos/psf/requests/issues/5696/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5696.diff",
"html_url": "https://github.com/psf/requests/pull/5696",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5696.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5696"
} | true | [
"`int`s are just converted to `float`s under the covers and really floats are the better thing to be using. It'd probably be better to convert the timeout section in our docs to using floats.",
"I disagree. Despite the internal conversion, from the perspective of the user code, the best data type to represent an ... |
https://api.github.com/repos/psf/requests/issues/5695 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5695/labels{/name} | https://api.github.com/repos/psf/requests/issues/5695/comments | https://api.github.com/repos/psf/requests/issues/5695/events | https://github.com/psf/requests/pull/5695 | 769,149,000 | MDExOlB1bGxSZXF1ZXN0NTQxMzQxNDI3 | 5,695 | v2.25.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 | 0 | 2020-12-16T17:56:20Z | 2021-08-27T00:08:55Z | 2020-12-16T19:34:27Z | MEMBER | resolved | 2.25.1 (2020-12-16)
-------------------
**Bugfixes**
- Requests now treats `application/json` as `utf8` by default. Resolving
inconsistencies between `r.text` and `r.json` output. (#5673)
**Dependencies**
- Requests now supports chardet v4.x. | {
"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/5695/reactions"
} | https://api.github.com/repos/psf/requests/issues/5695/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5695.diff",
"html_url": "https://github.com/psf/requests/pull/5695",
"merged_at": "2020-12-16T19:34:27Z",
"patch_url": "https://github.com/psf/requests/pull/5695.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5695"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/5694 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5694/labels{/name} | https://api.github.com/repos/psf/requests/issues/5694/comments | https://api.github.com/repos/psf/requests/issues/5694/events | https://github.com/psf/requests/pull/5694 | 767,022,479 | MDExOlB1bGxSZXF1ZXN0NTM5ODcxMTkw | 5,694 | fixed a typo in module doc string. | {
"avatar_url": "https://avatars.githubusercontent.com/u/91414?v=4",
"events_url": "https://api.github.com/users/shouro/events{/privacy}",
"followers_url": "https://api.github.com/users/shouro/followers",
"following_url": "https://api.github.com/users/shouro/following{/other_user}",
"gists_url": "https://api.github.com/users/shouro/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shouro",
"id": 91414,
"login": "shouro",
"node_id": "MDQ6VXNlcjkxNDE0",
"organizations_url": "https://api.github.com/users/shouro/orgs",
"received_events_url": "https://api.github.com/users/shouro/received_events",
"repos_url": "https://api.github.com/users/shouro/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shouro/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shouro/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shouro",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2020-12-14T23:44:12Z | 2021-08-27T00:08:56Z | 2020-12-14T23:49:50Z | CONTRIBUTOR | resolved | I changed requests.session -> requests.sessions in doc string of sessions module. | {
"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/5694/reactions"
} | https://api.github.com/repos/psf/requests/issues/5694/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5694.diff",
"html_url": "https://github.com/psf/requests/pull/5694",
"merged_at": "2020-12-14T23:49:50Z",
"patch_url": "https://github.com/psf/requests/pull/5694.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5694"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/5693 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5693/labels{/name} | https://api.github.com/repos/psf/requests/issues/5693/comments | https://api.github.com/repos/psf/requests/issues/5693/events | https://github.com/psf/requests/pull/5693 | 764,088,748 | MDExOlB1bGxSZXF1ZXN0NTM4MzI5NDM4 | 5,693 | Pass urllib3.SKIP_HEADER when headers should be unset | {
"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"
} | [] | open | false | null | [] | null | 0 | 2020-12-12T17:32:16Z | 2022-02-17T15:48:57Z | null | CONTRIBUTOR | null | urllib3 introduced some default headers and a way to skip them if
desired. Let's use that sentinel value to pass along information about
Requests' users desire to skip those headers as well.
Closes gh-5671
---
I'm pretty sure the tests will fail to start with, but wanted to get a sketch of something up for early review | null | {
"+1": 2,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 2,
"url": "https://api.github.com/repos/psf/requests/issues/5693/reactions"
} | https://api.github.com/repos/psf/requests/issues/5693/timeline | null | null | true | {
"diff_url": "https://github.com/psf/requests/pull/5693.diff",
"html_url": "https://github.com/psf/requests/pull/5693",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5693.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5693"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/5692 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5692/labels{/name} | https://api.github.com/repos/psf/requests/issues/5692/comments | https://api.github.com/repos/psf/requests/issues/5692/events | https://github.com/psf/requests/issues/5692 | 762,917,561 | MDU6SXNzdWU3NjI5MTc1NjE= | 5,692 | requests.auth.HTTPDigestAuth does not support qop=auth-int | {
"avatar_url": "https://avatars.githubusercontent.com/u/13699256?v=4",
"events_url": "https://api.github.com/users/ATXadam/events{/privacy}",
"followers_url": "https://api.github.com/users/ATXadam/followers",
"following_url": "https://api.github.com/users/ATXadam/following{/other_user}",
"gists_url": "https://api.github.com/users/ATXadam/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ATXadam",
"id": 13699256,
"login": "ATXadam",
"node_id": "MDQ6VXNlcjEzNjk5MjU2",
"organizations_url": "https://api.github.com/users/ATXadam/orgs",
"received_events_url": "https://api.github.com/users/ATXadam/received_events",
"repos_url": "https://api.github.com/users/ATXadam/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ATXadam/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ATXadam/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ATXadam",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 0 | 2020-12-11T21:18:45Z | 2020-12-11T21:18:45Z | null | NONE | null | ## Summary:
When using requests.auth.HTTPDigestAuth, if the www-authenticate digest back has a qop value of 'auth-int', build_digest_header returns None, which makes http.client.HTTPConnection.putheader throw an exception because *values expects to be a set of Strings or Bytes.
## Expected Result:
I expect a valid Digest in return, or at least an Exception that input data is bad
## Actual Result:
TypeError Exception - expected string or bytes-like object
## Reproduction Steps
```
import requests
requests.get('https://device.hostname/api/auth', auth=requests.auth.HTTPDigestAuth('login','password')
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.8.6"
},
"platform": {
"release": "20.2.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.24.0"
},
"system_ssl": {
"version": "1010108f"
},
"urllib3": {
"version": "1.25.9"
},
"using_pyopenssl": false
}
```
## Working Fix
requests.auth.HTTPDigestAuth.build_digest_header has the following code, which is causing the return of None:
```
if not qop:
respdig = KD(HA1, "%s:%s" % (nonce, HA2))
elif qop == 'auth' or 'auth' in qop.split(','):
noncebit = "%s:%s:%s:%s:%s" % (
nonce, ncvalue, cnonce, 'auth', HA2
)
respdig = KD(HA1, noncebit)
else:
# XXX handle auth-int.
return None
```
Patches Needed:
requests.auth.HTTPDigestAuth.build_digest_header needs to have an optional arg for body, which should be the bytes of the body of the request or None
```
def build_digest_header(self, method, url, body=b''):
```
The qop value should be put into a list:
```
qop = self._thread_local.chal.get('qop')
if qop:
qop = [x.strip() for x in qop.split(',')]
```
A2 needs to be calculated differently if auth-int:
```
if qop and 'auth-int' in qop:
A2 = '%s:%s:%s' % (method, path, hash_utf8(body or b''))
else:
A2 = '%s:%s' % (method, path)
```
And the qop test block needs to be changed:
```
if not qop:
respdig = KD(HA1, "%s:%s" % (nonce, HA2))
else:
if 'auth' in qop or 'auth-int' in qop:
noncebit = "%s:%s:%s:%s:%s" % (
nonce, ncvalue, cnonce, ','.join(qop), HA2
)
respdig = KD(HA1, noncebit)
else:
raise NotImplementedError('qop value of "%s" is not implemented.' % (','.join(qop)))
```
Also the last check before returning digest:
```
if qop:
base += ', qop=%s, nc=%s, cnonce="%s"' % (','.join(qop), ncvalue, cnonce)
```
Now to change the callers:
handle_401 needs to be changed to add the body arg:
```
prep.headers['Authorization'] = self.build_digest_header(
prep.method, prep.url, prep.body)
```
__call__ needs to be changed to add the body arg:
```
r.headers['Authorization'] = self.build_digest_header(r.method, r.url, r.body)
```
And that should create a fully working framework for auth-int with RFC 2617 | 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/5692/reactions"
} | https://api.github.com/repos/psf/requests/issues/5692/timeline | null | null | null | null | false | [] |
https://api.github.com/repos/psf/requests/issues/5691 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5691/labels{/name} | https://api.github.com/repos/psf/requests/issues/5691/comments | https://api.github.com/repos/psf/requests/issues/5691/events | https://github.com/psf/requests/issues/5691 | 762,195,474 | MDU6SXNzdWU3NjIxOTU0NzQ= | 5,691 | Boundary and content disposition appears in content during PUT request python | {
"avatar_url": "https://avatars.githubusercontent.com/u/53515128?v=4",
"events_url": "https://api.github.com/users/swamat/events{/privacy}",
"followers_url": "https://api.github.com/users/swamat/followers",
"following_url": "https://api.github.com/users/swamat/following{/other_user}",
"gists_url": "https://api.github.com/users/swamat/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/swamat",
"id": 53515128,
"login": "swamat",
"node_id": "MDQ6VXNlcjUzNTE1MTI4",
"organizations_url": "https://api.github.com/users/swamat/orgs",
"received_events_url": "https://api.github.com/users/swamat/received_events",
"repos_url": "https://api.github.com/users/swamat/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/swamat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/swamat/subscriptions",
"type": "User",
"url": "https://api.github.com/users/swamat",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-12-11T10:15:12Z | 2021-08-28T00:06:02Z | 2020-12-11T12:19:45Z | NONE | resolved | Please refer to our [Stack Overflow tag](https://stackoverflow.com/questions/tagged/python-requests) for guidance.
Hi ,
I am new to requests lib.
I am generating a presigned url for s3 and use that to upload csv file using below command
files = {'file':open(<my file name'>,'rb')}
response = requests.put(<signed_url>,files=files)
The file is getting uploaded successfully. But when i download the same file using **requests.get** am getting boundary and content before my actual data as shown below
--cd5a636f460e663ab07e090ab029aac3
Content-Disposition: form-data; name="file"; filename=<filename>
Actual data
Please help me to remove the boundary string and content-disposition. I need only actual data to be uploaded
| {
"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/5691/reactions"
} | https://api.github.com/repos/psf/requests/issues/5691/timeline | null | completed | null | null | false | [
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here."
] |
https://api.github.com/repos/psf/requests/issues/5690 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5690/labels{/name} | https://api.github.com/repos/psf/requests/issues/5690/comments | https://api.github.com/repos/psf/requests/issues/5690/events | https://github.com/psf/requests/issues/5690 | 761,939,618 | MDU6SXNzdWU3NjE5Mzk2MTg= | 5,690 | Support Chardet version 4 | {
"avatar_url": "https://avatars.githubusercontent.com/u/57199?v=4",
"events_url": "https://api.github.com/users/dwt/events{/privacy}",
"followers_url": "https://api.github.com/users/dwt/followers",
"following_url": "https://api.github.com/users/dwt/following{/other_user}",
"gists_url": "https://api.github.com/users/dwt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dwt",
"id": 57199,
"login": "dwt",
"node_id": "MDQ6VXNlcjU3MTk5",
"organizations_url": "https://api.github.com/users/dwt/orgs",
"received_events_url": "https://api.github.com/users/dwt/received_events",
"repos_url": "https://api.github.com/users/dwt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dwt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dwt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dwt",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2020-12-11T06:05:43Z | 2021-08-28T00:06:01Z | 2020-12-14T17:30:07Z | NONE | resolved | It was released yesterday: https://github.com/chardet/chardet/releases and I would like to use it together with 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": 2,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 2,
"url": "https://api.github.com/repos/psf/requests/issues/5690/reactions"
} | https://api.github.com/repos/psf/requests/issues/5690/timeline | null | completed | null | null | false | [
"Someone will need to investigate how to test compatibility of Requests with the new `chardet` version.",
"PR for this is already in progress \r\nhttps://github.com/psf/requests/pull/5688",
"#5688 is merged. It should be available in the next release."
] |
https://api.github.com/repos/psf/requests/issues/5689 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5689/labels{/name} | https://api.github.com/repos/psf/requests/issues/5689/comments | https://api.github.com/repos/psf/requests/issues/5689/events | https://github.com/psf/requests/pull/5689 | 761,928,942 | MDExOlB1bGxSZXF1ZXN0NTM2NTI5NDM4 | 5,689 | Bump chardet to 4.0.0 | {
"avatar_url": "https://avatars.githubusercontent.com/u/27302114?v=4",
"events_url": "https://api.github.com/users/mishankov/events{/privacy}",
"followers_url": "https://api.github.com/users/mishankov/followers",
"following_url": "https://api.github.com/users/mishankov/following{/other_user}",
"gists_url": "https://api.github.com/users/mishankov/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mishankov",
"id": 27302114,
"login": "mishankov",
"node_id": "MDQ6VXNlcjI3MzAyMTE0",
"organizations_url": "https://api.github.com/users/mishankov/orgs",
"received_events_url": "https://api.github.com/users/mishankov/received_events",
"repos_url": "https://api.github.com/users/mishankov/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mishankov/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mishankov/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mishankov",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2020-12-11T05:45:18Z | 2021-08-27T00:08:56Z | 2020-12-11T05:50:46Z | NONE | resolved | Bump chardet version to >=4.0.0,<5
Chardets 4.0.0 release notes: https://github.com/chardet/chardet/releases/tag/4.0.0 | {
"avatar_url": "https://avatars.githubusercontent.com/u/27302114?v=4",
"events_url": "https://api.github.com/users/mishankov/events{/privacy}",
"followers_url": "https://api.github.com/users/mishankov/followers",
"following_url": "https://api.github.com/users/mishankov/following{/other_user}",
"gists_url": "https://api.github.com/users/mishankov/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mishankov",
"id": 27302114,
"login": "mishankov",
"node_id": "MDQ6VXNlcjI3MzAyMTE0",
"organizations_url": "https://api.github.com/users/mishankov/orgs",
"received_events_url": "https://api.github.com/users/mishankov/received_events",
"repos_url": "https://api.github.com/users/mishankov/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mishankov/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mishankov/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mishankov",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5689/reactions"
} | https://api.github.com/repos/psf/requests/issues/5689/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5689.diff",
"html_url": "https://github.com/psf/requests/pull/5689",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5689.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5689"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/5688 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5688/labels{/name} | https://api.github.com/repos/psf/requests/issues/5688/comments | https://api.github.com/repos/psf/requests/issues/5688/events | https://github.com/psf/requests/pull/5688 | 761,771,131 | MDExOlB1bGxSZXF1ZXN0NTM2Mzg4OTcy | 5,688 | Upgrade to chardet 4.x | {
"avatar_url": "https://avatars.githubusercontent.com/u/976345?v=4",
"events_url": "https://api.github.com/users/dan-blanchard/events{/privacy}",
"followers_url": "https://api.github.com/users/dan-blanchard/followers",
"following_url": "https://api.github.com/users/dan-blanchard/following{/other_user}",
"gists_url": "https://api.github.com/users/dan-blanchard/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dan-blanchard",
"id": 976345,
"login": "dan-blanchard",
"node_id": "MDQ6VXNlcjk3NjM0NQ==",
"organizations_url": "https://api.github.com/users/dan-blanchard/orgs",
"received_events_url": "https://api.github.com/users/dan-blanchard/received_events",
"repos_url": "https://api.github.com/users/dan-blanchard/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dan-blanchard/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dan-blanchard/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dan-blanchard",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2020-12-11T01:26:30Z | 2021-08-27T00:08:56Z | 2020-12-14T17:29:11Z | CONTRIBUTOR | resolved | I just released [chardet 4.0.0](https://github.com/chardet/chardet/releases/tag/4.0.0) today, and it's faster and fully backward compatible with chardet 3.x (as long as you aren't mucking around in the models it uses under-the-hood directly). The next major release will be Python 3.6+, but seeing as it took me three years to put out this one, that's unlikely to be soon. | {
"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": 4,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 3,
"laugh": 0,
"rocket": 0,
"total_count": 7,
"url": "https://api.github.com/repos/psf/requests/issues/5688/reactions"
} | https://api.github.com/repos/psf/requests/issues/5688/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5688.diff",
"html_url": "https://github.com/psf/requests/pull/5688",
"merged_at": "2020-12-14T17:29:11Z",
"patch_url": "https://github.com/psf/requests/pull/5688.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5688"
} | true | [
"`requests/__init__.py` lines 69 to 71 need to be updated otherwise one gets a warning:\r\n\r\n```\r\n/usr/lib/python3.8/site-packages/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (1.26.2) or chardet (4.0.0) doesn't match a supported version!\r\n warnings.warn(\"urllib3 ({}) or chardet ({}) doesn't ... |
https://api.github.com/repos/psf/requests/issues/5687 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5687/labels{/name} | https://api.github.com/repos/psf/requests/issues/5687/comments | https://api.github.com/repos/psf/requests/issues/5687/events | https://github.com/psf/requests/issues/5687 | 761,410,980 | MDU6SXNzdWU3NjE0MTA5ODA= | 5,687 | Uri and request from other language | {
"avatar_url": "https://avatars.githubusercontent.com/u/73819922?v=4",
"events_url": "https://api.github.com/users/GeorgeTheodorak/events{/privacy}",
"followers_url": "https://api.github.com/users/GeorgeTheodorak/followers",
"following_url": "https://api.github.com/users/GeorgeTheodorak/following{/other_user}",
"gists_url": "https://api.github.com/users/GeorgeTheodorak/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/GeorgeTheodorak",
"id": 73819922,
"login": "GeorgeTheodorak",
"node_id": "MDQ6VXNlcjczODE5OTIy",
"organizations_url": "https://api.github.com/users/GeorgeTheodorak/orgs",
"received_events_url": "https://api.github.com/users/GeorgeTheodorak/received_events",
"repos_url": "https://api.github.com/users/GeorgeTheodorak/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/GeorgeTheodorak/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/GeorgeTheodorak/subscriptions",
"type": "User",
"url": "https://api.github.com/users/GeorgeTheodorak",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-12-10T16:56:33Z | 2021-08-28T00:06:02Z | 2020-12-10T17:34:02Z | NONE | resolved | Hello.
I am currently tring to request a page using .get
my problem is that when i use specific chars become %something but i what be completed like this
"https://test:search?keyphrase=ΤεστΕδωΕχειΕλληνικα"
but the requests changes those greek chars before sending it .
Is there any way to fix this.
Thanks in advance. | {
"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/5687/reactions"
} | https://api.github.com/repos/psf/requests/issues/5687/timeline | null | completed | null | null | false | [
"Requests is doing the right thing by percent-encoding that phrase.\r\n\r\nBrowsers have this exact behavior because it's complying with standards (see RFC 3986). This is what the request looks like from Firefox:\r\n\r\n```\r\nhttps://test:search?keyphrase=%CE%A4%CE%B5%CF%83%CF%84%CE%95%CE%B4%CF%89%CE%95%CF%87%CE%B... |
https://api.github.com/repos/psf/requests/issues/5686 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5686/labels{/name} | https://api.github.com/repos/psf/requests/issues/5686/comments | https://api.github.com/repos/psf/requests/issues/5686/events | https://github.com/psf/requests/issues/5686 | 760,640,390 | MDU6SXNzdWU3NjA2NDAzOTA= | 5,686 | 301 on PUT drops body | {
"avatar_url": "https://avatars.githubusercontent.com/u/401438?v=4",
"events_url": "https://api.github.com/users/AstraLuma/events{/privacy}",
"followers_url": "https://api.github.com/users/AstraLuma/followers",
"following_url": "https://api.github.com/users/AstraLuma/following{/other_user}",
"gists_url": "https://api.github.com/users/AstraLuma/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/AstraLuma",
"id": 401438,
"login": "AstraLuma",
"node_id": "MDQ6VXNlcjQwMTQzOA==",
"organizations_url": "https://api.github.com/users/AstraLuma/orgs",
"received_events_url": "https://api.github.com/users/AstraLuma/received_events",
"repos_url": "https://api.github.com/users/AstraLuma/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/AstraLuma/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/AstraLuma/subscriptions",
"type": "User",
"url": "https://api.github.com/users/AstraLuma",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2020-12-09T20:18:17Z | 2021-08-28T00:06:03Z | 2020-12-09T20:33:32Z | NONE | resolved | When receiving a 301 redirect to an HTTP PUT, the second request is also a PUT but the body has been dropped.
## Expected Result
Either the request is converted to a GET (form reply redirect), or the body is retained (full retry redirect).
## Actual Result
```
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): myapp.redacted:80
send: b'PUT /api/2/devices/208395 HTTP/1.1\r\nHost: myapp.redacted\r\nUser-Agent: python-requests/2.25.0\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nConnection: keep-alive\r\nContent-Type: application/json\r\nContent-Length: 5773\r\nAuthorization: Basic <redacted base64 blob>\r\n\r\n'
send: b'<redacted json blob>'
reply: 'HTTP/1.1 301 Moved Permanently\r\n'
header: Server: nginx/1.14.0 (Ubuntu)
header: Date: Wed, 09 Dec 2020 18:42:52 GMT
header: Content-Type: text/html
header: Content-Length: 194
header: Connection: keep-alive
header: Location: https://myapp.redacted/api/2/devices/208395
DEBUG:urllib3.connectionpool:http://myapp.redacted:80 "PUT /api/2/devices/208395 HTTP/1.1" 301 194
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): myapp.redacted:443
send: b'PUT /api/2/devices/208395 HTTP/1.1\r\nHost: myapp.redacted\r\nContent-Length: 0\r\nUser-Agent: python-requests/2.25.0\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nConnection: keep-alive\r\nAuthorization: Basic <redacted base64 blob>\r\n\r\n'
reply: 'HTTP/1.1 500 INTERNAL SERVER ERROR\r\n'
header: Server: nginx/1.14.0 (Ubuntu)
header: Date: Wed, 09 Dec 2020 18:42:52 GMT
header: Content-Type: application/json
header: Content-Length: 43
header: Connection: keep-alive
header: Set-Cookie: myapp_session=9b25161f-c9d8-48a7-b72e-e564fffc38b3; Domain=dev.purestorage.com; Expires=Sat, 09-Jan-2021 18:42:52 GMT; Secure; HttpOnly; Path=/
```
Notice that in the second request, `Content-Length` is 0 and no body is sent.
## Reproduction Steps
Private library code.
## System Information
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.8.5"
},
"platform": {
"release": "19.6.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.25.0"
},
"system_ssl": {
"version": "1010108f"
},
"urllib3": {
"version": "1.26.2"
},
"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/5686/reactions"
} | https://api.github.com/repos/psf/requests/issues/5686/timeline | null | completed | null | null | false | [
"This is expected for compatibility reasons, see: https://tools.ietf.org/html/rfc7231#section-6.4.4\r\nThe HTTP status should be 308 for permanent redirects that don't change the request method.",
"Ok, then you should either:\r\n\r\n* Convert to a GET completely\r\n* Keep it a PUT and retain the body\r\n\r\nThis ... |
https://api.github.com/repos/psf/requests/issues/5685 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5685/labels{/name} | https://api.github.com/repos/psf/requests/issues/5685/comments | https://api.github.com/repos/psf/requests/issues/5685/events | https://github.com/psf/requests/issues/5685 | 760,550,067 | MDU6SXNzdWU3NjA1NTAwNjc= | 5,685 | Cannot pass in client certs while using a session | {
"avatar_url": "https://avatars.githubusercontent.com/u/19295663?v=4",
"events_url": "https://api.github.com/users/jsmaupin/events{/privacy}",
"followers_url": "https://api.github.com/users/jsmaupin/followers",
"following_url": "https://api.github.com/users/jsmaupin/following{/other_user}",
"gists_url": "https://api.github.com/users/jsmaupin/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jsmaupin",
"id": 19295663,
"login": "jsmaupin",
"node_id": "MDQ6VXNlcjE5Mjk1NjYz",
"organizations_url": "https://api.github.com/users/jsmaupin/orgs",
"received_events_url": "https://api.github.com/users/jsmaupin/received_events",
"repos_url": "https://api.github.com/users/jsmaupin/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jsmaupin/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jsmaupin/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jsmaupin",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-12-09T18:04:30Z | 2021-08-28T00:06:03Z | 2020-12-09T18:14:51Z | NONE | resolved | I get contradicting exceptions when I try to pass in a client certificate and private key into a session object that is used for the request.
## Expected Result
Using a client cert and private key will work with sessions just as it does with a request that is not in a session.
## Actual Result
If I use:
```python
self.session.cert = client_cert
```
I get back an error statement that stated that it tried to use the client_cert as a tuple, but it is not a tuple. I also changed this single file to contain both the client cert and the private key, where the private key was pasted below the client cert and I receive the same error.
```
Traceback (most recent call last):
File "/home/jmaupin/dev/pymeasure/pymeasure/client.py", line 245, in _upload
response = self.session.send(prepped,
File "/home/jmaupin/dev/sandbox/venv/lib64/python3.8/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/home/jmaupin/dev/sandbox/venv/lib64/python3.8/site-packages/requests/adapters.py", line 416, in send
self.cert_verify(conn, request.url, verify, cert)
File "/home/jmaupin/dev/sandbox/venv/lib64/python3.8/site-packages/requests/adapters.py", line 244, in cert_verify
conn.key_file = cert[1]
IndexError: tuple index out of range
```
If I change the cert parameter on the session object to be a tuple, I get a result stating that it cannot be a tuple.
```python
self.session.cert = client_cert, client_key
```
Or,
```python
self.session.cert = (client_cert, client_key)
```
```
Traceback (most recent call last):
File "/home/jmaupin/dev/pymeasure/pymeasure/client.py", line 245, in _upload
response = self.session.send(prepped,
File "/home/jmaupin/dev/sandbox/venv/lib64/python3.8/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/home/jmaupin/dev/sandbox/venv/lib64/python3.8/site-packages/requests/adapters.py", line 416, in send
self.cert_verify(conn, request.url, verify, cert)
File "/home/jmaupin/dev/sandbox/venv/lib64/python3.8/site-packages/requests/adapters.py", line 248, in cert_verify
if conn.cert_file and not os.path.exists(conn.cert_file):
File "/usr/lib64/python3.8/genericpath.py", line 19, in exists
os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not tuple
```
## Reproduction Steps
```python
import requests
session = Session()
self.session.cert = client_cert, client_key
request = Request('POST', url, data=payload)
prepped = self.session.prepare_request(request)
response = self.session.send(prepped)
```
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.9"
},
"implementation": {
"name": "CPython",
"version": "3.8.6"
},
"platform": {
"release": "5.9.11-100.fc32.x86_64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.25.0"
},
"system_ssl": {
"version": "1010107f"
},
"urllib3": {
"version": "1.25.11"
},
"using_pyopenssl": false
}
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/19295663?v=4",
"events_url": "https://api.github.com/users/jsmaupin/events{/privacy}",
"followers_url": "https://api.github.com/users/jsmaupin/followers",
"following_url": "https://api.github.com/users/jsmaupin/following{/other_user}",
"gists_url": "https://api.github.com/users/jsmaupin/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jsmaupin",
"id": 19295663,
"login": "jsmaupin",
"node_id": "MDQ6VXNlcjE5Mjk1NjYz",
"organizations_url": "https://api.github.com/users/jsmaupin/orgs",
"received_events_url": "https://api.github.com/users/jsmaupin/received_events",
"repos_url": "https://api.github.com/users/jsmaupin/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jsmaupin/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jsmaupin/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jsmaupin",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5685/reactions"
} | https://api.github.com/repos/psf/requests/issues/5685/timeline | null | completed | null | null | false | [
"I resolved this. I had a stray comma in my code."
] |
https://api.github.com/repos/psf/requests/issues/5684 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5684/labels{/name} | https://api.github.com/repos/psf/requests/issues/5684/comments | https://api.github.com/repos/psf/requests/issues/5684/events | https://github.com/psf/requests/pull/5684 | 760,348,792 | MDExOlB1bGxSZXF1ZXN0NTM1MTk1NjA1 | 5,684 | update sponsorship link, resolves #5683 | {
"avatar_url": "https://avatars.githubusercontent.com/u/1200832?v=4",
"events_url": "https://api.github.com/users/ewdurbin/events{/privacy}",
"followers_url": "https://api.github.com/users/ewdurbin/followers",
"following_url": "https://api.github.com/users/ewdurbin/following{/other_user}",
"gists_url": "https://api.github.com/users/ewdurbin/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ewdurbin",
"id": 1200832,
"login": "ewdurbin",
"node_id": "MDQ6VXNlcjEyMDA4MzI=",
"organizations_url": "https://api.github.com/users/ewdurbin/orgs",
"received_events_url": "https://api.github.com/users/ewdurbin/received_events",
"repos_url": "https://api.github.com/users/ewdurbin/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ewdurbin/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ewdurbin/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ewdurbin",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2020-12-09T13:52:50Z | 2021-08-27T00:08:57Z | 2020-12-09T14:03:58Z | MEMBER | resolved | PSF relaunched new sponsorship program and the URL has changed. | {
"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/5684/reactions"
} | https://api.github.com/repos/psf/requests/issues/5684/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5684.diff",
"html_url": "https://github.com/psf/requests/pull/5684",
"merged_at": "2020-12-09T14:03:58Z",
"patch_url": "https://github.com/psf/requests/pull/5684.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5684"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/5683 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5683/labels{/name} | https://api.github.com/repos/psf/requests/issues/5683/comments | https://api.github.com/repos/psf/requests/issues/5683/events | https://github.com/psf/requests/issues/5683 | 760,140,647 | MDU6SXNzdWU3NjAxNDA2NDc= | 5,683 | Broken sponsor link | {
"avatar_url": "https://avatars.githubusercontent.com/u/59408894?v=4",
"events_url": "https://api.github.com/users/shelld3v/events{/privacy}",
"followers_url": "https://api.github.com/users/shelld3v/followers",
"following_url": "https://api.github.com/users/shelld3v/following{/other_user}",
"gists_url": "https://api.github.com/users/shelld3v/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shelld3v",
"id": 59408894,
"login": "shelld3v",
"node_id": "MDQ6VXNlcjU5NDA4ODk0",
"organizations_url": "https://api.github.com/users/shelld3v/orgs",
"received_events_url": "https://api.github.com/users/shelld3v/received_events",
"repos_url": "https://api.github.com/users/shelld3v/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shelld3v/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shelld3v/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shelld3v",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2020-12-09T09:00:27Z | 2021-08-28T00:06:03Z | 2020-12-09T12:59:26Z | NONE | resolved | Summary.
## Expected Result
I and others can sponsor your team for this awesome project
## Actual Result
I can't because the sponsor link has been broken
## Reproduction Steps
N/A
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.8.6"
},
"platform": {
"release": "4.4.0-18362-Microsoft",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.25.0"
},
"system_ssl": {
"version": "1010108f"
},
"urllib3": {
"version": "1.24.3"
},
"using_pyopenssl": false
}
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5683/reactions"
} | https://api.github.com/repos/psf/requests/issues/5683/timeline | null | completed | null | null | false | [
"Hi there,\r\n\r\nThanks for bringing this to our attention. Unfortunately, the folks who maintain this project don't control that form. Supporting the PSF (especially during the Q4 drive right now: https://www.python.org/psf/donations/2020-q42020-drive/ ) will undoubtedly benefit this project.\r\n\r\nCheers,\r\nIa... |
https://api.github.com/repos/psf/requests/issues/5682 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5682/labels{/name} | https://api.github.com/repos/psf/requests/issues/5682/comments | https://api.github.com/repos/psf/requests/issues/5682/events | https://github.com/psf/requests/issues/5682 | 760,019,713 | MDU6SXNzdWU3NjAwMTk3MTM= | 5,682 | When I upload empty file with streaming, `Transfer-Encoding` added to request header. | {
"avatar_url": "https://avatars.githubusercontent.com/u/6350027?v=4",
"events_url": "https://api.github.com/users/yuji38kwmt/events{/privacy}",
"followers_url": "https://api.github.com/users/yuji38kwmt/followers",
"following_url": "https://api.github.com/users/yuji38kwmt/following{/other_user}",
"gists_url": "https://api.github.com/users/yuji38kwmt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/yuji38kwmt",
"id": 6350027,
"login": "yuji38kwmt",
"node_id": "MDQ6VXNlcjYzNTAwMjc=",
"organizations_url": "https://api.github.com/users/yuji38kwmt/orgs",
"received_events_url": "https://api.github.com/users/yuji38kwmt/received_events",
"repos_url": "https://api.github.com/users/yuji38kwmt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/yuji38kwmt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/yuji38kwmt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/yuji38kwmt",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-12-09T05:45:16Z | 2021-08-28T00:06:04Z | 2020-12-09T13:01:46Z | NONE | resolved | When I upload empty file with streaming, `Transfer-Encoding` added to request header.
## Expected Result
What you expected.
```
def upload_streaming(file):
with open(file, mode="rb") as f:
r = requests.put("https://httpbin.org/put", data=f)
print(r.request.headers)
upload_streaming("empty.txt")
# {'User-Agent': 'python-requests/2.24.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'}
```
## Actual Result
What happened instead.
```
def upload_streaming(file):
with open(file, mode="rb") as f:
r = requests.put("https://httpbin.org/put", data=f)
print(r.request.headers)
upload_streaming("empty.txt")
# {'User-Agent': 'python-requests/2.24.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Transfer-Encoding': 'chunked'}
```
## Reproduction Steps
```python
import requests
def upload_streaming(file):
with open(file, mode="rb") as f:
r = requests.put("https://httpbin.org/put", data=f)
print(r.request.headers)
upload_streaming("empty.txt")
```
## System Information
```
$ python -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.8.6"
},
"platform": {
"release": "4.18.0-16-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.24.0"
},
"system_ssl": {
"version": "1010100f"
},
"urllib3": {
"version": "1.25.11"
},
"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/5682/reactions"
} | https://api.github.com/repos/psf/requests/issues/5682/timeline | null | completed | null | null | false | [
"Hi there,\r\n\r\nWhen we cannot determine a length for a file, we default to chunked transfer-encoding which is entirely valid approach. It's what many HTTP clients do in this case where the file size is unavailable to them. Your expectation is also entirely flawed. If you're uploading a file anywhere (regardless ... |
https://api.github.com/repos/psf/requests/issues/5681 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5681/labels{/name} | https://api.github.com/repos/psf/requests/issues/5681/comments | https://api.github.com/repos/psf/requests/issues/5681/events | https://github.com/psf/requests/pull/5681 | 759,644,479 | MDExOlB1bGxSZXF1ZXN0NTM0NjEzOTQ2 | 5,681 | 5677: Rebuild proxies on Session#send | {
"avatar_url": "https://avatars.githubusercontent.com/u/1688249?v=4",
"events_url": "https://api.github.com/users/mateusduboli/events{/privacy}",
"followers_url": "https://api.github.com/users/mateusduboli/followers",
"following_url": "https://api.github.com/users/mateusduboli/following{/other_user}",
"gists_url": "https://api.github.com/users/mateusduboli/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mateusduboli",
"id": 1688249,
"login": "mateusduboli",
"node_id": "MDQ6VXNlcjE2ODgyNDk=",
"organizations_url": "https://api.github.com/users/mateusduboli/orgs",
"received_events_url": "https://api.github.com/users/mateusduboli/received_events",
"repos_url": "https://api.github.com/users/mateusduboli/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mateusduboli/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mateusduboli/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mateusduboli",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2020-12-08T17:39:44Z | 2021-08-27T00:08:49Z | 2021-01-24T22:59:47Z | CONTRIBUTOR | resolved | - Adds some test cases to highlight the issue, some of those seem excessive, I would like suggestions on how to combine them.
- Rebuilds the proxy configuration on `send`, making it behave like `requests.Session#request` that already did that.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5681/reactions"
} | https://api.github.com/repos/psf/requests/issues/5681/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5681.diff",
"html_url": "https://github.com/psf/requests/pull/5681",
"merged_at": "2021-01-24T22:59:47Z",
"patch_url": "https://github.com/psf/requests/pull/5681.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5681"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/5680 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5680/labels{/name} | https://api.github.com/repos/psf/requests/issues/5680/comments | https://api.github.com/repos/psf/requests/issues/5680/events | https://github.com/psf/requests/issues/5680 | 759,122,504 | MDU6SXNzdWU3NTkxMjI1MDQ= | 5,680 | Response object does not handle encoding properly | {
"avatar_url": "https://avatars.githubusercontent.com/u/44990492?v=4",
"events_url": "https://api.github.com/users/harplife/events{/privacy}",
"followers_url": "https://api.github.com/users/harplife/followers",
"following_url": "https://api.github.com/users/harplife/following{/other_user}",
"gists_url": "https://api.github.com/users/harplife/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/harplife",
"id": 44990492,
"login": "harplife",
"node_id": "MDQ6VXNlcjQ0OTkwNDky",
"organizations_url": "https://api.github.com/users/harplife/orgs",
"received_events_url": "https://api.github.com/users/harplife/received_events",
"repos_url": "https://api.github.com/users/harplife/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/harplife/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/harplife/subscriptions",
"type": "User",
"url": "https://api.github.com/users/harplife",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-12-08T06:47:58Z | 2021-08-28T00:06:00Z | 2020-12-08T13:06:32Z | NONE | resolved | GET request to an API returned a response with broken encoding.
More specifically, the response body was encoded in ASCII even though the data sent via API is encoded in UTF-8.
The result is escaped non-ASCII characters in the response body.
This behaviour can be observed on r.content, r.text, and r.json().
Following the quickstart guide, I tried to "force encoding" with `r.encoding = 'UTF-8'` but it had no effect.
I made sure to include `charset=UTF-8` in request header, which also didn't help.
What ended up working was `json.loads(r.text)`.
Very simple I know, but locating the problem was difficult,
not to mention I had to be absolutely sure the API was sending a data that was encoded in UTF-8.
This problem is not mentioned or, at least, not easily found on Stackoverflow.
I thought I would mention it here, so that others can find it.
issue #5577 seems to be similar in nature, which only proves that Encoding is an issue that seems to pop up every now and then.
The answer given for that issue seems to be "there is an easy solution so there's no need to fix it on our ends".
But nonetheless, a bug is a bug.
Besides, it would be nice to mention how to troubleshoot encoding on the quickstart guide.
Sorry it's not so much of a "summary", but things had to be said.
## Expected Result
A response body properly encoded in UTF-8.
Like so, `{'body': '상품등록'}`
## Actual Result
A response body encoded in ASCII even though it's supposed to be UTF-8.
`{'body': '\uc0c1\ud488\ub4f1\ub85'}`
## Reproduction Steps
```python
import requests
url = 'https://www.sorryicannottellyoutheactualapi.com/api'
headers = {'Content-Type': 'application/json;charset=UTF-8'}
r = requests.get(url, headers=headers)
print(r.content)
print(r.text)
print(r.json())
```
## System Information
```
chardet 3.0.4
cryptography 2.8
idna 2.9
implementation CPython 3.6.7
platform Linux 4.15.0-101-generic
pyOpenSSL 19.1.0 (openssl 1010101f)
requests 2.23.0
system_ssl 1010104f
urllib3 1.25.7
using_pyopenssl True
python 3.6.7
``` | {
"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/5680/reactions"
} | https://api.github.com/repos/psf/requests/issues/5680/timeline | null | completed | null | null | false | [
"You're right, this is a duplicate of old bug reports. The fact that you found those and opened a new one is confusing. We don't need 1 bug report for everyone who has found the same bug"
] |
https://api.github.com/repos/psf/requests/issues/5679 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5679/labels{/name} | https://api.github.com/repos/psf/requests/issues/5679/comments | https://api.github.com/repos/psf/requests/issues/5679/events | https://github.com/psf/requests/issues/5679 | 758,235,022 | MDU6SXNzdWU3NTgyMzUwMjI= | 5,679 | [DOC] Misleading Statement in Chinese Translation of Documentation | {
"avatar_url": "https://avatars.githubusercontent.com/u/16185679?v=4",
"events_url": "https://api.github.com/users/zhan-zhang/events{/privacy}",
"followers_url": "https://api.github.com/users/zhan-zhang/followers",
"following_url": "https://api.github.com/users/zhan-zhang/following{/other_user}",
"gists_url": "https://api.github.com/users/zhan-zhang/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/zhan-zhang",
"id": 16185679,
"login": "zhan-zhang",
"node_id": "MDQ6VXNlcjE2MTg1Njc5",
"organizations_url": "https://api.github.com/users/zhan-zhang/orgs",
"received_events_url": "https://api.github.com/users/zhan-zhang/received_events",
"repos_url": "https://api.github.com/users/zhan-zhang/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/zhan-zhang/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zhan-zhang/subscriptions",
"type": "User",
"url": "https://api.github.com/users/zhan-zhang",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2020-12-07T07:13:27Z | 2021-08-28T00:06:04Z | 2020-12-09T07:43:45Z | NONE | resolved | In the first line of the [Chinese translation](https://requests.readthedocs.io/zh_CN/latest/#id3), the translator used a statement as:
> "Requests 唯一的一个非转基因的 Python HTTP 库,人类可以安全享用。"
which means:
> "Requests is the only non-genetically-modified HTTP library in Python, safe for human beings to use"
This statement is scientifically misleading with the improper metaphor and apparently diverged from the English version
> "Requests is an elegant and simple HTTP library for Python, built for human beings."
| {
"avatar_url": "https://avatars.githubusercontent.com/u/16185679?v=4",
"events_url": "https://api.github.com/users/zhan-zhang/events{/privacy}",
"followers_url": "https://api.github.com/users/zhan-zhang/followers",
"following_url": "https://api.github.com/users/zhan-zhang/following{/other_user}",
"gists_url": "https://api.github.com/users/zhan-zhang/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/zhan-zhang",
"id": 16185679,
"login": "zhan-zhang",
"node_id": "MDQ6VXNlcjE2MTg1Njc5",
"organizations_url": "https://api.github.com/users/zhan-zhang/orgs",
"received_events_url": "https://api.github.com/users/zhan-zhang/received_events",
"repos_url": "https://api.github.com/users/zhan-zhang/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/zhan-zhang/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zhan-zhang/subscriptions",
"type": "User",
"url": "https://api.github.com/users/zhan-zhang",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5679/reactions"
} | https://api.github.com/repos/psf/requests/issues/5679/timeline | null | completed | null | null | false | [
"I'd be happy to open a PR to make it match the English version but failed to find the file that contains the translation - can anyone give me a pointer?",
"https://github.com/requests/requests-docs-cn is the repository with that translation. It's from an older version of the english docs"
] |
https://api.github.com/repos/psf/requests/issues/5678 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5678/labels{/name} | https://api.github.com/repos/psf/requests/issues/5678/comments | https://api.github.com/repos/psf/requests/issues/5678/events | https://github.com/psf/requests/issues/5678 | 755,738,198 | MDU6SXNzdWU3NTU3MzgxOTg= | 5,678 | request defaulting to GET if url missing ending '/' on rasberry pi | {
"avatar_url": "https://avatars.githubusercontent.com/u/42101276?v=4",
"events_url": "https://api.github.com/users/newnativeabq/events{/privacy}",
"followers_url": "https://api.github.com/users/newnativeabq/followers",
"following_url": "https://api.github.com/users/newnativeabq/following{/other_user}",
"gists_url": "https://api.github.com/users/newnativeabq/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/newnativeabq",
"id": 42101276,
"login": "newnativeabq",
"node_id": "MDQ6VXNlcjQyMTAxMjc2",
"organizations_url": "https://api.github.com/users/newnativeabq/orgs",
"received_events_url": "https://api.github.com/users/newnativeabq/received_events",
"repos_url": "https://api.github.com/users/newnativeabq/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/newnativeabq/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/newnativeabq/subscriptions",
"type": "User",
"url": "https://api.github.com/users/newnativeabq",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2020-12-03T01:31:08Z | 2021-08-28T00:06:05Z | 2020-12-03T03:53:45Z | NONE | resolved | Summary.
If I send a POST request with http://...., the request is sent as GET and the body is stripped. If I add the ending '/' http://.../, the request sends as expected.
## Expected Result
requests.request("POST", **kwargs) sends a POST request regardless of URL. Same for requests.POST(url, **kwargs)
## Actual Result
```python
url = "http://192.168.1.37:8080/api
r = requests.request(url, data={'sid':'test', 'value':911})
# Yields GET request being sent to endpoint
url = "http://192.168.1.37:8080/api/
r = requests.request(url, data={'sid':'test', 'value':911})
# Yields POST request being sent to endpoint
```
## Reproduction Steps
On Rasberry Pi 4, rasbian, using pipenv (requests installed via: pipenv install requests)
```python
import requests
url = "http://192.168.1.37:8080/api
r = requests.request(url, data={'sid':'test', 'value':911})
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.7.3"
},
"platform": {
"release": "5.4.72-v7l+",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.25.0"
},
"system_ssl": {
"version": "1010104f"
},
"urllib3": {
"version": "1.26.2"
},
"using_pyopenssl": false
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
| {
"avatar_url": "https://avatars.githubusercontent.com/u/42101276?v=4",
"events_url": "https://api.github.com/users/newnativeabq/events{/privacy}",
"followers_url": "https://api.github.com/users/newnativeabq/followers",
"following_url": "https://api.github.com/users/newnativeabq/following{/other_user}",
"gists_url": "https://api.github.com/users/newnativeabq/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/newnativeabq",
"id": 42101276,
"login": "newnativeabq",
"node_id": "MDQ6VXNlcjQyMTAxMjc2",
"organizations_url": "https://api.github.com/users/newnativeabq/orgs",
"received_events_url": "https://api.github.com/users/newnativeabq/received_events",
"repos_url": "https://api.github.com/users/newnativeabq/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/newnativeabq/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/newnativeabq/subscriptions",
"type": "User",
"url": "https://api.github.com/users/newnativeabq",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5678/reactions"
} | https://api.github.com/repos/psf/requests/issues/5678/timeline | null | completed | null | null | false | [
"Sounds like the API you're hitting is returning a redirect that for compatibility reasons transforms POST to GET. Try the request with redirects=False and inspect the status code to verify this.\n\nIf you control the API I recommend using 307/308 redirect status codes.",
"You nailed it. If I use allow_redirects... |
https://api.github.com/repos/psf/requests/issues/5677 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5677/labels{/name} | https://api.github.com/repos/psf/requests/issues/5677/comments | https://api.github.com/repos/psf/requests/issues/5677/events | https://github.com/psf/requests/issues/5677 | 755,724,610 | MDU6SXNzdWU3NTU3MjQ2MTA= | 5,677 | Session does not consistently respects proxy environment variables. | {
"avatar_url": "https://avatars.githubusercontent.com/u/1688249?v=4",
"events_url": "https://api.github.com/users/mateusduboli/events{/privacy}",
"followers_url": "https://api.github.com/users/mateusduboli/followers",
"following_url": "https://api.github.com/users/mateusduboli/following{/other_user}",
"gists_url": "https://api.github.com/users/mateusduboli/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mateusduboli",
"id": 1688249,
"login": "mateusduboli",
"node_id": "MDQ6VXNlcjE2ODgyNDk=",
"organizations_url": "https://api.github.com/users/mateusduboli/orgs",
"received_events_url": "https://api.github.com/users/mateusduboli/received_events",
"repos_url": "https://api.github.com/users/mateusduboli/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mateusduboli/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mateusduboli/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mateusduboli",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 9 | 2020-12-03T00:55:49Z | 2023-06-26T12:06:39Z | null | CONTRIBUTOR | null | There are inconsistencies when working with proxy environment variables using `Session` objects.
When using `Session#request` or verb methods (`get`, `post`, `put`), those work correctly and use the proxy when they are present.
However `Session#send(PreparedRequest)` does not respect the variables by default, but does when it handles redirect responses, e.g. `303`.
I've written a test class to present this behavior.
## Expected Result
All methods in `Session` to respect the proxy variable.
## Actual Result
`Session#send(PreparedRequest)` does not respect proxy environment variables.
## Reproduction Steps
Test case 1 fails with a successful request.
```python
import requests
import pytest
# Copied from requests/tests/utils.py for making this a standalone
import os
import contextlib
@contextlib.contextmanager
def override_environ(**kwargs):
save_env = dict(os.environ)
for key, value in kwargs.items():
if value is None:
del os.environ[key]
else:
os.environ[key] = value
try:
yield
finally:
os.environ.clear()
os.environ.update(save_env)
class TestSession:
def test_respect_proxy_env_on_send(self):
session = requests.Session()
# Does not respect the proxy configuration and ignores the proxy
request = requests.Request(
method='GET', url='https://www.google.com/'
)
with override_environ(https_proxy='http://example.com'):
try:
session.send(request.prepare())
assert False, "The proxy is invalid this request should not be successful."
except requests.exceptions.ProxyError as e:
assert 'Cannot connect to proxy' in str(e)
def test_respect_proxy_env_on_send_with_redirects(self):
session = requests.Session()
# Returns a 303 to www.google.com and respects the proxy
request = requests.Request(
method='GET', url='https://google.com/'
)
with override_environ(https_proxy='http://example.com'):
try:
session.send(request.prepare())
assert False, "The proxy is invalid this request should not be successful."
except requests.exceptions.ProxyError as e:
assert 'Cannot connect to proxy' in str(e)
def test_respect_proxy_env_on_get(self):
session = requests.Session()
with override_environ(https_proxy='http://example.com'):
try:
# No redirects
session.get('https://www.google.com')
assert False, "The proxy is invalid this request should not be successful."
except requests.exceptions.ProxyError as e:
assert 'Cannot connect to proxy' in str(e)
def test_respect_proxy_env_on_request(self):
session = requests.Session()
with override_environ(https_proxy='http://example.com'):
try:
# No redirects
session.request(method='GET', url='https://www.google.com')
assert False, "The proxy is invalid this request should not be successful."
except requests.exceptions.ProxyError as e:
assert 'Cannot connect to proxy' in str(e)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.8.1"
},
"platform": {
"release": "5.9.8-100.fc32.x86_64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.25.0"
},
"system_ssl": {
"version": "100020ff"
},
"urllib3": {
"version": "1.26.2"
},
"using_pyopenssl": false
}
```
| null | {
"+1": 2,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 2,
"url": "https://api.github.com/repos/psf/requests/issues/5677/reactions"
} | https://api.github.com/repos/psf/requests/issues/5677/timeline | null | null | null | null | false | [
"I believe things will work if you use `Session.prepare_request(request)` instead of `request.prepare()`. ",
"Doesn't seem to be the case.\r\n\r\n```python\r\n def test_respect_proxy_env_on_send_session_prepared_request(self):\r\n session = requests.Session()\r\n\r\n # Does not respect the proxy ... |
https://api.github.com/repos/psf/requests/issues/5676 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5676/labels{/name} | https://api.github.com/repos/psf/requests/issues/5676/comments | https://api.github.com/repos/psf/requests/issues/5676/events | https://github.com/psf/requests/issues/5676 | 755,662,945 | MDU6SXNzdWU3NTU2NjI5NDU= | 5,676 | Waiting on 503 | {
"avatar_url": "https://avatars.githubusercontent.com/u/71735710?v=4",
"events_url": "https://api.github.com/users/elanjcoop/events{/privacy}",
"followers_url": "https://api.github.com/users/elanjcoop/followers",
"following_url": "https://api.github.com/users/elanjcoop/following{/other_user}",
"gists_url": "https://api.github.com/users/elanjcoop/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/elanjcoop",
"id": 71735710,
"login": "elanjcoop",
"node_id": "MDQ6VXNlcjcxNzM1NzEw",
"organizations_url": "https://api.github.com/users/elanjcoop/orgs",
"received_events_url": "https://api.github.com/users/elanjcoop/received_events",
"repos_url": "https://api.github.com/users/elanjcoop/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/elanjcoop/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/elanjcoop/subscriptions",
"type": "User",
"url": "https://api.github.com/users/elanjcoop",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-12-02T22:38:58Z | 2021-08-28T00:06:05Z | 2020-12-02T22:52:00Z | NONE | resolved | Please refer to our [Stack Overflow tag](https://stackoverflow.com/questions/tagged/python-requests) for guidance.
Hello!
I'm encountering a 503 error of DDOS protection by cloudfare when using the library.
My code is as follows:
s = requests.Session()
h = s.get('https://www.pcpartpicker.com')
print(h.status)code)
>>> 503
So what I want to happen is for there to be a minimum 5 second wait from doing the get request to actually getting the page and printing the page contents.
Is this doable? I find that timeout only works by waiting for a response, but the 503 response comes immediately so that's unhelpful.
Thanks for reading! | {
"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/5676/reactions"
} | https://api.github.com/repos/psf/requests/issues/5676/timeline | null | completed | null | null | false | [
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here."
] |
https://api.github.com/repos/psf/requests/issues/5675 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5675/labels{/name} | https://api.github.com/repos/psf/requests/issues/5675/comments | https://api.github.com/repos/psf/requests/issues/5675/events | https://github.com/psf/requests/issues/5675 | 753,718,286 | MDU6SXNzdWU3NTM3MTgyODY= | 5,675 | [Bug/Feature?] HTTP 206 Multipart Byterange (Multiple HTTP Range response) | {
"avatar_url": "https://avatars.githubusercontent.com/u/23286051?v=4",
"events_url": "https://api.github.com/users/danieldjewell/events{/privacy}",
"followers_url": "https://api.github.com/users/danieldjewell/followers",
"following_url": "https://api.github.com/users/danieldjewell/following{/other_user}",
"gists_url": "https://api.github.com/users/danieldjewell/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/danieldjewell",
"id": 23286051,
"login": "danieldjewell",
"node_id": "MDQ6VXNlcjIzMjg2MDUx",
"organizations_url": "https://api.github.com/users/danieldjewell/orgs",
"received_events_url": "https://api.github.com/users/danieldjewell/received_events",
"repos_url": "https://api.github.com/users/danieldjewell/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/danieldjewell/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/danieldjewell/subscriptions",
"type": "User",
"url": "https://api.github.com/users/danieldjewell",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-11-30T18:51:37Z | 2021-08-28T00:06:06Z | 2020-12-01T16:12:10Z | NONE | resolved | Not sure if this is a bug or a feature?
Requests happily will build and parse an HTTP GET with the ```Range:``` header to request specific bytes from a server. (Assuming the server supports it, of course.)
Specifically, setting the header to say:
```python
headers = {'Range': 'bytes 0-100, 1000-2000'}
```
See [the Mozilla HTTP reference on HTTP Range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range) for some more examples.
However, supplying a list of ranges in the request causes response processing to break down - the response is there, but it's not fully parsed: per [RFC 7233 Section 4.1](https://tools.ietf.org/html/rfc7233#section-4.1) the server *MUST* respond with a ```Content-Type:``` of ```multipart/byteranges``` and the associated boundary parameter that separates the ranges. In the raw response, each range is separated by the boundary parameter and then has a few small headers for each of the ranges in the response.
## Expected Result
Parsing of the returned individual ranges into something usable - perhaps one of the following:
- A collection of some sort that contains the individual parsed headers and range data (this might be a bigger way to do it - instead of a Response object, perhaps a MultipartResponse that then parses the individual headers and allows access to the separate ranges)
- At a minimum, transparent concatenation of the response data into a contiguous stream that can be accessed/iterated as a normal response can.
## Actual Result
The response data contains the unparsed/unseparated ranges of data instead of header parsed data.
## Reproduction Steps
```python
import requests as req
headers={'Range': 'bytes 0-100, 1000-2000'}
response = req.get('<Some URL from a server that supports range>', headers=headers)
response.content
```
## System Information
Tested on Python 3.8/3.9 - Linux - Requests v2.25.0, urllib3 1.26.2
| {
"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/5675/reactions"
} | https://api.github.com/repos/psf/requests/issues/5675/timeline | null | completed | null | null | false | [
"This would be a feature request and the project is presently under a feature freeze. To handle Multipart responses you can use the toolbelt's multipart decoder to accomplish much of this yourself."
] |
https://api.github.com/repos/psf/requests/issues/5674 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5674/labels{/name} | https://api.github.com/repos/psf/requests/issues/5674/comments | https://api.github.com/repos/psf/requests/issues/5674/events | https://github.com/psf/requests/issues/5674 | 753,290,265 | MDU6SXNzdWU3NTMyOTAyNjU= | 5,674 | Offline installation in python2.7 | {
"avatar_url": "https://avatars.githubusercontent.com/u/61306204?v=4",
"events_url": "https://api.github.com/users/heart-scalpel/events{/privacy}",
"followers_url": "https://api.github.com/users/heart-scalpel/followers",
"following_url": "https://api.github.com/users/heart-scalpel/following{/other_user}",
"gists_url": "https://api.github.com/users/heart-scalpel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/heart-scalpel",
"id": 61306204,
"login": "heart-scalpel",
"node_id": "MDQ6VXNlcjYxMzA2MjA0",
"organizations_url": "https://api.github.com/users/heart-scalpel/orgs",
"received_events_url": "https://api.github.com/users/heart-scalpel/received_events",
"repos_url": "https://api.github.com/users/heart-scalpel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/heart-scalpel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/heart-scalpel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/heart-scalpel",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2020-11-30T09:01:09Z | 2021-08-28T00:06:06Z | 2020-11-30T13:34:23Z | NONE | resolved | Thank you for taking the time to review this request,I want install this package , but I use python2.7, I can't install urllib3,So what can I do to finish this installation
requires = [
'chardet>=3.0.2,<4',
'idna>=2.5,<3',
'urllib3>=1.21.1,<1.26,!=1.25.0,!=1.25.1',
'certifi>=2017.4.17'
]
| {
"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/5674/reactions"
} | https://api.github.com/repos/psf/requests/issues/5674/timeline | null | completed | null | null | false | [
"I need work in python2.7, I can't change the version.(cry)",
"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 defec... |
https://api.github.com/repos/psf/requests/issues/5673 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5673/labels{/name} | https://api.github.com/repos/psf/requests/issues/5673/comments | https://api.github.com/repos/psf/requests/issues/5673/events | https://github.com/psf/requests/pull/5673 | 752,971,279 | MDExOlB1bGxSZXF1ZXN0NTI5MTQ3MjUz | 5,673 | updated `get_encoding_from_headers` to return utf-8 if the content type is set to application/json | {
"avatar_url": "https://avatars.githubusercontent.com/u/2326898?v=4",
"events_url": "https://api.github.com/users/jjmaldonis/events{/privacy}",
"followers_url": "https://api.github.com/users/jjmaldonis/followers",
"following_url": "https://api.github.com/users/jjmaldonis/following{/other_user}",
"gists_url": "https://api.github.com/users/jjmaldonis/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jjmaldonis",
"id": 2326898,
"login": "jjmaldonis",
"node_id": "MDQ6VXNlcjIzMjY4OTg=",
"organizations_url": "https://api.github.com/users/jjmaldonis/orgs",
"received_events_url": "https://api.github.com/users/jjmaldonis/received_events",
"repos_url": "https://api.github.com/users/jjmaldonis/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jjmaldonis/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jjmaldonis/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jjmaldonis",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-11-29T18:00:53Z | 2021-08-27T00:08:57Z | 2020-11-29T18:19:16Z | CONTRIBUTOR | resolved | This PR fixes #5667 by adding a small bit of code to `get_encoding_from_headers` that returns `utf-8` if the content type is set to `application/json` and `charset` is not set. This follows [RFC 4627](https://www.ietf.org/rfc/rfc4627.txt) (ctrl+f for `shall be`) which reads: "JSON text SHALL be encoded in Unicode. The default encoding is UTF-8." | {
"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/5673/reactions"
} | https://api.github.com/repos/psf/requests/issues/5673/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5673.diff",
"html_url": "https://github.com/psf/requests/pull/5673",
"merged_at": "2020-11-29T18:19:16Z",
"patch_url": "https://github.com/psf/requests/pull/5673.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5673"
} | true | [
"Awesome, thanks for the fast responses here and for merging!"
] |
https://api.github.com/repos/psf/requests/issues/5672 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5672/labels{/name} | https://api.github.com/repos/psf/requests/issues/5672/comments | https://api.github.com/repos/psf/requests/issues/5672/events | https://github.com/psf/requests/pull/5672 | 752,736,439 | MDExOlB1bGxSZXF1ZXN0NTI4OTg5NTA3 | 5,672 | Fix broken link to Kenneth Rietz page | {
"avatar_url": "https://avatars.githubusercontent.com/u/12448084?v=4",
"events_url": "https://api.github.com/users/sivaraam/events{/privacy}",
"followers_url": "https://api.github.com/users/sivaraam/followers",
"following_url": "https://api.github.com/users/sivaraam/following{/other_user}",
"gists_url": "https://api.github.com/users/sivaraam/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sivaraam",
"id": 12448084,
"login": "sivaraam",
"node_id": "MDQ6VXNlcjEyNDQ4MDg0",
"organizations_url": "https://api.github.com/users/sivaraam/orgs",
"received_events_url": "https://api.github.com/users/sivaraam/received_events",
"repos_url": "https://api.github.com/users/sivaraam/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sivaraam/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sivaraam/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sivaraam",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2020-11-28T18:09:19Z | 2021-08-28T00:06:13Z | 2020-11-28T18:21:03Z | CONTRIBUTOR | resolved | The link to Kenneth Reitz page seems to be broken now.
Fix it by using a currently active link. | {
"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/5672/reactions"
} | https://api.github.com/repos/psf/requests/issues/5672/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5672.diff",
"html_url": "https://github.com/psf/requests/pull/5672",
"merged_at": "2020-11-28T18:21:03Z",
"patch_url": "https://github.com/psf/requests/pull/5672.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5672"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/5671 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5671/labels{/name} | https://api.github.com/repos/psf/requests/issues/5671/comments | https://api.github.com/repos/psf/requests/issues/5671/events | https://github.com/psf/requests/issues/5671 | 752,649,243 | MDU6SXNzdWU3NTI2NDkyNDM= | 5,671 | Urllib3 >1.26.x | Introduces default User-Agent header | {
"avatar_url": "https://avatars.githubusercontent.com/u/66376450?v=4",
"events_url": "https://api.github.com/users/prilly-dev/events{/privacy}",
"followers_url": "https://api.github.com/users/prilly-dev/followers",
"following_url": "https://api.github.com/users/prilly-dev/following{/other_user}",
"gists_url": "https://api.github.com/users/prilly-dev/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/prilly-dev",
"id": 66376450,
"login": "prilly-dev",
"node_id": "MDQ6VXNlcjY2Mzc2NDUw",
"organizations_url": "https://api.github.com/users/prilly-dev/orgs",
"received_events_url": "https://api.github.com/users/prilly-dev/received_events",
"repos_url": "https://api.github.com/users/prilly-dev/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/prilly-dev/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/prilly-dev/subscriptions",
"type": "User",
"url": "https://api.github.com/users/prilly-dev",
"user_view_type": "public"
} | [] | open | 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"
} | [
{
"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}... | null | 2 | 2020-11-28T10:32:24Z | 2022-01-06T16:40:21Z | null | NONE | null | With pyrequest pullrequest https://github.com/psf/requests/commit/03957eb1c2b9a1e5e6d61f5e930d7c5ed7cfe853 v2.25.0 urllib3 is updated to v1.26.0. with this version bump urllib3 has changed default behavior in regards to header "User-Agent" : https://pypi.org/project/urllib3/
urllib3 1.26.0
```
Added default User-Agent header to every request (Pull #1750)
Added urllib3.util.SKIP_HEADER for skipping User-Agent, Accept-Encoding, and Host headers from being automatically emitted with requests (Pull #2018)
```
Urllib3 now introduces default User-Agent header when no user-agent header is set. Urlib3 also introduces the function "urllib3.util.SKIP_HEADER" as a means to deactivate default user-agent header.
## Expected Result
Pyrequest should adopt easy means of deactivating "User-Agent" headers by utilizing the "urllib3.util.SKIP_HEADER" function
## Actual Result
Default "User-agent" header is enforced when no header= is specified.
by using headers={"User-Agent": none} no longer deactivate default "user-agent" while using headers={"User-Agent": ""} will deactivate "user-agent" header
## Reproduction Steps
```python
import requests
req = Request('POST', url=BASE_URL + endpoint, data=params).prepare()
```
---> Deafult "user-agent" is enforced "User-Agent: python-urllib3/1.26.2"
```
req = Request('POST', url=BASE_URL + endpoint, headers={"User-Agent": None}, data=params).prepare()
```
---> Does not deactivate "User-Agent"
```
req = Request('POST', url=BASE_URL + endpoint, headers={"User-Agent": ""}, data=params).prepare()
```
Deactivates "User-Agent" succesfully
```
## System Information
$ python -m requests.help
```
<paste here>
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
Python 3.8, Docker
| 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/5671/reactions"
} | https://api.github.com/repos/psf/requests/issues/5671/timeline | null | null | null | null | false | [
"Hi @prilly-dev, thanks for bringing this to our attention. I was actually surprised to see Requests wasn't emitting a header here, but it appears this is specific to the Session workflow.\r\n\r\nWe'll probably need something that is tolerant to urllib3 < 1.26 not being installed. I'm not immediately sure if that ... |
https://api.github.com/repos/psf/requests/issues/5670 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5670/labels{/name} | https://api.github.com/repos/psf/requests/issues/5670/comments | https://api.github.com/repos/psf/requests/issues/5670/events | https://github.com/psf/requests/pull/5670 | 752,171,980 | MDExOlB1bGxSZXF1ZXN0NTI4NTQ3NzA5 | 5,670 | Proxy related doc updates | {
"avatar_url": "https://avatars.githubusercontent.com/u/3236794?v=4",
"events_url": "https://api.github.com/users/smarie/events{/privacy}",
"followers_url": "https://api.github.com/users/smarie/followers",
"following_url": "https://api.github.com/users/smarie/following{/other_user}",
"gists_url": "https://api.github.com/users/smarie/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/smarie",
"id": 3236794,
"login": "smarie",
"node_id": "MDQ6VXNlcjMyMzY3OTQ=",
"organizations_url": "https://api.github.com/users/smarie/orgs",
"received_events_url": "https://api.github.com/users/smarie/received_events",
"repos_url": "https://api.github.com/users/smarie/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/smarie/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/smarie/subscriptions",
"type": "User",
"url": "https://api.github.com/users/smarie",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 8 | 2020-11-27T11:06:11Z | 2021-08-27T00:08:49Z | 2020-12-04T19:38:17Z | NONE | resolved | Hi, I have spent the past 15 years working in professional environments where the http/https proxy was the most annoying issue to myself and all my developer colleagues (in java, matlab, python...). A few years ago I even ended up writing a internal tutorial for our corporate proxy, a public one (https://smarie.github.io/develop-behind-proxy/), and a environment switching tool (https://smarie.github.io/env-switcher-gui/) that is used by many of us especially the ones switching from home office to work place regularly.
This introduction just to say that even if this is issue is now fairly trivial to me, I have been helping hundreds of colleagues over the year (and am still from time to time) so I believe that it is not yet easy to understand for most people.
`requests` is working perfectly fine with proxies. However the way it finds the proxy-related information is not very well documented, and the way one can override this information on a `Session` is quite un-pythonic (a plain dict, therefore possibly error-prone). Some work I did a few months ago using `requests-oauthlib` made me once again think that it would be extremely helpful to have a good helper function on the `Session` object.
This PR contains two things:
- a `Session.set_http_proxy` method with associated unit tests
- an update for the Proxies documentation section
I had one afterthought after completing this, maybe you'll find this relevant too: instead of providing just one `set_http_proxy` method, maybe it would be better to split it into two : `set_http_proxy` and `set_https_proxy`. Far more simple and elegant in my opinion, but I'll wait for your first feedback before modding anything here.
Thanks for your time and for maintaining this great lib!
| {
"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/5670/reactions"
} | https://api.github.com/repos/psf/requests/issues/5670/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5670.diff",
"html_url": "https://github.com/psf/requests/pull/5670",
"merged_at": "2020-12-04T19:38:17Z",
"patch_url": "https://github.com/psf/requests/pull/5670.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5670"
} | true | [
"Hi @smarie ,\r\n\r\nThanks for sending this along. Unfortunately, Requests is under a feature freeze so we're not accepting any changes that introduce new API surface area. Documentation updates to make things clearer/more explicit are always welcome though.",
"Thanks @sigmavirus24 ! I had hoped that such helper... |
https://api.github.com/repos/psf/requests/issues/5669 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5669/labels{/name} | https://api.github.com/repos/psf/requests/issues/5669/comments | https://api.github.com/repos/psf/requests/issues/5669/events | https://github.com/psf/requests/issues/5669 | 751,664,464 | MDU6SXNzdWU3NTE2NjQ0NjQ= | 5,669 | a post request body has one key corresponds to multiple values。 | {
"avatar_url": "https://avatars.githubusercontent.com/u/48149977?v=4",
"events_url": "https://api.github.com/users/mabeijing/events{/privacy}",
"followers_url": "https://api.github.com/users/mabeijing/followers",
"following_url": "https://api.github.com/users/mabeijing/following{/other_user}",
"gists_url": "https://api.github.com/users/mabeijing/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mabeijing",
"id": 48149977,
"login": "mabeijing",
"node_id": "MDQ6VXNlcjQ4MTQ5OTc3",
"organizations_url": "https://api.github.com/users/mabeijing/orgs",
"received_events_url": "https://api.github.com/users/mabeijing/received_events",
"repos_url": "https://api.github.com/users/mabeijing/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mabeijing/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mabeijing/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mabeijing",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-11-26T15:11:37Z | 2021-08-28T00:06:07Z | 2020-11-26T16:04:06Z | NONE | resolved | requests version = 2.22.0
I had some trouble sending a post request。
headers = {'Content-Type': 'application/x-www-form-urlencoded'},
the body_data has a key corresponds to multiple values,

my scripts

data = cargo_info.update(important_info)
requests.post(url, data=data, headers=headers)
the result takes the cargo_info['cargoName'] as one good('["无烟煤", "铝合金"]') not two.
and I don't know what to do。please help me。thinks | {
"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/5669/reactions"
} | https://api.github.com/repos/psf/requests/issues/5669/timeline | null | completed | null | null | false | [
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here."
] |
https://api.github.com/repos/psf/requests/issues/5668 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5668/labels{/name} | https://api.github.com/repos/psf/requests/issues/5668/comments | https://api.github.com/repos/psf/requests/issues/5668/events | https://github.com/psf/requests/issues/5668 | 750,244,584 | MDU6SXNzdWU3NTAyNDQ1ODQ= | 5,668 | Request with chunked encoding doesn't respect timeout | {
"avatar_url": "https://avatars.githubusercontent.com/u/31767?v=4",
"events_url": "https://api.github.com/users/kchen/events{/privacy}",
"followers_url": "https://api.github.com/users/kchen/followers",
"following_url": "https://api.github.com/users/kchen/following{/other_user}",
"gists_url": "https://api.github.com/users/kchen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kchen",
"id": 31767,
"login": "kchen",
"node_id": "MDQ6VXNlcjMxNzY3",
"organizations_url": "https://api.github.com/users/kchen/orgs",
"received_events_url": "https://api.github.com/users/kchen/received_events",
"repos_url": "https://api.github.com/users/kchen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kchen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kchen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kchen",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 5 | 2020-11-25T01:30:18Z | 2024-07-02T11:46:46Z | null | NONE | null | If I use requests to send a POST request and pass in a generator (and therefore the request uses chunked encoding), the timeout parameter is not respected. If I use a fixed bytes object instead of a generator, the timeout is respected.
## Expected Result
The request should time out (in the reproduction steps below, after 2 seconds).
## Actual Result
The request did not time out. The reproduction steps below print "Connecting to http://localhost:15382/" and then hangs there.
## Reproduction Steps
Run "nc -l 15382", and then the program below:
```python
import requests
url = "http://localhost:15382/"
def generator():
yield b"a"
yield b"b"
print(f"Connecting to {url}")
try:
requests.post(url, timeout=2, data=generator())
print(f"Completed connecting to {url}")
except Exception as exc:
print(f"Got {exc}")
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.7"
},
"implementation": {
"name": "CPython",
"version": "3.8.5"
},
"platform": {
"release": "4.15.0-111-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1010104f"
},
"urllib3": {
"version": "1.25.3"
},
"using_pyopenssl": false
}
```
It appears that HTTPAdapter.send() uses the timeout for non-chunked requests, but not for chunked requests, so that may be the cause of this issue.
(I initially investigated this bug after finding that my POST request of a large file to an HTTPS server was timing out after about 6 minutes (when I had a 10 minute timeout set). I haven't been able to reproduce the 6 minute timeout with a simple test case, but it seems like that may consist of 1 minute to send the large file, and after sending the file, it looks like openssl may have a default 5 minute timeout if not overridden. If this analysis is correct, a fix should also ensure the openssl timeout is updated as well.) | 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/5668/reactions"
} | https://api.github.com/repos/psf/requests/issues/5668/timeline | null | null | null | null | false | [
"We also ran into this issue the other day. The default timeout seems to be infinite, so if you're unlucky the HTTP POST request will end up blocking forever.",
"it depends on the http response header",
"We are observing that behaviour too. Did you manage to fix that?",
"Nope, I worked around it. (My project... |
https://api.github.com/repos/psf/requests/issues/5667 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5667/labels{/name} | https://api.github.com/repos/psf/requests/issues/5667/comments | https://api.github.com/repos/psf/requests/issues/5667/events | https://github.com/psf/requests/issues/5667 | 749,293,805 | MDU6SXNzdWU3NDkyOTM4MDU= | 5,667 | r.text and r.json() return different results *in some cases* | {
"avatar_url": "https://avatars.githubusercontent.com/u/2326898?v=4",
"events_url": "https://api.github.com/users/jjmaldonis/events{/privacy}",
"followers_url": "https://api.github.com/users/jjmaldonis/followers",
"following_url": "https://api.github.com/users/jjmaldonis/following{/other_user}",
"gists_url": "https://api.github.com/users/jjmaldonis/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jjmaldonis",
"id": 2326898,
"login": "jjmaldonis",
"node_id": "MDQ6VXNlcjIzMjY4OTg=",
"organizations_url": "https://api.github.com/users/jjmaldonis/orgs",
"received_events_url": "https://api.github.com/users/jjmaldonis/received_events",
"repos_url": "https://api.github.com/users/jjmaldonis/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jjmaldonis/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jjmaldonis/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jjmaldonis",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2020-11-24T02:47:03Z | 2021-08-28T00:06:06Z | 2020-11-29T18:19:16Z | CONTRIBUTOR | resolved | This might be an interesting one... I found that `r.text` and `r.json()` _can_ return different results in some specific cases. I don't understand why the difference between the two cases is changing the result of `r.text`.
Maybe `r.text` should always default to using `utf-8` as the decoding if `application/json` is set as the response's content type, following https://www.ietf.org/rfc/rfc4627.txt (ctrl+f for `JSON text SHALL be encoded in Unicode.`).
I'm using the latest version of requests.
## Expected Result
I would expect `r.text` and `r.json()` to return ~ the same thing. More specifically, I would expect `json.loads(r.text)` and `r.json()` to return the same thing, but the issue seems to be with `r.text`'s decoding specifically.
## Actual Result
In the following code, I am making a sample request and replacing the request's response with custom content so we have full control over it. The custom content is utf-8 encoded. In the next version of this code, you'll see the `name` change when it shouldn't.
```python
import requests
import json
r = requests.get("https://api.covidtracking.com/v1/us/current.json")
r._content = b'{"name":"rd\xce\xba"}' # This is utf-8
r.headers = {
"Content-Type": "application/json",
}
print(r.json())
print(json.loads(r.text))
```
The above code prints:
```
{'name': 'rdκ'}
{'name': 'rdκ'}
```
which is fantastic.
Replacing the request's content with `b'{"name":"rd\xce\xba","uuid":"1234"}'`, which simply adds a `uuid` field to the JSON, and running the code again prints:
```
{'name': 'rdκ', 'uuid': '1234'}
{'name': 'rdκ', 'uuid': '1234'}
```
The `name` is different even though it did not change at all! The existence of `"uuid":"1234"` in the response's contents somehow changes the decoding. I have no clue why.
## Reproduction Steps
Run this code:
```python
import requests
import json
r = requests.get("https://api.covidtracking.com/v1/us/current.json")
r._content = b'{"name":"rd\xce\xba","uuid":"1234"}'
r.headers = {
"Content-Type": "application/json",
}
print(r.json())
print(json.loads(r.text))
```
The issue should be fixed when the two print statements match... I think.
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.7"
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.7.4"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "1010103f",
"version": "19.0.0"
},
"requests": {
"version": "2.25.0"
},
"system_ssl": {
"version": "1010104f"
},
"urllib3": {
"version": "1.24.2"
},
"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/5667/reactions"
} | https://api.github.com/repos/psf/requests/issues/5667/timeline | null | completed | null | null | false | [
"I looked into this some more and the reason for the difference is that `chardet` is guessing different text encodings for the two different strings.\r\n\r\nI propose that, based on RFC 4627, if the response's content type is set to `application/json` that `utf` be used as the encoding by default rather than using ... |
https://api.github.com/repos/psf/requests/issues/5666 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5666/labels{/name} | https://api.github.com/repos/psf/requests/issues/5666/comments | https://api.github.com/repos/psf/requests/issues/5666/events | https://github.com/psf/requests/issues/5666 | 747,361,408 | MDU6SXNzdWU3NDczNjE0MDg= | 5,666 | Getting stuck even with timeout | {
"avatar_url": "https://avatars.githubusercontent.com/u/33482468?v=4",
"events_url": "https://api.github.com/users/JakkuSakura/events{/privacy}",
"followers_url": "https://api.github.com/users/JakkuSakura/followers",
"following_url": "https://api.github.com/users/JakkuSakura/following{/other_user}",
"gists_url": "https://api.github.com/users/JakkuSakura/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JakkuSakura",
"id": 33482468,
"login": "JakkuSakura",
"node_id": "MDQ6VXNlcjMzNDgyNDY4",
"organizations_url": "https://api.github.com/users/JakkuSakura/orgs",
"received_events_url": "https://api.github.com/users/JakkuSakura/received_events",
"repos_url": "https://api.github.com/users/JakkuSakura/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JakkuSakura/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JakkuSakura/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JakkuSakura",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-11-20T10:11:54Z | 2021-08-28T00:06:08Z | 2020-11-20T15:19:37Z | NONE | resolved | I'm trying to request google search results and access the top few links. However, it always gets stuck on some sites. Ctrl-C is not in effect but Ctrl-Z does bring me to the terminal.
I have set a timeout for each request.
I have read messages that DNS is one of the sources of blocking and I patched this with an HTTP adapter.
It seems that the requests library is using blocking TCP connection(not sure), where the program has no control over the timeout if the underlying implementation does not return.
In another scenario, the connection is perfectly slow or the page is unexpected too big such that this connection keeps forever. This case is obviously not a bug but a vulnerability that can be used to anti-spider.
I would like to set a hard limit for my connection, regardless of DNS, TCP handshaking time, TLS handshaking time, or uploading/downloading time, and at any time I would like to exit, I just enter Ctrl-C. This can be done by using requests in another thread(POSIX thread)/process, ungracefully.
My program just stuck again. | {
"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/5666/reactions"
} | https://api.github.com/repos/psf/requests/issues/5666/timeline | null | completed | null | null | false | [
"In the future, please search **closed and** open issues before creating new ones that are duplicates."
] |
https://api.github.com/repos/psf/requests/issues/5665 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5665/labels{/name} | https://api.github.com/repos/psf/requests/issues/5665/comments | https://api.github.com/repos/psf/requests/issues/5665/events | https://github.com/psf/requests/pull/5665 | 746,843,383 | MDExOlB1bGxSZXF1ZXN0NTI0MTY1Nzg4 | 5,665 | Add support for HTTPS proxies. | {
"avatar_url": "https://avatars.githubusercontent.com/u/1276443?v=4",
"events_url": "https://api.github.com/users/jalopezsilva/events{/privacy}",
"followers_url": "https://api.github.com/users/jalopezsilva/followers",
"following_url": "https://api.github.com/users/jalopezsilva/following{/other_user}",
"gists_url": "https://api.github.com/users/jalopezsilva/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jalopezsilva",
"id": 1276443,
"login": "jalopezsilva",
"node_id": "MDQ6VXNlcjEyNzY0NDM=",
"organizations_url": "https://api.github.com/users/jalopezsilva/orgs",
"received_events_url": "https://api.github.com/users/jalopezsilva/received_events",
"repos_url": "https://api.github.com/users/jalopezsilva/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jalopezsilva/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jalopezsilva/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jalopezsilva",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 5 | 2020-11-19T19:00:06Z | 2022-01-03T15:23:25Z | null | NONE | null | Starting with 1.26 urllib3 now supports HTTPS proxies. To enable the support two changes are needed:
* An additional proxy_kwargs argument that can be passed from the session. This dictionary will be used to pass any arguments needed to the underlying adapter. The parameter is optional.
* The use_forwarding_for_https mode requires us to send the absolute URI when enabled.
The resulting API is very similar except it takes an additional parameter when needed. An example:
```
session = requests.Session()
proxies = {"http": "https://proxy.example", "https": "https://proxy.example"}
proxies_kwargs = {
"proxy_ssl_context": proxy_ssl_context(),
}
response = session.get(
"https://www.google.com", proxies=proxies, proxies_kwargs=proxies_kwargs
)
```
| 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/5665/reactions"
} | https://api.github.com/repos/psf/requests/issues/5665/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5665.diff",
"html_url": "https://github.com/psf/requests/pull/5665",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5665.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5665"
} | true | [
"Requests is under feature freeze which means we will not add any additional keyword arguments to the public API like this.",
"@sigmavirus24 thanks for the feedback! Is adding an additional keyword argument to the public API the only concern? I've been reviewing the options available and there's no easy way aroun... |
https://api.github.com/repos/psf/requests/issues/5664 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5664/labels{/name} | https://api.github.com/repos/psf/requests/issues/5664/comments | https://api.github.com/repos/psf/requests/issues/5664/events | https://github.com/psf/requests/pull/5664 | 745,479,854 | MDExOlB1bGxSZXF1ZXN0NTIzMDM3NjI1 | 5,664 | Use urllib for chunked requests (Resubmit) | {
"avatar_url": "https://avatars.githubusercontent.com/u/15229879?v=4",
"events_url": "https://api.github.com/users/lmvlmv/events{/privacy}",
"followers_url": "https://api.github.com/users/lmvlmv/followers",
"following_url": "https://api.github.com/users/lmvlmv/following{/other_user}",
"gists_url": "https://api.github.com/users/lmvlmv/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lmvlmv",
"id": 15229879,
"login": "lmvlmv",
"node_id": "MDQ6VXNlcjE1MjI5ODc5",
"organizations_url": "https://api.github.com/users/lmvlmv/orgs",
"received_events_url": "https://api.github.com/users/lmvlmv/received_events",
"repos_url": "https://api.github.com/users/lmvlmv/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lmvlmv/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lmvlmv/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lmvlmv",
"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"
}
] | closed | true | null | [] | null | 7 | 2020-11-18T09:16:53Z | 2024-04-23T00:03:50Z | 2023-04-23T18:05:04Z | CONTRIBUTOR | resolved | This is a resubmit of Use urllib for chunked requests #5128 which was merged and then pulled without warning.
"Resubmit of #4958 with up to date merge. Also addresses #4179.
Specifically, in my use case, chunked requests when a proxy is in use results in failure to evaluate the proxy configuration and the request being sent direct. It appears that urllib3 supports chunking as an option so this fork to lower level urllib3 code seems to no longer be required."
[](https://github.com/psf/requests/pull/5128)
| {
"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/5664/reactions"
} | https://api.github.com/repos/psf/requests/issues/5664/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5664.diff",
"html_url": "https://github.com/psf/requests/pull/5664",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5664.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5664"
} | true | [
"Hi @lmvlmv,\r\n\r\nThanks for reraising the issue. We're aware there's still demand for simplifying this. The reason the first PR was reverted was a lack of review, and failing to meet the original criteria we'd set to make this change.\r\n\r\nWhen we first discussed this in #4392, we'd wanted a pretty rigorous te... |
https://api.github.com/repos/psf/requests/issues/5663 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5663/labels{/name} | https://api.github.com/repos/psf/requests/issues/5663/comments | https://api.github.com/repos/psf/requests/issues/5663/events | https://github.com/psf/requests/pull/5663 | 745,395,503 | MDExOlB1bGxSZXF1ZXN0NTIyOTY4MDkx | 5,663 | Pin GHA to Ubuntu 18.04 | {
"avatar_url": "https://avatars.githubusercontent.com/u/1324225?v=4",
"events_url": "https://api.github.com/users/hugovk/events{/privacy}",
"followers_url": "https://api.github.com/users/hugovk/followers",
"following_url": "https://api.github.com/users/hugovk/following{/other_user}",
"gists_url": "https://api.github.com/users/hugovk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hugovk",
"id": 1324225,
"login": "hugovk",
"node_id": "MDQ6VXNlcjEzMjQyMjU=",
"organizations_url": "https://api.github.com/users/hugovk/orgs",
"received_events_url": "https://api.github.com/users/hugovk/received_events",
"repos_url": "https://api.github.com/users/hugovk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hugovk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hugovk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hugovk",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2020-11-18T07:05:01Z | 2021-08-28T00:06:14Z | 2020-11-18T16:32:03Z | CONTRIBUTOR | resolved | Fixes https://github.com/psf/requests/issues/5662.
`ubuntu-latest` points to 18.04 and will soon flip to 20.04.
However tests currently fail on 20.04, so let's explicitly pin to 18.04 for now. | {
"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/5663/reactions"
} | https://api.github.com/repos/psf/requests/issues/5663/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5663.diff",
"html_url": "https://github.com/psf/requests/pull/5663",
"merged_at": "2020-11-18T16:32:03Z",
"patch_url": "https://github.com/psf/requests/pull/5663.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5663"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/5662 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5662/labels{/name} | https://api.github.com/repos/psf/requests/issues/5662/comments | https://api.github.com/repos/psf/requests/issues/5662/events | https://github.com/psf/requests/issues/5662 | 745,131,727 | MDU6SXNzdWU3NDUxMzE3Mjc= | 5,662 | GHA: Tests fail with ubuntu-20.04 | {
"avatar_url": "https://avatars.githubusercontent.com/u/1324225?v=4",
"events_url": "https://api.github.com/users/hugovk/events{/privacy}",
"followers_url": "https://api.github.com/users/hugovk/followers",
"following_url": "https://api.github.com/users/hugovk/following{/other_user}",
"gists_url": "https://api.github.com/users/hugovk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hugovk",
"id": 1324225,
"login": "hugovk",
"node_id": "MDQ6VXNlcjEzMjQyMjU=",
"organizations_url": "https://api.github.com/users/hugovk/orgs",
"received_events_url": "https://api.github.com/users/hugovk/received_events",
"repos_url": "https://api.github.com/users/hugovk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hugovk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hugovk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hugovk",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-11-17T22:22:47Z | 2021-08-28T00:06:08Z | 2020-11-18T16:32:03Z | CONTRIBUTOR | resolved | GitHub Actions fails when using the Ubuntu 20.04 image, and pass with 18.04.
## Expected Result
Tests pass on GitHub Actions with `ubuntu-20.04`
## Actual Result
Tests fail on GitHub Actions with `ubuntu-20.04` for CPython, pass on PyPy.
## Reproduction Steps
I noticed this annotation on [this recent build](https://github.com/hugovk/requests/actions/runs/368989395):
> Ubuntu-latest workflows will use Ubuntu-20.04 soon. For more details, see https://github.com/actions/virtual-environments/issues/1816
I ran a quick test with explicit `ubuntu-20.04` instead of `ubuntu-latest`:
* https://github.com/hugovk/requests/commit/43e1c9ee709d2efd18c9294b941babd816193f3d
* https://github.com/hugovk/requests/actions/runs/369014648
I've not looked into the failures in detail, one is `requests/adapters.py:514: SSLError`.
The linked https://github.com/actions/virtual-environments/issues/1816 says:
> **This change will be rolled out over a period of several weeks beginning on November, 30.** (December, 22 - January, 4 will be a migration break due to holidays)
It's also possible to explicitly pin to `ubuntu-18.04`, which passes:
* https://github.com/hugovk/requests/commit/69e5c04372eb6f6dc2d14bb8617d47df1ba1c199
* https://github.com/hugovk/requests/actions/runs/369033603
| {
"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/5662/reactions"
} | https://api.github.com/repos/psf/requests/issues/5662/timeline | null | completed | null | null | false | [
"Good catch, @hugovk! It looks like our local httpbin server for tests is having trouble either with the newer version of openssl or configuration being vended in 20.04. I think the best bet is to pin us to ubuntu-18.04 for now. We'll gladly accept a PR for that or I'll work on getting it resolved by the end of the... |
https://api.github.com/repos/psf/requests/issues/5661 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5661/labels{/name} | https://api.github.com/repos/psf/requests/issues/5661/comments | https://api.github.com/repos/psf/requests/issues/5661/events | https://github.com/psf/requests/pull/5661 | 745,114,551 | MDExOlB1bGxSZXF1ZXN0NTIyNzI5MDIw | 5,661 | Remove the deprecated security extra | {
"avatar_url": "https://avatars.githubusercontent.com/u/1324225?v=4",
"events_url": "https://api.github.com/users/hugovk/events{/privacy}",
"followers_url": "https://api.github.com/users/hugovk/followers",
"following_url": "https://api.github.com/users/hugovk/following{/other_user}",
"gists_url": "https://api.github.com/users/hugovk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hugovk",
"id": 1324225,
"login": "hugovk",
"node_id": "MDQ6VXNlcjEzMjQyMjU=",
"organizations_url": "https://api.github.com/users/hugovk/orgs",
"received_events_url": "https://api.github.com/users/hugovk/received_events",
"repos_url": "https://api.github.com/users/hugovk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hugovk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hugovk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hugovk",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-11-17T21:52:24Z | 2021-08-28T00:06:14Z | 2020-11-17T21:57:15Z | CONTRIBUTOR | resolved | > The requests[security] extra is officially deprecated and will be removed in Requests v2.26.0.
https://requests.readthedocs.io/en/latest/community/updates/ | {
"avatar_url": "https://avatars.githubusercontent.com/u/1324225?v=4",
"events_url": "https://api.github.com/users/hugovk/events{/privacy}",
"followers_url": "https://api.github.com/users/hugovk/followers",
"following_url": "https://api.github.com/users/hugovk/following{/other_user}",
"gists_url": "https://api.github.com/users/hugovk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hugovk",
"id": 1324225,
"login": "hugovk",
"node_id": "MDQ6VXNlcjEzMjQyMjU=",
"organizations_url": "https://api.github.com/users/hugovk/orgs",
"received_events_url": "https://api.github.com/users/hugovk/received_events",
"repos_url": "https://api.github.com/users/hugovk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hugovk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hugovk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hugovk",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5661/reactions"
} | https://api.github.com/repos/psf/requests/issues/5661/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5661.diff",
"html_url": "https://github.com/psf/requests/pull/5661",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5661.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5661"
} | true | [
"Closing, will be dealt with as part of the standard deprecation process at next release time:\r\n\r\n* https://github.com/psf/requests/pull/5660#issuecomment-729236559"
] |
https://api.github.com/repos/psf/requests/issues/5660 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5660/labels{/name} | https://api.github.com/repos/psf/requests/issues/5660/comments | https://api.github.com/repos/psf/requests/issues/5660/events | https://github.com/psf/requests/pull/5660 | 745,109,427 | MDExOlB1bGxSZXF1ZXN0NTIyNzI0Nzgx | 5,660 | Drop support for EOL Python 3.5 | {
"avatar_url": "https://avatars.githubusercontent.com/u/1324225?v=4",
"events_url": "https://api.github.com/users/hugovk/events{/privacy}",
"followers_url": "https://api.github.com/users/hugovk/followers",
"following_url": "https://api.github.com/users/hugovk/following{/other_user}",
"gists_url": "https://api.github.com/users/hugovk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hugovk",
"id": 1324225,
"login": "hugovk",
"node_id": "MDQ6VXNlcjEzMjQyMjU=",
"organizations_url": "https://api.github.com/users/hugovk/orgs",
"received_events_url": "https://api.github.com/users/hugovk/received_events",
"repos_url": "https://api.github.com/users/hugovk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hugovk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hugovk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hugovk",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2020-11-17T21:43:17Z | 2021-10-10T21:00:31Z | 2021-07-12T18:13:58Z | CONTRIBUTOR | resolved | > Requests v2.25.x will be the last release series with support for Python 3.5.
https://requests.readthedocs.io/en/latest/community/updates/ | {
"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/5660/reactions"
} | https://api.github.com/repos/psf/requests/issues/5660/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5660.diff",
"html_url": "https://github.com/psf/requests/pull/5660",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5660.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5660"
} | true | [
"Hey @hugovk,\r\n\r\nThanks for the PR! I think we're unlikely to release Requests 2.26.0 prior to urllib3 2.0's release. That may mean this PR sits unmerged for quite a while.\r\n\r\nWe also have a standard deprecation process for this that will be done at release time to clean up any remaining deprecation items. ... |
https://api.github.com/repos/psf/requests/issues/5659 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5659/labels{/name} | https://api.github.com/repos/psf/requests/issues/5659/comments | https://api.github.com/repos/psf/requests/issues/5659/events | https://github.com/psf/requests/pull/5659 | 744,082,206 | MDExOlB1bGxSZXF1ZXN0NTIxODY0NDgw | 5,659 | Remove reference to development philosophy | {
"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 | 2020-11-16T18:59:45Z | 2021-08-28T00:06:15Z | 2020-11-16T19:19:06Z | MEMBER | resolved | Removing missed reference from the #5562 cleanup. This should resolve #5657. | {
"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/5659/reactions"
} | https://api.github.com/repos/psf/requests/issues/5659/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5659.diff",
"html_url": "https://github.com/psf/requests/pull/5659",
"merged_at": "2020-11-16T19:19:06Z",
"patch_url": "https://github.com/psf/requests/pull/5659.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5659"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/5658 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5658/labels{/name} | https://api.github.com/repos/psf/requests/issues/5658/comments | https://api.github.com/repos/psf/requests/issues/5658/events | https://github.com/psf/requests/pull/5658 | 743,362,552 | MDExOlB1bGxSZXF1ZXN0NTIxMjcxODMx | 5,658 | Improve the Session.request() documentation | {
"avatar_url": "https://avatars.githubusercontent.com/u/29452238?v=4",
"events_url": "https://api.github.com/users/pzahemszky/events{/privacy}",
"followers_url": "https://api.github.com/users/pzahemszky/followers",
"following_url": "https://api.github.com/users/pzahemszky/following{/other_user}",
"gists_url": "https://api.github.com/users/pzahemszky/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pzahemszky",
"id": 29452238,
"login": "pzahemszky",
"node_id": "MDQ6VXNlcjI5NDUyMjM4",
"organizations_url": "https://api.github.com/users/pzahemszky/orgs",
"received_events_url": "https://api.github.com/users/pzahemszky/received_events",
"repos_url": "https://api.github.com/users/pzahemszky/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pzahemszky/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pzahemszky/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pzahemszky",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2020-11-15T22:38:41Z | 2021-10-10T19:00:51Z | 2021-07-12T18:19:46Z | NONE | resolved | This PR improves the documentation of the `Session.request()` method. Its `stream` parameter's description used to have remnants of the old `prefetch` parameter (from PR #1283), which are now rephrased slightly.
The new sentence is the same as that in the [Body Content Worklflow](https://requests.readthedocs.io/en/latest/user/advanced/#body-content-workflow) section of the documentation. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5658/reactions"
} | https://api.github.com/repos/psf/requests/issues/5658/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5658.diff",
"html_url": "https://github.com/psf/requests/pull/5658",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5658.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5658"
} | true | [
"This is my first PR in this repo, so please let me know if I missed something.",
"Repeating documentation doesn't clarify it enough. I would say \"open a stream to iterate over content manually\"",
"Thanks for the PR, @pzahemszky. I believe we'll pass on this as it unfortunately doesn't improve clarity and lac... |
https://api.github.com/repos/psf/requests/issues/5657 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5657/labels{/name} | https://api.github.com/repos/psf/requests/issues/5657/comments | https://api.github.com/repos/psf/requests/issues/5657/events | https://github.com/psf/requests/issues/5657 | 743,362,335 | MDU6SXNzdWU3NDMzNjIzMzU= | 5,657 | Dead link to "development philosophy" in the contribution guidelines | {
"avatar_url": "https://avatars.githubusercontent.com/u/29452238?v=4",
"events_url": "https://api.github.com/users/pzahemszky/events{/privacy}",
"followers_url": "https://api.github.com/users/pzahemszky/followers",
"following_url": "https://api.github.com/users/pzahemszky/following{/other_user}",
"gists_url": "https://api.github.com/users/pzahemszky/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pzahemszky",
"id": 29452238,
"login": "pzahemszky",
"node_id": "MDQ6VXNlcjI5NDUyMjM4",
"organizations_url": "https://api.github.com/users/pzahemszky/orgs",
"received_events_url": "https://api.github.com/users/pzahemszky/received_events",
"repos_url": "https://api.github.com/users/pzahemszky/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pzahemszky/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pzahemszky/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pzahemszky",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2020-11-15T22:37:33Z | 2021-08-28T00:06:09Z | 2020-11-16T19:19:06Z | NONE | resolved | The [Contribution Guidelines](https://github.com/psf/requests/blob/master/.github/CONTRIBUTING.md) is referencing the "development philosophy" using a seemingly incorrect URL: https://requests.readthedocs.io/en/latest/dev/philosophy/.
Upon accessing that website, I get the following error message.
```
\ SORRY /
\ /
\ This page does /
] not exist yet. [ ,'|
] [ / |
]___ ___[ ,' |
] ]\ /[ [ |: |
] ] \ / [ [ |: |
] ] ] [ [ [ |: |
] ] ]__ __[ [ [ |: |
] ] ] ]\ _ /[ [ [ [ |: |
] ] ] ] (#) [ [ [ [ :===='
] ] ]_].nHn.[_[ [ [
] ] ] HHHHH. [ [ [
] ] / `HH("N \ [ [
]__]/ HHH " \[__[
] NNN [
] N/" [
] N H [
/ N \
/ q, \
/ \
```
| {
"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/5657/reactions"
} | https://api.github.com/repos/psf/requests/issues/5657/timeline | null | completed | null | null | false | [] |
https://api.github.com/repos/psf/requests/issues/5656 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5656/labels{/name} | https://api.github.com/repos/psf/requests/issues/5656/comments | https://api.github.com/repos/psf/requests/issues/5656/events | https://github.com/psf/requests/issues/5656 | 743,273,504 | MDU6SXNzdWU3NDMyNzM1MDQ= | 5,656 | How to requests without removing the ./ or ../ in Python 3 | {
"avatar_url": "https://avatars.githubusercontent.com/u/59408894?v=4",
"events_url": "https://api.github.com/users/shelld3v/events{/privacy}",
"followers_url": "https://api.github.com/users/shelld3v/followers",
"following_url": "https://api.github.com/users/shelld3v/following{/other_user}",
"gists_url": "https://api.github.com/users/shelld3v/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shelld3v",
"id": 59408894,
"login": "shelld3v",
"node_id": "MDQ6VXNlcjU5NDA4ODk0",
"organizations_url": "https://api.github.com/users/shelld3v/orgs",
"received_events_url": "https://api.github.com/users/shelld3v/received_events",
"repos_url": "https://api.github.com/users/shelld3v/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shelld3v/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shelld3v/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shelld3v",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2020-11-15T14:56:06Z | 2021-08-28T00:06:09Z | 2020-11-15T15:22:55Z | NONE | resolved | Hi, if you do this:
```python
requests.get('http://127.0.0.1/hello/../blah')
```
Your server will receive:
```
GET /blah HTTP/1.1
```
But what I want here is to send the request with the dot-slash:
```
GET hello/../blah HTTP/1.1
```
In python2, I can use this (it worked in my test):
```python
import urllib
u = urllib.quote('http://127.0.0.1/./foo/../bar', safe=':/.')
```
But in python 3, it does not work for some reasons:
```python
import urllib.parse
u = urllib.parse.quote('http://127.0.0.1/./foo/../bar', safe=':/.')
```
```
GET /bar HTTP/1.1
```
How can I solve this? | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5656/reactions"
} | https://api.github.com/repos/psf/requests/issues/5656/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.",
"Hey, I didn't see any answer that can solve this q... |
https://api.github.com/repos/psf/requests/issues/5655 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5655/labels{/name} | https://api.github.com/repos/psf/requests/issues/5655/comments | https://api.github.com/repos/psf/requests/issues/5655/events | https://github.com/psf/requests/issues/5655 | 741,049,961 | MDU6SXNzdWU3NDEwNDk5NjE= | 5,655 | Requests 2.25.0 issue | {
"avatar_url": "https://avatars.githubusercontent.com/u/539788?v=4",
"events_url": "https://api.github.com/users/mchristopher/events{/privacy}",
"followers_url": "https://api.github.com/users/mchristopher/followers",
"following_url": "https://api.github.com/users/mchristopher/following{/other_user}",
"gists_url": "https://api.github.com/users/mchristopher/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mchristopher",
"id": 539788,
"login": "mchristopher",
"node_id": "MDQ6VXNlcjUzOTc4OA==",
"organizations_url": "https://api.github.com/users/mchristopher/orgs",
"received_events_url": "https://api.github.com/users/mchristopher/received_events",
"repos_url": "https://api.github.com/users/mchristopher/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mchristopher/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mchristopher/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mchristopher",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2020-11-11T20:30:27Z | 2021-08-28T00:06:10Z | 2020-11-11T21:23:29Z | NONE | resolved | ## Summary.
Our CI suite just ran and failed with the latest release of requests 2.25.0. Nothing in our code has changed aside from the version of requests installed.
## What you expected.
Our CI tests to pass as normal.
## What happened instead.
You can see the full test run on https://github.com/panoramichq/panoramic-cli/runs/1387129299?check_suite_focus=true for more details, but the important part is we received the following import error:
```
________ ERROR collecting tests/panoramic/cli/test_supported_version.py ________
ImportError while importing test module '/home/runner/work/panoramic-cli/panoramic-cli/tests/panoramic/cli/test_supported_version.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
.tox/py36/lib/python3.6/site-packages/responses.py:27: in <module>
from requests.packages.urllib3.connection import HTTPHeaderDict
E ImportError: cannot import name 'HTTPHeaderDict'
During handling of the above exception, another exception occurred:
/opt/hostedtoolcache/Python/3.6.12/x64/lib/python3.6/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/panoramic/cli/test_supported_version.py:1: in <module>
import responses
.tox/py36/lib/python3.6/site-packages/responses.py:29: in <module>
from urllib3.connection import HTTPHeaderDict
E ImportError: cannot import name 'HTTPHeaderDict'
``` | {
"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/5655/reactions"
} | https://api.github.com/repos/psf/requests/issues/5655/timeline | null | completed | null | null | false | [
"Hi @mchristopher, this was a change in urllib3 that was reverted in 1.26.1. If you update urllib3 as well, you should stop seeing this exception.",
"That fixed it, but I'm not sure why pip didn't automatically pick up the correct dependencies. It may have been an issue with caches on the pypi side... 🤷 \r\n\r\n... |
https://api.github.com/repos/psf/requests/issues/5654 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5654/labels{/name} | https://api.github.com/repos/psf/requests/issues/5654/comments | https://api.github.com/repos/psf/requests/issues/5654/events | https://github.com/psf/requests/issues/5654 | 740,501,918 | MDU6SXNzdWU3NDA1MDE5MTg= | 5,654 | Upgrade Urllib3 Version | {
"avatar_url": "https://avatars.githubusercontent.com/u/1209742?v=4",
"events_url": "https://api.github.com/users/MarianG/events{/privacy}",
"followers_url": "https://api.github.com/users/MarianG/followers",
"following_url": "https://api.github.com/users/MarianG/following{/other_user}",
"gists_url": "https://api.github.com/users/MarianG/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/MarianG",
"id": 1209742,
"login": "MarianG",
"node_id": "MDQ6VXNlcjEyMDk3NDI=",
"organizations_url": "https://api.github.com/users/MarianG/orgs",
"received_events_url": "https://api.github.com/users/MarianG/received_events",
"repos_url": "https://api.github.com/users/MarianG/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/MarianG/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/MarianG/subscriptions",
"type": "User",
"url": "https://api.github.com/users/MarianG",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2020-11-11T06:26:03Z | 2021-08-28T00:06:10Z | 2020-11-11T20:09:20Z | NONE | resolved | I just encountered a problem, when I tried to run a regular script, because the dependencies for requests are a bit outdated. In your setup.py you still require urllib3 with a version limitation: 'urllib3>=1.21.1,<1.26,!=1.25.0,!=1.25.1'.
My Problem was that the current available version 1.26 is obviously not valid and my pip command fails within the installation of the requests package.
## Expected Result
Installation of package completes as usual.
## Actual Result
ERROR: Could not find a version that satisfies the requirement urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
## Reproduction Steps
```
pip install urllib3
pip install 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": 7,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 7,
"url": "https://api.github.com/repos/psf/requests/issues/5654/reactions"
} | https://api.github.com/repos/psf/requests/issues/5654/timeline | null | completed | null | null | false | [
"This will be resolved tomorrow in #5651.",
"Requests 2.25.0 should now be released."
] |
https://api.github.com/repos/psf/requests/issues/5653 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5653/labels{/name} | https://api.github.com/repos/psf/requests/issues/5653/comments | https://api.github.com/repos/psf/requests/issues/5653/events | https://github.com/psf/requests/issues/5653 | 740,455,477 | MDU6SXNzdWU3NDA0NTU0Nzc= | 5,653 | Help Needed: Uploading tarfile using python requests library's post | {
"avatar_url": "https://avatars.githubusercontent.com/u/4566851?v=4",
"events_url": "https://api.github.com/users/moijes12/events{/privacy}",
"followers_url": "https://api.github.com/users/moijes12/followers",
"following_url": "https://api.github.com/users/moijes12/following{/other_user}",
"gists_url": "https://api.github.com/users/moijes12/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/moijes12",
"id": 4566851,
"login": "moijes12",
"node_id": "MDQ6VXNlcjQ1NjY4NTE=",
"organizations_url": "https://api.github.com/users/moijes12/orgs",
"received_events_url": "https://api.github.com/users/moijes12/received_events",
"repos_url": "https://api.github.com/users/moijes12/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/moijes12/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/moijes12/subscriptions",
"type": "User",
"url": "https://api.github.com/users/moijes12",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2020-11-11T04:42:53Z | 2020-11-11T15:19:46Z | 2020-11-11T06:17:53Z | NONE | off-topic | I am trying to upload tgz files to a server using the python requests library. I am not sure how to pass the files to be uploaded. The curl command that I have to convert into a python request is as below:
```shell
curl -X POST 'Content-Type: multipart/form-data' -H "x-auth-token: $token" -H 'Accept: application/json' https://<some_server>/api/url -F "file=@$1" # $1 is the name of the file
```
### First Attempt
I pass a file handle in a dictionary using the `open()` function as below:
```python
import requests
data = {'file':open('tgz_file.tgz')}
headers = {'x-auth-token': 'some_token', 'Accept': 'application/json', 'Content-Type': 'multipart/form-data'}
requests.post(url=https://<some_server>/api/url, headers=headers, data=data)
```
The error I get is as below:
```shell
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.6/site-packages/requests/api.py", line 112, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/lib/python3.6/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 516, in request
prep = self.prepare_request(req)
File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 448, in prepare_request
hooks=merge_hooks(request.hooks, self.hooks),
File "/usr/lib/python3.6/site-packages/requests/models.py", line 305, in prepare
self.prepare_body(data, files, json)
File "/usr/lib/python3.6/site-packages/requests/models.py", line 502, in prepare_body
body = self._encode_params(data)
File "/usr/lib/python3.6/site-packages/requests/models.py", line 99, in _encode_params
for v in vs:
File "/usr/lib64/python3.6/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb3 in position 0: invalid start byte
```
I assumed this to be an issue with `open()` not being able to read the tar file correctly. So I tried the second option.
### Second Attempt - Use the tarfile module
```python
import requests
import tarfile
data = {'file':tarfile.open('tgz_file.tgz', mode='r:gz')}
headers = {'x-auth-token': 'some_token', 'Accept': 'application/json', 'Content-Type': 'multipart/form-data'}
requests.post(url=https://<some_server>/api/url, headers=headers, data=data)
```
However, this lead to a different issue:
```shell
'{"statusCode":400,"error":"Bad Request","message":"Invalid content-type header: multipart missing boundary"}'
```
### Third Attempt - Removed *Content-Type* from the headers
```python
import requests
import tarfile
data = {'file':tarfile.open('tgz_file.tgz', mode='r:gz')}
headers = {'x-auth-token': 'some_token', 'Accept': 'application/json'}
requests.post(url=https://<some_server>/api/url, headers=headers, data=data)
```
This results in:
```shell
{'statusCode': 415, 'error': 'Unsupported Media Type', 'message': 'Unsupported Media Type'}
```
I am not sure how to go about solving this issue. Any help will be be greatly appreciated. | {
"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/5653/reactions"
} | https://api.github.com/repos/psf/requests/issues/5653/timeline | null | completed | null | null | false | [
"Hi @moijes12,\r\n\r\nThis is all covered in the [documentation](https://requests.readthedocs.io/en/master/user/quickstart/#post-a-multipart-encoded-file). If you have further questions, please consult [StackOverflow](https://stackoverflow.com) since we do not triage usage tickets on this tracker. Thanks!",
"@nat... |
https://api.github.com/repos/psf/requests/issues/5652 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5652/labels{/name} | https://api.github.com/repos/psf/requests/issues/5652/comments | https://api.github.com/repos/psf/requests/issues/5652/events | https://github.com/psf/requests/pull/5652 | 740,288,437 | MDExOlB1bGxSZXF1ZXN0NTE4ODAxNjk4 | 5,652 | Move CI to Github Actions | {
"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 | {
"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"
} | [
{
"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}",... | null | 3 | 2020-11-10T22:27:27Z | 2021-08-28T00:06:16Z | 2020-11-11T18:29:14Z | MEMBER | resolved | Moving us to GH Actions since our Travis configs are in relative disarray and we haven't been running Mac/Windows builds for years at this point.
### Other changes in this PR:
**Pipenv**
Pipenv has caused a lot of friction with users trying to submit PR updates that need dependency changes, so this removes it. I've readded a `requirements-dev.txt` to store dev dependencies.
**Removal of pytest-xdist**
`pytest-xdist` causes threading issues on macOS for some versions of Python [StackOverflow issue](https://stackoverflow.com/questions/50168647/multiprocessing-causes-python-to-crash-and-gives-an-error-may-have-been-in-progr/52230415). The performance gain on tests is negligible, so I've removed it for config simplicity. If there's strong demand, we could attempt the bash updates or split out the macOS test command in the action definition.
**Adding Python 3.9**
Adding 3.9 to tests so we can update our trove classifiers before releasing 2.25.
| {
"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/5652/reactions"
} | https://api.github.com/repos/psf/requests/issues/5652/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5652.diff",
"html_url": "https://github.com/psf/requests/pull/5652",
"merged_at": "2020-11-11T18:29:14Z",
"patch_url": "https://github.com/psf/requests/pull/5652.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5652"
} | true | [
"TODO: We'll need to remove the Travis integration in Settings after this is merged.",
"> TODO: We'll need to remove the Travis integration in Settings after this is merged.\r\n\r\nI used to be able to help with that but no longer ",
"> I used to be able to help with that but no longer\r\n\r\nIt looks like it's... |
https://api.github.com/repos/psf/requests/issues/5651 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5651/labels{/name} | https://api.github.com/repos/psf/requests/issues/5651/comments | https://api.github.com/repos/psf/requests/issues/5651/events | https://github.com/psf/requests/pull/5651 | 740,226,659 | MDExOlB1bGxSZXF1ZXN0NTE4NzUxMDQy | 5,651 | v2.25.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 | 4 | 2020-11-10T20:38:36Z | 2021-08-28T00:06:16Z | 2020-11-11T19:55:51Z | MEMBER | resolved | This is getting staged for a release this week to stay in sync with urllib3. This release should also resolve the outstanding doc issues with Requests on pypi (#5501).
2.25.0 (2020-11-11)
------------------
**Improvements**
- Added support for NETRC environment variable. (#5643)
**Dependencies**
- Requests now supports urllib3 v1.26.
**Deprecations**
- Requests v2.25.x will be the last release series with support for Python 3.5.
- The `requests[security]` extra is officially deprecated and will be removed
in Requests v2.26.0. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 6,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 6,
"url": "https://api.github.com/repos/psf/requests/issues/5651/reactions"
} | https://api.github.com/repos/psf/requests/issues/5651/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5651.diff",
"html_url": "https://github.com/psf/requests/pull/5651",
"merged_at": "2020-11-11T19:55:51Z",
"patch_url": "https://github.com/psf/requests/pull/5651.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5651"
} | true | [
"Just an FYI since we're removing the !=1.25 and !=1.25.1: both of those releases have been yanked from PyPI so shouldn't be an issue.",
"https://github.com/psf/requests/blob/master/requests/__init__.py#L63 ? ;)",
"@asavah Great catch!",
":tada: Very exciting!"
] |
https://api.github.com/repos/psf/requests/issues/5650 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5650/labels{/name} | https://api.github.com/repos/psf/requests/issues/5650/comments | https://api.github.com/repos/psf/requests/issues/5650/events | https://github.com/psf/requests/issues/5650 | 739,381,713 | MDU6SXNzdWU3MzkzODE3MTM= | 5,650 | requests.post() does not work until reset modem | {
"avatar_url": "https://avatars.githubusercontent.com/u/42833660?v=4",
"events_url": "https://api.github.com/users/kaloomte/events{/privacy}",
"followers_url": "https://api.github.com/users/kaloomte/followers",
"following_url": "https://api.github.com/users/kaloomte/following{/other_user}",
"gists_url": "https://api.github.com/users/kaloomte/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kaloomte",
"id": 42833660,
"login": "kaloomte",
"node_id": "MDQ6VXNlcjQyODMzNjYw",
"organizations_url": "https://api.github.com/users/kaloomte/orgs",
"received_events_url": "https://api.github.com/users/kaloomte/received_events",
"repos_url": "https://api.github.com/users/kaloomte/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kaloomte/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kaloomte/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kaloomte",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-11-09T21:38:37Z | 2021-08-29T00:06:37Z | 2020-11-10T00:04:43Z | NONE | resolved | Hi everyone
I have an interesting problem. When i run my basic script with raspberry pi i get response but after a couple post, my codes do not work anymore until i reset the modem or reset my phone if i connect with my phone network.
```
import requests
import json
import time
url = '...'
myobj = {"status":1,"makina_id":1,"ambalaj":{"boyut":0.5,"cins":"plastic"},"doluluk":50,"error":0}
x = requests.post(url,json.dumps(myobj))
print(x)
print(myobj)
```
****Output** is**
```
<Response [200]>
{'status': 1, 'makina_id': 1, 'ambalaj': {'boyut': 0.5, 'cins': 'plastic'}, 'doluluk': 50, 'error': 0}
```
when the problem occuring, there is not any output, any error or warnings.
I could not find what is the problem. Thank you for your 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/5650/reactions"
} | https://api.github.com/repos/psf/requests/issues/5650/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. This is likely related to your network or timeout settings. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects h... |
https://api.github.com/repos/psf/requests/issues/5649 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5649/labels{/name} | https://api.github.com/repos/psf/requests/issues/5649/comments | https://api.github.com/repos/psf/requests/issues/5649/events | https://github.com/psf/requests/pull/5649 | 737,044,088 | MDExOlB1bGxSZXF1ZXN0NTE2MTU1MTg4 | 5,649 | Document how to turn off Keep-Alive in 2.x | {
"avatar_url": "https://avatars.githubusercontent.com/u/8781107?v=4",
"events_url": "https://api.github.com/users/abitrolly/events{/privacy}",
"followers_url": "https://api.github.com/users/abitrolly/followers",
"following_url": "https://api.github.com/users/abitrolly/following{/other_user}",
"gists_url": "https://api.github.com/users/abitrolly/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/abitrolly",
"id": 8781107,
"login": "abitrolly",
"node_id": "MDQ6VXNlcjg3ODExMDc=",
"organizations_url": "https://api.github.com/users/abitrolly/orgs",
"received_events_url": "https://api.github.com/users/abitrolly/received_events",
"repos_url": "https://api.github.com/users/abitrolly/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/abitrolly/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/abitrolly/subscriptions",
"type": "User",
"url": "https://api.github.com/users/abitrolly",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 9 | 2020-11-05T15:42:49Z | 2022-03-30T22:00:47Z | 2021-12-29T17:47:32Z | NONE | resolved | Ref. #5646 | {
"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/5649/reactions"
} | https://api.github.com/repos/psf/requests/issues/5649/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5649.diff",
"html_url": "https://github.com/psf/requests/pull/5649",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5649.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5649"
} | true | [
"This documentation isn't entirely correct and that issue is already clsoed",
"@sigmavirus24 I don't know how to improve it. What is not correct here?",
"I edited the description to mention issue without closing it (for me).",
"> What is not correct here?\r\n\r\nIt's not the only way to disable keep-alive. Se... |
https://api.github.com/repos/psf/requests/issues/5648 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5648/labels{/name} | https://api.github.com/repos/psf/requests/issues/5648/comments | https://api.github.com/repos/psf/requests/issues/5648/events | https://github.com/psf/requests/issues/5648 | 736,914,810 | MDU6SXNzdWU3MzY5MTQ4MTA= | 5,648 | HEAD Request never returns | {
"avatar_url": "https://avatars.githubusercontent.com/u/29598866?v=4",
"events_url": "https://api.github.com/users/cstayyab/events{/privacy}",
"followers_url": "https://api.github.com/users/cstayyab/followers",
"following_url": "https://api.github.com/users/cstayyab/following{/other_user}",
"gists_url": "https://api.github.com/users/cstayyab/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cstayyab",
"id": 29598866,
"login": "cstayyab",
"node_id": "MDQ6VXNlcjI5NTk4ODY2",
"organizations_url": "https://api.github.com/users/cstayyab/orgs",
"received_events_url": "https://api.github.com/users/cstayyab/received_events",
"repos_url": "https://api.github.com/users/cstayyab/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cstayyab/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cstayyab/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cstayyab",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2020-11-05T13:03:00Z | 2021-08-29T00:06:38Z | 2020-11-05T14:12:49Z | NONE | resolved | Summary.
When used `requests.head` with `url='https://mega.nz'` is stuck forever.
## Expected Result
Either a response or a Timeout error or any exception.
## Actual Result
The function never returns.
## Reproduction Steps
```python
import requests
r = requests.head("https://mega.nz")
```
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.8.5"
},
"platform": {
"release": "4.19.104-microsoft-standard",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.24.0"
},
"system_ssl": {
"version": "1010106f"
},
"urllib3": {
"version": "1.25.11"
},
"using_pyopenssl": false
}
```
I have also verified this on [Google Colab](https://colab.research.google.com)
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5648/reactions"
} | https://api.github.com/repos/psf/requests/issues/5648/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.",
"@sigmavirus24 The purpose of filing the issue was... |
https://api.github.com/repos/psf/requests/issues/5647 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5647/labels{/name} | https://api.github.com/repos/psf/requests/issues/5647/comments | https://api.github.com/repos/psf/requests/issues/5647/events | https://github.com/psf/requests/issues/5647 | 736,666,696 | MDU6SXNzdWU3MzY2NjY2OTY= | 5,647 | Can't get NASDAQ related APIs while others can. | {
"avatar_url": "https://avatars.githubusercontent.com/u/38759782?v=4",
"events_url": "https://api.github.com/users/xiongnemo/events{/privacy}",
"followers_url": "https://api.github.com/users/xiongnemo/followers",
"following_url": "https://api.github.com/users/xiongnemo/following{/other_user}",
"gists_url": "https://api.github.com/users/xiongnemo/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/xiongnemo",
"id": 38759782,
"login": "xiongnemo",
"node_id": "MDQ6VXNlcjM4NzU5Nzgy",
"organizations_url": "https://api.github.com/users/xiongnemo/orgs",
"received_events_url": "https://api.github.com/users/xiongnemo/received_events",
"repos_url": "https://api.github.com/users/xiongnemo/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/xiongnemo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/xiongnemo/subscriptions",
"type": "User",
"url": "https://api.github.com/users/xiongnemo",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-11-05T06:53:53Z | 2021-08-29T00:06:39Z | 2020-11-05T14:11:34Z | NONE | resolved | `requests` stucks when trying to `GET` a NASDAQ API.
## Expected Result
`requests` operates normally and fetches a `json`.

## Actual Result
`requests` stucks, though the network conditions are good:

```python
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw)
376 try: # Python 2.7, use buffering of HTTP responses
--> 377 httplib_response = conn.getresponse(buffering=True)
378 except TypeError: # Python 3
TypeError: getresponse() got an unexpected keyword argument 'buffering'
During handling of the above exception, another exception occurred:
KeyboardInterrupt Traceback (most recent call last)
13 frames
<ipython-input-10-9f0a114ca4b3> in <module>()
1 s = requests.Session()
----> 2 temp = s.get("https://www.nasdaq.com/", headers=nasdaq_header)
3 print(temp.text)
4 r = requests.get("https://api.nasdaq.com/api/quote/INDU/info?assetclass=index", headers=nasdaq_header)
5 print(r.text)
/usr/local/lib/python3.6/dist-packages/requests/sessions.py in get(self, url, **kwargs)
541
542 kwargs.setdefault('allow_redirects', True)
--> 543 return self.request('GET', url, **kwargs)
544
545 def options(self, url, **kwargs):
/usr/local/lib/python3.6/dist-packages/requests/sessions.py in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)
528 }
529 send_kwargs.update(settings)
--> 530 resp = self.send(prep, **send_kwargs)
531
532 return resp
/usr/local/lib/python3.6/dist-packages/requests/sessions.py in send(self, request, **kwargs)
641
642 # Send the request
--> 643 r = adapter.send(request, **kwargs)
644
645 # Total elapsed time of the request (approximately)
/usr/local/lib/python3.6/dist-packages/requests/adapters.py in send(self, request, stream, timeout, verify, cert, proxies)
447 decode_content=False,
448 retries=self.max_retries,
--> 449 timeout=timeout
450 )
451
/usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)
598 timeout=timeout_obj,
599 body=body, headers=headers,
--> 600 chunked=chunked)
601
602 # If we're going to release the connection in ``finally:``, then
/usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw)
378 except TypeError: # Python 3
379 try:
--> 380 httplib_response = conn.getresponse()
381 except Exception as e:
382 # Remove the TypeError from the exception chain in Python 3;
/usr/lib/python3.6/http/client.py in getresponse(self)
1371 try:
1372 try:
-> 1373 response.begin()
1374 except ConnectionError:
1375 self.close()
/usr/lib/python3.6/http/client.py in begin(self)
309 # read until we get a non-100 response
310 while True:
--> 311 version, status, reason = self._read_status()
312 if status != CONTINUE:
313 break
/usr/lib/python3.6/http/client.py in _read_status(self)
270
271 def _read_status(self):
--> 272 line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
273 if len(line) > _MAXLINE:
274 raise LineTooLong("status line")
/usr/lib/python3.6/socket.py in readinto(self, b)
584 while True:
585 try:
--> 586 return self._sock.recv_into(b)
587 except timeout:
588 self._timeout_occurred = True
/usr/lib/python3.6/ssl.py in recv_into(self, buffer, nbytes, flags)
1010 "non-zero flags not allowed in calls to recv_into() on %s" %
1011 self.__class__)
-> 1012 return self.read(nbytes, buffer)
1013 else:
1014 return socket.recv_into(self, buffer, nbytes, flags)
/usr/lib/python3.6/ssl.py in read(self, len, buffer)
872 raise ValueError("Read on closed or unwrapped SSL socket.")
873 try:
--> 874 return self._sslobj.read(len, buffer)
875 except SSLError as x:
876 if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs:
/usr/lib/python3.6/ssl.py in read(self, len, buffer)
629 """
630 if buffer is not None:
--> 631 v = self._sslobj.read(len, buffer)
632 else:
633 v = self._sslobj.read(len)
KeyboardInterrupt:
```
## Reproduction Steps
```python
import requests
# long time ago, this header is good for me
nasdaq_header = {
'Host': 'api.nasdaq.com',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
'Accept-Encoding': 'gzip, deflate, br',
'Accept-Language': 'en-US,en;q=0.9',
'Cache-Control': 'max-age=0',
'Connection': 'keep-alive',
'DNT': '1',
'Upgrade-Insecure-Requests': '1',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) '
'Chrome/79.0.3945.130 Safari/537.36 '
}
r = requests.get("https://api.nasdaq.com/api/quote/INDU/info?assetclass=index", headers=nasdaq_header)
print(r.text)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.9.0"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.24.0"
},
"system_ssl": {
"version": "1010107f"
},
"urllib3": {
"version": "1.25.11"
},
"using_pyopenssl": false
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5647/reactions"
} | https://api.github.com/repos/psf/requests/issues/5647/timeline | null | completed | null | null | false | [
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here."
] |
https://api.github.com/repos/psf/requests/issues/5646 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5646/labels{/name} | https://api.github.com/repos/psf/requests/issues/5646/comments | https://api.github.com/repos/psf/requests/issues/5646/events | https://github.com/psf/requests/issues/5646 | 736,241,063 | MDU6SXNzdWU3MzYyNDEwNjM= | 5,646 | Unable to turn off Keep-Alive | {
"avatar_url": "https://avatars.githubusercontent.com/u/8781107?v=4",
"events_url": "https://api.github.com/users/abitrolly/events{/privacy}",
"followers_url": "https://api.github.com/users/abitrolly/followers",
"following_url": "https://api.github.com/users/abitrolly/following{/other_user}",
"gists_url": "https://api.github.com/users/abitrolly/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/abitrolly",
"id": 8781107,
"login": "abitrolly",
"node_id": "MDQ6VXNlcjg3ODExMDc=",
"organizations_url": "https://api.github.com/users/abitrolly/orgs",
"received_events_url": "https://api.github.com/users/abitrolly/received_events",
"repos_url": "https://api.github.com/users/abitrolly/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/abitrolly/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/abitrolly/subscriptions",
"type": "User",
"url": "https://api.github.com/users/abitrolly",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2020-11-04T16:14:31Z | 2020-11-05T14:11:23Z | 2020-11-04T17:36:35Z | NONE | resolved | Documentation doesn't specify how to turn off Keep-Alive
https://requests.readthedocs.io/en/latest/user/advanced/#keep-alive | {
"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/5646/reactions"
} | https://api.github.com/repos/psf/requests/issues/5646/timeline | null | completed | null | null | false | [
"In the future, please search **closed and** open issues before creating new ones that are duplicates.",
"I thought I searched. My bad. The duplicate is #4913. However, no answer was given and no docs updated.",
"Turning off keep-alive means closing the connection. So set a session default for the `Connection` ... |
https://api.github.com/repos/psf/requests/issues/5645 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5645/labels{/name} | https://api.github.com/repos/psf/requests/issues/5645/comments | https://api.github.com/repos/psf/requests/issues/5645/events | https://github.com/psf/requests/issues/5645 | 734,815,980 | MDU6SXNzdWU3MzQ4MTU5ODA= | 5,645 | Address CVE-2020-26137 | {
"avatar_url": "https://avatars.githubusercontent.com/u/23018378?v=4",
"events_url": "https://api.github.com/users/karthikkalasani/events{/privacy}",
"followers_url": "https://api.github.com/users/karthikkalasani/followers",
"following_url": "https://api.github.com/users/karthikkalasani/following{/other_user}",
"gists_url": "https://api.github.com/users/karthikkalasani/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/karthikkalasani",
"id": 23018378,
"login": "karthikkalasani",
"node_id": "MDQ6VXNlcjIzMDE4Mzc4",
"organizations_url": "https://api.github.com/users/karthikkalasani/orgs",
"received_events_url": "https://api.github.com/users/karthikkalasani/received_events",
"repos_url": "https://api.github.com/users/karthikkalasani/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/karthikkalasani/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/karthikkalasani/subscriptions",
"type": "User",
"url": "https://api.github.com/users/karthikkalasani",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-11-02T21:01:15Z | 2021-08-29T00:06:40Z | 2020-11-02T21:23:31Z | NONE | resolved | urllib3 before 1.25.9 allows CRLF injection if the attacker controls the HTTP request method
https://nvd.nist.gov/vuln/detail/CVE-2020-26137 | {
"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/5645/reactions"
} | https://api.github.com/repos/psf/requests/issues/5645/timeline | null | completed | null | null | false | [
"This vulnerability isn't in Requests, ensure that your `urllib3` version is >1.25.9 and you are secure against this CVE."
] |
https://api.github.com/repos/psf/requests/issues/5644 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5644/labels{/name} | https://api.github.com/repos/psf/requests/issues/5644/comments | https://api.github.com/repos/psf/requests/issues/5644/events | https://github.com/psf/requests/issues/5644 | 734,379,792 | MDU6SXNzdWU3MzQzNzk3OTI= | 5,644 | PyPI page formatting | {
"avatar_url": "https://avatars.githubusercontent.com/u/22172519?v=4",
"events_url": "https://api.github.com/users/pedro-w/events{/privacy}",
"followers_url": "https://api.github.com/users/pedro-w/followers",
"following_url": "https://api.github.com/users/pedro-w/following{/other_user}",
"gists_url": "https://api.github.com/users/pedro-w/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pedro-w",
"id": 22172519,
"login": "pedro-w",
"node_id": "MDQ6VXNlcjIyMTcyNTE5",
"organizations_url": "https://api.github.com/users/pedro-w/orgs",
"received_events_url": "https://api.github.com/users/pedro-w/received_events",
"repos_url": "https://api.github.com/users/pedro-w/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pedro-w/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pedro-w/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pedro-w",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2020-11-02T10:21:10Z | 2021-08-29T00:06:40Z | 2020-11-02T13:30:00Z | NONE | resolved | Sorry if this is the wrong place to report but the 'Project Description' for your entry on the PyPI site looks all mixed up with formatting and raw HTML tags.
https://pypi.org/project/requests/
| {
"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/5644/reactions"
} | https://api.github.com/repos/psf/requests/issues/5644/timeline | null | completed | null | null | false | [
"We're aware of the issue. Please read [closed issues](https://github.com/psf/requests/issues/5601) before opening new ones.",
"Thanks. Not easy if you close issues without fixing them.",
"@pedro-w There's nothing left for us to fix, it's fixed in master and on the next release to PyPI there will be no issue."
... |
https://api.github.com/repos/psf/requests/issues/5643 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5643/labels{/name} | https://api.github.com/repos/psf/requests/issues/5643/comments | https://api.github.com/repos/psf/requests/issues/5643/events | https://github.com/psf/requests/pull/5643 | 733,365,003 | MDExOlB1bGxSZXF1ZXN0NTEzMTU2MzY4 | 5,643 | Respect the NETRC environment variable | {
"avatar_url": "https://avatars.githubusercontent.com/u/107975?v=4",
"events_url": "https://api.github.com/users/tarmath/events{/privacy}",
"followers_url": "https://api.github.com/users/tarmath/followers",
"following_url": "https://api.github.com/users/tarmath/following{/other_user}",
"gists_url": "https://api.github.com/users/tarmath/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tarmath",
"id": 107975,
"login": "tarmath",
"node_id": "MDQ6VXNlcjEwNzk3NQ==",
"organizations_url": "https://api.github.com/users/tarmath/orgs",
"received_events_url": "https://api.github.com/users/tarmath/received_events",
"repos_url": "https://api.github.com/users/tarmath/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tarmath/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tarmath/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tarmath",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-10-30T17:20:32Z | 2021-08-27T00:08:57Z | 2020-11-01T16:52:02Z | NONE | resolved | Resurecting https://github.com/psf/requests/pull/4339 with incorporated review/feedback
Fixes https://github.com/psf/requests/issues/4318
| {
"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/5643/reactions"
} | https://api.github.com/repos/psf/requests/issues/5643/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5643.diff",
"html_url": "https://github.com/psf/requests/pull/5643",
"merged_at": "2020-11-01T16:52:02Z",
"patch_url": "https://github.com/psf/requests/pull/5643.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5643"
} | true | [
"@tarmath thanks for this!"
] |
https://api.github.com/repos/psf/requests/issues/5642 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5642/labels{/name} | https://api.github.com/repos/psf/requests/issues/5642/comments | https://api.github.com/repos/psf/requests/issues/5642/events | https://github.com/psf/requests/issues/5642 | 730,390,633 | MDU6SXNzdWU3MzAzOTA2MzM= | 5,642 | Session.send() does not check for environment variables like proxy | {
"avatar_url": "https://avatars.githubusercontent.com/u/36988897?v=4",
"events_url": "https://api.github.com/users/spreiter/events{/privacy}",
"followers_url": "https://api.github.com/users/spreiter/followers",
"following_url": "https://api.github.com/users/spreiter/following{/other_user}",
"gists_url": "https://api.github.com/users/spreiter/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/spreiter",
"id": 36988897,
"login": "spreiter",
"node_id": "MDQ6VXNlcjM2OTg4ODk3",
"organizations_url": "https://api.github.com/users/spreiter/orgs",
"received_events_url": "https://api.github.com/users/spreiter/received_events",
"repos_url": "https://api.github.com/users/spreiter/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/spreiter/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/spreiter/subscriptions",
"type": "User",
"url": "https://api.github.com/users/spreiter",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-10-27T12:06:15Z | 2021-08-29T00:06:41Z | 2020-10-27T14:00:59Z | NONE | resolved | I was following the mechanism of the usage of the PreparedRequest class.
But the `send()` does not call the `merge_environment_settings()` of the session automatically.
## Expected Result
So it would be helpful to enable this via an option or at least update the documentation, that it is necessary to call the `merge_environment_settings()` manually.
## Actual Result
It results in a ConnectionError.
## Reproduction Steps
using Python 3.6:
```
>>> import requests
>>> req = requests.Request('GET', 'https://httpbin.org/get')
>>> r = req.prepare()
>>> r
<PreparedRequest [GET]>
>>> s = requests.Session()
>>> s.send(r)
<Response [200]>
```
## System Information
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "2.7.5"
},
"platform": {
"release": "3.10.0-1062.9.1.el7.x86_64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.21.0"
},
"system_ssl": {
"version": "100020bf"
},
"urllib3": {
"version": "1.24.1"
},
"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/5642/reactions"
} | https://api.github.com/repos/psf/requests/issues/5642/timeline | null | completed | null | null | false | [
"This is what `r = s.prepare(req)` is for and it's documented as such"
] |
https://api.github.com/repos/psf/requests/issues/5641 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5641/labels{/name} | https://api.github.com/repos/psf/requests/issues/5641/comments | https://api.github.com/repos/psf/requests/issues/5641/events | https://github.com/psf/requests/issues/5641 | 729,507,670 | MDU6SXNzdWU3Mjk1MDc2NzA= | 5,641 | Bad escaping of double quote in uploaded file | {
"avatar_url": "https://avatars.githubusercontent.com/u/199429?v=4",
"events_url": "https://api.github.com/users/dvarrazzo/events{/privacy}",
"followers_url": "https://api.github.com/users/dvarrazzo/followers",
"following_url": "https://api.github.com/users/dvarrazzo/following{/other_user}",
"gists_url": "https://api.github.com/users/dvarrazzo/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dvarrazzo",
"id": 199429,
"login": "dvarrazzo",
"node_id": "MDQ6VXNlcjE5OTQyOQ==",
"organizations_url": "https://api.github.com/users/dvarrazzo/orgs",
"received_events_url": "https://api.github.com/users/dvarrazzo/received_events",
"repos_url": "https://api.github.com/users/dvarrazzo/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dvarrazzo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dvarrazzo/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dvarrazzo",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 6 | 2020-10-26T12:08:14Z | 2023-10-10T17:51:55Z | null | NONE | null | Uploading a file whose name contains double quotes (") in the file, requests replaces the character with %22. This is not reversible because the % char is not escaped (it's not possible to tell apart a literal %22 from a quote), and it's different from what a browser does. Browsers seem to use backslash escape instead (tested with Firefox).
## Expected Result
In a shell run:
```
$ nc -l 0.0.0.0 8080 | grep filename
```
In Python
```
requests.post("http://localhost:8080/", files={'file': ("""foo% 'bar" \u20ac.txt""", open("README.rst"))})
```
Expected, what a browser returns, in the nc shell:
```
Content-Disposition: form-data; name="file"; filename="foo% 'bar\" €.txt"
```
## Actual Result
```
Content-Disposition: form-data; name="file"; filename="foo% 'bar%22 €.txt"
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.8.5"
},
"platform": {
"release": "5.4.0-51-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.24.0"
},
"system_ssl": {
"version": "1010106f"
},
"urllib3": {
"version": "1.25.8"
},
"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/5641/reactions"
} | https://api.github.com/repos/psf/requests/issues/5641/timeline | null | null | null | null | false | [
"> This is not reversible because the % char is not escaped (it's not possible to tell apart a literal %22 from a quote)\r\n\r\nI don't think this is categorically true and there's information missing from here that isn't present. In general, the RFCs don't have specific guidance around this and so this behaviour d... |
https://api.github.com/repos/psf/requests/issues/5640 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5640/labels{/name} | https://api.github.com/repos/psf/requests/issues/5640/comments | https://api.github.com/repos/psf/requests/issues/5640/events | https://github.com/psf/requests/issues/5640 | 728,932,048 | MDU6SXNzdWU3Mjg5MzIwNDg= | 5,640 | Sending body via requests.post gives empty body in Node server,Why? | {
"avatar_url": "https://avatars.githubusercontent.com/u/30069626?v=4",
"events_url": "https://api.github.com/users/Ammyy9908/events{/privacy}",
"followers_url": "https://api.github.com/users/Ammyy9908/followers",
"following_url": "https://api.github.com/users/Ammyy9908/following{/other_user}",
"gists_url": "https://api.github.com/users/Ammyy9908/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Ammyy9908",
"id": 30069626,
"login": "Ammyy9908",
"node_id": "MDQ6VXNlcjMwMDY5NjI2",
"organizations_url": "https://api.github.com/users/Ammyy9908/orgs",
"received_events_url": "https://api.github.com/users/Ammyy9908/received_events",
"repos_url": "https://api.github.com/users/Ammyy9908/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Ammyy9908/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Ammyy9908/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Ammyy9908",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2020-10-25T03:41:30Z | 2021-06-17T14:14:18Z | 2020-10-25T12:20:22Z | NONE | null |
Python program Which sends Post Request

Logs on NodeJS Express server

Please refer to our [Stack Overflow tag](https://stackoverflow.com/questions/tagged/python-requests) for guidance.
| {
"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/5640/reactions"
} | https://api.github.com/repos/psf/requests/issues/5640/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.",
"Thanks! now it is solved.",
"@Ammyy9908 how did ... |
https://api.github.com/repos/psf/requests/issues/5639 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5639/labels{/name} | https://api.github.com/repos/psf/requests/issues/5639/comments | https://api.github.com/repos/psf/requests/issues/5639/events | https://github.com/psf/requests/issues/5639 | 728,180,230 | MDU6SXNzdWU3MjgxODAyMzA= | 5,639 | Exceptionally awkward MaxRetryError exception handling | {
"avatar_url": "https://avatars.githubusercontent.com/u/124301?v=4",
"events_url": "https://api.github.com/users/pielgrzym/events{/privacy}",
"followers_url": "https://api.github.com/users/pielgrzym/followers",
"following_url": "https://api.github.com/users/pielgrzym/following{/other_user}",
"gists_url": "https://api.github.com/users/pielgrzym/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pielgrzym",
"id": 124301,
"login": "pielgrzym",
"node_id": "MDQ6VXNlcjEyNDMwMQ==",
"organizations_url": "https://api.github.com/users/pielgrzym/orgs",
"received_events_url": "https://api.github.com/users/pielgrzym/received_events",
"repos_url": "https://api.github.com/users/pielgrzym/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pielgrzym/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pielgrzym/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pielgrzym",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-10-23T12:31:21Z | 2021-08-29T00:06:42Z | 2020-10-23T13:15:05Z | NONE | resolved | If one uses custom HTTPAdapter with urllib3 Retry() class the `requests.packages.urllib3.exceptions.MaxRetryError` is ~~wrapped in~~chained with several exceptions making it hard to catch the exception we are looking for - that is MaxRetryError.
Tested on python 3.8 with requests==2.24.0
## Expected Result
If I setup HTTPAdapter with max_retries I actually *want* to catch MaxRetryError exception - this is kinda the point of using Retry() class - to be able to act on specific problem.
## Actual Result
Instead I got `requests.exceptions.ConnectionError` exception. With several wrapped exceptions.
## Reproduction Steps
```python3
import requests
import urllib3.exceptions
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry
s = requests.Session()
retries = Retry(total=2, backoff_factor=1)
s.mount('http://', HTTPAdapter(max_retries=retries))
try:
s.get("http://localhost")
except requests.packages.urllib3.exceptions.MaxRetryError:
print("Exception I should actually catch")
except urllib3.exceptions.MaxRetryError:
print("Eventually this one....")
except requests.packages.urllib3.exceptions.ConnectionError:
print("This one is kinda the one I'd expect if MaxRetryError is not caught")
except urllib3.exceptions.ConnectionError:
print("Or this one")
except requests.exceptions.ConnectionError:
print("But instead I got this one. Sweet baby Jesus. Fair enough - I should have guessed to use this one if I did not want to catch MaxRetryError")
except Exception as ex:
template = "An exception of type {0} occurred. Arguments:\n{1!r}"
message = template.format(type(ex).__name__, ex.args)
print(message)
raise
```
## System Information
$ python -m requests.help
```{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.8.6"
},
"platform": {
"release": "5.5.0-2-amd64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.24.0"
},
"system_ssl": {
"version": "1010108f"
},
"urllib3": {
"version": "1.25.10"
},
"using_pyopenssl": false
}
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/124301?v=4",
"events_url": "https://api.github.com/users/pielgrzym/events{/privacy}",
"followers_url": "https://api.github.com/users/pielgrzym/followers",
"following_url": "https://api.github.com/users/pielgrzym/following{/other_user}",
"gists_url": "https://api.github.com/users/pielgrzym/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pielgrzym",
"id": 124301,
"login": "pielgrzym",
"node_id": "MDQ6VXNlcjEyNDMwMQ==",
"organizations_url": "https://api.github.com/users/pielgrzym/orgs",
"received_events_url": "https://api.github.com/users/pielgrzym/received_events",
"repos_url": "https://api.github.com/users/pielgrzym/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pielgrzym/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pielgrzym/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pielgrzym",
"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/5639/reactions"
} | https://api.github.com/repos/psf/requests/issues/5639/timeline | null | completed | null | null | false | [
"Welp, this is actually python3 doing it's glorified exception chaining. No dumpster fire here :D "
] |
https://api.github.com/repos/psf/requests/issues/5638 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5638/labels{/name} | https://api.github.com/repos/psf/requests/issues/5638/comments | https://api.github.com/repos/psf/requests/issues/5638/events | https://github.com/psf/requests/pull/5638 | 728,166,550 | MDExOlB1bGxSZXF1ZXN0NTA4OTIzMTQ2 | 5,638 | corrected a phrase on api.rst | {
"avatar_url": "https://avatars.githubusercontent.com/u/64856262?v=4",
"events_url": "https://api.github.com/users/karimk123/events{/privacy}",
"followers_url": "https://api.github.com/users/karimk123/followers",
"following_url": "https://api.github.com/users/karimk123/following{/other_user}",
"gists_url": "https://api.github.com/users/karimk123/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/karimk123",
"id": 64856262,
"login": "karimk123",
"node_id": "MDQ6VXNlcjY0ODU2MjYy",
"organizations_url": "https://api.github.com/users/karimk123/orgs",
"received_events_url": "https://api.github.com/users/karimk123/received_events",
"repos_url": "https://api.github.com/users/karimk123/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/karimk123/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/karimk123/subscriptions",
"type": "User",
"url": "https://api.github.com/users/karimk123",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2020-10-23T12:10:29Z | 2021-08-28T00:06:18Z | 2020-10-23T12:37:33Z | NONE | resolved | Made phrase pleasant to read. | {
"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/5638/reactions"
} | https://api.github.com/repos/psf/requests/issues/5638/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5638.diff",
"html_url": "https://github.com/psf/requests/pull/5638",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5638.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5638"
} | true | [
"We're not accepting small aesthetic doc changes.",
"This is my first pull request so I was just seeing how it works anyways no problem."
] |
https://api.github.com/repos/psf/requests/issues/5637 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5637/labels{/name} | https://api.github.com/repos/psf/requests/issues/5637/comments | https://api.github.com/repos/psf/requests/issues/5637/events | https://github.com/psf/requests/issues/5637 | 727,784,553 | MDU6SXNzdWU3Mjc3ODQ1NTM= | 5,637 | Ability to specify default timeout value in session object | {
"avatar_url": "https://avatars.githubusercontent.com/u/7035647?v=4",
"events_url": "https://api.github.com/users/mdavis-xyz/events{/privacy}",
"followers_url": "https://api.github.com/users/mdavis-xyz/followers",
"following_url": "https://api.github.com/users/mdavis-xyz/following{/other_user}",
"gists_url": "https://api.github.com/users/mdavis-xyz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mdavis-xyz",
"id": 7035647,
"login": "mdavis-xyz",
"node_id": "MDQ6VXNlcjcwMzU2NDc=",
"organizations_url": "https://api.github.com/users/mdavis-xyz/orgs",
"received_events_url": "https://api.github.com/users/mdavis-xyz/received_events",
"repos_url": "https://api.github.com/users/mdavis-xyz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mdavis-xyz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mdavis-xyz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mdavis-xyz",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-10-22T23:30:32Z | 2021-08-29T00:06:42Z | 2020-10-23T10:49:59Z | NONE | resolved | > Requests is not accepting feature requests at this time.
I've just read [this section](https://requests.readthedocs.io/en/latest/dev/contributing/#feature-requests), and I believe my feature request is still worthwhile and simple, and I'm happy to write it myself. I'm just [getting early feedback](https://requests.readthedocs.io/en/latest/dev/contributing/#get-early-feedback).
I would like the ability to set a default timeout value for a session object, rather than passing in the same argument for every single call.
Existing usage:
```
s = requests.Session()
s.get(url_a, timeout=10)
s.get(url_b, timeout=10)
```
Proposed Usage:
```
s = requests.Session()
s.timeout = 10 # seconds
s.get(url_a)
s.get(url_b)
``` | {
"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/5637/reactions"
} | https://api.github.com/repos/psf/requests/issues/5637/timeline | null | completed | null | null | false | [
"In the future, please search **closed and** open issues before creating new ones that are duplicates."
] |
https://api.github.com/repos/psf/requests/issues/5636 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5636/labels{/name} | https://api.github.com/repos/psf/requests/issues/5636/comments | https://api.github.com/repos/psf/requests/issues/5636/events | https://github.com/psf/requests/issues/5636 | 726,766,478 | MDU6SXNzdWU3MjY3NjY0Nzg= | 5,636 | Prepared Post Requests Timeout after changing body | {
"avatar_url": "https://avatars.githubusercontent.com/u/51248447?v=4",
"events_url": "https://api.github.com/users/VainlyStrain/events{/privacy}",
"followers_url": "https://api.github.com/users/VainlyStrain/followers",
"following_url": "https://api.github.com/users/VainlyStrain/following{/other_user}",
"gists_url": "https://api.github.com/users/VainlyStrain/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/VainlyStrain",
"id": 51248447,
"login": "VainlyStrain",
"node_id": "MDQ6VXNlcjUxMjQ4NDQ3",
"organizations_url": "https://api.github.com/users/VainlyStrain/orgs",
"received_events_url": "https://api.github.com/users/VainlyStrain/received_events",
"repos_url": "https://api.github.com/users/VainlyStrain/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/VainlyStrain/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/VainlyStrain/subscriptions",
"type": "User",
"url": "https://api.github.com/users/VainlyStrain",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2020-10-21T18:34:55Z | 2020-10-22T00:19:33Z | 2020-10-22T00:19:22Z | NONE | resolved | I am trying to do a POST request using the requests library. However, for this specific request, it is important that the POST data stay unaltered (e.g. do not get URL-encoded).
I have seen in the documentation under "advanced usage" that you can do PreparedRequests. So, I did as shown in the docs, however it does not yield results as expected.
## Expected Result
We should get a response to our request.
## Actual Result
Prepared POST requests with changed body timeout.
## Reproduction Steps
```
python
import requests
s = requests.session()
data = {"file": "../p1.png"}
req = requests.Request(method='POST', url="http://localhost:8000", data=data)
prep = s.prepare_request(req)
prep.body = unquote(prep.body) #from urllib.parse, however the behavior is reproducible with any string, e.g. prep.body = "1234"
r = s.send(prep, timeout=timeout)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.8"
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.8.6"
},
"platform": {
"release": "5.8.15-201.fc32.x86_64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010104f",
"version": "19.0.0"
},
"requests": {
"version": "2.24.0"
},
"system_ssl": {
"version": "1010107f"
},
"urllib3": {
"version": "1.25.7"
},
"using_pyopenssl": true
}
```
Tested on local php server. PHP 7.4.11 (cli) (built: Sep 29 2020 10:17:06) ( NTS )
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5636/reactions"
} | https://api.github.com/repos/psf/requests/issues/5636/timeline | null | completed | null | null | false | [
"Upgraded some packages, but issue still persists:\r\n\r\n```\r\n{\r\n \"chardet\": {\r\n \"version\": \"3.0.4\"\r\n },\r\n \"cryptography\": {\r\n \"version\": \"2.9\"\r\n },\r\n \"idna\": {\r\n \"version\": \"2.10\"\r\n },\r\n \"implementation\": {\r\n \"name\": \"CPython\",\r\n \"version\":... |
https://api.github.com/repos/psf/requests/issues/5635 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5635/labels{/name} | https://api.github.com/repos/psf/requests/issues/5635/comments | https://api.github.com/repos/psf/requests/issues/5635/events | https://github.com/psf/requests/issues/5635 | 725,469,501 | MDU6SXNzdWU3MjU0Njk1MDE= | 5,635 | Ocassionally getting temporary failure in name resolution | {
"avatar_url": "https://avatars.githubusercontent.com/u/9302265?v=4",
"events_url": "https://api.github.com/users/priyanshujain/events{/privacy}",
"followers_url": "https://api.github.com/users/priyanshujain/followers",
"following_url": "https://api.github.com/users/priyanshujain/following{/other_user}",
"gists_url": "https://api.github.com/users/priyanshujain/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/priyanshujain",
"id": 9302265,
"login": "priyanshujain",
"node_id": "MDQ6VXNlcjkzMDIyNjU=",
"organizations_url": "https://api.github.com/users/priyanshujain/orgs",
"received_events_url": "https://api.github.com/users/priyanshujain/received_events",
"repos_url": "https://api.github.com/users/priyanshujain/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/priyanshujain/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/priyanshujain/subscriptions",
"type": "User",
"url": "https://api.github.com/users/priyanshujain",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2020-10-20T11:04:50Z | 2020-10-21T13:50:03Z | 2020-10-20T12:17:48Z | NONE | resolved | I am getting name resolution error with requests occasionally, it's happening approx once in 10 requests.
My stackoverflow question https://stackoverflow.com/questions/64357458/failed-to-establish-a-new-connection-errno-3-temporary-failure-in-name-resol
| {
"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/5635/reactions"
} | https://api.github.com/repos/psf/requests/issues/5635/timeline | null | completed | null | null | false | [
"@sigmavirus24 Can you help me this issue?",
"You asked on StackOverflow which is the correct place. For what it's worth, I maintain systems making thousands of requests per minute with requests that don't have this issue. And a DNS issue is firmly outside of our control given that we use the standard library to ... |
https://api.github.com/repos/psf/requests/issues/5634 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5634/labels{/name} | https://api.github.com/repos/psf/requests/issues/5634/comments | https://api.github.com/repos/psf/requests/issues/5634/events | https://github.com/psf/requests/issues/5634 | 724,593,946 | MDU6SXNzdWU3MjQ1OTM5NDY= | 5,634 | Segmentation Fault - Core Dumped | {
"avatar_url": "https://avatars.githubusercontent.com/u/68481259?v=4",
"events_url": "https://api.github.com/users/codinghedgehog-python/events{/privacy}",
"followers_url": "https://api.github.com/users/codinghedgehog-python/followers",
"following_url": "https://api.github.com/users/codinghedgehog-python/following{/other_user}",
"gists_url": "https://api.github.com/users/codinghedgehog-python/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/codinghedgehog-python",
"id": 68481259,
"login": "codinghedgehog-python",
"node_id": "MDQ6VXNlcjY4NDgxMjU5",
"organizations_url": "https://api.github.com/users/codinghedgehog-python/orgs",
"received_events_url": "https://api.github.com/users/codinghedgehog-python/received_events",
"repos_url": "https://api.github.com/users/codinghedgehog-python/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/codinghedgehog-python/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/codinghedgehog-python/subscriptions",
"type": "User",
"url": "https://api.github.com/users/codinghedgehog-python",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-10-19T13:08:24Z | 2021-08-29T00:06:42Z | 2020-10-19T13:52:44Z | NONE | resolved | Hi, since I'm not 100% sure whether it's a bug or not I'm putting it under "Request for Help".
I looked up what the error actually means and apparently my program attempted to access restricted part of RAM.
You go figure.
I had to use Python debugger to find out that the module throws seg fault on the method call.
Anyway, I'd appreciated any feedback on the below
Request I'm sending:
```
data = {
'first_name': self.first_name,
'middle_name': self.middle_name,
'last_name': self.last_name,
'new_comment': self.comment
}
files = {'image_file1': open(self.file_path1, 'rb')}
#print(data)
#pdb.set_trace()
response = requests.post('http://localhost/users/add', json=data, files=files)
if response.status_code == 201:
print('ADDED !')
else:
print(response)
```
output from debugger:
```
/home/mark/front_end_android/venv/lib/python3.7/site-packages/requests/api.py(119)post()
-> return request('post', url, data=data, json=json, **kwargs)
Segmentation fault (core dumped)
``` | {
"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/5634/reactions"
} | https://api.github.com/repos/psf/requests/issues/5634/timeline | null | completed | null | null | false | [
"It's likely this is coming from a lower-level library that's using C but at first blush, you can't (and this is documented) combine `json=` and `files=`. So I'm sure the JSON library you're using is doing something to cause this with the open file you're using.\r\n\r\nPlease use [StackOverflow](https://stackoverfl... |
https://api.github.com/repos/psf/requests/issues/5633 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5633/labels{/name} | https://api.github.com/repos/psf/requests/issues/5633/comments | https://api.github.com/repos/psf/requests/issues/5633/events | https://github.com/psf/requests/issues/5633 | 724,254,792 | MDU6SXNzdWU3MjQyNTQ3OTI= | 5,633 | Session.close() does not close underlying sockets | {
"avatar_url": "https://avatars.githubusercontent.com/u/118304?v=4",
"events_url": "https://api.github.com/users/grantjenks/events{/privacy}",
"followers_url": "https://api.github.com/users/grantjenks/followers",
"following_url": "https://api.github.com/users/grantjenks/following{/other_user}",
"gists_url": "https://api.github.com/users/grantjenks/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/grantjenks",
"id": 118304,
"login": "grantjenks",
"node_id": "MDQ6VXNlcjExODMwNA==",
"organizations_url": "https://api.github.com/users/grantjenks/orgs",
"received_events_url": "https://api.github.com/users/grantjenks/received_events",
"repos_url": "https://api.github.com/users/grantjenks/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/grantjenks/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/grantjenks/subscriptions",
"type": "User",
"url": "https://api.github.com/users/grantjenks",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-10-19T04:46:43Z | 2021-08-29T00:06:43Z | 2020-10-19T11:10:37Z | NONE | resolved | It seems that Session.close() does not close the underlying TCP socket. That was unexpected and it wasn't clear to me in the docs. Is there any way to explicitly/forcefully close all underlying sockets in a threadsafe way?
## Expected Result
Using sockets:
```python
"""Demo for Canceling IO by Closing the Socket
"""
import socket
import time
from concurrent import futures
start_time = time.time()
sock = socket.socket()
def read():
"Read data with 10 second delay."
sock.connect(('httpbin.org', 80))
sock.sendall(b'GET /delay/10 HTTP/1.0\r\n\r\n')
while True:
data = sock.recv(1024)
if not data:
break
print(data.decode(), end='')
with futures.ThreadPoolExecutor() as pool:
future = pool.submit(read)
futures.wait([future], timeout=5)
sock.close() # <-- Interrupt sock.recv(1024) in Thread:read().
end_time = time.time()
print(f'Duration: {end_time - start_time:.3f}')
# Duration is ~5s as expected.
```
The duration is ~5s, as expected.
## Actual Result
```python
"""Demo for Canceling IO in Threads
"""
import time
from concurrent import futures
import requests
start_time = time.time()
with futures.ThreadPoolExecutor() as pool:
with requests.Session() as session:
request = pool.submit(session.get, 'http://httpbin.org/delay/10')
done, not_done = futures.wait([request], timeout=5)
# Session.__exit__() calls Session.close() which should close the
# socket from the main thread and interrupt the read in the
# Thread:session.get().
end_time = time.time()
print(f'Duration: {end_time - start_time:.3f}')
# Duration is ~10s as *unexpected*.
# Why does session.close() not interrupt the socket.recv()?
```
The duration is ~10s which was unexpected.
## Reproduction Steps
See code samples above.
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.7.9"
},
"platform": {
"release": "19.6.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.24.0"
},
"system_ssl": {
"version": "1010107f"
},
"urllib3": {
"version": "1.25.10"
},
"using_pyopenssl": false
}
```
Running in Python 3.7.9 on Mac OSX.
| {
"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/5633/reactions"
} | https://api.github.com/repos/psf/requests/issues/5633/timeline | null | completed | null | null | false | [
"You have to first return the socket to the connection pool by closing the response if you haven't already consumed all the content. Then you can close the Session. Responses hold onto their socket until either:\r\n\r\n- All the content has been read into memory (default)\r\n- The user has read all the content (str... |
https://api.github.com/repos/psf/requests/issues/5632 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5632/labels{/name} | https://api.github.com/repos/psf/requests/issues/5632/comments | https://api.github.com/repos/psf/requests/issues/5632/events | https://github.com/psf/requests/issues/5632 | 723,739,495 | MDU6SXNzdWU3MjM3Mzk0OTU= | 5,632 | Requests and Answers Encoding | {
"avatar_url": "https://avatars.githubusercontent.com/u/30806958?v=4",
"events_url": "https://api.github.com/users/oktorok/events{/privacy}",
"followers_url": "https://api.github.com/users/oktorok/followers",
"following_url": "https://api.github.com/users/oktorok/following{/other_user}",
"gists_url": "https://api.github.com/users/oktorok/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/oktorok",
"id": 30806958,
"login": "oktorok",
"node_id": "MDQ6VXNlcjMwODA2OTU4",
"organizations_url": "https://api.github.com/users/oktorok/orgs",
"received_events_url": "https://api.github.com/users/oktorok/received_events",
"repos_url": "https://api.github.com/users/oktorok/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/oktorok/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/oktorok/subscriptions",
"type": "User",
"url": "https://api.github.com/users/oktorok",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 7 | 2020-10-17T11:46:14Z | 2021-08-29T00:06:43Z | 2020-10-17T13:08:46Z | NONE | resolved | When requests answer is from (atleast) ISO-8859-1, the module take so long for process the response.
## Expected Result
Similar time than curl or browser time around 1 sec
## Actual Result
The answer takes more than 2 minutes

## Reproduction Steps
```
url = 'https://geoportal.minetur.gob.es/VCTEL/infoantenasGeoJSON.do?idCapa=null&bbox=-1.5525697885398,39.26519497205,-1.549179476345,39.273649294864&zoom=4'
r = requests.get(url, headers=headers)
print(r.json())
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.8.5"
},
"platform": {
"release": "5.4.64-1-MANJARO",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.24.0"
},
"system_ssl": {
"version": "1010107f"
},
"urllib3": {
"version": "1.25.10"
},
"using_pyopenssl": false
}
```
## Thoughts
This looks like a problem with encoding as requests needs to guess the encoding, maybe adding a parameter or a way for specify the answer encoding would speed it up | {
"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/5632/reactions"
} | https://api.github.com/repos/psf/requests/issues/5632/timeline | null | completed | null | null | false | [
"> This looks like a problem with encoding as requests needs to guess the encoding, maybe adding a parameter or a way for specify the answer encoding would speed it up\r\n\r\nAssuming this is accurate, `r.encoding` can be set to bypass `chardet`. This is well documented across issues and our documentation and stack... |
https://api.github.com/repos/psf/requests/issues/5631 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5631/labels{/name} | https://api.github.com/repos/psf/requests/issues/5631/comments | https://api.github.com/repos/psf/requests/issues/5631/events | https://github.com/psf/requests/issues/5631 | 723,404,330 | MDU6SXNzdWU3MjM0MDQzMzA= | 5,631 | ModuleNotFoundError | {
"avatar_url": "https://avatars.githubusercontent.com/u/52720753?v=4",
"events_url": "https://api.github.com/users/PurpShell/events{/privacy}",
"followers_url": "https://api.github.com/users/PurpShell/followers",
"following_url": "https://api.github.com/users/PurpShell/following{/other_user}",
"gists_url": "https://api.github.com/users/PurpShell/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/PurpShell",
"id": 52720753,
"login": "PurpShell",
"node_id": "MDQ6VXNlcjUyNzIwNzUz",
"organizations_url": "https://api.github.com/users/PurpShell/orgs",
"received_events_url": "https://api.github.com/users/PurpShell/received_events",
"repos_url": "https://api.github.com/users/PurpShell/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/PurpShell/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/PurpShell/subscriptions",
"type": "User",
"url": "https://api.github.com/users/PurpShell",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2020-10-16T17:29:54Z | 2021-08-29T00:06:43Z | 2020-10-16T17:39:20Z | NONE | resolved | I have tried multiple things from removing python 2.7 to installing last version.
I tried in multiple ways installing using PIP.
I keep getting this 'ModuleNotFoundError'
pylint says that it is unable to import the package.
My error
`Exception has occurred: ModuleNotFoundError
No module named 'requests'
File "file-hidden", line 1, in <module>
import 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/5631/reactions"
} | https://api.github.com/repos/psf/requests/issues/5631/timeline | null | completed | null | null | false | [
"Also everything is satisfied if i try reinstalling in pip\r\n",
"I just realized that I am using the windows 10 version of python 3.8. Installing the normal version to see if that is the issue\r\n",
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report... |
https://api.github.com/repos/psf/requests/issues/5630 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5630/labels{/name} | https://api.github.com/repos/psf/requests/issues/5630/comments | https://api.github.com/repos/psf/requests/issues/5630/events | https://github.com/psf/requests/issues/5630 | 723,252,722 | MDU6SXNzdWU3MjMyNTI3MjI= | 5,630 | The ordering of cookies in the Cookie header are not correct. | {
"avatar_url": "https://avatars.githubusercontent.com/u/55282537?v=4",
"events_url": "https://api.github.com/users/IKermani/events{/privacy}",
"followers_url": "https://api.github.com/users/IKermani/followers",
"following_url": "https://api.github.com/users/IKermani/following{/other_user}",
"gists_url": "https://api.github.com/users/IKermani/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/IKermani",
"id": 55282537,
"login": "IKermani",
"node_id": "MDQ6VXNlcjU1MjgyNTM3",
"organizations_url": "https://api.github.com/users/IKermani/orgs",
"received_events_url": "https://api.github.com/users/IKermani/received_events",
"repos_url": "https://api.github.com/users/IKermani/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/IKermani/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/IKermani/subscriptions",
"type": "User",
"url": "https://api.github.com/users/IKermani",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2020-10-16T13:58:37Z | 2021-08-29T00:06:44Z | 2020-10-16T14:38:19Z | NONE | resolved | ## Summery
I found this issue (I am not sure if it is issue though) when I was analyzing requests and responses of a website and tried to imitate them with [requests library](https://github.com/psf/requests) and found that the cookies ordering in the request Cookie header are not as the same as the browser(Chromium and Firefox) manage them.
In my case I am not able to communicate (imitate request of a normal web browser) with the web application because of the ordering of the cookies.
According to [RFC 2109](https://tools.ietf.org/html/rfc2109) that says:
> If multiple cookies satisfy the criteria above, they are ordered in
the Cookie header such that those with more specific Path attributes
precede those with less specific. Ordering with respect to other
attributes (e.g., Domain) is unspecified.
they both have same domain (`path=/`) but the `SESSIONID` has the `HttpOnly` attribute so (I guess) it should precedes to be on the Cookie header but the browser always use the `cookie=; SESSIONID=` order.
## Expected Result
Expect [requests](https://github.com/psf/requests) handle the Cookie header as the browser do.
the first GET request and response in chromium

the second GET requests and response in chromium

## Actual Result
```python
from requests import Session
s = Session()
# The first requests without Cookie header
s.get("http://localhost:8000")
# the second request
s.get("http://localhost:8000")
```
first `s.get("http://localhost:8000")`

second `s.get("http://localhost:8000")`

## Reproduction Steps
the following test server can be used to reproduce the steps
```python
from http.server import BaseHTTPRequestHandler, HTTPStatus, HTTPServer
class Handler(BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(HTTPStatus.OK)
self.send_header("Set-Cookie", "cookie=R123006635; path=/")
self.send_header("Cache-Control", "no-cache")
self.send_header("Cache-Control", "no-store")
self.send_header("Pragma", "no-cache")
self.send_header("Content-Type", "text/html;charset=UTF-8")
self.send_header("Expires", "Thu, 01 Jan 1970 00:00:00 GMT")
self.send_header("Set-Cookie",
"SESSIONID=8bYxaPf5vNENGOuOXSYMCO1Ee05VmFsouDinyXp1Zg9tpXjXWoDL!-1207423773; path=/; HttpOnly")
self.send_header("Content-Language", "en-GB")
self.end_headers()
server_address = ('', 8000)
httpd = HTTPServer(server_address, Handler)
httpd.serve_forever()
```
Client
```python
from requests import Session
s = Session()
# should be used 2 times first time set the cookie on the session obj
s.get("http://localhost:8000")
s.get("http://localhost:8000")
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.9.0"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.24.0"
},
"system_ssl": {
"version": "1010107f"
},
"urllib3": {
"version": "1.25.10"
},
"using_pyopenssl": false
}
```
This problem was on python3.7 too.
Thanks for your help in advance. | {
"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/5630/reactions"
} | https://api.github.com/repos/psf/requests/issues/5630/timeline | null | completed | null | null | false | [
"`HttpOnly` doesn't make a difference in how the cookie should be interpreted in the semantic way that `Path` _can_ (although you're quoting a _very_ old RFC). (Note that by your own quote, nothing else should affect the ordering but `Path`.) If you look at your responses, the browser gets `cookie=` first, then `SE... |
https://api.github.com/repos/psf/requests/issues/5629 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5629/labels{/name} | https://api.github.com/repos/psf/requests/issues/5629/comments | https://api.github.com/repos/psf/requests/issues/5629/events | https://github.com/psf/requests/issues/5629 | 721,590,238 | MDU6SXNzdWU3MjE1OTAyMzg= | 5,629 | content-type: media subtypes of "text" using ISO-8859-1 as default charset may be inappropriate | {
"avatar_url": "https://avatars.githubusercontent.com/u/18023477?v=4",
"events_url": "https://api.github.com/users/stanpao/events{/privacy}",
"followers_url": "https://api.github.com/users/stanpao/followers",
"following_url": "https://api.github.com/users/stanpao/following{/other_user}",
"gists_url": "https://api.github.com/users/stanpao/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/stanpao",
"id": 18023477,
"login": "stanpao",
"node_id": "MDQ6VXNlcjE4MDIzNDc3",
"organizations_url": "https://api.github.com/users/stanpao/orgs",
"received_events_url": "https://api.github.com/users/stanpao/received_events",
"repos_url": "https://api.github.com/users/stanpao/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/stanpao/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/stanpao/subscriptions",
"type": "User",
"url": "https://api.github.com/users/stanpao",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-10-14T16:06:25Z | 2021-08-29T00:06:44Z | 2020-10-14T18:20:08Z | NONE | resolved | https://github.com/psf/requests/blob/143150233162d609330941ec2aacde5ed4caa510/requests/utils.py#L497
From [RFC 2616](https://tools.ietf.org/html/rfc2616#section-3.7.1):
When no explicit charset parameter is provided by the sender, media subtypes of the "text"
type are defined to have a default charset value of "ISO-8859-1" when received via HTTP.
However, from [RFC7231](https://tools.ietf.org/html/rfc7231#appendix-B):
The default charset of ISO-8859-1 for text media types has been removed;
Actually, if requests uses the default charset of ISO-8859-1, the property text of response will always lose the efficiency of chardet and cause messy code problem.
I think these lines should be deleted. | {
"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/5629/reactions"
} | https://api.github.com/repos/psf/requests/issues/5629/timeline | null | completed | null | null | false | [
"It's a backwards incompatible change.\r\n\r\nIn the future, please search **closed and** open issues before creating new ones that are duplicates."
] |
https://api.github.com/repos/psf/requests/issues/5628 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5628/labels{/name} | https://api.github.com/repos/psf/requests/issues/5628/comments | https://api.github.com/repos/psf/requests/issues/5628/events | https://github.com/psf/requests/pull/5628 | 721,345,257 | MDExOlB1bGxSZXF1ZXN0NTAzMjc4MTE5 | 5,628 | Added python 3.9 to CI, tox and setup.py | {
"avatar_url": "https://avatars.githubusercontent.com/u/56871115?v=4",
"events_url": "https://api.github.com/users/hughesp8/events{/privacy}",
"followers_url": "https://api.github.com/users/hughesp8/followers",
"following_url": "https://api.github.com/users/hughesp8/following{/other_user}",
"gists_url": "https://api.github.com/users/hughesp8/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hughesp8",
"id": 56871115,
"login": "hughesp8",
"node_id": "MDQ6VXNlcjU2ODcxMTE1",
"organizations_url": "https://api.github.com/users/hughesp8/orgs",
"received_events_url": "https://api.github.com/users/hughesp8/received_events",
"repos_url": "https://api.github.com/users/hughesp8/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hughesp8/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hughesp8/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hughesp8",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 6 | 2020-10-14T10:39:37Z | 2021-08-28T00:06:17Z | 2020-11-11T19:00:37Z | NONE | resolved | # Added Python 3.9 into CI, tox and setup.py
This PR is directly related to this issue #5620
closes #5620
**This PR is currently a draft**
I am creating the PR to run test suite/see how CI performs using python3.9 via Actions. I was unable to get a Python3.9 virtual environment working locally so this is my alternative to see if it works. (This is my first open-source contribution so if this approach is poor please go easy on 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": 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/5628/reactions"
} | https://api.github.com/repos/psf/requests/issues/5628/timeline | null | null | true | {
"diff_url": "https://github.com/psf/requests/pull/5628.diff",
"html_url": "https://github.com/psf/requests/pull/5628",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5628.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5628"
} | true | [
"Looks like travis doesn't have 3.9 yet",
"> Looks like travis doesn't have 3.9 yet\r\n\r\nI looked through the on-demand python versions for travis and they do have python-3.9-dev.tar.bz2. So the dev version. However I don't know how to target. Any ideas?\r\n\r\nHere are the available versions https://docs.travi... |
https://api.github.com/repos/psf/requests/issues/5627 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5627/labels{/name} | https://api.github.com/repos/psf/requests/issues/5627/comments | https://api.github.com/repos/psf/requests/issues/5627/events | https://github.com/psf/requests/issues/5627 | 721,236,019 | MDU6SXNzdWU3MjEyMzYwMTk= | 5,627 | Is it possible to support ftp transfer ? | {
"avatar_url": "https://avatars.githubusercontent.com/u/31752768?v=4",
"events_url": "https://api.github.com/users/eaglegai/events{/privacy}",
"followers_url": "https://api.github.com/users/eaglegai/followers",
"following_url": "https://api.github.com/users/eaglegai/following{/other_user}",
"gists_url": "https://api.github.com/users/eaglegai/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/eaglegai",
"id": 31752768,
"login": "eaglegai",
"node_id": "MDQ6VXNlcjMxNzUyNzY4",
"organizations_url": "https://api.github.com/users/eaglegai/orgs",
"received_events_url": "https://api.github.com/users/eaglegai/received_events",
"repos_url": "https://api.github.com/users/eaglegai/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/eaglegai/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/eaglegai/subscriptions",
"type": "User",
"url": "https://api.github.com/users/eaglegai",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-10-14T08:01:42Z | 2021-08-29T00:06:45Z | 2020-10-14T10:32:11Z | NONE | resolved | I see 'class HTTPAdapter' in adapters.py,if it's possible to deal with ftp requests?
Looking forward to your reply ,thanks! | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 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/5627/reactions"
} | https://api.github.com/repos/psf/requests/issues/5627/timeline | null | completed | null | null | false | [
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here."
] |
https://api.github.com/repos/psf/requests/issues/5626 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5626/labels{/name} | https://api.github.com/repos/psf/requests/issues/5626/comments | https://api.github.com/repos/psf/requests/issues/5626/events | https://github.com/psf/requests/issues/5626 | 720,283,795 | MDU6SXNzdWU3MjAyODM3OTU= | 5,626 | Inconsistent host behaviour when request is redirected | {
"avatar_url": "https://avatars.githubusercontent.com/u/12761574?v=4",
"events_url": "https://api.github.com/users/javixeneize/events{/privacy}",
"followers_url": "https://api.github.com/users/javixeneize/followers",
"following_url": "https://api.github.com/users/javixeneize/following{/other_user}",
"gists_url": "https://api.github.com/users/javixeneize/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/javixeneize",
"id": 12761574,
"login": "javixeneize",
"node_id": "MDQ6VXNlcjEyNzYxNTc0",
"organizations_url": "https://api.github.com/users/javixeneize/orgs",
"received_events_url": "https://api.github.com/users/javixeneize/received_events",
"repos_url": "https://api.github.com/users/javixeneize/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/javixeneize/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/javixeneize/subscriptions",
"type": "User",
"url": "https://api.github.com/users/javixeneize",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-10-13T13:50:53Z | 2021-08-29T00:06:45Z | 2020-10-13T19:19:56Z | NONE | resolved | Summary.
Hi
Im trying to implement a script to test a host header injection. It is quite simple, it sends a valid request to an endpoint, but modifies the Host header injecting a fake domain (evil.com)
When the request is not a redirection, this header is ignored, and the request reaches the original url, however, if the request ends in a redirection (302), and you enable redirections (allow_redirects=True), this redirection is done to the host specified in the header (evil.com)
To summarise:
if i send a request to test.com/blah with Host: evil.com and it returns a 200, the requests goes to test.com/blah
if i send a request to test.com/blah with Host: evil.com and it returns a 302 that redirects to test.com/redirected_site, then, i see the first request going to test.com/blah with a 302, but the redirection, instead of going to test.com/redirected_site, goes to evil.com/redirected_site
So it looks like this redirection is using the host header instead of taking the url generated by the 302 request
Thanks
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5626/reactions"
} | https://api.github.com/repos/psf/requests/issues/5626/timeline | null | completed | null | null | false | [
"This isn't behaviour in Requests. We don't look at the `Host` header at all while [handling redirects](https://github.com/psf/requests/blob/143150233162d609330941ec2aacde5ed4caa510/requests/sessions.py#L96). "
] |
https://api.github.com/repos/psf/requests/issues/5625 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5625/labels{/name} | https://api.github.com/repos/psf/requests/issues/5625/comments | https://api.github.com/repos/psf/requests/issues/5625/events | https://github.com/psf/requests/issues/5625 | 720,047,150 | MDU6SXNzdWU3MjAwNDcxNTA= | 5,625 | Preparing request with Session obj | {
"avatar_url": "https://avatars.githubusercontent.com/u/14844484?v=4",
"events_url": "https://api.github.com/users/ShurayukiHime/events{/privacy}",
"followers_url": "https://api.github.com/users/ShurayukiHime/followers",
"following_url": "https://api.github.com/users/ShurayukiHime/following{/other_user}",
"gists_url": "https://api.github.com/users/ShurayukiHime/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ShurayukiHime",
"id": 14844484,
"login": "ShurayukiHime",
"node_id": "MDQ6VXNlcjE0ODQ0NDg0",
"organizations_url": "https://api.github.com/users/ShurayukiHime/orgs",
"received_events_url": "https://api.github.com/users/ShurayukiHime/received_events",
"repos_url": "https://api.github.com/users/ShurayukiHime/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ShurayukiHime/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ShurayukiHime/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ShurayukiHime",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-10-13T09:25:52Z | 2021-08-29T00:06:46Z | 2020-10-13T12:24:18Z | NONE | resolved | Hi,
this is actually a question more than an issue.
```
req = requests.Request(method=None, url=url, cookies=self.cookies)
prepped = self.session.prepare_request(req)
```
raises error because method is None, and this is actually because of `method.upper()`. [Code here](https://github.com/psf/requests/blob/143150233162d609330941ec2aacde5ed4caa510/requests/sessions.py#L457) -- specifically _AttributeError: 'NoneType' object has no attribute 'upper'_.
(suppose I have an object incapsulating a `session = requests.Session()`; this explains why `self.session` in the above snippet)
On the other hand,
```
req = requests.Request(method=None, url=url, cookies=self.cookies)
prepped = req.prepare()
```
works fine. In this second case, the same `prepare()` method is called ([code here](https://github.com/psf/requests/blob/143150233162d609330941ec2aacde5ed4caa510/requests/models.py#L254)).
I don't understand if there is a reason for requests made with sessions not to have None method, or if this is a bug.
Thank you!
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5625/reactions"
} | https://api.github.com/repos/psf/requests/issues/5625/timeline | null | completed | null | null | false | [
"I'd say it's a bug that `req.prepare()` doesn't raise an exception for a `None` method. It shouldn't raise an `AttributeError` but we can't swap that out for something more reasonable at this point or break `req.prepare()`."
] |
https://api.github.com/repos/psf/requests/issues/5624 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5624/labels{/name} | https://api.github.com/repos/psf/requests/issues/5624/comments | https://api.github.com/repos/psf/requests/issues/5624/events | https://github.com/psf/requests/issues/5624 | 719,715,335 | MDU6SXNzdWU3MTk3MTUzMzU= | 5,624 | Issue with using http proxies with requests | {
"avatar_url": "https://avatars.githubusercontent.com/u/57771737?v=4",
"events_url": "https://api.github.com/users/FunnyMan69420/events{/privacy}",
"followers_url": "https://api.github.com/users/FunnyMan69420/followers",
"following_url": "https://api.github.com/users/FunnyMan69420/following{/other_user}",
"gists_url": "https://api.github.com/users/FunnyMan69420/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/FunnyMan69420",
"id": 57771737,
"login": "FunnyMan69420",
"node_id": "MDQ6VXNlcjU3NzcxNzM3",
"organizations_url": "https://api.github.com/users/FunnyMan69420/orgs",
"received_events_url": "https://api.github.com/users/FunnyMan69420/received_events",
"repos_url": "https://api.github.com/users/FunnyMan69420/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/FunnyMan69420/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/FunnyMan69420/subscriptions",
"type": "User",
"url": "https://api.github.com/users/FunnyMan69420",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-10-12T22:42:44Z | 2021-08-29T00:06:46Z | 2020-10-12T22:46:30Z | NONE | resolved | Hello I have recently been attempting to use http proxies for something im making however when I use http proxies it instead uses my ip but when I use https proxies it actually uses the proxies ip. Slightly confused about this I do not know if there is something stopping this from working, thanks a lot for reading.
I checked this by requesting a IP checker API. | {
"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/5624/reactions"
} | https://api.github.com/repos/psf/requests/issues/5624/timeline | null | completed | null | null | false | [
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here.\r\n\r\nIf you open this again as an issue, you will be ... |
https://api.github.com/repos/psf/requests/issues/5623 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5623/labels{/name} | https://api.github.com/repos/psf/requests/issues/5623/comments | https://api.github.com/repos/psf/requests/issues/5623/events | https://github.com/psf/requests/issues/5623 | 719,703,176 | MDU6SXNzdWU3MTk3MDMxNzY= | 5,623 | Requests library (python) with http proxies | {
"avatar_url": "https://avatars.githubusercontent.com/u/57771737?v=4",
"events_url": "https://api.github.com/users/FunnyMan69420/events{/privacy}",
"followers_url": "https://api.github.com/users/FunnyMan69420/followers",
"following_url": "https://api.github.com/users/FunnyMan69420/following{/other_user}",
"gists_url": "https://api.github.com/users/FunnyMan69420/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/FunnyMan69420",
"id": 57771737,
"login": "FunnyMan69420",
"node_id": "MDQ6VXNlcjU3NzcxNzM3",
"organizations_url": "https://api.github.com/users/FunnyMan69420/orgs",
"received_events_url": "https://api.github.com/users/FunnyMan69420/received_events",
"repos_url": "https://api.github.com/users/FunnyMan69420/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/FunnyMan69420/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/FunnyMan69420/subscriptions",
"type": "User",
"url": "https://api.github.com/users/FunnyMan69420",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-10-12T22:14:50Z | 2021-08-29T00:06:46Z | 2020-10-12T22:28:07Z | NONE | resolved | Hello I have recently been attempting to use http proxies for something im making however when I use http proxies it instead uses my ip but when I use https proxies it actually uses the proxies ip. Slightly confused about this I do not know if there is something stopping this from working, thanks a lot for reading. | {
"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/5623/reactions"
} | https://api.github.com/repos/psf/requests/issues/5623/timeline | null | completed | null | null | false | [
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here."
] |
https://api.github.com/repos/psf/requests/issues/5622 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5622/labels{/name} | https://api.github.com/repos/psf/requests/issues/5622/comments | https://api.github.com/repos/psf/requests/issues/5622/events | https://github.com/psf/requests/issues/5622 | 719,407,242 | MDU6SXNzdWU3MTk0MDcyNDI= | 5,622 | Response Cookies are not Accessible (but they end up in the session) | {
"avatar_url": "https://avatars.githubusercontent.com/u/2635438?v=4",
"events_url": "https://api.github.com/users/cedricvanrompay/events{/privacy}",
"followers_url": "https://api.github.com/users/cedricvanrompay/followers",
"following_url": "https://api.github.com/users/cedricvanrompay/following{/other_user}",
"gists_url": "https://api.github.com/users/cedricvanrompay/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cedricvanrompay",
"id": 2635438,
"login": "cedricvanrompay",
"node_id": "MDQ6VXNlcjI2MzU0Mzg=",
"organizations_url": "https://api.github.com/users/cedricvanrompay/orgs",
"received_events_url": "https://api.github.com/users/cedricvanrompay/received_events",
"repos_url": "https://api.github.com/users/cedricvanrompay/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cedricvanrompay/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cedricvanrompay/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cedricvanrompay",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2020-10-12T14:03:58Z | 2021-08-29T00:06:44Z | 2020-10-12T14:24:47Z | NONE | resolved | `response.cookies` is empty when it shouldn't; [the example in documentation for reading cookies from a response](https://requests.readthedocs.io/en/master/user/quickstart/#cookies) does not seem to work.
*(**EDIT:** solved, it works, see answer below)*
## Expected Result
```
>>> requests.get('https://httpbin.org/cookies/set?foo=bar').cookies
<RequestsCookieJar[Cookie(version=0, name='foo', value='bar', port=None, port_specified=False, domain='httpbin.org', domain_specified=False, domain_initial_dot=False, path='/', path_specified=True, secure=False, expires=None, discard=True, comment=None, comment_url=None, rest={}, rfc2109=False)]>
```
## Actual Result
```
>>> requests.get('https://httpbin.org/cookies/set?foo=bar').cookies
<RequestsCookieJar[]>
```
Note that we can see the cookie in the session if we use one, though:
```
>>> s = requests.session()
>>> resp = s.get('https://httpbin.org/cookies/set?foo=bar')
>>> s.cookies
<RequestsCookieJar[Cookie(version=0, name='foo', value='bar', port=None, port_specified=False, domain='httpbin.org', domain_specified=False, domain_initial_dot=False, path='/', path_specified=True, secure=False, expires=None, discard=True, comment=None, comment_url=None, rest={}, rfc2109=False)]>
>>> s.cookies['foo']
'bar'
>>> resp.cookies
<RequestsCookieJar[]>
```
## Reproduction Steps
```python
import requests
print(requests.get('https://httpbin.org/cookies/set?foo=bar').cookies)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.8.4"
},
"platform": {
"release": "5.4.0-48-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.24.0"
},
"system_ssl": {
"version": "1010106f"
},
"urllib3": {
"version": "1.25.9"
},
"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/5622/reactions"
} | https://api.github.com/repos/psf/requests/issues/5622/timeline | null | completed | null | null | false | [
"Check `response.history` the cookies are set on the response that actually received the cookies, not every subsequent one.",
"Indeed:\r\n\r\n```\r\n>>> resp.history\r\n[<Response [302]>]\r\n>>> resp.history[0].headers\r\n{'Date': 'Thu, 15 Oct 2020 15:33:54 GMT', 'Content-Type': 'text/html; charset=utf-8', 'Conte... |
https://api.github.com/repos/psf/requests/issues/5621 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5621/labels{/name} | https://api.github.com/repos/psf/requests/issues/5621/comments | https://api.github.com/repos/psf/requests/issues/5621/events | https://github.com/psf/requests/pull/5621 | 719,162,571 | MDExOlB1bGxSZXF1ZXN0NTAxMzk5NDEy | 5,621 | Fix formatting in setup.py | {
"avatar_url": "https://avatars.githubusercontent.com/u/10052309?v=4",
"events_url": "https://api.github.com/users/vladdoster/events{/privacy}",
"followers_url": "https://api.github.com/users/vladdoster/followers",
"following_url": "https://api.github.com/users/vladdoster/following{/other_user}",
"gists_url": "https://api.github.com/users/vladdoster/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/vladdoster",
"id": 10052309,
"login": "vladdoster",
"node_id": "MDQ6VXNlcjEwMDUyMzA5",
"organizations_url": "https://api.github.com/users/vladdoster/orgs",
"received_events_url": "https://api.github.com/users/vladdoster/received_events",
"repos_url": "https://api.github.com/users/vladdoster/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/vladdoster/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vladdoster/subscriptions",
"type": "User",
"url": "https://api.github.com/users/vladdoster",
"user_view_type": "public"
} | [
{
"color": "d16014",
"default": false,
"description": "",
"id": 2392364523,
"name": "spam",
"node_id": "MDU6TGFiZWwyMzkyMzY0NTIz",
"url": "https://api.github.com/repos/psf/requests/labels/spam"
}
] | closed | true | null | [] | null | 1 | 2020-10-12T08:03:59Z | 2021-08-28T00:06:17Z | 2020-10-29T20:12:23Z | NONE | resolved | - Remove extraneous whitespace in `requires` list
- Add spacing between `requires` and `test_requirements` | {
"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/5621/reactions"
} | https://api.github.com/repos/psf/requests/issues/5621/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5621.diff",
"html_url": "https://github.com/psf/requests/pull/5621",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5621.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5621"
} | true | [
"Thanks but the project is not accepting purely cosmetic changes"
] |
https://api.github.com/repos/psf/requests/issues/5620 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5620/labels{/name} | https://api.github.com/repos/psf/requests/issues/5620/comments | https://api.github.com/repos/psf/requests/issues/5620/events | https://github.com/psf/requests/issues/5620 | 718,772,948 | MDU6SXNzdWU3MTg3NzI5NDg= | 5,620 | Add Python 3.9 to CI | {
"avatar_url": "https://avatars.githubusercontent.com/u/3972343?v=4",
"events_url": "https://api.github.com/users/tirkarthi/events{/privacy}",
"followers_url": "https://api.github.com/users/tirkarthi/followers",
"following_url": "https://api.github.com/users/tirkarthi/following{/other_user}",
"gists_url": "https://api.github.com/users/tirkarthi/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tirkarthi",
"id": 3972343,
"login": "tirkarthi",
"node_id": "MDQ6VXNlcjM5NzIzNDM=",
"organizations_url": "https://api.github.com/users/tirkarthi/orgs",
"received_events_url": "https://api.github.com/users/tirkarthi/received_events",
"repos_url": "https://api.github.com/users/tirkarthi/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tirkarthi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tirkarthi/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tirkarthi",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2020-10-11T06:49:38Z | 2021-08-28T00:06:10Z | 2020-11-11T19:01:00Z | NONE | resolved | Python 3.9 was released on October 5, 2020. Add Python 3.9 to CI, tox configuration and update classifiers in setup.py
## Expected Result
What you expected.
## Actual Result
What happened instead.
## Reproduction Steps
Tests pass on Python 3.9.0
```
tox -e py39
GLOB sdist-make: /root/checked_repos/requests/setup.py
py39 create: /root/checked_repos/requests/.tox/py39
py39 inst: /root/checked_repos/requests/.tox/.tmp/package/1/requests-2.24.0.zip
py39 installed: certifi==2020.6.20,chardet==3.0.4,idna==2.10,requests @ file:///root/checked_repos/requests/.tox/.tmp/package/1/requests-2.24.0.zip,urllib3==1.25.10
py39 run-test-pre: PYTHONHASHSEED='2412316346'
py39 run-test: commands[0] | python setup.py test
running test
WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.
running egg_info
writing requests.egg-info/PKG-INFO
writing dependency_links to requests.egg-info/dependency_links.txt
writing requirements to requests.egg-info/requires.txt
writing top-level names to requests.egg-info/top_level.txt
reading manifest file 'requests.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'requirements.txt'
writing manifest file 'requests.egg-info/SOURCES.txt'
running build_ext
========================================================================= test session starts ==========================================================================
platform linux -- Python 3.9.0, pytest-6.1.1, py-1.9.0, pluggy-0.13.1
cachedir: .tox/py39/.pytest_cache
rootdir: /root/checked_repos/requests, configfile: pytest.ini
plugins: forked-1.3.0, httpbin-0.0.7, cov-2.10.1, mock-3.3.1, xdist-2.1.0
gw0 [555]g 0 items / 1 error
................................................................................................................................................................ [ 28%]
...................................................................x............................................................................................ [ 57%]
.....................s......s................................................................................................................................... [ 86%]
............................................................ssssssssss..... [100%]
================================================================================ ERRORS ================================================================================
_________________________________________________________ ERROR collecting docs/_themes/flask_theme_support.py _________________________________________________________
docs/_themes/flask_theme_support.py:2: in <module>
from pygments.style import Style
E ModuleNotFoundError: No module named 'pygments'
======================================================================= short test summary info ========================================================================
ERROR docs/_themes/flask_theme_support.py - ModuleNotFoundError: No module named 'pygments'
=================================================== 542 passed, 12 skipped, 1 xfailed, 1 error in 132.95s (0:02:12) ====================================================
ERROR: InvocationError for command /root/checked_repos/requests/.tox/py39/bin/python setup.py test (exited with code 1)
_______________________________________________________________________________ summary ________________________________________________________________________________
ERROR: py39: commands failed
``` | {
"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/5620/reactions"
} | https://api.github.com/repos/psf/requests/issues/5620/timeline | null | completed | null | null | false | [
"Hi,\r\n\r\nCould you please add some clarification. Are you saying that the above tox output is as we want it? Do we want py39 to fail?\r\n\r\nYou said \"Tests pass on Python 3.9.0\" but I don't think they do, it says py39 commands failed.\r\n\r\nPerhaps it is ok for the majority of tests to pass and these errors/... |
https://api.github.com/repos/psf/requests/issues/5619 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5619/labels{/name} | https://api.github.com/repos/psf/requests/issues/5619/comments | https://api.github.com/repos/psf/requests/issues/5619/events | https://github.com/psf/requests/issues/5619 | 718,709,799 | MDU6SXNzdWU3MTg3MDk3OTk= | 5,619 | README mentions Python 2.7 support | {
"avatar_url": "https://avatars.githubusercontent.com/u/28923979?v=4",
"events_url": "https://api.github.com/users/Helveg/events{/privacy}",
"followers_url": "https://api.github.com/users/Helveg/followers",
"following_url": "https://api.github.com/users/Helveg/following{/other_user}",
"gists_url": "https://api.github.com/users/Helveg/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Helveg",
"id": 28923979,
"login": "Helveg",
"node_id": "MDQ6VXNlcjI4OTIzOTc5",
"organizations_url": "https://api.github.com/users/Helveg/orgs",
"received_events_url": "https://api.github.com/users/Helveg/received_events",
"repos_url": "https://api.github.com/users/Helveg/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Helveg/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Helveg/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Helveg",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-10-10T21:51:57Z | 2021-08-29T00:06:47Z | 2020-10-10T21:55:31Z | NONE | resolved | _(Bug template was not applicable)_
The README states that requests officially supports Python 2.7. Shouldn't that support be dropped now that Python 2 has been sunset? | {
"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/5619/reactions"
} | https://api.github.com/repos/psf/requests/issues/5619/timeline | null | completed | null | null | false | [
"Hi @Helveg, the documentation is correct. There are still a number of tools that use Requests and require Python 2.7 support, including pip. Our support may change as we get into 2021 but we'll provide advanced notification on that."
] |
https://api.github.com/repos/psf/requests/issues/5618 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5618/labels{/name} | https://api.github.com/repos/psf/requests/issues/5618/comments | https://api.github.com/repos/psf/requests/issues/5618/events | https://github.com/psf/requests/issues/5618 | 717,563,116 | MDU6SXNzdWU3MTc1NjMxMTY= | 5,618 | Keep-alive after pickling a session | {
"avatar_url": "https://avatars.githubusercontent.com/u/8843150?v=4",
"events_url": "https://api.github.com/users/jsmedmar/events{/privacy}",
"followers_url": "https://api.github.com/users/jsmedmar/followers",
"following_url": "https://api.github.com/users/jsmedmar/following{/other_user}",
"gists_url": "https://api.github.com/users/jsmedmar/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jsmedmar",
"id": 8843150,
"login": "jsmedmar",
"node_id": "MDQ6VXNlcjg4NDMxNTA=",
"organizations_url": "https://api.github.com/users/jsmedmar/orgs",
"received_events_url": "https://api.github.com/users/jsmedmar/received_events",
"repos_url": "https://api.github.com/users/jsmedmar/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jsmedmar/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jsmedmar/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jsmedmar",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-10-08T18:20:28Z | 2021-08-29T00:06:47Z | 2020-10-08T18:26:43Z | NONE | resolved | I'm trying to implement TLS session resumption for my command line application.
This issue https://github.com/psf/requests/issues/2522 explains how to pickle a `requests.session`.
However, the TLS handshake is repeated when I rerun my application, loading a pickled session.
I was wondering what I'm I missing?
| {
"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/5618/reactions"
} | https://api.github.com/repos/psf/requests/issues/5618/timeline | null | completed | null | null | false | [
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here."
] |
https://api.github.com/repos/psf/requests/issues/5617 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5617/labels{/name} | https://api.github.com/repos/psf/requests/issues/5617/comments | https://api.github.com/repos/psf/requests/issues/5617/events | https://github.com/psf/requests/pull/5617 | 717,020,378 | MDExOlB1bGxSZXF1ZXN0NDk5NjU2MTQ0 | 5,617 | Exemplo De Commit | {
"avatar_url": "https://avatars.githubusercontent.com/u/71050601?v=4",
"events_url": "https://api.github.com/users/DiksonSantos/events{/privacy}",
"followers_url": "https://api.github.com/users/DiksonSantos/followers",
"following_url": "https://api.github.com/users/DiksonSantos/following{/other_user}",
"gists_url": "https://api.github.com/users/DiksonSantos/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/DiksonSantos",
"id": 71050601,
"login": "DiksonSantos",
"node_id": "MDQ6VXNlcjcxMDUwNjAx",
"organizations_url": "https://api.github.com/users/DiksonSantos/orgs",
"received_events_url": "https://api.github.com/users/DiksonSantos/received_events",
"repos_url": "https://api.github.com/users/DiksonSantos/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/DiksonSantos/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/DiksonSantos/subscriptions",
"type": "User",
"url": "https://api.github.com/users/DiksonSantos",
"user_view_type": "public"
} | [
{
"color": "d16014",
"default": false,
"description": "",
"id": 2392364523,
"name": "spam",
"node_id": "MDU6TGFiZWwyMzkyMzY0NTIz",
"url": "https://api.github.com/repos/psf/requests/labels/spam"
}
] | closed | true | null | [] | null | 0 | 2020-10-08T04:56:47Z | 2021-08-28T00:06:18Z | 2020-10-08T13:36:13Z | NONE | resolved | PullRequest | {
"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/5617/reactions"
} | https://api.github.com/repos/psf/requests/issues/5617/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5617.diff",
"html_url": "https://github.com/psf/requests/pull/5617",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5617.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5617"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/5616 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5616/labels{/name} | https://api.github.com/repos/psf/requests/issues/5616/comments | https://api.github.com/repos/psf/requests/issues/5616/events | https://github.com/psf/requests/issues/5616 | 715,660,682 | MDU6SXNzdWU3MTU2NjA2ODI= | 5,616 | RESPONSE 500 on Heroku | {
"avatar_url": "https://avatars.githubusercontent.com/u/65137814?v=4",
"events_url": "https://api.github.com/users/krutoypan3/events{/privacy}",
"followers_url": "https://api.github.com/users/krutoypan3/followers",
"following_url": "https://api.github.com/users/krutoypan3/following{/other_user}",
"gists_url": "https://api.github.com/users/krutoypan3/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/krutoypan3",
"id": 65137814,
"login": "krutoypan3",
"node_id": "MDQ6VXNlcjY1MTM3ODE0",
"organizations_url": "https://api.github.com/users/krutoypan3/orgs",
"received_events_url": "https://api.github.com/users/krutoypan3/received_events",
"repos_url": "https://api.github.com/users/krutoypan3/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/krutoypan3/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/krutoypan3/subscriptions",
"type": "User",
"url": "https://api.github.com/users/krutoypan3",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-10-06T13:05:35Z | 2021-08-29T00:06:47Z | 2020-10-06T13:57:37Z | NONE | resolved | On Heroku and localhost


Response 200 (on localhost) its good
Response 500 (on Heroku) its BAD. How fix it?
url = 'https://animego.org/anime/filter/status-is-released/apply?&direction=desc&page='
headers = {
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.90 Safari/537.36,', 'Origin': 'http://example.com', 'Referer': 'http://example.com/some_page'}
response = requests.request("get", url, headers=headers)
print(response)
| {
"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/5616/reactions"
} | https://api.github.com/repos/psf/requests/issues/5616/timeline | null | completed | null | null | false | [
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here."
] |
https://api.github.com/repos/psf/requests/issues/5615 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5615/labels{/name} | https://api.github.com/repos/psf/requests/issues/5615/comments | https://api.github.com/repos/psf/requests/issues/5615/events | https://github.com/psf/requests/issues/5615 | 715,597,602 | MDU6SXNzdWU3MTU1OTc2MDI= | 5,615 | Docs and Readme: [GitHub] Deprecation Notice | {
"avatar_url": "https://avatars.githubusercontent.com/u/3272563?v=4",
"events_url": "https://api.github.com/users/giuliohome/events{/privacy}",
"followers_url": "https://api.github.com/users/giuliohome/followers",
"following_url": "https://api.github.com/users/giuliohome/following{/other_user}",
"gists_url": "https://api.github.com/users/giuliohome/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/giuliohome",
"id": 3272563,
"login": "giuliohome",
"node_id": "MDQ6VXNlcjMyNzI1NjM=",
"organizations_url": "https://api.github.com/users/giuliohome/orgs",
"received_events_url": "https://api.github.com/users/giuliohome/received_events",
"repos_url": "https://api.github.com/users/giuliohome/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/giuliohome/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/giuliohome/subscriptions",
"type": "User",
"url": "https://api.github.com/users/giuliohome",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-10-06T11:49:25Z | 2021-08-29T00:06:47Z | 2020-10-06T13:56:17Z | NONE | resolved | I've followed the main example you present at the start of your Docs
```python
>>> r = requests.get('https://api.github.com/user', auth=('user', 'pass'))
>>> r.status_code
200
>>> r.headers['content-type']
'application/json; charset=utf8'
>>> r.encoding
'utf-8'
>>> r.text
'{"type":"User"...'
>>> r.json()
{'private_gists': 419, 'total_private_repos': 77, ...}
```
and I've received the following **[GitHub] Deprecation Notice**:
>On October 6th, 2020 at 11:19 (UTC) you used a password to access an endpoint through the GitHub API using python-requests/2.18.4:
>
>https://api.github.com/user
>
>Basic authentication using a password to the API is deprecated and will soon no longer work. Visit https://developer.github.com/changes/2020-02-14-deprecating-password-auth/ for more information around suggested workarounds and removal dates.
>
>Thanks,
>The GitHub Team
| {
"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/5615/reactions"
} | https://api.github.com/repos/psf/requests/issues/5615/timeline | null | completed | null | null | false | [
"The example code is not broken. GitHub is just changing their policies around using basic authentication. This could be changed to something else easily. GitHub's deprecation is not a bug in our project though."
] |
https://api.github.com/repos/psf/requests/issues/5614 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5614/labels{/name} | https://api.github.com/repos/psf/requests/issues/5614/comments | https://api.github.com/repos/psf/requests/issues/5614/events | https://github.com/psf/requests/pull/5614 | 714,439,661 | MDExOlB1bGxSZXF1ZXN0NDk3NTI2NzE4 | 5,614 | small typo corrected. | {
"avatar_url": "https://avatars.githubusercontent.com/u/10545530?v=4",
"events_url": "https://api.github.com/users/smstong/events{/privacy}",
"followers_url": "https://api.github.com/users/smstong/followers",
"following_url": "https://api.github.com/users/smstong/following{/other_user}",
"gists_url": "https://api.github.com/users/smstong/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/smstong",
"id": 10545530,
"login": "smstong",
"node_id": "MDQ6VXNlcjEwNTQ1NTMw",
"organizations_url": "https://api.github.com/users/smstong/orgs",
"received_events_url": "https://api.github.com/users/smstong/received_events",
"repos_url": "https://api.github.com/users/smstong/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/smstong/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/smstong/subscriptions",
"type": "User",
"url": "https://api.github.com/users/smstong",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2020-10-05T00:45:59Z | 2021-08-28T00:06:18Z | 2020-10-05T18:15:44Z | CONTRIBUTOR | resolved | a small typo was corrected. | {
"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/5614/reactions"
} | https://api.github.com/repos/psf/requests/issues/5614/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5614.diff",
"html_url": "https://github.com/psf/requests/pull/5614",
"merged_at": "2020-10-05T18:15:44Z",
"patch_url": "https://github.com/psf/requests/pull/5614.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5614"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/5613 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5613/labels{/name} | https://api.github.com/repos/psf/requests/issues/5613/comments | https://api.github.com/repos/psf/requests/issues/5613/events | https://github.com/psf/requests/issues/5613 | 714,114,435 | MDU6SXNzdWU3MTQxMTQ0MzU= | 5,613 | Support for SameSite cookie flag. | {
"avatar_url": "https://avatars.githubusercontent.com/u/3686626?v=4",
"events_url": "https://api.github.com/users/anio/events{/privacy}",
"followers_url": "https://api.github.com/users/anio/followers",
"following_url": "https://api.github.com/users/anio/following{/other_user}",
"gists_url": "https://api.github.com/users/anio/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/anio",
"id": 3686626,
"login": "anio",
"node_id": "MDQ6VXNlcjM2ODY2MjY=",
"organizations_url": "https://api.github.com/users/anio/orgs",
"received_events_url": "https://api.github.com/users/anio/received_events",
"repos_url": "https://api.github.com/users/anio/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/anio/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/anio/subscriptions",
"type": "User",
"url": "https://api.github.com/users/anio",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 3 | 2020-10-03T15:33:09Z | 2020-10-03T22:33:48Z | null | NONE | null | Hi,
Have you any plan to expose `samesite` cookie flag?
| 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/5613/reactions"
} | https://api.github.com/repos/psf/requests/issues/5613/timeline | null | null | null | null | false | [
"We use the standard library which doesn't expose it but I'm working on [moreos](/sigmavirus24/moreos) which will have a cookie jar that's saner, more secure, and would expose this for Requests as a drop-in replacement",
"You are right, but I think it's possible to add to newer python versions. I added it to my f... |
https://api.github.com/repos/psf/requests/issues/5612 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5612/labels{/name} | https://api.github.com/repos/psf/requests/issues/5612/comments | https://api.github.com/repos/psf/requests/issues/5612/events | https://github.com/psf/requests/issues/5612 | 713,215,695 | MDU6SXNzdWU3MTMyMTU2OTU= | 5,612 | (optionally) Prevent exceptions from iter_content() | {
"avatar_url": "https://avatars.githubusercontent.com/u/11820748?v=4",
"events_url": "https://api.github.com/users/girst/events{/privacy}",
"followers_url": "https://api.github.com/users/girst/followers",
"following_url": "https://api.github.com/users/girst/following{/other_user}",
"gists_url": "https://api.github.com/users/girst/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/girst",
"id": 11820748,
"login": "girst",
"node_id": "MDQ6VXNlcjExODIwNzQ4",
"organizations_url": "https://api.github.com/users/girst/orgs",
"received_events_url": "https://api.github.com/users/girst/received_events",
"repos_url": "https://api.github.com/users/girst/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/girst/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/girst/subscriptions",
"type": "User",
"url": "https://api.github.com/users/girst",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2020-10-01T22:07:23Z | 2021-08-29T00:06:48Z | 2020-10-01T23:29:12Z | NONE | resolved | It should be possible to suppress exceptions, like when the server closes the connection on us, from `iter_content()`. Catching exceptions from iterators is notoriously difficult, and they are often passed on to other libraries which are outside the control of the programmer.
A typical example (and the case I ran into) is proxying large files; see the example below.
Preventing exceptions should probably be opt-in, e.g. using an argument like this: `r.iter_content(chunk_size=None, prevent_exceptions=True)`.
## Expected Result
Given the hypothetical `prevent_exceptions` parameter, the iterator should just end instead of raising the urllib error.
## Actual Result
When e.g. the server closes the connection on us, a ConnectionResetError is raised.
```
requests.exceptions.ChunkedEncodingError: ("Connection broken: ConnectionResetError(104, 'Connection reset by peer')", ConnectionResetError(104, 'Connection reset by peer'))
```
<details><summary>full trace</summary>
```
[2020-10-01 06:13:09 +0200] [30794] [ERROR] Socket error processing request.
Traceback (most recent call last):
File "/opt/venv/lib64/python3.6/site-packages/urllib3/response.py", line 437, in _error_catcher
yield
File "/opt/venv/lib64/python3.6/site-packages/urllib3/response.py", line 519, in read
data = self._fp.read(amt) if not fp_closed else b""
File "/usr/lib64/python3.6/http/client.py", line 459, in read
n = self.readinto(b)
File "/usr/lib64/python3.6/http/client.py", line 503, in readinto
n = self.fp.readinto(b)
File "/usr/lib64/python3.6/socket.py", line 586, in readinto
return self._sock.recv_into(b)
File "/opt/venv/lib64/python3.6/site-packages/eventlet/green/ssl.py", line 241, in recv_into
return self._base_recv(nbytes, flags, into=True, buffer_=buffer)
File "/opt/venv/lib64/python3.6/site-packages/eventlet/green/ssl.py", line 256, in _base_recv
read = self.read(nbytes, buffer_)
File "/opt/venv/lib64/python3.6/site-packages/eventlet/green/ssl.py", line 176, in read
super(GreenSSLSocket, self).read, *args, **kwargs)
File "/opt/venv/lib64/python3.6/site-packages/eventlet/green/ssl.py", line 150, in _call_trampolining
return func(*a, **kw)
File "/usr/lib64/python3.6/ssl.py", line 830, in read
return self._sslobj.read(len, buffer)
File "/usr/lib64/python3.6/ssl.py", line 587, in read
v = self._sslobj.read(len, buffer)
ConnectionResetError: [Errno 104] Connection reset by peer
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/venv/lib64/python3.6/site-packages/requests/models.py", line 751, in generate
for chunk in self.raw.stream(chunk_size, decode_content=True):
File "/opt/venv/lib64/python3.6/site-packages/urllib3/response.py", line 576, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/opt/venv/lib64/python3.6/site-packages/urllib3/response.py", line 541, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/usr/lib64/python3.6/contextlib.py", line 99, in __exit__
self.gen.throw(type, value, traceback)
File "/opt/venv/lib64/python3.6/site-packages/urllib3/response.py", line 455, in _error_catcher
raise ProtocolError("Connection broken: %r" % e, e)
urllib3.exceptions.ProtocolError: ("Connection broken: ConnectionResetError(104, 'Connection reset by peer')", ConnectionResetError(104, 'Connection reset by peer'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/venv/lib64/python3.6/site-packages/gunicorn/workers/base_async.py", line 65, in handle
util.reraise(*sys.exc_info())
File "/opt/venv/lib64/python3.6/site-packages/gunicorn/util.py", line 625, in reraise
raise value
File "/opt/venv/lib64/python3.6/site-packages/gunicorn/workers/base_async.py", line 55, in handle
self.handle_request(listener_name, req, client, addr)
File "/opt/venv/lib64/python3.6/site-packages/gunicorn/workers/base_async.py", line 128, in handle_request
util.reraise(*sys.exc_info())
File "/opt/venv/lib64/python3.6/site-packages/gunicorn/util.py", line 625, in reraise
raise value
File "/opt/venv/lib64/python3.6/site-packages/gunicorn/workers/base_async.py", line 113, in handle_request
for item in respiter:
File "/opt/venv/lib64/python3.6/site-packages/werkzeug/wsgi.py", line 506, in __next__
return self._next()
File "/opt/venv/lib64/python3.6/site-packages/werkzeug/wrappers/base_response.py", line 45, in _iter_encoded
for item in iterable:
File "/opt/venv/lib64/python3.6/site-packages/requests/models.py", line 754, in generate
raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ("Connection broken: ConnectionResetError(104, 'Connection reset by peer')", ConnectionResetError(104, 'Connection reset by peer'))
```
</details>
## Reproduction Steps
```python
import requests
from flask import Flask, Response
app = Flask(__name__)
@app.route("/")
def proxy():
r = requests.get("https://httpbin.org/stream-bytes/99999999", stream=True)
return Response(r.iter_content(chunk_size=8192), status=r.status_code)
app.run(port=8080)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.6.1"
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.7.9"
},
"platform": {
"release": "5.8.11-100.fc31.x86_64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010104f",
"version": "19.0.0"
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1010107f"
},
"urllib3": {
"version": "1.25.7"
},
"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/5612/reactions"
} | https://api.github.com/repos/psf/requests/issues/5612/timeline | null | completed | null | null | false | [
"You're on python 3, and given this is a library in feature freeze. You're going to get to a better solution with:\r\n\r\n```py\r\nimport requests\r\nfrom flask import Flask, Response\r\n\r\ndef silence_errors(generator):\r\n try:\r\n yield from generator\r\n except requests.exceptions.RequestsExcepti... |
https://api.github.com/repos/psf/requests/issues/5611 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5611/labels{/name} | https://api.github.com/repos/psf/requests/issues/5611/comments | https://api.github.com/repos/psf/requests/issues/5611/events | https://github.com/psf/requests/pull/5611 | 712,890,175 | MDExOlB1bGxSZXF1ZXN0NDk2Mjk4Nzgz | 5,611 | Create codeql-analysis.yml | {
"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"
} | [] | closed | true | {
"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"
} | [
{
"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}"... | null | 1 | 2020-10-01T14:19:41Z | 2021-08-28T00:06:19Z | 2020-10-02T22:10:53Z | CONTRIBUTOR | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5611/reactions"
} | https://api.github.com/repos/psf/requests/issues/5611/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5611.diff",
"html_url": "https://github.com/psf/requests/pull/5611",
"merged_at": "2020-10-02T22:10:53Z",
"patch_url": "https://github.com/psf/requests/pull/5611.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5611"
} | true | [
"To all of your questions: I don't know. I saw the announcement and thought it wouldn't hurt here. I'll look more closely later"
] | |
https://api.github.com/repos/psf/requests/issues/5610 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5610/labels{/name} | https://api.github.com/repos/psf/requests/issues/5610/comments | https://api.github.com/repos/psf/requests/issues/5610/events | https://github.com/psf/requests/pull/5610 | 712,678,111 | MDExOlB1bGxSZXF1ZXN0NDk2MTE5NTIx | 5,610 | Fixed the comments | {
"avatar_url": "https://avatars.githubusercontent.com/u/67335037?v=4",
"events_url": "https://api.github.com/users/shreeya0505/events{/privacy}",
"followers_url": "https://api.github.com/users/shreeya0505/followers",
"following_url": "https://api.github.com/users/shreeya0505/following{/other_user}",
"gists_url": "https://api.github.com/users/shreeya0505/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shreeya0505",
"id": 67335037,
"login": "shreeya0505",
"node_id": "MDQ6VXNlcjY3MzM1MDM3",
"organizations_url": "https://api.github.com/users/shreeya0505/orgs",
"received_events_url": "https://api.github.com/users/shreeya0505/received_events",
"repos_url": "https://api.github.com/users/shreeya0505/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shreeya0505/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shreeya0505/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shreeya0505",
"user_view_type": "public"
} | [
{
"color": "d16014",
"default": false,
"description": "",
"id": 2392364523,
"name": "spam",
"node_id": "MDU6TGFiZWwyMzkyMzY0NTIz",
"url": "https://api.github.com/repos/psf/requests/labels/spam"
}
] | closed | true | null | [] | null | 0 | 2020-10-01T09:42:42Z | 2021-08-28T00:06:19Z | 2020-10-01T16:30:52Z | NONE | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5610/reactions"
} | https://api.github.com/repos/psf/requests/issues/5610/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5610.diff",
"html_url": "https://github.com/psf/requests/pull/5610",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5610.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5610"
} | true | [] | |
https://api.github.com/repos/psf/requests/issues/5609 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5609/labels{/name} | https://api.github.com/repos/psf/requests/issues/5609/comments | https://api.github.com/repos/psf/requests/issues/5609/events | https://github.com/psf/requests/issues/5609 | 712,305,305 | MDU6SXNzdWU3MTIzMDUzMDU= | 5,609 | requests.get(url, proxies=proxy_list), Failed to parse if username is Email | {
"avatar_url": "https://avatars.githubusercontent.com/u/10436946?v=4",
"events_url": "https://api.github.com/users/sandman6578/events{/privacy}",
"followers_url": "https://api.github.com/users/sandman6578/followers",
"following_url": "https://api.github.com/users/sandman6578/following{/other_user}",
"gists_url": "https://api.github.com/users/sandman6578/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sandman6578",
"id": 10436946,
"login": "sandman6578",
"node_id": "MDQ6VXNlcjEwNDM2OTQ2",
"organizations_url": "https://api.github.com/users/sandman6578/orgs",
"received_events_url": "https://api.github.com/users/sandman6578/received_events",
"repos_url": "https://api.github.com/users/sandman6578/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sandman6578/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sandman6578/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sandman6578",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-09-30T21:52:18Z | 2021-08-29T00:06:49Z | 2020-09-30T23:46:31Z | NONE | resolved | Hey at all.
I have an Issue with request.get to use proxies function if the username for the proxy server contains an @ or some "unsafe characters".
## Expected Result
To get successfully logged in to my proxy and get the IP from proxy server
## Actual Result
Failed to parse: https://username@email.com:password@proxy.com
## Reproduction Steps
```python
import requests
proxys = {
'http': "http://username@email.com:password@proxy.com,
'https': "https://username@email.com:password@proxy.com,
}
requests.get("https://www.wieistmeineip.at/", proxies=proxys)
```
## System Information
$ python -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "3.1"
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.8.5"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "1010107f",
"version": "19.1.0"
},
"requests": {
"version": "2.24.0"
},
"system_ssl": {
"version": "1010108f"
},
"urllib3": {
"version": "1.25.10"
},
"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/5609/reactions"
} | https://api.github.com/repos/psf/requests/issues/5609/timeline | null | completed | null | null | false | [
"In RFC 3986 `@` is exclusively reserved for separating the user info from the hostname in the authority section (`authority = userinfo @ host : port`) so you should replace `@` with `%40`. This has been covered in open and closed issues and is likely well documented on stackoverflow."
] |
https://api.github.com/repos/psf/requests/issues/5608 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5608/labels{/name} | https://api.github.com/repos/psf/requests/issues/5608/comments | https://api.github.com/repos/psf/requests/issues/5608/events | https://github.com/psf/requests/pull/5608 | 712,237,532 | MDExOlB1bGxSZXF1ZXN0NDk1NzUyMDg1 | 5,608 | Add official Python 3.8 support on Appveyor | {
"avatar_url": "https://avatars.githubusercontent.com/u/5083377?v=4",
"events_url": "https://api.github.com/users/abdullahselek/events{/privacy}",
"followers_url": "https://api.github.com/users/abdullahselek/followers",
"following_url": "https://api.github.com/users/abdullahselek/following{/other_user}",
"gists_url": "https://api.github.com/users/abdullahselek/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/abdullahselek",
"id": 5083377,
"login": "abdullahselek",
"node_id": "MDQ6VXNlcjUwODMzNzc=",
"organizations_url": "https://api.github.com/users/abdullahselek/orgs",
"received_events_url": "https://api.github.com/users/abdullahselek/received_events",
"repos_url": "https://api.github.com/users/abdullahselek/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/abdullahselek/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/abdullahselek/subscriptions",
"type": "User",
"url": "https://api.github.com/users/abdullahselek",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2020-09-30T19:56:20Z | 2021-08-28T00:06:19Z | 2020-09-30T20:35:12Z | CONTRIBUTOR | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5608/reactions"
} | https://api.github.com/repos/psf/requests/issues/5608/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5608.diff",
"html_url": "https://github.com/psf/requests/pull/5608",
"merged_at": "2020-09-30T20:35:12Z",
"patch_url": "https://github.com/psf/requests/pull/5608.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5608"
} | true | [] | |
https://api.github.com/repos/psf/requests/issues/5607 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5607/labels{/name} | https://api.github.com/repos/psf/requests/issues/5607/comments | https://api.github.com/repos/psf/requests/issues/5607/events | https://github.com/psf/requests/pull/5607 | 712,218,015 | MDExOlB1bGxSZXF1ZXN0NDk1NzM1NDgw | 5,607 | Run tests on Python 3.9 dev | {
"avatar_url": "https://avatars.githubusercontent.com/u/5083377?v=4",
"events_url": "https://api.github.com/users/abdullahselek/events{/privacy}",
"followers_url": "https://api.github.com/users/abdullahselek/followers",
"following_url": "https://api.github.com/users/abdullahselek/following{/other_user}",
"gists_url": "https://api.github.com/users/abdullahselek/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/abdullahselek",
"id": 5083377,
"login": "abdullahselek",
"node_id": "MDQ6VXNlcjUwODMzNzc=",
"organizations_url": "https://api.github.com/users/abdullahselek/orgs",
"received_events_url": "https://api.github.com/users/abdullahselek/received_events",
"repos_url": "https://api.github.com/users/abdullahselek/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/abdullahselek/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/abdullahselek/subscriptions",
"type": "User",
"url": "https://api.github.com/users/abdullahselek",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2020-09-30T19:26:45Z | 2021-08-28T00:06:20Z | 2020-09-30T19:49:38Z | CONTRIBUTOR | resolved | Add a new Python version on Travis-CI that run the tests. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5083377?v=4",
"events_url": "https://api.github.com/users/abdullahselek/events{/privacy}",
"followers_url": "https://api.github.com/users/abdullahselek/followers",
"following_url": "https://api.github.com/users/abdullahselek/following{/other_user}",
"gists_url": "https://api.github.com/users/abdullahselek/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/abdullahselek",
"id": 5083377,
"login": "abdullahselek",
"node_id": "MDQ6VXNlcjUwODMzNzc=",
"organizations_url": "https://api.github.com/users/abdullahselek/orgs",
"received_events_url": "https://api.github.com/users/abdullahselek/received_events",
"repos_url": "https://api.github.com/users/abdullahselek/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/abdullahselek/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/abdullahselek/subscriptions",
"type": "User",
"url": "https://api.github.com/users/abdullahselek",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5607/reactions"
} | https://api.github.com/repos/psf/requests/issues/5607/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5607.diff",
"html_url": "https://github.com/psf/requests/pull/5607",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5607.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5607"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/5606 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5606/labels{/name} | https://api.github.com/repos/psf/requests/issues/5606/comments | https://api.github.com/repos/psf/requests/issues/5606/events | https://github.com/psf/requests/issues/5606 | 712,064,564 | MDU6SXNzdWU3MTIwNjQ1NjQ= | 5,606 | BUG "except requests.HTTPError as e:" at error 500 doesnt work | {
"avatar_url": "https://avatars.githubusercontent.com/u/38250422?v=4",
"events_url": "https://api.github.com/users/marcraft2/events{/privacy}",
"followers_url": "https://api.github.com/users/marcraft2/followers",
"following_url": "https://api.github.com/users/marcraft2/following{/other_user}",
"gists_url": "https://api.github.com/users/marcraft2/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/marcraft2",
"id": 38250422,
"login": "marcraft2",
"node_id": "MDQ6VXNlcjM4MjUwNDIy",
"organizations_url": "https://api.github.com/users/marcraft2/orgs",
"received_events_url": "https://api.github.com/users/marcraft2/received_events",
"repos_url": "https://api.github.com/users/marcraft2/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/marcraft2/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/marcraft2/subscriptions",
"type": "User",
"url": "https://api.github.com/users/marcraft2",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-09-30T15:47:31Z | 2021-08-29T00:06:49Z | 2020-09-30T16:37:38Z | NONE | resolved | Hi!
This expect doesnt work with error 500
`except requests.HTTPError as e:`
Why did you do that? Do you like the difficulty?
It should be noted that the success of the call to r.json() does not indicate the success of the response. Some servers may return a JSON object in a failed response (e.g. error details with HTTP 500). Such JSON will be decoded and returned. To check that a request is successful, use r.raise_for_status() or check r.status_code is what you expect.
So what's the point? `except requests.HTTPError as e:`
| {
"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/5606/reactions"
} | https://api.github.com/repos/psf/requests/issues/5606/timeline | null | completed | null | null | false | [
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here."
] |
https://api.github.com/repos/psf/requests/issues/5605 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5605/labels{/name} | https://api.github.com/repos/psf/requests/issues/5605/comments | https://api.github.com/repos/psf/requests/issues/5605/events | https://github.com/psf/requests/pull/5605 | 711,196,132 | MDExOlB1bGxSZXF1ZXN0NDk0ODk3Nzc5 | 5,605 | Remove leftover HISTORY.md file read from setup.py | {
"avatar_url": "https://avatars.githubusercontent.com/u/43097289?v=4",
"events_url": "https://api.github.com/users/Ae-Mc/events{/privacy}",
"followers_url": "https://api.github.com/users/Ae-Mc/followers",
"following_url": "https://api.github.com/users/Ae-Mc/following{/other_user}",
"gists_url": "https://api.github.com/users/Ae-Mc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Ae-Mc",
"id": 43097289,
"login": "Ae-Mc",
"node_id": "MDQ6VXNlcjQzMDk3Mjg5",
"organizations_url": "https://api.github.com/users/Ae-Mc/orgs",
"received_events_url": "https://api.github.com/users/Ae-Mc/received_events",
"repos_url": "https://api.github.com/users/Ae-Mc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Ae-Mc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Ae-Mc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Ae-Mc",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2020-09-29T14:54:58Z | 2021-08-28T00:06:20Z | 2020-09-29T15:36:31Z | CONTRIBUTOR | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4",
"events_url": "https://api.github.com/users/sethmlarson/events{/privacy}",
"followers_url": "https://api.github.com/users/sethmlarson/followers",
"following_url": "https://api.github.com/users/sethmlarson/following{/other_user}",
"gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sethmlarson",
"id": 18519037,
"login": "sethmlarson",
"node_id": "MDQ6VXNlcjE4NTE5MDM3",
"organizations_url": "https://api.github.com/users/sethmlarson/orgs",
"received_events_url": "https://api.github.com/users/sethmlarson/received_events",
"repos_url": "https://api.github.com/users/sethmlarson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sethmlarson",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5605/reactions"
} | https://api.github.com/repos/psf/requests/issues/5605/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5605.diff",
"html_url": "https://github.com/psf/requests/pull/5605",
"merged_at": "2020-09-29T15:36:31Z",
"patch_url": "https://github.com/psf/requests/pull/5605.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5605"
} | true | [] | |
https://api.github.com/repos/psf/requests/issues/5604 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5604/labels{/name} | https://api.github.com/repos/psf/requests/issues/5604/comments | https://api.github.com/repos/psf/requests/issues/5604/events | https://github.com/psf/requests/issues/5604 | 710,735,853 | MDU6SXNzdWU3MTA3MzU4NTM= | 5,604 | Multi post request in Session doesn't use single connection | {
"avatar_url": "https://avatars.githubusercontent.com/u/7325798?v=4",
"events_url": "https://api.github.com/users/chenhd/events{/privacy}",
"followers_url": "https://api.github.com/users/chenhd/followers",
"following_url": "https://api.github.com/users/chenhd/following{/other_user}",
"gists_url": "https://api.github.com/users/chenhd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/chenhd",
"id": 7325798,
"login": "chenhd",
"node_id": "MDQ6VXNlcjczMjU3OTg=",
"organizations_url": "https://api.github.com/users/chenhd/orgs",
"received_events_url": "https://api.github.com/users/chenhd/received_events",
"repos_url": "https://api.github.com/users/chenhd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/chenhd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/chenhd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/chenhd",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2020-09-29T03:47:14Z | 2020-09-30T13:29:30Z | 2020-09-29T13:23:57Z | NONE | resolved | I use session object to make the request, but I see the connection will be close after the request, because I see the client sent the tcp-FIN flag to the server by wireshark.
-------------
python 3.7.7
requests 2.24.0
win10 | {
"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/5604/reactions"
} | https://api.github.com/repos/psf/requests/issues/5604/timeline | null | completed | null | null | false | [
"We send `Connection: keep-alive` but we can't control the server. This isn't a requests bug and you've provided none of the required informatoin",
"I found a information, open the logging, it print something:\r\n\r\nDEBUG:urllib3.connectionpool:Resetting dropped connection: (this is a ip)\r\n\r\nin two same post... |
https://api.github.com/repos/psf/requests/issues/5603 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5603/labels{/name} | https://api.github.com/repos/psf/requests/issues/5603/comments | https://api.github.com/repos/psf/requests/issues/5603/events | https://github.com/psf/requests/issues/5603 | 710,230,707 | MDU6SXNzdWU3MTAyMzA3MDc= | 5,603 | How can I create requests without actually executing them ( to get instance ) | {
"avatar_url": "https://avatars.githubusercontent.com/u/29454176?v=4",
"events_url": "https://api.github.com/users/realsirjoe/events{/privacy}",
"followers_url": "https://api.github.com/users/realsirjoe/followers",
"following_url": "https://api.github.com/users/realsirjoe/following{/other_user}",
"gists_url": "https://api.github.com/users/realsirjoe/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/realsirjoe",
"id": 29454176,
"login": "realsirjoe",
"node_id": "MDQ6VXNlcjI5NDU0MTc2",
"organizations_url": "https://api.github.com/users/realsirjoe/orgs",
"received_events_url": "https://api.github.com/users/realsirjoe/received_events",
"repos_url": "https://api.github.com/users/realsirjoe/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/realsirjoe/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/realsirjoe/subscriptions",
"type": "User",
"url": "https://api.github.com/users/realsirjoe",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-09-28T12:41:16Z | 2021-08-29T00:06:49Z | 2020-09-28T13:58:26Z | NONE | resolved | I want to do this in order to log the requests myself, in order to reproduce them when an error is thrown, for better debugging.
If there is no way to do so how can I log the requests ( all http requests: GET, POST, PUT,..) preferably as cURL string | {
"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/5603/reactions"
} | https://api.github.com/repos/psf/requests/issues/5603/timeline | null | completed | null | null | false | [
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here."
] |
https://api.github.com/repos/psf/requests/issues/5602 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5602/labels{/name} | https://api.github.com/repos/psf/requests/issues/5602/comments | https://api.github.com/repos/psf/requests/issues/5602/events | https://github.com/psf/requests/issues/5602 | 709,793,105 | MDU6SXNzdWU3MDk3OTMxMDU= | 5,602 | Exception instead of following 302 redirect | {
"avatar_url": "https://avatars.githubusercontent.com/u/4247916?v=4",
"events_url": "https://api.github.com/users/jozo/events{/privacy}",
"followers_url": "https://api.github.com/users/jozo/followers",
"following_url": "https://api.github.com/users/jozo/following{/other_user}",
"gists_url": "https://api.github.com/users/jozo/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jozo",
"id": 4247916,
"login": "jozo",
"node_id": "MDQ6VXNlcjQyNDc5MTY=",
"organizations_url": "https://api.github.com/users/jozo/orgs",
"received_events_url": "https://api.github.com/users/jozo/received_events",
"repos_url": "https://api.github.com/users/jozo/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jozo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jozo/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jozo",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2020-09-27T18:43:59Z | 2021-08-29T00:06:50Z | 2020-09-27T23:31:01Z | NONE | resolved | Requests throw an exception instead of following 302 redirect. Curl returns a response and browsers follow redirect.
## Expected Result
Requests follow redirect
## Actual Result
Exceptions is thrown:
```
ConnectionError: HTTPConnectionPool(host='localhost', port=8000): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f8a70874e50>: Failed to establish a new connection: [Errno 111] Connection refused'))
```
## Reproduction Steps
```python
import requests
requests.get("http://localhost:8000/")
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.10"
},
"implementation": {
"name": "CPython",
"version": "3.8.5"
},
"platform": {
"release": "4.19.76-linuxkit",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.24.0"
},
"system_ssl": {
"version": "1010104f"
},
"urllib3": {
"version": "1.25.10"
},
"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/5602/reactions"
} | https://api.github.com/repos/psf/requests/issues/5602/timeline | null | completed | null | null | false | [
"Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here.\r\n\r\n> [Errno 111] Connection refused\r\n\r\nImplies ... |
https://api.github.com/repos/psf/requests/issues/5601 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5601/labels{/name} | https://api.github.com/repos/psf/requests/issues/5601/comments | https://api.github.com/repos/psf/requests/issues/5601/events | https://github.com/psf/requests/issues/5601 | 709,453,169 | MDU6SXNzdWU3MDk0NTMxNjk= | 5,601 | Fix the pypi documentation page | {
"avatar_url": "https://avatars.githubusercontent.com/u/8208868?v=4",
"events_url": "https://api.github.com/users/abhijitgujar86/events{/privacy}",
"followers_url": "https://api.github.com/users/abhijitgujar86/followers",
"following_url": "https://api.github.com/users/abhijitgujar86/following{/other_user}",
"gists_url": "https://api.github.com/users/abhijitgujar86/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/abhijitgujar86",
"id": 8208868,
"login": "abhijitgujar86",
"node_id": "MDQ6VXNlcjgyMDg4Njg=",
"organizations_url": "https://api.github.com/users/abhijitgujar86/orgs",
"received_events_url": "https://api.github.com/users/abhijitgujar86/received_events",
"repos_url": "https://api.github.com/users/abhijitgujar86/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/abhijitgujar86/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/abhijitgujar86/subscriptions",
"type": "User",
"url": "https://api.github.com/users/abhijitgujar86",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2020-09-26T07:57:35Z | 2021-08-29T00:06:48Z | 2020-10-05T15:44:15Z | NONE | resolved | the pypi page for request is showing html tags
https://pypi.org/project/requests/
its not readable | {
"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/5601/reactions"
} | https://api.github.com/repos/psf/requests/issues/5601/timeline | null | completed | null | null | false | [
"This seems like a recent issue",
"This issue will be automatically resolved during the next Requests release."
] |
https://api.github.com/repos/psf/requests/issues/5600 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5600/labels{/name} | https://api.github.com/repos/psf/requests/issues/5600/comments | https://api.github.com/repos/psf/requests/issues/5600/events | https://github.com/psf/requests/issues/5600 | 709,418,877 | MDU6SXNzdWU3MDk0MTg4Nzc= | 5,600 | Performance downgrade for simple get request in kubernetes environment | {
"avatar_url": "https://avatars.githubusercontent.com/u/25401850?v=4",
"events_url": "https://api.github.com/users/hmliu6/events{/privacy}",
"followers_url": "https://api.github.com/users/hmliu6/followers",
"following_url": "https://api.github.com/users/hmliu6/following{/other_user}",
"gists_url": "https://api.github.com/users/hmliu6/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hmliu6",
"id": 25401850,
"login": "hmliu6",
"node_id": "MDQ6VXNlcjI1NDAxODUw",
"organizations_url": "https://api.github.com/users/hmliu6/orgs",
"received_events_url": "https://api.github.com/users/hmliu6/received_events",
"repos_url": "https://api.github.com/users/hmliu6/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hmliu6/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hmliu6/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hmliu6",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2020-09-26T04:04:14Z | 2021-04-20T21:43:37Z | 2020-10-08T10:54:21Z | NONE | resolved | In a simple get request, by default trust_env is set to true, so the get request will check for the environment variables for proxy setting, but if it is in a large kubernetes cluster, the environment variables will be sufficiently large and each scan has a very heavy workload but not used on networking.
## Expected Result
Expected there will be an option to override the environment variables checking, so that we do not need to waste lots of CPU time to scan through the environment everytime when we call get request.
OR
A setter method to set the trust_env to false and bypass all the environment checking so as to reduce the loop resource.
## Actual Result
In a heavy loading kubenetes cluster, there are around 20k environment variables when creating new service container (just because it has too many services)
While performing loading test in the same namespace environment, every get request call will scan through 20k elements, if we have 10 request per second, it is already occupied whole single CPU core
If we deleted all the environment variables at the very beginning before the requests, it just take 10% or less resource for the same loading.
## Reproduction Steps
```python
import requests
# if we get from private network, we possibly don't need the proxy setting
r = requests.get('http://10.0.0.1')
```
## Reference
https://github.com/psf/requests/blob/master/requests/sessions.py#L701
https://github.com/psf/requests/blob/967a05bfffcb68f97296eda197b062221c2ebc0d/requests/utils.py#L760
https://github.com/psf/requests/blob/967a05bfffcb68f97296eda197b062221c2ebc0d/requests/utils.py#L699 | {
"avatar_url": "https://avatars.githubusercontent.com/u/25401850?v=4",
"events_url": "https://api.github.com/users/hmliu6/events{/privacy}",
"followers_url": "https://api.github.com/users/hmliu6/followers",
"following_url": "https://api.github.com/users/hmliu6/following{/other_user}",
"gists_url": "https://api.github.com/users/hmliu6/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hmliu6",
"id": 25401850,
"login": "hmliu6",
"node_id": "MDQ6VXNlcjI1NDAxODUw",
"organizations_url": "https://api.github.com/users/hmliu6/orgs",
"received_events_url": "https://api.github.com/users/hmliu6/received_events",
"repos_url": "https://api.github.com/users/hmliu6/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hmliu6/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hmliu6/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hmliu6",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5600/reactions"
} | https://api.github.com/repos/psf/requests/issues/5600/timeline | null | completed | null | null | false | [
"> In a simple get request, by default trust_env is set to true, so the get request will check for the environment variables for proxy setting, but if it is in a large kubernetes cluster, the environment variables will be sufficiently large and each scan has a very heavy workload but not used on networking.\r\n\r\n... |
https://api.github.com/repos/psf/requests/issues/5599 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5599/labels{/name} | https://api.github.com/repos/psf/requests/issues/5599/comments | https://api.github.com/repos/psf/requests/issues/5599/events | https://github.com/psf/requests/issues/5599 | 708,826,946 | MDU6SXNzdWU3MDg4MjY5NDY= | 5,599 | Setting SSLContext for Session or operation | {
"avatar_url": "https://avatars.githubusercontent.com/u/5131271?v=4",
"events_url": "https://api.github.com/users/achapkowski/events{/privacy}",
"followers_url": "https://api.github.com/users/achapkowski/followers",
"following_url": "https://api.github.com/users/achapkowski/following{/other_user}",
"gists_url": "https://api.github.com/users/achapkowski/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/achapkowski",
"id": 5131271,
"login": "achapkowski",
"node_id": "MDQ6VXNlcjUxMzEyNzE=",
"organizations_url": "https://api.github.com/users/achapkowski/orgs",
"received_events_url": "https://api.github.com/users/achapkowski/received_events",
"repos_url": "https://api.github.com/users/achapkowski/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/achapkowski/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/achapkowski/subscriptions",
"type": "User",
"url": "https://api.github.com/users/achapkowski",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2020-09-25T10:25:59Z | 2021-08-29T00:06:50Z | 2020-09-25T14:14:34Z | NONE | resolved | The `certifi` library often runs into issues with domain certificates, but in the standard `urllib.request` library has no issue.
If I set the context to use the certifi's file, I get the SSL error,
```python
import ssl
import certifi
import requests.urllib as urlrq
resp = urlrq.urlopen(url="https://<web address>/rest/info?f=json",
context=ssl.create_default_context(cafile=certifi.where()))
```
if I use the standard library and set the context as follows:
```python
import ssl
import certifi
import requests.urllib as urlrq
resp = urlrq.urlopen(url="https://<web address>/rest/info?f=json",
context=ssl.SSLContext(ssl.PROTOCOL_TLSv1))
```
No SSL error.
How can I get requests to honor this `SSLContext`?
| {
"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/5599/reactions"
} | https://api.github.com/repos/psf/requests/issues/5599/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.",
"It's actually a usage question for the API, stacko... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.