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/4862
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4862/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4862/comments
|
https://api.github.com/repos/psf/requests/issues/4862/events
|
https://github.com/psf/requests/pull/4862
| 378,542,999 |
MDExOlB1bGxSZXF1ZXN0MjI5MjI0NTIy
| 4,862 |
update pipfile
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/11512276?v=4",
"events_url": "https://api.github.com/users/taylorjacklespriggs/events{/privacy}",
"followers_url": "https://api.github.com/users/taylorjacklespriggs/followers",
"following_url": "https://api.github.com/users/taylorjacklespriggs/following{/other_user}",
"gists_url": "https://api.github.com/users/taylorjacklespriggs/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/taylorjacklespriggs",
"id": 11512276,
"login": "taylorjacklespriggs",
"node_id": "MDQ6VXNlcjExNTEyMjc2",
"organizations_url": "https://api.github.com/users/taylorjacklespriggs/orgs",
"received_events_url": "https://api.github.com/users/taylorjacklespriggs/received_events",
"repos_url": "https://api.github.com/users/taylorjacklespriggs/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/taylorjacklespriggs/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/taylorjacklespriggs/subscriptions",
"type": "User",
"url": "https://api.github.com/users/taylorjacklespriggs",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-11-08T01:42:37Z
|
2021-09-01T00:11:48Z
|
2018-11-08T01:42:46Z
|
NONE
|
resolved
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/11512276?v=4",
"events_url": "https://api.github.com/users/taylorjacklespriggs/events{/privacy}",
"followers_url": "https://api.github.com/users/taylorjacklespriggs/followers",
"following_url": "https://api.github.com/users/taylorjacklespriggs/following{/other_user}",
"gists_url": "https://api.github.com/users/taylorjacklespriggs/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/taylorjacklespriggs",
"id": 11512276,
"login": "taylorjacklespriggs",
"node_id": "MDQ6VXNlcjExNTEyMjc2",
"organizations_url": "https://api.github.com/users/taylorjacklespriggs/orgs",
"received_events_url": "https://api.github.com/users/taylorjacklespriggs/received_events",
"repos_url": "https://api.github.com/users/taylorjacklespriggs/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/taylorjacklespriggs/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/taylorjacklespriggs/subscriptions",
"type": "User",
"url": "https://api.github.com/users/taylorjacklespriggs",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4862/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4862/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4862.diff",
"html_url": "https://github.com/psf/requests/pull/4862",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4862.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4862"
}
| true |
[
"Miss-click, my bad"
] |
|
https://api.github.com/repos/psf/requests/issues/4861
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4861/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4861/comments
|
https://api.github.com/repos/psf/requests/issues/4861/events
|
https://github.com/psf/requests/pull/4861
| 377,957,511 |
MDExOlB1bGxSZXF1ZXN0MjI4Nzc2MTU1
| 4,861 |
Set iter_lines() decode_unicode default to False
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/543719?v=4",
"events_url": "https://api.github.com/users/altendky/events{/privacy}",
"followers_url": "https://api.github.com/users/altendky/followers",
"following_url": "https://api.github.com/users/altendky/following{/other_user}",
"gists_url": "https://api.github.com/users/altendky/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/altendky",
"id": 543719,
"login": "altendky",
"node_id": "MDQ6VXNlcjU0MzcxOQ==",
"organizations_url": "https://api.github.com/users/altendky/orgs",
"received_events_url": "https://api.github.com/users/altendky/received_events",
"repos_url": "https://api.github.com/users/altendky/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/altendky/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/altendky/subscriptions",
"type": "User",
"url": "https://api.github.com/users/altendky",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2018-11-06T17:36:12Z
|
2021-09-01T00:11:48Z
|
2018-11-09T20:44:35Z
|
CONTRIBUTOR
|
resolved
|
The docs just read a bit strange with `decode_unicode=None` as opposed to `False`.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4861/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4861/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4861.diff",
"html_url": "https://github.com/psf/requests/pull/4861",
"merged_at": "2018-11-09T20:44:35Z",
"patch_url": "https://github.com/psf/requests/pull/4861.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4861"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4861?src=pr&el=h1) Report\n> Merging [#4861](https://codecov.io/gh/requests/requests/pull/4861?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/6cfbe1aedd56f8c2f9ff8b968efe65b22669795b?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `0%`.\n\n[](https://codecov.io/gh/requests/requests/pull/4861?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4861 +/- ##\n=======================================\n Coverage 66.89% 66.89% \n=======================================\n Files 15 15 \n Lines 1577 1577 \n=======================================\n Hits 1055 1055 \n Misses 522 522\n```\n\n\n| [Impacted Files](https://codecov.io/gh/requests/requests/pull/4861?src=pr&el=tree) | Coverage Δ | |\n|---|---|---|\n| [requests/models.py](https://codecov.io/gh/requests/requests/pull/4861/diff?src=pr&el=tree#diff-cmVxdWVzdHMvbW9kZWxzLnB5) | `77.35% <0%> (ø)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4861?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4861?src=pr&el=footer). Last update [6cfbe1a...36412c5](https://codecov.io/gh/requests/requests/pull/4861?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"I had a suspicion that it was meaningful but it appears it isn't from a cursory look. Go ahead",
"Thanks again @altendky! ✨"
] |
https://api.github.com/repos/psf/requests/issues/4860
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4860/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4860/comments
|
https://api.github.com/repos/psf/requests/issues/4860/events
|
https://github.com/psf/requests/pull/4860
| 377,870,244 |
MDExOlB1bGxSZXF1ZXN0MjI4NzA5Njky
| 4,860 |
fix issue when an object overrode __getattr__
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/754906?v=4",
"events_url": "https://api.github.com/users/truebit/events{/privacy}",
"followers_url": "https://api.github.com/users/truebit/followers",
"following_url": "https://api.github.com/users/truebit/following{/other_user}",
"gists_url": "https://api.github.com/users/truebit/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/truebit",
"id": 754906,
"login": "truebit",
"node_id": "MDQ6VXNlcjc1NDkwNg==",
"organizations_url": "https://api.github.com/users/truebit/orgs",
"received_events_url": "https://api.github.com/users/truebit/received_events",
"repos_url": "https://api.github.com/users/truebit/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/truebit/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/truebit/subscriptions",
"type": "User",
"url": "https://api.github.com/users/truebit",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 7 |
2018-11-06T14:26:58Z
|
2021-09-01T00:11:47Z
|
2018-11-06T15:47:23Z
|
NONE
|
resolved
|
when a class overrode `__getattr__` method and always return something even `None`, this check would fail.
adding `callable` check to ensure there is an existing method `read`.
below is fail case which is used widely to use dot access for a dict:
```
class DotDict(dict):
"""dot.notation access to dictionary attributes"""
__setattr__ = dict.__setitem__
__delattr__ = dict.__delitem__
__getattr__ = dict.get
```
|
{
"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/4860/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4860/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4860.diff",
"html_url": "https://github.com/psf/requests/pull/4860",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4860.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4860"
}
| true |
[
"Hi @truebit, thanks for contributing to Requests. While we want Requests to be general enough to span a wide range of use cases, I'm not sure this is necessary. The [official Python docs](https://docs.python.org/3/reference/datamodel.html#object.__getattr__) state pretty clearly that: \r\n> [\\_\\_getattr\\_\\_] should either return the (computed) attribute value or raise an AttributeError exception.\r\n\r\nOverloading a dunder method and breaking the expected contract is going to cause issues, and we can't support every possible scenario. Given that \\_\\_getattr\\_\\_ is used in a number of areas throughout the codebase, this would have to be added everywhere for what I'd consider undefined behaviour. I don't think we're likely to accept this PR at this time. Thanks for the proposal though!",
"Sorry, Maybe I did not make it clear. Besides the mentioned case, for the condition check statement itself, its intention is to check if a `read` **method** in the object:\r\n``` \r\nif isinstance(data, (str, bytes)):\r\n return data\r\nelif hasattr(data, 'read'):\r\n return data\r\nelif hasattr(data, '__iter__'):\r\n result = []\r\n……\r\n```\r\n\r\nIn that case, current check is only a necessary but not sufficient condition; with a `callable` check , the two checks together would be necessary and sufficient one.\r\n\r\nOn the other hand, if it's not check for `read` method, there is another problem: the `hasattr` in Python2 would not find a property if this check is only check for a `read` attrbibute instead of `read` method. More details could be found [here](https://hynek.me/articles/hasattr/).\r\n\r\nIn a word, I think this PR has no problem",
"I added one [more commit](https://github.com/truebit/requests/commit/ed01d428ab9d8ffade81d3c3e716d163d3ab330a) to cover all hasattr problems in requests.\r\n\r\nBTW, It seems closed PR do not update new commits...",
"@truebit, the problem mentioned above is how quickly the handling scope explodes once you start down this path. We have a well documented set of inputs we take for each parameter in the API. Once users start handing in objects with unknown or redefined behavior, it becomes extremely difficult to predict all outcomes. Trying to handle everything causes the code base to become needlessly cluttered.\r\n\r\nA quick example is if someone has chosen to overload `read`. If they decide that read is still callable but it performs a non-io action, we’re in the same spot. The definition of `read` has clear semantics in the [Python docs](https://docs.python.org/3/glossary.html#term-file-object), deviating from that enters unsupported territory.\r\n\r\nAs for `hasattr` vs `getattr`, we’re aware of the issues with Python2. We’ve discussed moving these over previously (#3426) but it was determined to be out of scope by Kenneth.",
"I understand your standpoint. \r\nAs a professional QA, I do not think this bug is too occasional to be fixed. \r\nIMHO right is always above wrong:\r\n\"In the face of ambiguity, refuse the temptation to guess. There should be one-- and preferably only one --obvious way to do it.\" from zen of Python",
"> \"In the face of ambiguity, refuse the temptation to guess. There should be one-- and preferably only one --obvious way to do it.\" from zen of Python\r\n\r\nAnd as a professional Python software developer your \"widely used\" accessing of a dictionary via attributes is not widely used. I've seen a great deal of proprietary and open source Python codebases that don't do that because there is one obvious way to access the members of a dictionary and using attributes is **not** that method.",
"Nevertheless, `callable` is a correct way to check if it's an attribute or a method after `hasattr` returned `True`..."
] |
https://api.github.com/repos/psf/requests/issues/4859
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4859/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4859/comments
|
https://api.github.com/repos/psf/requests/issues/4859/events
|
https://github.com/psf/requests/issues/4859
| 377,446,490 |
MDU6SXNzdWUzNzc0NDY0OTA=
| 4,859 |
PyPI page for requests shows raw markup
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/159967?v=4",
"events_url": "https://api.github.com/users/mgedmin/events{/privacy}",
"followers_url": "https://api.github.com/users/mgedmin/followers",
"following_url": "https://api.github.com/users/mgedmin/following{/other_user}",
"gists_url": "https://api.github.com/users/mgedmin/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mgedmin",
"id": 159967,
"login": "mgedmin",
"node_id": "MDQ6VXNlcjE1OTk2Nw==",
"organizations_url": "https://api.github.com/users/mgedmin/orgs",
"received_events_url": "https://api.github.com/users/mgedmin/received_events",
"repos_url": "https://api.github.com/users/mgedmin/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mgedmin/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mgedmin/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mgedmin",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-11-05T15:20:27Z
|
2021-09-06T00:06:45Z
|
2018-11-05T16:03:39Z
|
NONE
|
resolved
|
https://pypi.org/project/requests/ shows raw markdown.
## Expected Result
Properly formatted text.
## Actual Result

## Reproduction Steps
Open https://pypi.org/p/requests in a browser
|
{
"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/4859/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4859/timeline
| null |
completed
| null | null | false |
[
"Hi @mgedmin, this is a result of the version of twine used to upload the 2.20 release. The readme was recently changed to markdown which had issues rendering properly with older versions of twine.\r\n\r\nWe’ll be doing a hotfix release sometime this week which will resolve the issue. Thanks for making sure we were aware :)"
] |
https://api.github.com/repos/psf/requests/issues/4858
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4858/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4858/comments
|
https://api.github.com/repos/psf/requests/issues/4858/events
|
https://github.com/psf/requests/pull/4858
| 377,200,343 |
MDExOlB1bGxSZXF1ZXN0MjI4MjA2NTIx
| 4,858 |
standard library suppress instead of try...except...pass
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/36747317?v=4",
"events_url": "https://api.github.com/users/Hyaxia/events{/privacy}",
"followers_url": "https://api.github.com/users/Hyaxia/followers",
"following_url": "https://api.github.com/users/Hyaxia/following{/other_user}",
"gists_url": "https://api.github.com/users/Hyaxia/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Hyaxia",
"id": 36747317,
"login": "Hyaxia",
"node_id": "MDQ6VXNlcjM2NzQ3MzE3",
"organizations_url": "https://api.github.com/users/Hyaxia/orgs",
"received_events_url": "https://api.github.com/users/Hyaxia/received_events",
"repos_url": "https://api.github.com/users/Hyaxia/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Hyaxia/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Hyaxia/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Hyaxia",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 6 |
2018-11-04T22:08:58Z
|
2021-09-01T00:11:49Z
|
2018-11-05T17:32:46Z
|
NONE
|
resolved
|
Code readability :)
Just thought it would be nice to use the suppress instead of the except...pass usage.
|
{
"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/4858/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4858/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4858.diff",
"html_url": "https://github.com/psf/requests/pull/4858",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4858.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4858"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4858?src=pr&el=h1) Report\n> Merging [#4858](https://codecov.io/gh/requests/requests/pull/4858?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/c501ec986daa4961cd9dee370b5d45ff2e524b37?src=pr&el=desc) will **increase** coverage by `<.01%`.\n> The diff coverage is `100%`.\n\n[](https://codecov.io/gh/requests/requests/pull/4858?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4858 +/- ##\n=========================================\n+ Coverage 66.89% 66.9% +<.01% \n=========================================\n Files 15 15 \n Lines 1577 1571 -6 \n=========================================\n- Hits 1055 1051 -4 \n+ Misses 522 520 -2\n```\n\n\n| [Impacted Files](https://codecov.io/gh/requests/requests/pull/4858?src=pr&el=tree) | Coverage Δ | |\n|---|---|---|\n| [requests/sessions.py](https://codecov.io/gh/requests/requests/pull/4858/diff?src=pr&el=tree#diff-cmVxdWVzdHMvc2Vzc2lvbnMucHk=) | `76.42% <100%> (-0.34%)` | :arrow_down: |\n| [requests/models.py](https://codecov.io/gh/requests/requests/pull/4858/diff?src=pr&el=tree#diff-cmVxdWVzdHMvbW9kZWxzLnB5) | `77.7% <100%> (+0.34%)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4858?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4858?src=pr&el=footer). Last update [c501ec9...d3d21af](https://codecov.io/gh/requests/requests/pull/4858?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"I'm -1ish on this change because it seems to purely be a refactoring that isn't necessary which can make archaeology on bugs significantly more difficult. I'm not a fan of change for change's sake when it comes to requests.",
"I think I’m in agreement with @sigmavirus24 here. While this does make a small simplification to the code it’s adding additional overhead to ensure we continue using this going forward.\r\n\r\nI think we’ll pass on this change for now, @hyaxia, but thank you for putting the idea forward!",
"Thanks for replying.\n@nateprewitt, Just out of curiousity, if there was no need for the python 2.7 compatibility, and you could use the \"suppress\" method from the standard library,\n(There was no need for the function i created but just to import the class from contextlib)\n would your opinion on the matter be different? ",
"We’ve discussed removing Python 2 support as part of Requests 3.0 but I don’t know if that decision has been finalized. We may revisit this at that point but until then I think we’re unlikely to merge a change like this.",
"Cool thanks!"
] |
https://api.github.com/repos/psf/requests/issues/4857
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4857/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4857/comments
|
https://api.github.com/repos/psf/requests/issues/4857/events
|
https://github.com/psf/requests/issues/4857
| 376,832,917 |
MDU6SXNzdWUzNzY4MzI5MTc=
| 4,857 |
HTTPConnectionPool(host='207.45.249.157', port=80): Max retries exceeded with url: http://www.google.com/ (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.HTTPConnection object at 0x00000234AC984898>: Failed to establish a new connection: [WinError 10060]
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/44704368?v=4",
"events_url": "https://api.github.com/users/ImARegularUser/events{/privacy}",
"followers_url": "https://api.github.com/users/ImARegularUser/followers",
"following_url": "https://api.github.com/users/ImARegularUser/following{/other_user}",
"gists_url": "https://api.github.com/users/ImARegularUser/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ImARegularUser",
"id": 44704368,
"login": "ImARegularUser",
"node_id": "MDQ6VXNlcjQ0NzA0MzY4",
"organizations_url": "https://api.github.com/users/ImARegularUser/orgs",
"received_events_url": "https://api.github.com/users/ImARegularUser/received_events",
"repos_url": "https://api.github.com/users/ImARegularUser/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ImARegularUser/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ImARegularUser/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ImARegularUser",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-11-02T14:29:22Z
|
2021-09-06T00:06:45Z
|
2018-11-02T16:01:01Z
|
NONE
|
resolved
|
Hi, I'm working on a python project, I use python3 with anaconda
I'm trying to execute a simple get request with this code:
import requests
proxies = {'http' : 'http://207.45.249.157',
'https': 'https://207.45.249.157'}
r = requests.get('http://www.google.com/', proxies=proxies)
and I get this error as a result:
ProxyError: HTTPConnectionPool(host='207.45.249.157', port=80): Max retries exceeded with url: http://www.google.com/ (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.HTTPConnection object at 0x00000234AC984898>: Failed to establish a new connection: [WinError 10060]')))
I'm quite new to python, especialy to the requests module
Thanks
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4857/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4857/timeline
| null |
completed
| null | null | false |
[
"Hi @ImARegularUser, welcome to the world of Python! The issue you’re seeing here is with your proxy rather than Requests. I’d suggest reviewing the [proxy docs](\r\nhttp://docs.python-requests.org/en/master/user/advanced/#proxies) and debugging from there. For future reference, we prefer usage questions to be directed towards StackOverflow with the python-requests tag since this issue tracker is reserved for defects in Requests. Thanks!",
"Alright, Thanks for you reply and sorry for the mistake x)"
] |
https://api.github.com/repos/psf/requests/issues/4856
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4856/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4856/comments
|
https://api.github.com/repos/psf/requests/issues/4856/events
|
https://github.com/psf/requests/pull/4856
| 375,750,580 |
MDExOlB1bGxSZXF1ZXN0MjI3MTI0MjIz
| 4,856 |
Remove unnecessary travis config
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2379650?v=4",
"events_url": "https://api.github.com/users/sloria/events{/privacy}",
"followers_url": "https://api.github.com/users/sloria/followers",
"following_url": "https://api.github.com/users/sloria/following{/other_user}",
"gists_url": "https://api.github.com/users/sloria/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sloria",
"id": 2379650,
"login": "sloria",
"node_id": "MDQ6VXNlcjIzNzk2NTA=",
"organizations_url": "https://api.github.com/users/sloria/orgs",
"received_events_url": "https://api.github.com/users/sloria/received_events",
"repos_url": "https://api.github.com/users/sloria/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sloria/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sloria/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sloria",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-10-31T00:33:31Z
|
2021-09-01T00:11:39Z
|
2018-11-13T12:52:37Z
|
CONTRIBUTOR
|
resolved
|
Each job already defines its `script`, so need
to define it at the top level.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4856/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4856/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4856.diff",
"html_url": "https://github.com/psf/requests/pull/4856",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4856.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4856"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4856?src=pr&el=h1) Report\n> Merging [#4856](https://codecov.io/gh/requests/requests/pull/4856?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/c501ec986daa4961cd9dee370b5d45ff2e524b37?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4856?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4856 +/- ##\n=======================================\n Coverage 66.89% 66.89% \n=======================================\n Files 15 15 \n Lines 1577 1577 \n=======================================\n Hits 1055 1055 \n Misses 522 522\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4856?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4856?src=pr&el=footer). Last update [c501ec9...5e0fbae](https://codecov.io/gh/requests/requests/pull/4856?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"Not sure why this was closed. Is there anything I should fix up?\r\n\r\nAlso, I just noticed that `sudo:` should be removed. TravisCI has migrated to the new infrastructure already: https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration . It's also not necessary on [xenial for Python 3.7](https://github.com/deadsnakes/travis-ci-python3.7-example#update-2018-07-03)\r\n"
] |
https://api.github.com/repos/psf/requests/issues/4855
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4855/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4855/comments
|
https://api.github.com/repos/psf/requests/issues/4855/events
|
https://github.com/psf/requests/pull/4855
| 375,304,415 |
MDExOlB1bGxSZXF1ZXN0MjI2NzgwMTEy
| 4,855 |
Fix the syntax highlighting of README
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/16336606?v=4",
"events_url": "https://api.github.com/users/frostming/events{/privacy}",
"followers_url": "https://api.github.com/users/frostming/followers",
"following_url": "https://api.github.com/users/frostming/following{/other_user}",
"gists_url": "https://api.github.com/users/frostming/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/frostming",
"id": 16336606,
"login": "frostming",
"node_id": "MDQ6VXNlcjE2MzM2NjA2",
"organizations_url": "https://api.github.com/users/frostming/orgs",
"received_events_url": "https://api.github.com/users/frostming/received_events",
"repos_url": "https://api.github.com/users/frostming/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/frostming/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/frostming/subscriptions",
"type": "User",
"url": "https://api.github.com/users/frostming",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-10-30T03:26:56Z
|
2021-09-01T00:11:49Z
|
2018-11-06T15:50:57Z
|
CONTRIBUTOR
|
resolved
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4855/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4855/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4855.diff",
"html_url": "https://github.com/psf/requests/pull/4855",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4855.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4855"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4855?src=pr&el=h1) Report\n> Merging [#4855](https://codecov.io/gh/requests/requests/pull/4855?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/eaab47f033cae3bd443abb6707dfc30ae3482c36?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4855?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4855 +/- ##\n=======================================\n Coverage 66.89% 66.89% \n=======================================\n Files 15 15 \n Lines 1577 1577 \n=======================================\n Hits 1055 1055 \n Misses 522 522\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4855?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4855?src=pr&el=footer). Last update [eaab47f...1de5d47](https://codecov.io/gh/requests/requests/pull/4855?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"Hi @frostming, I believe these classes are defined for specific formatting by @kennethreitz. I'm going to err on the side of caution and pass on these for now since the current readme is valid markdown. If Kenneth has different thoughts, I'll defer to him to reopen and merge this.\r\n\r\nThanks for the suggestion!"
] |
|
https://api.github.com/repos/psf/requests/issues/4854
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4854/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4854/comments
|
https://api.github.com/repos/psf/requests/issues/4854/events
|
https://github.com/psf/requests/issues/4854
| 375,303,086 |
MDU6SXNzdWUzNzUzMDMwODY=
| 4,854 |
respect_retry_after_header in urllib3.util.retry.Retry is not respected
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/3086245?v=4",
"events_url": "https://api.github.com/users/brysontyrrell/events{/privacy}",
"followers_url": "https://api.github.com/users/brysontyrrell/followers",
"following_url": "https://api.github.com/users/brysontyrrell/following{/other_user}",
"gists_url": "https://api.github.com/users/brysontyrrell/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/brysontyrrell",
"id": 3086245,
"login": "brysontyrrell",
"node_id": "MDQ6VXNlcjMwODYyNDU=",
"organizations_url": "https://api.github.com/users/brysontyrrell/orgs",
"received_events_url": "https://api.github.com/users/brysontyrrell/received_events",
"repos_url": "https://api.github.com/users/brysontyrrell/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/brysontyrrell/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/brysontyrrell/subscriptions",
"type": "User",
"url": "https://api.github.com/users/brysontyrrell",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-10-30T03:20:14Z
|
2021-09-05T00:06:59Z
|
2019-02-14T15:01:37Z
|
NONE
|
resolved
|
## Summary
I am trying to setup backoff and retry for 429 errors in a module I'm working on.
I want to ignore any `Retry-After` headers that are returned by the target API. According to the requests/urllib3 documentation I've followed, the code below should work, but instead of my backoff the full `3600` seconds set in the response to `http://httpstat.us/429` (which I'm testing against) is being used for the sleep.
## Reproduction Steps
```python
import logging
import requests
from requests.adapters import HTTPAdapter
from urllib3.util.retry import Retry
logging.basicConfig(level=logging.DEBUG)
session = requests.Session()
retries = Retry(
total=3,
backoff_factor=0.3,
status_forcelist=[429],
raise_on_status=False,
respect_retry_after_header=False
)
session.mount('https://', HTTPAdapter(max_retries=retries))
session.mount('http://', HTTPAdapter(max_retries=retries))
resp = session.get('http://httpstat.us/429', timeout=5)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.7"
},
"implementation": {
"name": "CPython",
"version": "2.7.10"
},
"platform": {
"release": "18.0.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.20.0"
},
"system_ssl": {
"version": "20000000"
},
"urllib3": {
"version": "1.24"
},
"using_pyopenssl": false
}
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/6740665?v=4",
"events_url": "https://api.github.com/users/lmiguelvargasf/events{/privacy}",
"followers_url": "https://api.github.com/users/lmiguelvargasf/followers",
"following_url": "https://api.github.com/users/lmiguelvargasf/following{/other_user}",
"gists_url": "https://api.github.com/users/lmiguelvargasf/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lmiguelvargasf",
"id": 6740665,
"login": "lmiguelvargasf",
"node_id": "MDQ6VXNlcjY3NDA2NjU=",
"organizations_url": "https://api.github.com/users/lmiguelvargasf/orgs",
"received_events_url": "https://api.github.com/users/lmiguelvargasf/received_events",
"repos_url": "https://api.github.com/users/lmiguelvargasf/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lmiguelvargasf/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lmiguelvargasf/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lmiguelvargasf",
"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/4854/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4854/timeline
| null |
completed
| null | null | false |
[
"Add \r\n",
"Closed due to inactivity."
] |
https://api.github.com/repos/psf/requests/issues/4853
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4853/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4853/comments
|
https://api.github.com/repos/psf/requests/issues/4853/events
|
https://github.com/psf/requests/pull/4853
| 375,189,962 |
MDExOlB1bGxSZXF1ZXN0MjI2NjkzMjk3
| 4,853 |
Incorrect ValueError Message on ~requests.utils.from_key_val_list comments
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/966361?v=4",
"events_url": "https://api.github.com/users/mainanick/events{/privacy}",
"followers_url": "https://api.github.com/users/mainanick/followers",
"following_url": "https://api.github.com/users/mainanick/following{/other_user}",
"gists_url": "https://api.github.com/users/mainanick/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mainanick",
"id": 966361,
"login": "mainanick",
"node_id": "MDQ6VXNlcjk2NjM2MQ==",
"organizations_url": "https://api.github.com/users/mainanick/orgs",
"received_events_url": "https://api.github.com/users/mainanick/received_events",
"repos_url": "https://api.github.com/users/mainanick/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mainanick/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mainanick/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mainanick",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-10-29T19:56:51Z
|
2021-09-01T00:11:49Z
|
2018-10-30T06:13:57Z
|
CONTRIBUTOR
|
resolved
|
The function `requests.utils.from_key_val_list` raises ValueError with message `cannot encode objects that are not 2-tuples`.
On the function comments it show that it raises ValueError with message `need more than 1 value to unpack`
|
{
"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/4853/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4853/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4853.diff",
"html_url": "https://github.com/psf/requests/pull/4853",
"merged_at": "2018-10-30T06:13:57Z",
"patch_url": "https://github.com/psf/requests/pull/4853.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4853"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4853?src=pr&el=h1) Report\n> Merging [#4853](https://codecov.io/gh/requests/requests/pull/4853?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/eaab47f033cae3bd443abb6707dfc30ae3482c36?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4853?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4853 +/- ##\n=======================================\n Coverage 66.89% 66.89% \n=======================================\n Files 15 15 \n Lines 1577 1577 \n=======================================\n Hits 1055 1055 \n Misses 522 522\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4853?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4853?src=pr&el=footer). Last update [eaab47f...045b706](https://codecov.io/gh/requests/requests/pull/4853?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n"
] |
https://api.github.com/repos/psf/requests/issues/4852
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4852/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4852/comments
|
https://api.github.com/repos/psf/requests/issues/4852/events
|
https://github.com/psf/requests/issues/4852
| 374,957,637 |
MDU6SXNzdWUzNzQ5NTc2Mzc=
| 4,852 |
2.20.0 result.headers.get('x-content-type-options') does not return header
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/11268775?v=4",
"events_url": "https://api.github.com/users/jgrobbel/events{/privacy}",
"followers_url": "https://api.github.com/users/jgrobbel/followers",
"following_url": "https://api.github.com/users/jgrobbel/following{/other_user}",
"gists_url": "https://api.github.com/users/jgrobbel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jgrobbel",
"id": 11268775,
"login": "jgrobbel",
"node_id": "MDQ6VXNlcjExMjY4Nzc1",
"organizations_url": "https://api.github.com/users/jgrobbel/orgs",
"received_events_url": "https://api.github.com/users/jgrobbel/received_events",
"repos_url": "https://api.github.com/users/jgrobbel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jgrobbel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jgrobbel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jgrobbel",
"user_view_type": "public"
}
|
[
{
"color": "f7c6c7",
"default": false,
"description": null,
"id": 167537670,
"name": "Propose Close",
"node_id": "MDU6TGFiZWwxNjc1Mzc2NzA=",
"url": "https://api.github.com/repos/psf/requests/labels/Propose%20Close"
},
{
"color": "fef2c0",
"default": false,
"description": null,
"id": 298537994,
"name": "Needs More Information",
"node_id": "MDU6TGFiZWwyOTg1Mzc5OTQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Needs%20More%20Information"
}
] |
closed
| true | null |
[] | null | 3 |
2018-10-29T10:50:34Z
|
2021-09-06T00:06:43Z
|
2018-11-20T16:41:24Z
|
NONE
|
resolved
|
Summary.
## Expected Result
What you expected. (as seen with downgrading to 2.19.1)
```
Successfully installed requests-2.19.1 urllib3-1.23
(pytest-env) ./test_send_request.py
-> assert result.headers.get('x-content-type-options') == 'nosniff', \
(Pdb) result.headers
{'Server': 'nginx', 'Date': 'Sat, 27 Oct 2018 08:22:52 GMT', 'Content-Type': 'application/json', 'Content-Length': '675', 'Connection': 'keep-alive', 'Set-Cookie': 'redacted; HttpOnly; Path=/', 'Strict-Transport-Security': 'max-age=63072000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Frame-Options': 'DENY', 'X-XSS-Protection': '1; mode=block', 'Referrer-Policy': 'same-origin'}
```
## Actual Result (2.20.0)
```
-> assert result.headers.get('x-content-type-options') == 'nosniff', \
(Pdb) result.headers.get('x-content-type-options') <--- no header returned
(Pdb) result.headers
{'Date': 'Sat, 27 Oct 2018 08:04:06 GMT', 'Content-Type': 'text/html; charset=utf-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Vary': 'Accept-Encoding', Max-Age=864000000; Path=/usernamepassword/login; HttpOnly; Secure', 'X-Robots-Tag': 'noindex, nofollow, noindex, nofollow, nosnippet, noarchive', 'Cache-Control': 'private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0', 'Strict-Transport-Security': 'max-age=15724800', 'Content-Encoding': 'gzip'}
```
What happened instead.
## Reproduction Steps
```python
import requests
```
## System Information
$ python3 -m requests.help
```
python3 -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.7"
},
"implementation": {
"name": "CPython",
"version": "3.6.5"
},
"platform": {
"release": "17.7.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.20.0"
},
"system_ssl": {
"version": "100020ff"
},
"urllib3": {
"version": "1.23"
},
"using_pyopenssl": false
}
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/11268775?v=4",
"events_url": "https://api.github.com/users/jgrobbel/events{/privacy}",
"followers_url": "https://api.github.com/users/jgrobbel/followers",
"following_url": "https://api.github.com/users/jgrobbel/following{/other_user}",
"gists_url": "https://api.github.com/users/jgrobbel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jgrobbel",
"id": 11268775,
"login": "jgrobbel",
"node_id": "MDQ6VXNlcjExMjY4Nzc1",
"organizations_url": "https://api.github.com/users/jgrobbel/orgs",
"received_events_url": "https://api.github.com/users/jgrobbel/received_events",
"repos_url": "https://api.github.com/users/jgrobbel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jgrobbel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jgrobbel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jgrobbel",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4852/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4852/timeline
| null |
completed
| null | null | false |
[
"We need far more information than is provided here to help you. In all honesty, though, I severely doubt this is a bug in Requests. For example, \r\n\r\n- What URL are you requesting?\r\n- Can you share the test code that is failing?\r\n- Are there redirects involved?\r\n - Have you checked the redirects to see what's happening?",
"@sigmavirus24 \r\n\r\nI have nginx config that is configured like so:\r\n\r\n```\r\n location / {\r\n proxy_pass http://my_api;\r\n\r\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\r\n proxy_set_header X-Forwarded-Proto https;\r\n proxy_set_header Host $http_host;\r\n proxy_redirect off;\r\n\r\n add_header Strict-Transport-Security \"max-age=63072000; includeSubDomains; preload\" always;\r\n add_header X-Content-Type-Options \"nosniff\" always;\r\n add_header X-Frame-Options \"DENY\" always;\r\n add_header X-XSS-Protection \"1; mode=block\" always;\r\n add_header Referrer-Policy \"same-origin\" always;\r\n }\r\n```\r\n\r\nAnd with 2.19.1 we get these headers back, which has been checked and passing in our CI-pipeline for ages. But now I looked again I see `Strict-Transport-Security` value is off as well. From my point of view the only thing that changed was the requests version (literally swapping between the two in the same virtual env and calling the endpoint).\r\n\r\nI'll have to do some more digging to see what is going on.\r\n",
"@sigmavirus24 \r\n\r\nAfter some further analysis we did uncover one endpoint that was doing a bad redirect. It was redirecting to http, which was then again upgraded by nginx but without `X-Content-Type-Options` in the response headers.\r\n\r\nWe don't think that STS headers are being honoured by `requests` and if we confirm this will look at creating an enhancement request.\r\n\r\nClosing this issue then."
] |
https://api.github.com/repos/psf/requests/issues/4851
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4851/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4851/comments
|
https://api.github.com/repos/psf/requests/issues/4851/events
|
https://github.com/psf/requests/pull/4851
| 374,876,069 |
MDExOlB1bGxSZXF1ZXN0MjI2NDUxNTgz
| 4,851 |
proper handling for default ports in auth stripping
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2018-10-29T06:34:28Z
|
2021-09-01T00:11:44Z
|
2018-10-29T12:48:37Z
|
MEMBER
|
resolved
|
This is an attempt to address the default port issues presented in #4850. Our recent changes around auth stripping to handle downgrade attacks in #4718 broke compatibility for cases like http://example.com:80 -> http://example.com. This will allow the use of "default" ports and no port interchangeably.
If you get a moment @sigmavirus24, I'd like a second pair of eyes on this. I'm not ecstatic about continuing to expand this function, but I don't think there's an easier simplification of what we have.
|
{
"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/4851/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4851/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4851.diff",
"html_url": "https://github.com/psf/requests/pull/4851",
"merged_at": "2018-10-29T12:48:37Z",
"patch_url": "https://github.com/psf/requests/pull/4851.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4851"
}
| true |
[
"@nateprewitt : hi nate. version bump not required? ",
"@rishabh5j, this will be in the next release, likely 2.20.1.",
"@nateprewitt : thanks i can see its version upped now. "
] |
https://api.github.com/repos/psf/requests/issues/4850
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4850/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4850/comments
|
https://api.github.com/repos/psf/requests/issues/4850/events
|
https://github.com/psf/requests/issues/4850
| 374,861,882 |
MDU6SXNzdWUzNzQ4NjE4ODI=
| 4,850 |
Authorization header dropped accidentally because wrong port change detection logic
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/6889221?v=4",
"events_url": "https://api.github.com/users/quickwind/events{/privacy}",
"followers_url": "https://api.github.com/users/quickwind/followers",
"following_url": "https://api.github.com/users/quickwind/following{/other_user}",
"gists_url": "https://api.github.com/users/quickwind/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/quickwind",
"id": 6889221,
"login": "quickwind",
"node_id": "MDQ6VXNlcjY4ODkyMjE=",
"organizations_url": "https://api.github.com/users/quickwind/orgs",
"received_events_url": "https://api.github.com/users/quickwind/received_events",
"repos_url": "https://api.github.com/users/quickwind/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/quickwind/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/quickwind/subscriptions",
"type": "User",
"url": "https://api.github.com/users/quickwind",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2018-10-29T05:18:11Z
|
2021-09-06T00:06:46Z
|
2018-10-30T06:00:48Z
|
NONE
|
resolved
|
Summary.
## Expected Result
We have a library code using requests, when we get a URL with auth, it will be redirected to cas authentication url which is exactly same schema, same hostname, but for the port, our original request explicitly gave 443, but the location returned in 302 response is without ":443" (means default 443 https), in such case we expect the redirected request should not strip the authorization header.
## Actual Result
The authorization header is stripped and causing eventually 401 error.
## Reproduction Steps
```python
import requests
session = requests.Session()
session.auth = ('admin', 'password1')
response = session.get('https://example.com:443/foo')
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.7"
},
"implementation": {
"name": "CPython",
"version": "3.6.5"
},
"platform": {
"release": "4.15.0-36-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.20.0"
},
"system_ssl": {
"version": "1010008f"
},
"urllib3": {
"version": "1.24"
},
"using_pyopenssl": false
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4850/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4850/timeline
| null |
completed
| null | null | false |
[
"Hi @quickwind, thanks for bringing this to our attention. I've quickly tossed together #4851 to address the problem. I'm not ecstatic about the solution, but it should resolve the issues. I'll try to give the issue some more thought in the morning and we'll work towards getting this resolved in the next bugfix release.",
"@nateprewitt Thanks for your quick response, looking forward to next patch version...",
"No problem @quickwind, we'll likely wait another week to see if anything else crops up and then I'll look at getting a hotfix release out. Going to close now that #4851 is merged."
] |
https://api.github.com/repos/psf/requests/issues/4849
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4849/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4849/comments
|
https://api.github.com/repos/psf/requests/issues/4849/events
|
https://github.com/psf/requests/pull/4849
| 374,631,612 |
MDExOlB1bGxSZXF1ZXN0MjI2Mjg1NTY3
| 4,849 |
Extending Gitignore for Easier Contribution
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2399084?v=4",
"events_url": "https://api.github.com/users/erayerdin/events{/privacy}",
"followers_url": "https://api.github.com/users/erayerdin/followers",
"following_url": "https://api.github.com/users/erayerdin/following{/other_user}",
"gists_url": "https://api.github.com/users/erayerdin/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/erayerdin",
"id": 2399084,
"login": "erayerdin",
"node_id": "MDQ6VXNlcjIzOTkwODQ=",
"organizations_url": "https://api.github.com/users/erayerdin/orgs",
"received_events_url": "https://api.github.com/users/erayerdin/received_events",
"repos_url": "https://api.github.com/users/erayerdin/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/erayerdin/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/erayerdin/subscriptions",
"type": "User",
"url": "https://api.github.com/users/erayerdin",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-10-27T10:39:23Z
|
2021-09-01T00:11:50Z
|
2018-10-27T16:38:01Z
|
NONE
|
resolved
|
`.gitignore` has been changed.
# Rationale
Developers/contributors might use different tools. These tools might provide undesired files about tests, test reports, binary files et cetera. That's why `.gitignore` had to be updated.
# What has changed?
Old entries are still present at the end of file so that maintainers can still have the same result. The file was generated by [gitignore.io](https://www.gitignore.io). A full path to what aspects have been included can be seen in the first line of `.gitignore` file. Anyway, to be verbose:
- **Jetbrains + Pycharm** caches, configs etc.
- Generic **Python** files which are not supposed to be in the repository such as archived sources, compiled `pyc` files etc. This section also contains some files for `pytest`, `coverage` and `tox`.
- **Virtualenv** has been extended. Other developers/tools might use different path for virtualenv. Pycharm default is `.venv` while current gitignore does not have that, instead, it has `env/` entry.
|
{
"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/4849/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4849/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4849.diff",
"html_url": "https://github.com/psf/requests/pull/4849",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4849.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4849"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4849?src=pr&el=h1) Report\n> Merging [#4849](https://codecov.io/gh/requests/requests/pull/4849?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/7c812e919b3cd3267c2159be96ad63fff3dd1260?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4849?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4849 +/- ##\n=======================================\n Coverage 66.79% 66.79% \n=======================================\n Files 15 15 \n Lines 1572 1572 \n=======================================\n Hits 1050 1050 \n Misses 522 522\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4849?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4849?src=pr&el=footer). Last update [7c812e9...5be968e](https://codecov.io/gh/requests/requests/pull/4849?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"Users of these various tools should use [a global gitignore](https://help.github.com/articles/ignoring-files/#create-a-global-gitignore)."
] |
https://api.github.com/repos/psf/requests/issues/4848
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4848/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4848/comments
|
https://api.github.com/repos/psf/requests/issues/4848/events
|
https://github.com/psf/requests/issues/4848
| 373,726,423 |
MDU6SXNzdWUzNzM3MjY0MjM=
| 4,848 |
can we remove the 'chardet' dependence which is LGPL license
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/29417316?v=4",
"events_url": "https://api.github.com/users/8key/events{/privacy}",
"followers_url": "https://api.github.com/users/8key/followers",
"following_url": "https://api.github.com/users/8key/following{/other_user}",
"gists_url": "https://api.github.com/users/8key/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/8key",
"id": 29417316,
"login": "8key",
"node_id": "MDQ6VXNlcjI5NDE3MzE2",
"organizations_url": "https://api.github.com/users/8key/orgs",
"received_events_url": "https://api.github.com/users/8key/received_events",
"repos_url": "https://api.github.com/users/8key/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/8key/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/8key/subscriptions",
"type": "User",
"url": "https://api.github.com/users/8key",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2018-10-25T00:24:12Z
|
2021-09-03T00:10:47Z
|
2018-10-25T00:31:04Z
|
NONE
|
resolved
|
Requests package is dependent on 'chardet' which is LGPL, I am not sure if one can call the package "Apache License" when its dependency includes "LGPL" license. Would be nice to replace 'chardet' with something else.
thanks
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4848/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4848/timeline
| null |
completed
| null | null | false |
[
"#3389 #4417 \r\n\r\nHi @8key, in the future please search both open and *closed* issues. Thanks!",
"FWIW Maybe at some point it could be made pluggable and allow to switch with https://github.com/Ousret/charset_normalizer",
"Allowing the use of something like `charset_normalizer` would be really nice, as currently the only GPL-like licenses dependency in our project is `chardet` and that is a dependency of `requests`. `requests` is awesome and we really need to use it, but the LGPL dependency gives people on the team worries.\r\n\r\nIf `charset_normalizer` has feature parity, the MIT license it brings would be much appreciated.\r\n\r\nThe concern is that for a closed-source project that uses `requests`, [LGPL](https://opensource.org/licenses/lgpl-3.0.html) imposes some extra requirements on the LGPL portions (`chardet`) that could be bundled by the closed-source project depending on how they distribute (pyinstaller, bundling PyPI dependencies, etc):\r\n\r\n------\r\n\r\n 4. Combined Works.\r\n\r\nYou may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following:\r\n\r\na) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License.\r\nb) Accompany the Combined Work with a copy of the GNU GPL and this license document.\r\nc) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document.\r\nd) Do one of the following:\r\n0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.\r\n1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version.\r\ne) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.)"
] |
https://api.github.com/repos/psf/requests/issues/4847
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4847/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4847/comments
|
https://api.github.com/repos/psf/requests/issues/4847/events
|
https://github.com/psf/requests/issues/4847
| 373,692,014 |
MDU6SXNzdWUzNzM2OTIwMTQ=
| 4,847 |
Option for retrieving peer's TLS certificate
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/7912657?v=4",
"events_url": "https://api.github.com/users/martingalvan/events{/privacy}",
"followers_url": "https://api.github.com/users/martingalvan/followers",
"following_url": "https://api.github.com/users/martingalvan/following{/other_user}",
"gists_url": "https://api.github.com/users/martingalvan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/martingalvan",
"id": 7912657,
"login": "martingalvan",
"node_id": "MDQ6VXNlcjc5MTI2NTc=",
"organizations_url": "https://api.github.com/users/martingalvan/orgs",
"received_events_url": "https://api.github.com/users/martingalvan/received_events",
"repos_url": "https://api.github.com/users/martingalvan/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/martingalvan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/martingalvan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/martingalvan",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 1 |
2018-10-24T21:52:30Z
|
2020-08-24T15:18:39Z
| null |
NONE
| null |
It would be good to have an option to retrieve the peer's TLS certificate after a request is performed. For example, this is what libcurl provides with [CURLINFO_CERTINFO](https://curl.haxx.se/libcurl/c/CURLINFO_CERTINFO.html).
There's a StackOverflow thread which offers some rather ugly methods to do this: https://stackoverflow.com/questions/16903528/how-to-get-response-ssl-certificate-from-requests-in-python
| null |
{
"+1": 3,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 3,
"url": "https://api.github.com/repos/psf/requests/issues/4847/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4847/timeline
| null | null | null | null | false |
[
"I actually managed to fix this via an adapter, but would like for this to be natively supported. Also, TLS certificate is fetched prior a connection is fully established, as the certificate is checked for validity and only then \"fully\" connected.\r\n\r\nRequests actually fetches the certificate at some pint, but it does not allow it to be stored saved somewhere, which might further complicate in situations where TLS pinning is needed."
] |
https://api.github.com/repos/psf/requests/issues/4846
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4846/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4846/comments
|
https://api.github.com/repos/psf/requests/issues/4846/events
|
https://github.com/psf/requests/issues/4846
| 373,590,854 |
MDU6SXNzdWUzNzM1OTA4NTQ=
| 4,846 |
Adding `timeout` changes behavior without raising an exception
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/22822319?v=4",
"events_url": "https://api.github.com/users/davisjam/events{/privacy}",
"followers_url": "https://api.github.com/users/davisjam/followers",
"following_url": "https://api.github.com/users/davisjam/following{/other_user}",
"gists_url": "https://api.github.com/users/davisjam/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/davisjam",
"id": 22822319,
"login": "davisjam",
"node_id": "MDQ6VXNlcjIyODIyMzE5",
"organizations_url": "https://api.github.com/users/davisjam/orgs",
"received_events_url": "https://api.github.com/users/davisjam/received_events",
"repos_url": "https://api.github.com/users/davisjam/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/davisjam/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/davisjam/subscriptions",
"type": "User",
"url": "https://api.github.com/users/davisjam",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-10-24T17:21:59Z
|
2021-09-07T00:06:08Z
|
2018-10-24T17:36:22Z
|
NONE
|
resolved
|
I am using `requests` to query a website.
If I query with `timeout`, it behaves like I want (well, kind of).
If I query without `timeout`, the request hangs.
This behavior seems to be specific to this website. My code works fine against other websites.
## Expected Result
The request does not hang.
## Actual Result
Without `timeout`, the request hangs.
With `timeout`, the request takes the full timeout window before returning successfully.
## Reproduction Steps
```python
#!/usr/bin/env python3
import requests
# Works -- but takes the full timeout before the call returns
print('Try 1')
r = requests.get('https://repo.packagist.org/p/jrodella/payment-form-api.json', timeout=5)
# Hangs
print('Try 2')
r = requests.get('https://repo.packagist.org/p/jrodella/payment-form-api.json')
```
If I add in logging, the hang occurs after the log statement:
```
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.packagist.org
```
## System Information
$ python -m requests.help
```
(13:21:07) jamie@woody ~/Desktop/EcosystemRegexps/ecosystems $ python3 -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "1.9"
},
"implementation": {
"name": "CPython",
"version": "3.5.2"
},
"platform": {
"release": "4.15.0-33-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1000207f",
"version": "17.3.0"
},
"requests": {
"version": "2.18.1"
},
"system_ssl": {
"version": "1000207f"
},
"urllib3": {
"version": "1.21.1"
},
"using_pyopenssl": true
}
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4846/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4846/timeline
| null |
completed
| null | null | false |
[
"Hi @davisjam,\r\n\r\nThis is the expected behavior of not passing a timeout, the connection will remain open until closed by one of the involved parties.\r\n\r\nThis information is available at the top of the timeout section in the [docs](http://docs.python-requests.org/en/master/user/quickstart/#timeouts).\r\n\r\n> Nearly all production code should use this parameter in nearly all requests. Failure to do so can cause your program to hang indefinitely",
"Hi @nateprewitt.\r\n\r\nI have read the documentation. Perhaps I was too hasty in my writeup.\r\n\r\nCan you clarify what I find the odd behavior here? Namely that:\r\n\r\n> With timeout, the request takes the full timeout window before returning successfully.\r\n\r\nThis implies that there is a path wherein the timeout expires but no exception is raised.\r\nI could not find this described in the documentation.\r\n\r\nIf I add `verify=False` then no `timeout` parameter is necessary; the request completes promptly and the website closes the connection."
] |
https://api.github.com/repos/psf/requests/issues/4845
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4845/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4845/comments
|
https://api.github.com/repos/psf/requests/issues/4845/events
|
https://github.com/psf/requests/issues/4845
| 373,391,247 |
MDU6SXNzdWUzNzMzOTEyNDc=
| 4,845 |
About the json param
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/44430857?v=4",
"events_url": "https://api.github.com/users/Arayui/events{/privacy}",
"followers_url": "https://api.github.com/users/Arayui/followers",
"following_url": "https://api.github.com/users/Arayui/following{/other_user}",
"gists_url": "https://api.github.com/users/Arayui/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Arayui",
"id": 44430857,
"login": "Arayui",
"node_id": "MDQ6VXNlcjQ0NDMwODU3",
"organizations_url": "https://api.github.com/users/Arayui/orgs",
"received_events_url": "https://api.github.com/users/Arayui/received_events",
"repos_url": "https://api.github.com/users/Arayui/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Arayui/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Arayui/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Arayui",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-10-24T09:34:57Z
|
2021-09-07T00:06:08Z
|
2018-10-24T13:30:05Z
|
NONE
|
resolved
|
In my work, I encountered such a problem:
Developers require the use of most compact json.
But when I use the requests module,
I found that the internal code used "body = complexjson.dumps (json)".
This is not flexible enough.
Especially when developers do not deal with such problems. (I am a tester)
So, can you add a parameter to deal with this kind of thing?
Looking forward to your reply.
|
{
"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/4845/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4845/timeline
| null |
completed
| null | null | false |
[
"Developers can already use their own JSON serialization by not using the `json` parameter. We will not add a new parameter to a feature-frozen API for an unspecified use-case."
] |
https://api.github.com/repos/psf/requests/issues/4844
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4844/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4844/comments
|
https://api.github.com/repos/psf/requests/issues/4844/events
|
https://github.com/psf/requests/issues/4844
| 373,069,411 |
MDU6SXNzdWUzNzMwNjk0MTE=
| 4,844 |
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/4923344?v=4",
"events_url": "https://api.github.com/users/ilkerceng/events{/privacy}",
"followers_url": "https://api.github.com/users/ilkerceng/followers",
"following_url": "https://api.github.com/users/ilkerceng/following{/other_user}",
"gists_url": "https://api.github.com/users/ilkerceng/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ilkerceng",
"id": 4923344,
"login": "ilkerceng",
"node_id": "MDQ6VXNlcjQ5MjMzNDQ=",
"organizations_url": "https://api.github.com/users/ilkerceng/orgs",
"received_events_url": "https://api.github.com/users/ilkerceng/received_events",
"repos_url": "https://api.github.com/users/ilkerceng/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ilkerceng/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ilkerceng/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ilkerceng",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-10-23T15:44:33Z
|
2021-09-07T00:06:08Z
|
2018-10-23T16:02:17Z
|
NONE
|
resolved
|
Hi dear community,
I am using windows 10 and python3.6. When i have multple threads(concurrent.futures ThreadPoolExecutor) making requests with the same parameter and the same proxy settings, i got this error.
> response = requests.get(random.choice(get_urls()), proxies={"http": proxy, "https": proxy})
> File "C:\Users\peja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\api.py", line 72, in get
> return request('get', url, params=params, **kwargs)
> File "C:\Users\peja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\api.py", line 58, in request
> return session.request(method=method, url=url, **kwargs)
> File "C:\Users\peja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\sessions.py", line 508, in request
> resp = self.send(prep, **send_kwargs)
> File "C:\Users\peja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\sessions.py", line 618, in send
> r = adapter.send(request, **kwargs)
> File "C:\Users\peja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\adapters.py", line 502, in send
> raise ProxyError(e, request=request)
> requests.exceptions.ProxyError: HTTPSConnectionPool(host='restcountries.eu', port=443): Max retries exceeded with url: /rest/v2/callingcode/372 (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x124BEB10>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',)))
> Unhandled exception in thread started by <bound method ProxyTools.call_url of <__main__.ProxyTools object at 0x006983F0>>
> Traceback (most recent call last):
> File "C:\Users\peja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\urllib3\connection.py", line 141, in _new_conn
> (self.host, self.port), self.timeout, **extra_kw)
> File "C:\Users\peja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\urllib3\util\connection.py", line 83, in create_connection
> raise err
> File "C:\Users\peja\AppData\Local\Programs\Python\Python36-32\lib\site-packages\urllib3\util\connection.py", line 73, in create_connection
> sock.connect(sa)
> ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
>
Is there any solution for this?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4844/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4844/timeline
| null |
completed
| null | null | false |
[
"Hi @ilkerceng, this looks like a request for assistance rather than a defect report for Requests which is the primary use of this issue tracker. Our standard policy is to have questions like these posted on [StackOverflow](https://www.stackoverflow.com). Thanks!",
"hi @nateprewitt, thanks for your response."
] |
https://api.github.com/repos/psf/requests/issues/4843
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4843/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4843/comments
|
https://api.github.com/repos/psf/requests/issues/4843/events
|
https://github.com/psf/requests/issues/4843
| 372,947,613 |
MDU6SXNzdWUzNzI5NDc2MTM=
| 4,843 |
Cookies problem
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2036941?v=4",
"events_url": "https://api.github.com/users/gaplan/events{/privacy}",
"followers_url": "https://api.github.com/users/gaplan/followers",
"following_url": "https://api.github.com/users/gaplan/following{/other_user}",
"gists_url": "https://api.github.com/users/gaplan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gaplan",
"id": 2036941,
"login": "gaplan",
"node_id": "MDQ6VXNlcjIwMzY5NDE=",
"organizations_url": "https://api.github.com/users/gaplan/orgs",
"received_events_url": "https://api.github.com/users/gaplan/received_events",
"repos_url": "https://api.github.com/users/gaplan/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gaplan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gaplan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gaplan",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 6 |
2018-10-23T11:21:19Z
|
2021-09-07T00:06:07Z
|
2018-10-29T17:34:14Z
|
NONE
|
resolved
|
Hello,
I'm working on instagram, and I've seen the error in the Cookie part of the response and add the result.
## Expected Result
`"{\"78.183.146.64\": 9121}:1gDpKI:LjSZuxpGaGdQPUPDd3rqZGx6BfQ"`
## Actual Result
"{78.183.146.64: 9121}:1gDpKI:LjSZuxpGaGdQPUPDd3rqZGx6BfQ"
## Reproduction Steps
```python
import requests
```
## System Information
$ python -m requests.help
```
python -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.3.1"
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "2.7.10"
},
"platform": {
"release": "17.7.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "20000000",
"version": "0.13.1"
},
"requests": {
"version": "2.20.0"
},
"system_ssl": {
"version": "20000000"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": true
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4843/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4843/timeline
| null |
completed
| null | null | false |
[
"if i try like this, i can see Expected Result\r\n\r\n`\r\nimport cookielib\r\nimport urllib2\r\n\r\ncookies = cookielib.LWPCookieJar()\r\nhandlers = [\r\n urllib2.HTTPHandler(),\r\n urllib2.HTTPSHandler(),\r\n urllib2.HTTPCookieProcessor(cookies)\r\n ]\r\nopener = urllib2.build_opener(*handlers)\r\n\r\ndef fetch(uri):\r\n req = urllib2.Request(uri)\r\n return opener.open(req)\r\n\r\ndef dump():\r\n for cookie in cookies:\r\n print cookie.name, cookie.value\r\n\r\nuri = 'https://i.instagram.com/api/v1/users/8748681962/info/'\r\nres = fetch(uri)\r\ndump()`\r\n\r\n\r\n`\r\ncsrftoken DmSQpBYsLLvDJDBn37qGzsYML0pNLSdz\r\nmcd 3\r\nmid W88LbQAEAAGwiOHOaLsBWlW5hhO-\r\nrur FRC\r\nurlgen \"{\\\"78.180.81.143\\\": 9121}:1gEvEL:dG2Yo8R-iIFx1GgExKUr74xtWuY\"\r\n`",
"Anybody ? ",
"Hi @gaplan, we haven’t had a chance yet to review this ticket. If you can please look at creating a test to demonstrate your issue with Requests code that will help expedite things.",
"Hello @nateprewitt Thank you for reply.\r\nIf I use Requests ;\r\n\r\ncode:\r\n`import requests\r\nr = requests.get('https://i.instagram.com/api/v1/users/8748681962/info/')\r\nkuki = r.cookies.get_dict()\r\nfor i in kuki:\r\n print i,kuki[i]`\r\n\r\nResponse : \r\n`csrftoken 0ckvyNUJ54UYBVV7os8DmsLF2NlBTWjr\r\nrur FTW\r\nmcd 3\r\nmid W8_OygAEAAEH_3MwkXUh_pM3O4Qp\r\nurlgen \"{78.180.81.143: 9121}:1gF8F0:fvj1GU2r17d3u7Ylo5c4rtDOU-k\"`\r\n\r\nbut if i use urllib2 for this link \r\n\r\nCode:\r\n`import cookielib\r\nimport urllib2\r\n\r\ncookies = cookielib.LWPCookieJar()\r\nhandlers = [\r\n urllib2.HTTPHandler(),\r\n urllib2.HTTPSHandler(),\r\n urllib2.HTTPCookieProcessor(cookies)\r\n ]\r\nopener = urllib2.build_opener(*handlers)\r\n\r\ndef fetch(uri):\r\n req = urllib2.Request(uri)\r\n return opener.open(req)\r\n\r\ndef dump():\r\n for cookie in cookies:\r\n print cookie.name, cookie.value\r\n print '*'*10\r\n\r\nuri = 'https://i.instagram.com/api/v1/users/8748681962/info/'\r\nres = fetch(uri)\r\ndump()\r\n`\r\n\r\nand response : \r\n`csrftoken BbvolUUXZ1ChLVu9v75NHdBiOZhzGLMG\r\nmcd 3\r\nmid W8_OyQAEAAHoH7b4DHRGrb4od9PR\r\nrur FRC\r\nurlgen \"{\\\"78.180.81.143\\\": 9121}:1gF8Ez:WSrOofW2qu5r4kwgjfs0f2STfKg\"\r\n`\r\n\r\n**please see the urlgen values**\r\n\r\n\r\n\r\n",
"still waiting...",
"@gaplan We don't have infinite time to help you with problems that don't seem to be caused by a bug in requests. This looks to be a problem with how the server generates the cookie value. We don't do any extra prasing here that would cause this."
] |
https://api.github.com/repos/psf/requests/issues/4842
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4842/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4842/comments
|
https://api.github.com/repos/psf/requests/issues/4842/events
|
https://github.com/psf/requests/issues/4842
| 372,482,456 |
MDU6SXNzdWUzNzI0ODI0NTY=
| 4,842 |
Using a `json.JSONDecoder` fails when simplejson is present
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/10698320?v=4",
"events_url": "https://api.github.com/users/ricellis/events{/privacy}",
"followers_url": "https://api.github.com/users/ricellis/followers",
"following_url": "https://api.github.com/users/ricellis/following{/other_user}",
"gists_url": "https://api.github.com/users/ricellis/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ricellis",
"id": 10698320,
"login": "ricellis",
"node_id": "MDQ6VXNlcjEwNjk4MzIw",
"organizations_url": "https://api.github.com/users/ricellis/orgs",
"received_events_url": "https://api.github.com/users/ricellis/received_events",
"repos_url": "https://api.github.com/users/ricellis/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ricellis/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ricellis/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ricellis",
"user_view_type": "public"
}
|
[
{
"color": "e102d8",
"default": false,
"description": null,
"id": 117745,
"name": "Planned",
"node_id": "MDU6TGFiZWwxMTc3NDU=",
"url": "https://api.github.com/repos/psf/requests/labels/Planned"
},
{
"color": "eb6420",
"default": false,
"description": null,
"id": 44501256,
"name": "Breaking API Change",
"node_id": "MDU6TGFiZWw0NDUwMTI1Ng==",
"url": "https://api.github.com/repos/psf/requests/labels/Breaking%20API%20Change"
}
] |
open
| false | null |
[] | null | 15 |
2018-10-22T11:27:25Z
|
2024-08-28T09:00:53Z
| null |
NONE
| null |
It appears that when `simplejson` is in the environment `requests` preferentially imports it. However, the arguments accepted by `JSONDecoder` are inconsistent between the standard library `json` and `simplejson` leading to errors when using the standard `json.JSONDecoder` when `simplejson` is in the environment.
[Your documentation for `response.json() `says](http://docs.python-requests.org/en/master/api/?highlight=json#requests.Response.json):
>Parameters: | **kwargs – Optional arguments that json.loads takes.
The [documentation for `json.loads`](https://docs.python.org/3.6/library/json.html#json.loads) says:
>`json.loads(s, *, encoding=None, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, **kw)`
and
>To use a custom JSONDecoder subclass, specify it with the cls kwarg; otherwise JSONDecoder is used. Additional keyword arguments will be passed to the constructor of the class.
I expected to be able to use a custom `json.JSONDecoder` without issue and indeed this works on Python 2.7, but in Python 3.7 it fails.
I can see that the issue of preferentially importing `simplejson` has been raised a few times e.g.
https://github.com/requests/requests/pull/2516
https://github.com/requests/requests/issues/3052
and that it is slated for removal in Requests 3, which I guess will resolve this issue.
If it is not possible to resolve this issue some other way in Requests 2.x then it would be nice if the documentation around `response.json()` was updated to make it clear that the arguments to `json.loads` could be either `simplejson.loads` or the standard lib `json.loads` depending on the environment since the preferential import is effectively undocumented and non-obvious.
## Expected Result
A successful JSON load when using `r.json(cls=json.JSONDecoder)`.
## Actual Result
```
print(r.json(cls=json.JSONDecoder))
File ".../python3.7/site-packages/requests/models.py", line 897, in json
return complexjson.loads(self.text, **kwargs)
File ".../python3.7/site-packages/simplejson/__init__.py", line 535, in loads
return cls(encoding=encoding, **kw).decode(s)
TypeError: __init__() got an unexpected keyword argument 'encoding'
```
## Reproduction Steps
```sh
pip install requests
pip install simplejson
```
```python
import json
import requests
r = requests.get('http://localhost:5984')
print(r.json(cls=json.JSONDecoder))
```
## System Information
**Note this issue does not occur in Python 2.7.x.**
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.7"
},
"implementation": {
"name": "CPython",
"version": "3.7.0"
},
"platform": {
"release": "18.0.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.20.0"
},
"system_ssl": {
"version": "1000210f"
},
"urllib3": {
"version": "1.24"
},
"using_pyopenssl": false
}
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 9,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 9,
"url": "https://api.github.com/repos/psf/requests/issues/4842/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4842/timeline
| null | null | null | null | false |
[
"Hi @ricellis, thanks for revisiting this. I don't believe we'll be seeing this removed in the near future until 3.0.0 is ready. If you'd like to make a small addendum to the documentation about this, we'd be happy to review it.",
"Thanks @nateprewitt I can update the docs, but would you be willing to accept a patch that protects people from the error if they are expecting to be using `json`, but `simplejson` happens to be present in the env (probably unbeknownst to them).\r\n\r\nFor example adding a check to `Response.json()` that uses the built-in json package if `cls` extends the built-in `json.decoder.JSONDecoder`. Something like this https://gist.github.com/ricellis/0690ebfc7f1a56df64df87c7a5251e77\r\n",
"Your proposed change breaks the deterministic behaviour of that function which is not ideal in the slightest. I don't think we can accept that.",
">breaks the deterministic behaviour of that function\r\n\r\nIt's annoying that the `json()` method could end up using a different module to what is used elsewhere, but that seems better than an error to me. It is deterministic though, the outputs are governed by the inputs and I think it only impacts the case that is currently broken:\r\n\r\n| `simplejson` | `cls` | current | proposal |\r\n| --- | --- | --- | --- |\r\nyes | extends `json.JSONDecoder` | **Error** | Decoded by `json` using `cls` |\r\nyes | None | Decoded by `simplejson` | Decoded by `simplejson` |\r\nno | extends `json.JSONDecoder` | Decoded by `json` using `cls` | Decoded by `json` using `cls` |\r\nno | None | Decoded by `json` | Decoded by `json`|\r\n\r\n>not ideal in the slightest\r\n\r\nIt was just a first stab at something that might work and I was trying to contain the change to just the specific area of the problem.\r\n\r\nI agree it is not the cleanest thing to do, but neither is swapping the JSON module with an API incompatible one. That's where this issue is different from the others that have been reported previously around the preferential import - this has identified a place where `simplejson` and `json` are not API compatible yet `requests` exposes that API to the end user through the `Response.json()` kwargs.\r\n\r\nThat in itself might not be a problem when the `requests` caller is also in control of the module environment. As you can see from our linked issue though the problem for us comes when a user of our library includes another module that itself has a dependency on `simplejson`. We are using the `requests` API in good faith, but it is broken by a transitive dependency over which we have no control. I think the discussion around `simplejson` that has preceded this issue didn't have to account for that.\r\n\r\nPerhaps someone can think of a better option than my proposal or maybe an option to disable the `simplejson` preferential import could be revisited in light of this particular scenario?\r\n\r\nOr if you're not interested in fixing 2.x at all then just say so and I'll submit a docs patch and spend my time implementing a workaround in our library instead.\r\n",
"@nateprewitt @sigmavirus24 any thoughts on this ^?",
"Simplejson is slower than stdlib json implementation in python 3, why don't you want to allow to override the default behavior at least?",
"I ran into this problem when we added a third-party library that had a transitive dependency on `simplejson`. That consequently broke all of our error handling, because `requests` now started throwing `simplejson.errors.JSONDecodeError` instead of `json.JSONDecodeError` that we had catches for. Judging from the referenced issues above, more users are affected.",
"Having the same issue as the user above. `requests` should just be using one or the another. Using either or conditionally only creates confusion.",
"Any update :)? ",
"I came here because berserk uses request, and this issue comes up. Can you plz give a sttatus update?",
"See also https://github.com/psf/requests/issues/3052",
"Our team has run into a similar issue, where we have simplejson installed but we want to use a custom json encoder class in the prepare_body method which now fails",
"Hi @krystofernewman, it doesn't sound like your issue is related to this one directly. We're specifically discussing simplejson's impact on `Response.json()`. There are likely similar issues on the `json` Request argument but that's a topic that would be handled separately.\r\n\r\n`simplejson` support was added in a very different time (almost a decade ago) but has been the default for the majority of the library's life. We agreed some time ago that a documentation update noting this would be accepted but cannot change the behavior until a major version bump.",
"@nateprewitt gotcha thanks for the response, I can open a separate issue for the impact of simplejson on the encoding of the request's body preparation if that works",
"Another incompatible change in simplejson: https://github.com/simplejson/simplejson/issues/324 (eg.: by adding a `allow_nan` parameter and defaulting it to False in the decoder)"
] |
https://api.github.com/repos/psf/requests/issues/4841
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4841/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4841/comments
|
https://api.github.com/repos/psf/requests/issues/4841/events
|
https://github.com/psf/requests/issues/4841
| 372,360,567 |
MDU6SXNzdWUzNzIzNjA1Njc=
| 4,841 |
requests.post doesn't close connection (Failed to establish a new connection: [Errno 99] Cannot assign requested address)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1065738?v=4",
"events_url": "https://api.github.com/users/lega911/events{/privacy}",
"followers_url": "https://api.github.com/users/lega911/followers",
"following_url": "https://api.github.com/users/lega911/following{/other_user}",
"gists_url": "https://api.github.com/users/lega911/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lega911",
"id": 1065738,
"login": "lega911",
"node_id": "MDQ6VXNlcjEwNjU3Mzg=",
"organizations_url": "https://api.github.com/users/lega911/orgs",
"received_events_url": "https://api.github.com/users/lega911/received_events",
"repos_url": "https://api.github.com/users/lega911/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lega911/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lega911/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lega911",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-10-21T21:48:00Z
|
2021-09-06T00:06:31Z
|
2018-10-21T22:01:40Z
|
NONE
|
resolved
|
requests.post in loop creates new connection every time and doesn't close it, after 30sec it throw exception:
```python
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=30100): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f4ee5
043c18>: Failed to establish a new connection: [Errno 99] Cannot assign requested address'))
```
## Expected Result
I expect requests.post closes connection on finish (or at least reuse old connection), instead a server supports keep-alive, so server left connection and requests doesn't disconnect, it it's ok for session, but for 1 request connection should be close, anyway requests doesn't use that (old) opened connection.
## Actual Result
requests.post throws exception
## Reproduction Steps
Client (2.py):
```python
import requests
for i in range(100000):
r = requests.post('http://127.0.0.1:30100/', data=b'Hi')
```
Server:
```python
import asyncio
from aiohttp import web
async def handle(request):
return web.Response(text='OK', status=200)
app = web.Application()
app.router.add_route('*', '/{tail:.*}', handle)
web.run_app(app, host='0.0.0.0', port=30100)
```
I start a few copies: ` python3.7 2.py & python3.7 2.py & python3.7 2.py & python3.7 2.py &`
## Info
If I use `headers={"Connection": "close"}`, it works without problems
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.7.0"
},
"platform": {
"release": "4.15.0-36-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.20.0"
},
"system_ssl": {
"version": "1000207f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}
```
## Traceback
```python
r = requests.post('http://127.0.0.1:30100/', data=b'Hi')
File "/home/lega/.local/lib/python3.7/site-packages/requests/api.py", line 116, in post
return request('post', url, data=data, json=json, **kwargs)
File "/home/lega/.local/lib/python3.7/site-packages/requests/api.py", line 60, in request
conn.request(method, url, **httplib_request_kw)
File "/usr/local/lib/python3.7/http/client.py", line 1229, in request
return session.request(method=method, url=url, **kwargs)
File "/home/lega/.local/lib/python3.7/site-packages/requests/sessions.py", line 524, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.7/http/client.py", line 1275, in _send_request
resp = self.send(prep, **send_kwargs)
File "/home/lega/.local/lib/python3.7/site-packages/requests/sessions.py", line 637, in send
self._send_request(method, url, body, headers, encode_chunked)
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.7/http/client.py", line 1275, in _send_request
File "/home/lega/.local/lib/python3.7/site-packages/requests/adapters.py", line 516, in send
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.7/http/client.py", line 1224, in endheaders
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=30100): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f4ee5
043c18>: Failed to establish a new connection: [Errno 99] Cannot assign requested address'))
```
|
{
"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/4841/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4841/timeline
| null |
completed
| null | null | false |
[
"Hi @Lega911, you want to use a `Session` if you’re trying to reuse connections. The semantics of a request call implies you want a new connection.\r\n\r\nYou can find full information in the docs.",
"Working with a session solves many problems during heavy load."
] |
https://api.github.com/repos/psf/requests/issues/4840
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4840/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4840/comments
|
https://api.github.com/repos/psf/requests/issues/4840/events
|
https://github.com/psf/requests/issues/4840
| 372,273,689 |
MDU6SXNzdWUzNzIyNzM2ODk=
| 4,840 |
certificate verify failed
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/16998719?v=4",
"events_url": "https://api.github.com/users/BigFishhhh/events{/privacy}",
"followers_url": "https://api.github.com/users/BigFishhhh/followers",
"following_url": "https://api.github.com/users/BigFishhhh/following{/other_user}",
"gists_url": "https://api.github.com/users/BigFishhhh/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/BigFishhhh",
"id": 16998719,
"login": "BigFishhhh",
"node_id": "MDQ6VXNlcjE2OTk4NzE5",
"organizations_url": "https://api.github.com/users/BigFishhhh/orgs",
"received_events_url": "https://api.github.com/users/BigFishhhh/received_events",
"repos_url": "https://api.github.com/users/BigFishhhh/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/BigFishhhh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/BigFishhhh/subscriptions",
"type": "User",
"url": "https://api.github.com/users/BigFishhhh",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-10-21T02:55:32Z
|
2021-09-07T00:06:09Z
|
2018-10-21T12:42:03Z
|
NONE
|
resolved
|
Caused by SSLError(SSLError(1, '_ssl.c:510: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed'
In my code, i used verify=False,why
|
{
"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/4840/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4840/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/4839
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4839/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4839/comments
|
https://api.github.com/repos/psf/requests/issues/4839/events
|
https://github.com/psf/requests/pull/4839
| 372,256,537 |
MDExOlB1bGxSZXF1ZXN0MjI0NTAzNzc2
| 4,839 |
Reverting redirect examples back to intended URLs
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/6011419?v=4",
"events_url": "https://api.github.com/users/rabdill/events{/privacy}",
"followers_url": "https://api.github.com/users/rabdill/followers",
"following_url": "https://api.github.com/users/rabdill/following{/other_user}",
"gists_url": "https://api.github.com/users/rabdill/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rabdill",
"id": 6011419,
"login": "rabdill",
"node_id": "MDQ6VXNlcjYwMTE0MTk=",
"organizations_url": "https://api.github.com/users/rabdill/orgs",
"received_events_url": "https://api.github.com/users/rabdill/received_events",
"repos_url": "https://api.github.com/users/rabdill/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rabdill/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rabdill/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rabdill",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2018-10-20T21:56:10Z
|
2021-09-01T00:11:50Z
|
2018-10-20T23:36:10Z
|
CONTRIBUTOR
|
resolved
|
A find/replace from a few weeks ago made the redirection sample not demonstrate redirection anymore
|
{
"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/4839/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4839/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4839.diff",
"html_url": "https://github.com/psf/requests/pull/4839",
"merged_at": "2018-10-20T23:36:10Z",
"patch_url": "https://github.com/psf/requests/pull/4839.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4839"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4839?src=pr&el=h1) Report\n> Merging [#4839](https://codecov.io/gh/requests/requests/pull/4839?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/d2962f1d55a211a4606d8387b6333de7a21e630d?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4839?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4839 +/- ##\n=======================================\n Coverage 66.79% 66.79% \n=======================================\n Files 15 15 \n Lines 1572 1572 \n=======================================\n Hits 1050 1050 \n Misses 522 522\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4839?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4839?src=pr&el=footer). Last update [d2962f1...5fdc25b](https://codecov.io/gh/requests/requests/pull/4839?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"Good spot, thanks @rabdill!",
"My pleasure @nateprewitt, thanks for helping maintain this project. Much appreciated."
] |
https://api.github.com/repos/psf/requests/issues/4838
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4838/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4838/comments
|
https://api.github.com/repos/psf/requests/issues/4838/events
|
https://github.com/psf/requests/pull/4838
| 372,231,622 |
MDExOlB1bGxSZXF1ZXN0MjI0NDg3Mzgx
| 4,838 |
Fixed sending objects with no .read and with length
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/7489847?v=4",
"events_url": "https://api.github.com/users/tzickel/events{/privacy}",
"followers_url": "https://api.github.com/users/tzickel/followers",
"following_url": "https://api.github.com/users/tzickel/following{/other_user}",
"gists_url": "https://api.github.com/users/tzickel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tzickel",
"id": 7489847,
"login": "tzickel",
"node_id": "MDQ6VXNlcjc0ODk4NDc=",
"organizations_url": "https://api.github.com/users/tzickel/orgs",
"received_events_url": "https://api.github.com/users/tzickel/received_events",
"repos_url": "https://api.github.com/users/tzickel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tzickel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tzickel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tzickel",
"user_view_type": "public"
}
|
[
{
"color": "e11d21",
"default": false,
"description": null,
"id": 78002701,
"name": "Do Not Merge",
"node_id": "MDU6TGFiZWw3ODAwMjcwMQ==",
"url": "https://api.github.com/repos/psf/requests/labels/Do%20Not%20Merge"
}
] |
closed
| true | null |
[] | null | 6 |
2018-10-20T17:01:18Z
|
2021-08-31T00:07:24Z
|
2019-02-14T14:16:53Z
|
NONE
|
resolved
|
This is a bug fix, because sending such an object currently will cause an exception:
```python
File "test.py", line 81, in client
r = session.post(url, data=DataWithoutLength(a)).text
File "/Users/icebreak/source/requestssux/requests/requests/sessions.py", line 572, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/Users/icebreak/source/requestssux/requests/requests/sessions.py", line 524, in request
resp = self.send(prep, **send_kwargs)
File "/Users/icebreak/source/requestssux/requests/requests/sessions.py", line 637, in send
r = adapter.send(request, **kwargs)
File "/Users/icebreak/source/requestssux/requests/requests/adapters.py", line 449, in send
timeout=timeout
File "/Users/icebreak/source/requestssux/.venv2/lib/python2.7/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/Users/icebreak/source/requestssux/.venv2/lib/python2.7/site-packages/urllib3/connectionpool.py", line 354, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/Users/icebreak/miniconda2/lib/python2.7/httplib.py", line 1042, in request
self._send_request(method, url, body, headers)
File "/Users/icebreak/miniconda2/lib/python2.7/httplib.py", line 1082, in _send_request
self.endheaders(body)
File "/Users/icebreak/miniconda2/lib/python2.7/httplib.py", line 1038, in endheaders
self._send_output(message_body)
File "/Users/icebreak/miniconda2/lib/python2.7/httplib.py", line 886, in _send_output
self.send(message_body)
File "/Users/icebreak/miniconda2/lib/python2.7/httplib.py", line 858, in send
self.sock.sendall(data)
File "/Users/icebreak/miniconda2/lib/python2.7/socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
TypeError: sendall() argument 1 must be convertible to a buffer, not DataWithoutLength
```
The patch makes sure that it will only fix this specific instance.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/3725578?v=4",
"events_url": "https://api.github.com/users/Projjol-zz/events{/privacy}",
"followers_url": "https://api.github.com/users/Projjol-zz/followers",
"following_url": "https://api.github.com/users/Projjol-zz/following{/other_user}",
"gists_url": "https://api.github.com/users/Projjol-zz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Projjol-zz",
"id": 3725578,
"login": "Projjol-zz",
"node_id": "MDQ6VXNlcjM3MjU1Nzg=",
"organizations_url": "https://api.github.com/users/Projjol-zz/orgs",
"received_events_url": "https://api.github.com/users/Projjol-zz/received_events",
"repos_url": "https://api.github.com/users/Projjol-zz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Projjol-zz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Projjol-zz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Projjol-zz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4838/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4838/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4838.diff",
"html_url": "https://github.com/psf/requests/pull/4838",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4838.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4838"
}
| true |
[
"I believe the correct, backwards-compatible, and feature-intended behaviour is to raise a different exception that we can not and will not handle the body",
"Hi @tzickel,\r\n\r\nIf you read the [documentation](http://docs.python-requests.org/en/master/user/quickstart/#more-complicated-post-requests) and the docstrings for the post method, you can see we support the following:\r\n> :param data: (optional) Dictionary, list of tuples, bytes, or file-like object to send in the body of the :class:`Request`.\r\n\r\nYou can find the definition of file-like [here](https://docs.python.org/3/glossary.html#term-file-object).\r\n\r\nWe will have the same problem on most of our interfaces when supplied objects not meeting the expected input criteria. We could also implement a custom `Header` class, but if it doesn't conform to the mapping interface, it's unlikely to work as expected.\r\n\r\nI believe you'll find if you replace your test case with the minimum of implementing `IOBase` from the `io` module that it fixes the error you're encountering. While @sigmavirus24 is right that we could implement exception handling, I think it's a bit of a slippery slope to start adding exact type checking to every API entry. \r\n\r\n\r\nThis is the test code I used:\r\n<details>\r\n\r\n```python\r\nclass TestIteratorWithLength(io.IOBase):\r\n def __init__(self, data):\r\n self.data = data.encode()\r\n self.length = len(self.data)\r\n self.itersize = 2**20\r\n\r\n def __len__(self):\r\n return self.length\r\n\r\n def __iter__(self):\r\n return self\r\n\r\n def __next__(self):\r\n if self.data:\r\n ret = self.data[:self.itersize]\r\n self.data = self.data[self.itersize:]\r\n return ret\r\n else:\r\n raise StopIteration()\r\n\r\n next = __next__\r\n\r\ntest = TestIteratorWithLength('test')\r\n\r\nr = requests.post('https://httpbin.org/post', data=test)\r\nprint(r.json())\r\n```\r\n\r\n</details>\r\n",
"@nateprewitt The issue with file object is described here:\r\nhttps://github.com/requests/requests/issues/4837\r\nmainly, it's a performance hog both I/o and memory allocation, since it will call .read with 8192 blocks instead of iterating and getting how much data it can (currently i'm streaming the data in 64MB chunks....).\r\n\r\nAlso seems pretty arbitrary to support \\_\\_iter__ without length, but not support it with...",
"Hmm.... this is an issue only in python2 (and maybe old python 3 versions)... newer python http handling can bypass this requests limitation, I still think requests should act the same...",
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4838?src=pr&el=h1) Report\n> Merging [#4838](https://codecov.io/gh/requests/requests/pull/4838?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/d2962f1d55a211a4606d8387b6333de7a21e630d?src=pr&el=desc) will **increase** coverage by `0.16%`.\n> The diff coverage is `93.33%`.\n\n[](https://codecov.io/gh/requests/requests/pull/4838?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4838 +/- ##\n==========================================\n+ Coverage 66.79% 66.96% +0.16% \n==========================================\n Files 15 15 \n Lines 1572 1580 +8 \n==========================================\n+ Hits 1050 1058 +8 \n Misses 522 522\n```\n\n\n| [Impacted Files](https://codecov.io/gh/requests/requests/pull/4838?src=pr&el=tree) | Coverage Δ | |\n|---|---|---|\n| [requests/adapters.py](https://codecov.io/gh/requests/requests/pull/4838/diff?src=pr&el=tree#diff-cmVxdWVzdHMvYWRhcHRlcnMucHk=) | `71.3% <93.33%> (+1.03%)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4838?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4838?src=pr&el=footer). Last update [d2962f1...828d179](https://codecov.io/gh/requests/requests/pull/4838?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"Closing due to inactivity and label"
] |
https://api.github.com/repos/psf/requests/issues/4837
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4837/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4837/comments
|
https://api.github.com/repos/psf/requests/issues/4837/events
|
https://github.com/psf/requests/issues/4837
| 372,071,757 |
MDU6SXNzdWUzNzIwNzE3NTc=
| 4,837 |
Requests does not let me send an iterable object as a data with known size
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/7489847?v=4",
"events_url": "https://api.github.com/users/tzickel/events{/privacy}",
"followers_url": "https://api.github.com/users/tzickel/followers",
"following_url": "https://api.github.com/users/tzickel/following{/other_user}",
"gists_url": "https://api.github.com/users/tzickel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tzickel",
"id": 7489847,
"login": "tzickel",
"node_id": "MDQ6VXNlcjc0ODk4NDc=",
"organizations_url": "https://api.github.com/users/tzickel/orgs",
"received_events_url": "https://api.github.com/users/tzickel/received_events",
"repos_url": "https://api.github.com/users/tzickel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tzickel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tzickel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tzickel",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2018-10-19T18:41:02Z
|
2021-09-07T00:06:09Z
|
2018-10-20T11:28:47Z
|
NONE
|
resolved
|
I am sending huge amounts of data in a request via a POST (gigabytes) where I know the data length, and would like to send it to the other side in the http headers (so it can do some optimization on allocation).
Since this data it generated itself via a stream (in chunks of lots of megabytes each), I am implementing my own class that I send to the data parameter.
My options today are (all bad):
A. Don't implement a \_\_len__/len, and implement \_\_Iter__, this way I can control how much data is send per iteration (I can even send it all in one shot), but the data is sent as chunked and the other side doesn't know how big the request is.
B. Implement \_\_len__/len, but then I need to implement read, which defaults to 8196 size reads (because of httplib) which I have to fake and return more (since 8196 kills performance).
C. Use toolbelt's StreamingIterator which returns to the performance issues of B (it implements read).
A side issue as well, I don't understand why a class with \_\_len__/len and read, needs to modify \_\_len__/len to what is left after read if it's passed as a files (multipart) parameter, but not if it's sent as a data parameter (confusing).
## Expected Result
I should be able to send a object with a known length, and only \_\_iter__ implemented so it won't be limited to 8192 cases in B, and C above.
|
{
"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/4837/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4837/timeline
| null |
completed
| null | null | false |
[
"This is effectively a feature request if I'm understanding correctly. You may have noticed there was a template for that which explicitly tells you that this project is under a feature freeze. That means that our default response to all new feature requests is \"No\".",
"I think it's a bug if I send an object with both len and __iter__ (and no read) and it throws an error...",
"Except we explicity document the behaviour of having `__iter__` defined regardless of `len`. This is also your first mention of it throwing an error. Regardless, nothing claims to support the behaviour you're proposing which in turn makes it a feature request"
] |
https://api.github.com/repos/psf/requests/issues/4836
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4836/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4836/comments
|
https://api.github.com/repos/psf/requests/issues/4836/events
|
https://github.com/psf/requests/pull/4836
| 371,218,896 |
MDExOlB1bGxSZXF1ZXN0MjIzNzE1NTI0
| 4,836 |
Allow urllib3 1.24
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/9677399?v=4",
"events_url": "https://api.github.com/users/ofek/events{/privacy}",
"followers_url": "https://api.github.com/users/ofek/followers",
"following_url": "https://api.github.com/users/ofek/following{/other_user}",
"gists_url": "https://api.github.com/users/ofek/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ofek",
"id": 9677399,
"login": "ofek",
"node_id": "MDQ6VXNlcjk2NzczOTk=",
"organizations_url": "https://api.github.com/users/ofek/orgs",
"received_events_url": "https://api.github.com/users/ofek/received_events",
"repos_url": "https://api.github.com/users/ofek/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ofek/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ofek/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ofek",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-10-17T18:51:36Z
|
2021-09-01T00:11:51Z
|
2018-10-17T19:08:49Z
|
CONTRIBUTOR
|
resolved
|
A new version of has been released. Most notably it ships https://github.com/urllib3/urllib3/pull/1346
That, plus https://github.com/requests/requests/pull/4718 on our side will resolve https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-18074. We just need to release after merging this.
cc @sigmavirus24 @nateprewitt
|
{
"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/4836/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4836/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4836.diff",
"html_url": "https://github.com/psf/requests/pull/4836",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4836.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4836"
}
| true |
[
"Hi @ofek, we’ve got comms available in #4830 and the patch for 2.20 is staged in #4835."
] |
https://api.github.com/repos/psf/requests/issues/4835
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4835/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4835/comments
|
https://api.github.com/repos/psf/requests/issues/4835/events
|
https://github.com/psf/requests/pull/4835
| 371,149,294 |
MDExOlB1bGxSZXF1ZXN0MjIzNjYwNzA0
| 4,835 |
v2.20.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 | 2 |
2018-10-17T15:55:17Z
|
2021-09-01T00:11:50Z
|
2018-10-18T15:44:50Z
|
MEMBER
|
resolved
|
2.20.0 (2018-10-??)
-------------------
**Bugfixes**
- Content-Type header parsing is now case-insensitive (e.g.
charset=utf8 v Charset=utf8).
- Fixed exception leak where certain redirect urls would raise
uncaught urllib3 exceptions.
- Requests removes Authorization headers from requests redirected
from https to http on the same hostname. (CVE-2018-18074)
- `should_bypass_proxies` now handles URIs without hostnames, e.g. files.
**Dependencies**
- We now support urllib3 v1.24.
**Deprecations**
- Requests has officially stopped support for Python 2.6.
|
{
"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": 2,
"laugh": 0,
"rocket": 0,
"total_count": 3,
"url": "https://api.github.com/repos/psf/requests/issues/4835/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4835/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4835.diff",
"html_url": "https://github.com/psf/requests/pull/4835",
"merged_at": "2018-10-18T15:44:50Z",
"patch_url": "https://github.com/psf/requests/pull/4835.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4835"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4835?src=pr&el=h1) Report\n> Merging [#4835](https://codecov.io/gh/requests/requests/pull/4835?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/2c6a8426aebd853966747f2c851f551c583cb21a?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `80%`.\n\n[](https://codecov.io/gh/requests/requests/pull/4835?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4835 +/- ##\n=======================================\n Coverage 66.79% 66.79% \n=======================================\n Files 15 15 \n Lines 1572 1572 \n=======================================\n Hits 1050 1050 \n Misses 522 522\n```\n\n\n| [Impacted Files](https://codecov.io/gh/requests/requests/pull/4835?src=pr&el=tree) | Coverage Δ | |\n|---|---|---|\n| [requests/auth.py](https://codecov.io/gh/requests/requests/pull/4835/diff?src=pr&el=tree#diff-cmVxdWVzdHMvYXV0aC5weQ==) | `68.96% <ø> (ø)` | :arrow_up: |\n| [requests/\\_\\_version\\_\\_.py](https://codecov.io/gh/requests/requests/pull/4835/diff?src=pr&el=tree#diff-cmVxdWVzdHMvX192ZXJzaW9uX18ucHk=) | `0% <0%> (ø)` | :arrow_up: |\n| [requests/sessions.py](https://codecov.io/gh/requests/requests/pull/4835/diff?src=pr&el=tree#diff-cmVxdWVzdHMvc2Vzc2lvbnMucHk=) | `76.34% <100%> (ø)` | :arrow_up: |\n| [requests/cookies.py](https://codecov.io/gh/requests/requests/pull/4835/diff?src=pr&el=tree#diff-cmVxdWVzdHMvY29va2llcy5weQ==) | `51.68% <100%> (ø)` | :arrow_up: |\n| [requests/hooks.py](https://codecov.io/gh/requests/requests/pull/4835/diff?src=pr&el=tree#diff-cmVxdWVzdHMvaG9va3MucHk=) | `73.33% <100%> (ø)` | :arrow_up: |\n| [requests/models.py](https://codecov.io/gh/requests/requests/pull/4835/diff?src=pr&el=tree#diff-cmVxdWVzdHMvbW9kZWxzLnB5) | `77.35% <100%> (ø)` | :arrow_up: |\n| [requests/adapters.py](https://codecov.io/gh/requests/requests/pull/4835/diff?src=pr&el=tree#diff-cmVxdWVzdHMvYWRhcHRlcnMucHk=) | `70.27% <100%> (ø)` | :arrow_up: |\n| [requests/help.py](https://codecov.io/gh/requests/requests/pull/4835/diff?src=pr&el=tree#diff-cmVxdWVzdHMvaGVscC5weQ==) | `68.62% <100%> (ø)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4835?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4835?src=pr&el=footer). Last update [2c6a842...bd84045](https://codecov.io/gh/requests/requests/pull/4835?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"🛬Landing."
] |
https://api.github.com/repos/psf/requests/issues/4834
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4834/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4834/comments
|
https://api.github.com/repos/psf/requests/issues/4834/events
|
https://github.com/psf/requests/pull/4834
| 371,011,257 |
MDExOlB1bGxSZXF1ZXN0MjIzNTU0Mjc2
| 4,834 |
Allow urllib3 1.24
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/7973460?v=4",
"events_url": "https://api.github.com/users/AymericDu/events{/privacy}",
"followers_url": "https://api.github.com/users/AymericDu/followers",
"following_url": "https://api.github.com/users/AymericDu/following{/other_user}",
"gists_url": "https://api.github.com/users/AymericDu/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/AymericDu",
"id": 7973460,
"login": "AymericDu",
"node_id": "MDQ6VXNlcjc5NzM0NjA=",
"organizations_url": "https://api.github.com/users/AymericDu/orgs",
"received_events_url": "https://api.github.com/users/AymericDu/received_events",
"repos_url": "https://api.github.com/users/AymericDu/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/AymericDu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/AymericDu/subscriptions",
"type": "User",
"url": "https://api.github.com/users/AymericDu",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-10-17T10:45:50Z
|
2021-08-29T00:07:01Z
|
2018-10-17T13:45:08Z
|
NONE
|
resolved
|
Changelog: https://github.com/urllib3/urllib3/blob/1.24/CHANGES.rst#124-2018-10-16
|
{
"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/4834/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4834/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4834.diff",
"html_url": "https://github.com/psf/requests/pull/4834",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4834.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4834"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4834?src=pr&el=h1) Report\n> Merging [#4834](https://codecov.io/gh/requests/requests/pull/4834?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/2c6a8426aebd853966747f2c851f551c583cb21a?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4834?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4834 +/- ##\n=======================================\n Coverage 66.79% 66.79% \n=======================================\n Files 15 15 \n Lines 1572 1572 \n=======================================\n Hits 1050 1050 \n Misses 522 522\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4834?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4834?src=pr&el=footer). Last update [2c6a842...4b5b118](https://codecov.io/gh/requests/requests/pull/4834?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"Hi @AymericDu, thanks for contributing to Requests. We're aware of the 1.24 release and have an announcement up in the issues detailing next steps. Once we've been able to vet the release, we'll be pushing a new version of Requests with the pin move. Thanks for your patience."
] |
https://api.github.com/repos/psf/requests/issues/4833
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4833/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4833/comments
|
https://api.github.com/repos/psf/requests/issues/4833/events
|
https://github.com/psf/requests/issues/4833
| 370,965,521 |
MDU6SXNzdWUzNzA5NjU1MjE=
| 4,833 |
Running prepare_headers on PreparedRequest break it
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2325687?v=4",
"events_url": "https://api.github.com/users/mlubimow/events{/privacy}",
"followers_url": "https://api.github.com/users/mlubimow/followers",
"following_url": "https://api.github.com/users/mlubimow/following{/other_user}",
"gists_url": "https://api.github.com/users/mlubimow/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mlubimow",
"id": 2325687,
"login": "mlubimow",
"node_id": "MDQ6VXNlcjIzMjU2ODc=",
"organizations_url": "https://api.github.com/users/mlubimow/orgs",
"received_events_url": "https://api.github.com/users/mlubimow/received_events",
"repos_url": "https://api.github.com/users/mlubimow/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mlubimow/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mlubimow/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mlubimow",
"user_view_type": "public"
}
|
[
{
"color": "02e10c",
"default": false,
"description": null,
"id": 76800,
"name": "Feature Request",
"node_id": "MDU6TGFiZWw3NjgwMA==",
"url": "https://api.github.com/repos/psf/requests/labels/Feature%20Request"
},
{
"color": "f7c6c7",
"default": false,
"description": null,
"id": 167537670,
"name": "Propose Close",
"node_id": "MDU6TGFiZWwxNjc1Mzc2NzA=",
"url": "https://api.github.com/repos/psf/requests/labels/Propose%20Close"
}
] |
open
| false | null |
[] | null | 5 |
2018-10-17T08:53:15Z
|
2018-10-29T12:38:54Z
| null |
NONE
| null |
After calling prepare() on a request, PreparedRequest object is returned. If its a PATCH request (GET is working as expected), and prepare_headers is called, it's not possible to send this request.
## Expected Result
Headers should be added to a prepared request and it should be possible to send it later.
## Actual Result
An exception is thrown:
```
Traceback (most recent call last):
File "r.py", line 7, in <module>
s.send(r)
File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 622, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 466, in send
low_conn.send(hex(len(i))[2:].encode('utf-8'))
TypeError: object of type 'int' has no len()
```
## Reproduction Steps
```python
import requests
r = requests.Request('PATCH', 'http://domain.com/objects/32', json={'name': 'new name'})
r = r.prepare()
s = requests.Session()
r.prepare_headers({'Authorization': 'Token 123'})
s.send(r)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.7"
},
"implementation": {
"name": "CPython",
"version": "3.6.6"
},
"platform": {
"release": "4.9.87-linuxkit-aufs",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.19.1"
},
"system_ssl": {
"version": "1010006f"
},
"urllib3": {
"version": "1.23"
},
"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/4833/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4833/timeline
| null | null | null | null | false |
[
"The error occurs while `HTTPAdapter::send` method tries to read the length of `request.body`.",
"@mlubinmow what do you think should be happening here? I'm not convinced this is a bug in Requests but rather in using undocumented methods.\r\n\r\nSpecifically http://docs.python-requests.org/en/master/user/advanced/?highlight=PreparedRequest#prepared-requests tells you how you're expected to interact with PreparedRequests and makes no guarantees about the `prepare_*` methods on the object.",
"@sigmavirus24 I disagree, function is listed in Devs interface and is inconsistent, as it works for GET request. I would expect it to.. just work ;) As mentioned in an issue.\r\n\r\nhttp://docs.python-requests.org/en/master/api/#lower-lower-level-classes",
"@mlubimow just because something is included in auto-generated documentation doesn't mean it just magically works as you expect it to.",
"To be clearer, the documentation I linked to explains how to actually work with the prepared request flow. If something happens to work in one case when you do something the system wasn't designed for, it doesn't mean it must work in a different case."
] |
https://api.github.com/repos/psf/requests/issues/4832
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4832/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4832/comments
|
https://api.github.com/repos/psf/requests/issues/4832/events
|
https://github.com/psf/requests/pull/4832
| 370,957,275 |
MDExOlB1bGxSZXF1ZXN0MjIzNTEyNDEx
| 4,832 |
Use default OrderedDict from collection module
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/671619?v=4",
"events_url": "https://api.github.com/users/tyzhnenko/events{/privacy}",
"followers_url": "https://api.github.com/users/tyzhnenko/followers",
"following_url": "https://api.github.com/users/tyzhnenko/following{/other_user}",
"gists_url": "https://api.github.com/users/tyzhnenko/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tyzhnenko",
"id": 671619,
"login": "tyzhnenko",
"node_id": "MDQ6VXNlcjY3MTYxOQ==",
"organizations_url": "https://api.github.com/users/tyzhnenko/orgs",
"received_events_url": "https://api.github.com/users/tyzhnenko/received_events",
"repos_url": "https://api.github.com/users/tyzhnenko/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tyzhnenko/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tyzhnenko/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tyzhnenko",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-10-17T08:33:05Z
|
2021-09-01T00:11:52Z
|
2018-10-17T08:36:17Z
|
NONE
|
resolved
|
Due urllib3 doesn't contain OrderedDict implementation in 1.24 version
requests should use default implementation OrderedDict
|
{
"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/4832/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4832/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4832.diff",
"html_url": "https://github.com/psf/requests/pull/4832",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4832.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4832"
}
| true |
[
"Hi @tyzhnenko, we’ve already addressed this in a couple places now. Please make sure to check the open and closed PRs/Issues before submitting a new one. Thanks!"
] |
https://api.github.com/repos/psf/requests/issues/4831
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4831/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4831/comments
|
https://api.github.com/repos/psf/requests/issues/4831/events
|
https://github.com/psf/requests/pull/4831
| 370,955,313 |
MDExOlB1bGxSZXF1ZXN0MjIzNTEwOTAy
| 4,831 |
Use default OrderedDict from collection module
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/671619?v=4",
"events_url": "https://api.github.com/users/tyzhnenko/events{/privacy}",
"followers_url": "https://api.github.com/users/tyzhnenko/followers",
"following_url": "https://api.github.com/users/tyzhnenko/following{/other_user}",
"gists_url": "https://api.github.com/users/tyzhnenko/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tyzhnenko",
"id": 671619,
"login": "tyzhnenko",
"node_id": "MDQ6VXNlcjY3MTYxOQ==",
"organizations_url": "https://api.github.com/users/tyzhnenko/orgs",
"received_events_url": "https://api.github.com/users/tyzhnenko/received_events",
"repos_url": "https://api.github.com/users/tyzhnenko/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tyzhnenko/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tyzhnenko/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tyzhnenko",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2018-10-17T08:27:56Z
|
2021-09-01T00:11:52Z
|
2018-10-17T08:41:29Z
|
NONE
|
resolved
|
Due urllib3 doesn't contain OrderedDict implementation in 1.24 version
requests should use default implementation OrderedDict
|
{
"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/4831/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4831/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4831.diff",
"html_url": "https://github.com/psf/requests/pull/4831",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4831.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4831"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/4830
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4830/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4830/comments
|
https://api.github.com/repos/psf/requests/issues/4830/events
|
https://github.com/psf/requests/issues/4830
| 370,872,496 |
MDU6SXNzdWUzNzA4NzI0OTY=
| 4,830 |
Urllib3 1.24
|
{
"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 | 11 |
2018-10-17T02:30:09Z
|
2021-09-07T00:06:09Z
|
2018-10-19T17:05:04Z
|
MEMBER
|
resolved
|
Urllib3 released a new version today which has some breaking changes for Python 2.6. While we work out any other possible incompatibilities Requests will remain compatible with urllib3 1.21.1 to 1.23 for the next week.
If you’re experiencing issues due to pip’s dependency resolution, you will need to pin ˋurllib3==1.23` in your package requirements.
|
{
"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": 10,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 10,
"url": "https://api.github.com/repos/psf/requests/issues/4830/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4830/timeline
| null |
completed
| null | null | false |
[
"same problem with python 3.6 and urllib3 1.24 : \r\n/usr/lib/python3.6/site-packages/requests/__init__.py:91: RequestsDependencyWarn ing: urllib3 (1.24) or chardet (3.0.4) doesn't match a supported version!\r\n RequestsDependencyWarning)\r\n\r\nOnly warning don't block my program",
"Same issue here, with this message during `pip install` : \r\n\r\n requests 2.19.1 has requirement urllib3<1.24,>=1.21.1, but you'll have urllib3 1.24 which is incompatible.\r\n\r\nand this error at execution time :\r\n```\r\n/usr/lib/python2.7/site-packages/gitlab/__init__.py:29: in <module>\r\n import requests\r\n/usr/lib/python2.7/site-packages/requests/__init__.py:112: in <module>\r\n from . import utils\r\n/usr/lib/python2.7/site-packages/requests/utils.py:24: in <module>\r\n from . import certs\r\nE ImportError: cannot import name certs\r\n```\r\n\r\nPinning `urllib3==1.23` worked as a workaround",
"Pinned for workaround but hopefully this is not a permanent solution.",
"\\#MeToo\r\n```powershell\r\nPS E:\\Test> pip check\r\nrequests 2.19.1 has requirement urllib3<1.24,>=1.21.1, but you have urllib3 1.24.\r\nPS E:\\Test>\r\n```\r\nhttps://pypi.org/project/urllib3/#history\r\nhttps://pypi.org/project/requests/#history\r\n\r\nNew👏release👏now👏(soon?)\r\n\r\nAnd if you allow me to enunciate a modest proposal:\r\nStrive a bit for better coordination in the future in order to avoid releasing incompatible changes.\r\nIsn't this Python after all? All grownup now, big and professional, supposedly.",
"@Hrxn, just to be clear, we’ve just crossed the 24 hour threshold since the urllib3 release. We’ve provided both a work around and posted a patch with the fix for review within hours. This is the same release process that’s been in place for a couple years now.\r\n\r\nGoing around demanding immediate action from projects that are run solely by volunteers isn’t going to get things done faster. It will be ready when we are confident it’s ready and not going to introduce additional problems to a very large ecosystem.",
"My builds are now failing with\r\n```\r\nCollecting urllib3<1.24,>=1.21.1 (from requests->chancellor==0.0.5)\r\n Could not find a version that satisfies the requirement urllib3<1.24,>=1.21.1 (from requests->chancellor==0.0.5) (from versions: 1.24)\r\n```\r\nNot sure why the previous version can't be pulled by pip. Any suggestions?",
"@nateprewitt I don't demand anything, I'm just interested if urllib3 maintainers care to let you know compatibility will be broken?",
"@ror6ax Breaking changes were known on urllib3's side before release. The issue being seen by many is that despite requests pinning the urllib3 version to <1.24,>=1.21.1 the newly released version is still being installed (perhaps by another dependency in the user's list that isn't restrained). Pip isn't a dependency resolver, this is why it's important to pin application dependencies (at a minimum!) and optionally use a tool with a real dependency resolver like Pipenv or Poetry.",
"Requests v2.20.0 has been uploaded to pypi.org. Issues should be resolved now. I'll leave this open for a bit for visibility, then close it out this evening.",
"Thank you @nateprewitt for getting on this and fixing the issue in under 72 hours :) ",
"Thanks @nateprewitt "
] |
https://api.github.com/repos/psf/requests/issues/4829
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4829/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4829/comments
|
https://api.github.com/repos/psf/requests/issues/4829/events
|
https://github.com/psf/requests/pull/4829
| 370,869,390 |
MDExOlB1bGxSZXF1ZXN0MjIzNDQ4MTM3
| 4,829 |
Follow suit of urllib3 and drop python2.6
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1810591?v=4",
"events_url": "https://api.github.com/users/asottile/events{/privacy}",
"followers_url": "https://api.github.com/users/asottile/followers",
"following_url": "https://api.github.com/users/asottile/following{/other_user}",
"gists_url": "https://api.github.com/users/asottile/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/asottile",
"id": 1810591,
"login": "asottile",
"node_id": "MDQ6VXNlcjE4MTA1OTE=",
"organizations_url": "https://api.github.com/users/asottile/orgs",
"received_events_url": "https://api.github.com/users/asottile/received_events",
"repos_url": "https://api.github.com/users/asottile/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/asottile/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/asottile/subscriptions",
"type": "User",
"url": "https://api.github.com/users/asottile",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2018-10-17T02:13:21Z
|
2021-09-01T00:11:52Z
|
2018-10-17T02:31:00Z
|
NONE
|
resolved
|
- Already untested (?)
- Resolves https://github.com/urllib3/urllib3/issues/1456
I used [pyupgrade](https://github.com/asottile/pyupgrade) for the syntax changes. Most of the motivation was to resolve the urllib3 issue.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4829/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4829/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4829.diff",
"html_url": "https://github.com/psf/requests/pull/4829",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4829.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4829"
}
| true |
[
"Hi @asottile, thanks for the pull request. As we noted in the urllib3 issue, this is already addressed and will be in our release within the next week once the changes in urllib3 have had some time to air out.",
"I’ve created #4830 for visibility. Thanks again @asottile!",
"@nateprewitt disregarding the urllib3 issue -- is this PR not ok? does requests intend to support python2.6 (it doesn't test against it)",
"There’s nothing wrong with the PR, but we already did this work a year ago. We haven’t supported python2.6 in a while but hadn’t intended to forcibly break compat until 3.0.0. \r\n\r\nThe reason we declined to merge this is it’s more work to rebase the release commits and would remove credit from the original author. It also introduces some breakages that will affect a number of our downstream dependencies which are unrelated to 2.6."
] |
https://api.github.com/repos/psf/requests/issues/4828
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4828/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4828/comments
|
https://api.github.com/repos/psf/requests/issues/4828/events
|
https://github.com/psf/requests/pull/4828
| 370,850,197 |
MDExOlB1bGxSZXF1ZXN0MjIzNDM0NzI4
| 4,828 |
compat: py 2.7 has ordered dicts
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/37160753?v=4",
"events_url": "https://api.github.com/users/cHYzZQo/events{/privacy}",
"followers_url": "https://api.github.com/users/cHYzZQo/followers",
"following_url": "https://api.github.com/users/cHYzZQo/following{/other_user}",
"gists_url": "https://api.github.com/users/cHYzZQo/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cHYzZQo",
"id": 37160753,
"login": "cHYzZQo",
"node_id": "MDQ6VXNlcjM3MTYwNzUz",
"organizations_url": "https://api.github.com/users/cHYzZQo/orgs",
"received_events_url": "https://api.github.com/users/cHYzZQo/received_events",
"repos_url": "https://api.github.com/users/cHYzZQo/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cHYzZQo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cHYzZQo/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cHYzZQo",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2018-10-17T00:24:46Z
|
2021-09-01T00:11:51Z
|
2018-10-17T01:36:19Z
|
CONTRIBUTOR
|
resolved
|
Use it if available rather than relying on urllib3 to provide it.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4828/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4828/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4828.diff",
"html_url": "https://github.com/psf/requests/pull/4828",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4828.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4828"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4828?src=pr&el=h1) Report\n> Merging [#4828](https://codecov.io/gh/requests/requests/pull/4828?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/2c6a8426aebd853966747f2c851f551c583cb21a?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4828?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4828 +/- ##\n=======================================\n Coverage 66.79% 66.79% \n=======================================\n Files 15 15 \n Lines 1572 1572 \n=======================================\n Hits 1050 1050 \n Misses 522 522\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4828?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4828?src=pr&el=footer). Last update [2c6a842...864e82f](https://codecov.io/gh/requests/requests/pull/4828?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"Hi @cHYzZQo, thanks for contributing to Requests! Unfortunately, we're already addressing the urllib3 1.24 related changes in our upcoming release patch. If you upgrade to 1.24 before we move the versioning pin, we won't be able to guarantee things work. Our current plan is to have a release ready within the next week after any major bugs in urllib3 have had a chance to surface.",
"I see you got about 5 of these, so I'm fine with letting this drop. Unfortunately pip is a mess and depending on what order things happen in it doesn't always respect requests' pinning. Are your coming changes anywhere in public yet?",
"nvmd just saw the v2.20.0 PR., tx\r\n"
] |
https://api.github.com/repos/psf/requests/issues/4827
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4827/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4827/comments
|
https://api.github.com/repos/psf/requests/issues/4827/events
|
https://github.com/psf/requests/pull/4827
| 370,689,050 |
MDExOlB1bGxSZXF1ZXN0MjIzMzEwNjYz
| 4,827 |
CVE URLs update: www sub-subdomain no longer valid
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/438502?v=4",
"events_url": "https://api.github.com/users/webmaven/events{/privacy}",
"followers_url": "https://api.github.com/users/webmaven/followers",
"following_url": "https://api.github.com/users/webmaven/following{/other_user}",
"gists_url": "https://api.github.com/users/webmaven/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/webmaven",
"id": 438502,
"login": "webmaven",
"node_id": "MDQ6VXNlcjQzODUwMg==",
"organizations_url": "https://api.github.com/users/webmaven/orgs",
"received_events_url": "https://api.github.com/users/webmaven/received_events",
"repos_url": "https://api.github.com/users/webmaven/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/webmaven/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/webmaven/subscriptions",
"type": "User",
"url": "https://api.github.com/users/webmaven",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 6 |
2018-10-16T16:11:14Z
|
2021-08-31T00:07:23Z
|
2018-10-16T16:33:08Z
|
CONTRIBUTOR
|
resolved
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4827/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4827/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4827.diff",
"html_url": "https://github.com/psf/requests/pull/4827",
"merged_at": "2018-10-16T16:33:08Z",
"patch_url": "https://github.com/psf/requests/pull/4827.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4827"
}
| true |
[
"Thanks @webmaven!",
"You're welcome @nateprewitt. Was wondering if adding the new CVE (http://cve.mitre.org/cgi-bin/cvename.cgi?name=2018-18074 eg. #4718) would also be an appropriate documentation change at this point, but would need to know next release's version number (eg. 2.19.2, or 2.20?) to include it.",
"@webmaven, thanks for the offer! We’re likely going to be doing a release sometime next week, and I think we’ll get all of that info bundled during the release process. ",
"@nateprewitt and @webmaven Do you have any insight as to whether or not this change could be applied to versions 2.6.0 and 2.7.0 and, if so, would doing so address the security concern outlined in the CVE? We're distributing those versions in a public repo and are considering just applying this change instead of forcing users through an upgrade quite far forward. Any thoughts would be much appreciated. :)",
"Hi @cachedout, I think you *could* apply the patch in #4718 (or a derivative) to the head of 2.6 or 2.7. We don’t have any intention to maintain that in Requests though since both of those release are approaching 4 years since release and are 13 versions behind.\r\n\r\nIf you choose to go down that path for Saltstack, we probably want to make it clear that it’s a forked version of Requests at that point. If you’re already vendoring copies though, that may not be a problem.",
"@nateprewitt Totally understood and thanks for the quick reply. That gives me what I need. Thanks!"
] |
|
https://api.github.com/repos/psf/requests/issues/4826
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4826/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4826/comments
|
https://api.github.com/repos/psf/requests/issues/4826/events
|
https://github.com/psf/requests/issues/4826
| 370,634,971 |
MDU6SXNzdWUzNzA2MzQ5NzE=
| 4,826 |
Memory leaks suspected (gc objects increases)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5613421?v=4",
"events_url": "https://api.github.com/users/Badiboy/events{/privacy}",
"followers_url": "https://api.github.com/users/Badiboy/followers",
"following_url": "https://api.github.com/users/Badiboy/following{/other_user}",
"gists_url": "https://api.github.com/users/Badiboy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Badiboy",
"id": 5613421,
"login": "Badiboy",
"node_id": "MDQ6VXNlcjU2MTM0MjE=",
"organizations_url": "https://api.github.com/users/Badiboy/orgs",
"received_events_url": "https://api.github.com/users/Badiboy/received_events",
"repos_url": "https://api.github.com/users/Badiboy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Badiboy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Badiboy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Badiboy",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-10-16T14:15:55Z
|
2021-09-07T00:06:10Z
|
2018-10-16T16:09:11Z
|
NONE
|
resolved
|
I'm running Telegram bot and noticed the free memory degradation when running bot for a long time. Firstly, I suspect my code; then I suspect bot and finally I came to requests. :)
I used **len(gc.get_objects())** to identify that problem exists. I located the communication routines, then cleared all bot code and comes to the example that raises the count of gc objects on every iteration.
## Expected Result
**len(gc.get_objects())** should give the **same** result on every loop iteration
## Actual Result
The value of **len(gc.get_objects())** increases on every loop iteration.
```
Test N2
GetObjects len: 27959
Test N3
GetObjects len: 27960
Test N4
GetObjects len: 27961
Test N5
GetObjects len: 27962
Test N6
GetObjects len: 27963
Test N7
GetObjects len: 27964
```
## Reproduction Steps
```
token = "XXX:XXX"
chat_id = '111'
proxy = {'https':'socks5h://ZZZ'} #You may need proxy to run this in Russia
from time import sleep
import gc, requests
def garbage_info():
res = ""
res += "\nGetObjects len: " + str(len(gc.get_objects()))
return res
def tester():
count = 0
while(True):
sleep(1)
count += 1
msg = "\nTest N{0}".format(count) + garbage_info()
print(msg)
method_url = r'sendMessage'
payload = {'chat_id': str(chat_id), 'text': msg}
request_url = "https://api.telegram.org/bot{0}/{1}".format(token, method_url)
method_name = 'get'
session = requests.session()
req = requests.Request(
method=method_name.upper(),
url=request_url,
params=payload
)
prep = session.prepare_request(req)
settings = session.merge_environment_settings(
prep.url, None, None, None, None)
# prep.url, proxy, None, None, None) #Change the line to enable proxy
send_kwargs = {
'timeout': None,
'allow_redirects': None,
}
send_kwargs.update(settings)
resp = session.send(prep, **send_kwargs)
# For more clean output
gc.collect()
tester()
```
## System Information
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.3.1"
},
"idna": {
"version": "2.7"
},
"implementation": {
"name": "CPython",
"version": "3.6.6"
},
"platform": {
"release": "4.15.0-36-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010009f",
"version": "17.5.0"
},
"requests": {
"version": "2.19.1"
},
"system_ssl": {
"version": "1010007f"
},
"urllib3": {
"version": "1.23"
},
"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/4826/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4826/timeline
| null |
completed
| null | null | false |
[
"In the future, please search **closed and** open issues before creating new ones that are duplicates.\r\n\r\nDuplicate of #4601"
] |
https://api.github.com/repos/psf/requests/issues/4825
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4825/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4825/comments
|
https://api.github.com/repos/psf/requests/issues/4825/events
|
https://github.com/psf/requests/pull/4825
| 370,254,678 |
MDExOlB1bGxSZXF1ZXN0MjIyOTc1OTE1
| 4,825 |
Document the security extra for SNI support with legacy Python
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/861044?v=4",
"events_url": "https://api.github.com/users/browniebroke/events{/privacy}",
"followers_url": "https://api.github.com/users/browniebroke/followers",
"following_url": "https://api.github.com/users/browniebroke/following{/other_user}",
"gists_url": "https://api.github.com/users/browniebroke/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/browniebroke",
"id": 861044,
"login": "browniebroke",
"node_id": "MDQ6VXNlcjg2MTA0NA==",
"organizations_url": "https://api.github.com/users/browniebroke/orgs",
"received_events_url": "https://api.github.com/users/browniebroke/received_events",
"repos_url": "https://api.github.com/users/browniebroke/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/browniebroke/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/browniebroke/subscriptions",
"type": "User",
"url": "https://api.github.com/users/browniebroke",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-10-15T16:58:46Z
|
2021-08-28T00:06:22Z
|
2020-08-18T21:51:47Z
|
CONTRIBUTOR
|
resolved
|
This was added back in #2195.
This started as I was trying to understand why we had PyOpenSSL installed on the project I joined recently. After a bit of digging, it seems that it came from the time when we were using Python 2 and was for Requests/urllib3.
However, looking at Requests' documentation, I couldn't find a clear explanation about this feature, so this is my attempt at fixing this.
Disclaimer: I'm by no means an expert at SNI, so please correct me on anything wrong that follows.
Here are what I could find:
- The intend was to [document this feature](https://github.com/requests/requests/pull/2195#issuecomment-54524390) after merging it, so I assume this contribution is welcome.
- Looking at [the documentation from urllib3](https://urllib3.readthedocs.io/en/latest/user-guide.html#ssl-py2), it seems that the extra dependencies aren't needed in Python 3* and by the look of #4315 it can slow down importing Requests when we have PyOpenSSL.
- Another open pull request (#4591) is trying to change this, but @sigmavirus24 comment implies that there is more to SNI in Requests?
I'm not sure if this is the best place to document this, adding it to the "install" section feels overwhelming for beginners, and I felt like it belongs close to the SSL & certificates verification of the advanced section. Happy to move it somewhere else.
*Edit:*
(*) Actually, it seems it was implemented in [PEP 476](https://www.python.org/dev/peps/pep-0476/) which covers Python >=2.7.9 or >=[3.4.3](https://docs.python.org/3.4/whatsnew/changelog.html#python-3-4-3-final), so not any Python 3 versions.
|
{
"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/4825/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4825/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4825.diff",
"html_url": "https://github.com/psf/requests/pull/4825",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4825.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4825"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4825?src=pr&el=h1) Report\n> Merging [#4825](https://codecov.io/gh/requests/requests/pull/4825?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/c501ec986daa4961cd9dee370b5d45ff2e524b37?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4825?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4825 +/- ##\n=======================================\n Coverage 66.89% 66.89% \n=======================================\n Files 15 15 \n Lines 1577 1577 \n=======================================\n Hits 1055 1055 \n Misses 522 522\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4825?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4825?src=pr&el=footer). Last update [c501ec9...ee76291](https://codecov.io/gh/requests/requests/pull/4825?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"Closing this as we're not recommending the security extra any longer."
] |
https://api.github.com/repos/psf/requests/issues/4824
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4824/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4824/comments
|
https://api.github.com/repos/psf/requests/issues/4824/events
|
https://github.com/psf/requests/issues/4824
| 369,856,334 |
MDU6SXNzdWUzNjk4NTYzMzQ=
| 4,824 |
HTTPSConnectionPool(host='stats.nba.com', port=443): Read timed out. (read timeout=None)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/33616967?v=4",
"events_url": "https://api.github.com/users/perksofthesewalls/events{/privacy}",
"followers_url": "https://api.github.com/users/perksofthesewalls/followers",
"following_url": "https://api.github.com/users/perksofthesewalls/following{/other_user}",
"gists_url": "https://api.github.com/users/perksofthesewalls/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/perksofthesewalls",
"id": 33616967,
"login": "perksofthesewalls",
"node_id": "MDQ6VXNlcjMzNjE2OTY3",
"organizations_url": "https://api.github.com/users/perksofthesewalls/orgs",
"received_events_url": "https://api.github.com/users/perksofthesewalls/received_events",
"repos_url": "https://api.github.com/users/perksofthesewalls/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/perksofthesewalls/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/perksofthesewalls/subscriptions",
"type": "User",
"url": "https://api.github.com/users/perksofthesewalls",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 11 |
2018-10-14T01:01:35Z
|
2021-08-28T00:05:57Z
|
2018-10-15T12:24:15Z
|
NONE
|
resolved
|
See this error in Logs. I have no proxy, VPN. Direct Internet. This is the full Python Script: https://pastebin.com/u5VS9QPn
## Expected Result
No errors.
## Actual Result
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/connectionpool.py", line 384, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/connectionpool.py", line 380, in _make_request
httplib_response = conn.getresponse()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 258, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socket.py", line 586, in readinto
return self._sock.recv_into(b)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 1009, in recv_into
return self.read(nbytes, buffer)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 871, in read
return self._sslobj.read(len, buffer)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 631, in read
v = self._sslobj.read(len, buffer)
TimeoutError: [Errno 60] Operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/adapters.py", line 445, in send
timeout=timeout
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/connectionpool.py", line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/util/retry.py", line 367, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/packages/six.py", line 686, in reraise
raise value
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/connectionpool.py", line 386, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/connectionpool.py", line 317, in _raise_timeout
raise ReadTimeoutError(self, url, "Read timed out. (read timeout=%s)" % timeout_value)
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='stats.nba.com', port=443): Read timed out. (read timeout=None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/perksofthesewalls/Documents/Reddit/r:Warriors/Python/warriorssidebar6.py", line 145, in <module>
data = getUrlContent2(url)
File "/Users/perksofthesewalls/Documents/Reddit/r:Warriors/Python/warriorssidebar6.py", line 16, in getUrlContent2
response = requests.get(url, headers=headers)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/sessions.py", line 512, in request
resp = self.send(prep, **send_kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/sessions.py", line 644, in send
history = [resp for resp in gen] if allow_redirects else []
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/sessions.py", line 644, in <listcomp>
history = [resp for resp in gen] if allow_redirects else []
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/sessions.py", line 222, in resolve_redirects
**adapter_kwargs
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/sessions.py", line 622, in send
r = adapter.send(request, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/adapters.py", line 526, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='stats.nba.com', port=443): Read timed out. (read timeout=None)
## Reproduction Steps
```python
import requests
```
## System Information
$ python -m requests.help
```
<paste here>
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4824/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4824/timeline
| null |
completed
| null | null | false |
[
"Your paste is private. You didn't provide the required information. And this is a read timeout meaning the server didn't send data within the timeframe you (or your system) specified. This is not a bug in requests.",
"Hello, were you able to get through this issue?",
"i have the same issue",
"same issue T^T",
"has anyone found a workaround or a solution to this? i'm running a GAE project that keeps getting this error. it works on localhost but when i deploy it, it gives the same http timeout error. i've tried increasing the timeout time, but that didn't work either.",
"same issue. ",
"same issue",
"@jentseng @skuan @pwu97 @YohannLeee @rajgiri8 \r\n\r\nWorkaround in here: https://github.com/swar/nba_api/issues/94\r\n\r\nChanging the header should fix it.",
"Use Google Chrome and go here (https://www.whatismybrowser.com/detect/what-is-my-user-agent)\r\nand then copy the User-Agent and paste to your code like below:\r\nheaders={ \"User-Agent\":\"your User-Agent\"}\r\n\r\ntype tho headers in requests.get tag like this:\r\nres = requests.get(url, headers=headers)",
"Thanks! Worked perfectly.",
"> (https://www.whatismybrowser.com/detect/what-is-my-user-agent\r\n\r\nHow do you do that ? theres = requests.get(url, headers=headers) part"
] |
https://api.github.com/repos/psf/requests/issues/4823
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4823/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4823/comments
|
https://api.github.com/repos/psf/requests/issues/4823/events
|
https://github.com/psf/requests/pull/4823
| 369,783,867 |
MDExOlB1bGxSZXF1ZXN0MjIyNjM4Mzg0
| 4,823 |
Add auth.HTTPHeaderAuth
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/3760893?v=4",
"events_url": "https://api.github.com/users/tmshn/events{/privacy}",
"followers_url": "https://api.github.com/users/tmshn/followers",
"following_url": "https://api.github.com/users/tmshn/following{/other_user}",
"gists_url": "https://api.github.com/users/tmshn/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tmshn",
"id": 3760893,
"login": "tmshn",
"node_id": "MDQ6VXNlcjM3NjA4OTM=",
"organizations_url": "https://api.github.com/users/tmshn/orgs",
"received_events_url": "https://api.github.com/users/tmshn/received_events",
"repos_url": "https://api.github.com/users/tmshn/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tmshn/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tmshn/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tmshn",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-10-13T09:12:11Z
|
2021-09-01T00:11:53Z
|
2018-10-13T10:19:45Z
|
NONE
|
resolved
|
Since authentication using 'Authorization' header is quite popular situation, I added `HTTPHeaderAuth` class to make it easier.
With this, instead of doing this
```python
requests.get(url, header={'Authorization': 'token xxx'})
```
(this will be overwritten by netrc!)
or
```python
def auth_header(r):
r.haeders['Authorization'] = 'token xxx'
return r
requests.get(url, auth=auth_header)
```
you can do
```python
requests.get(url, auth=HTTPHeaderAuth('token xxx'))
```
This is easier, clearer and no overwrite by netrc file.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4823/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4823/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4823.diff",
"html_url": "https://github.com/psf/requests/pull/4823",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4823.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4823"
}
| true |
[
"Thanks for sending this over. Unfortunately we're under a feature freeze and cannot accept this at this time."
] |
https://api.github.com/repos/psf/requests/issues/4822
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4822/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4822/comments
|
https://api.github.com/repos/psf/requests/issues/4822/events
|
https://github.com/psf/requests/pull/4822
| 369,420,966 |
MDExOlB1bGxSZXF1ZXN0MjIyMzY1OTY0
| 4,822 |
Important emergency change
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240616?v=4",
"events_url": "https://api.github.com/users/makimat/events{/privacy}",
"followers_url": "https://api.github.com/users/makimat/followers",
"following_url": "https://api.github.com/users/makimat/following{/other_user}",
"gists_url": "https://api.github.com/users/makimat/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/makimat",
"id": 240616,
"login": "makimat",
"node_id": "MDQ6VXNlcjI0MDYxNg==",
"organizations_url": "https://api.github.com/users/makimat/orgs",
"received_events_url": "https://api.github.com/users/makimat/received_events",
"repos_url": "https://api.github.com/users/makimat/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/makimat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/makimat/subscriptions",
"type": "User",
"url": "https://api.github.com/users/makimat",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-10-12T06:49:43Z
|
2021-09-01T00:11:54Z
|
2018-10-12T06:52:33Z
|
NONE
|
resolved
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240616?v=4",
"events_url": "https://api.github.com/users/makimat/events{/privacy}",
"followers_url": "https://api.github.com/users/makimat/followers",
"following_url": "https://api.github.com/users/makimat/following{/other_user}",
"gists_url": "https://api.github.com/users/makimat/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/makimat",
"id": 240616,
"login": "makimat",
"node_id": "MDQ6VXNlcjI0MDYxNg==",
"organizations_url": "https://api.github.com/users/makimat/orgs",
"received_events_url": "https://api.github.com/users/makimat/received_events",
"repos_url": "https://api.github.com/users/makimat/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/makimat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/makimat/subscriptions",
"type": "User",
"url": "https://api.github.com/users/makimat",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4822/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4822/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4822.diff",
"html_url": "https://github.com/psf/requests/pull/4822",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4822.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4822"
}
| true |
[
"Sorry about this, accidentally opened a pull request to wrong repo while testing something for softagram.com."
] |
|
https://api.github.com/repos/psf/requests/issues/4821
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4821/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4821/comments
|
https://api.github.com/repos/psf/requests/issues/4821/events
|
https://github.com/psf/requests/pull/4821
| 369,156,211 |
MDExOlB1bGxSZXF1ZXN0MjIyMTY1ODYz
| 4,821 |
Add read() to Response object.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/18865?v=4",
"events_url": "https://api.github.com/users/smoser/events{/privacy}",
"followers_url": "https://api.github.com/users/smoser/followers",
"following_url": "https://api.github.com/users/smoser/following{/other_user}",
"gists_url": "https://api.github.com/users/smoser/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/smoser",
"id": 18865,
"login": "smoser",
"node_id": "MDQ6VXNlcjE4ODY1",
"organizations_url": "https://api.github.com/users/smoser/orgs",
"received_events_url": "https://api.github.com/users/smoser/received_events",
"repos_url": "https://api.github.com/users/smoser/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/smoser/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/smoser/subscriptions",
"type": "User",
"url": "https://api.github.com/users/smoser",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2018-10-11T14:44:02Z
|
2021-09-01T00:11:54Z
|
2018-10-11T17:14:47Z
|
NONE
|
resolved
|
The traditional 'read' interface is useful in some cases.
At very least it may be easier for code that expectes file-handle
like objects to just add requests support.
Due to gzip/deflate content-encoding it is not really possible for
the caller to use just use Response.raw.read(). If gzip was used
that would return compressed bytes.
|
{
"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/4821/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4821/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4821.diff",
"html_url": "https://github.com/psf/requests/pull/4821",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4821.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4821"
}
| true |
[
"Hi,\r\nI realize the implementation probably needs some work, but I wanted to see what you think of the general idea before I polished it up.\r\n\r\nI've been using this in a downstream project at https://git.launchpad.net/simplestreams/tree/simplestreams/contentsource.py#n356 for a while.\r\n",
"Hi there, Requests is currently under a feature-freeze and the `read()` method isn't really the only thing that's necessary for code or libraries that require a file-like object.\r\n\r\nFurther, it is possible to get the raw, compressed bytes from `Response.raw.read` so this functionality is an unnecessary duplication of the logic in urllib3 + extra work to provide functionality that already exists.",
"The problem with Response.raw.read() is that if content-encoding of gzip, it will return gzipped' content.\r\nThe user is not expecting gzipped content.\r\n\r\nHere is attempt to use requests and 'raw.read' as you suggest.\r\nIt returns gzip compressed data even though the url opened has normal json content. This fact is not something the user of requests should have to expect or handle.\r\n\r\n >>> import requests\r\n >>> url = \"http://cloud-images.ubuntu.com/releases/streams/v1/com.brightbox:official.json\"\r\n >>> r = requests.get(url, stream=True)\r\n >>> r.headers.get('content-encoding')\r\n 'gzip'\r\n >>> r.raw.read(32)\r\n b'\\x1f\\x8b\\x08\\x00\\x00\\x00\\x00\\x00\\x00\\x03\\xcdWMs\\x9b0\\x10\\xbd\\xfbW0\\\\\\x1b\\x08\\xb2)&\\xfc\\x89^z\\xcf'\r\n\r\nHere is the function that my change provides. Now, read() returns\r\nthe uncompressed data.\r\n\r\n >>> r = requests.get(url, stream=True)\r\n >>> r.read(32)\r\n b'{\\n \"updated\": \"Thu, 11 Oct 201'\r\n\r\n\r\nWith regard to feature-freeze, I don't need this to be landed right now. I was really looking for feedback as to whether or not you were open to a 'read' interface on Response.",
"> With regard to feature-freeze, I don't need this to be landed right now. I was really looking for feedback as to whether or not you were open to a 'read' interface on Response.\r\n\r\nThe feature-freeze is relevant because it defaults the answer to No"
] |
https://api.github.com/repos/psf/requests/issues/4820
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4820/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4820/comments
|
https://api.github.com/repos/psf/requests/issues/4820/events
|
https://github.com/psf/requests/pull/4820
| 367,708,439 |
MDExOlB1bGxSZXF1ZXN0MjIxMDUzOTk0
| 4,820 |
fix codecov reporting
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/6290791?v=4",
"events_url": "https://api.github.com/users/vaibhavmule/events{/privacy}",
"followers_url": "https://api.github.com/users/vaibhavmule/followers",
"following_url": "https://api.github.com/users/vaibhavmule/following{/other_user}",
"gists_url": "https://api.github.com/users/vaibhavmule/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/vaibhavmule",
"id": 6290791,
"login": "vaibhavmule",
"node_id": "MDQ6VXNlcjYyOTA3OTE=",
"organizations_url": "https://api.github.com/users/vaibhavmule/orgs",
"received_events_url": "https://api.github.com/users/vaibhavmule/received_events",
"repos_url": "https://api.github.com/users/vaibhavmule/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/vaibhavmule/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vaibhavmule/subscriptions",
"type": "User",
"url": "https://api.github.com/users/vaibhavmule",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2018-10-08T09:36:51Z
|
2021-09-01T00:11:54Z
|
2018-10-10T11:14:43Z
|
NONE
|
resolved
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/6290791?v=4",
"events_url": "https://api.github.com/users/vaibhavmule/events{/privacy}",
"followers_url": "https://api.github.com/users/vaibhavmule/followers",
"following_url": "https://api.github.com/users/vaibhavmule/following{/other_user}",
"gists_url": "https://api.github.com/users/vaibhavmule/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/vaibhavmule",
"id": 6290791,
"login": "vaibhavmule",
"node_id": "MDQ6VXNlcjYyOTA3OTE=",
"organizations_url": "https://api.github.com/users/vaibhavmule/orgs",
"received_events_url": "https://api.github.com/users/vaibhavmule/received_events",
"repos_url": "https://api.github.com/users/vaibhavmule/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/vaibhavmule/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vaibhavmule/subscriptions",
"type": "User",
"url": "https://api.github.com/users/vaibhavmule",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4820/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4820/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4820.diff",
"html_url": "https://github.com/psf/requests/pull/4820",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4820.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4820"
}
| true |
[] |
|
https://api.github.com/repos/psf/requests/issues/4819
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4819/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4819/comments
|
https://api.github.com/repos/psf/requests/issues/4819/events
|
https://github.com/psf/requests/issues/4819
| 367,574,941 |
MDU6SXNzdWUzNjc1NzQ5NDE=
| 4,819 |
Are connections reused when response is read through json() method?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/624072?v=4",
"events_url": "https://api.github.com/users/rybak/events{/privacy}",
"followers_url": "https://api.github.com/users/rybak/followers",
"following_url": "https://api.github.com/users/rybak/following{/other_user}",
"gists_url": "https://api.github.com/users/rybak/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rybak",
"id": 624072,
"login": "rybak",
"node_id": "MDQ6VXNlcjYyNDA3Mg==",
"organizations_url": "https://api.github.com/users/rybak/orgs",
"received_events_url": "https://api.github.com/users/rybak/received_events",
"repos_url": "https://api.github.com/users/rybak/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rybak/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rybak/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rybak",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-10-07T17:25:16Z
|
2021-09-07T00:06:12Z
|
2018-10-08T11:58:01Z
|
NONE
|
resolved
|
From [Advanced Usage page](http://docs.python-requests.org/en/master/user/advanced/#keep-alive) (emphasis mine):
> ## Keep-Alive
>
> Excellent news — thanks to urllib3, keep-alive is 100% automatic within a session! Any requests that you make within a session will automatically reuse the appropriate connection!
>
> Note that connections are only released back to the pool for reuse once all body data has been read; be sure to either set `stream` to `False` or **read the `content` property** of the `Response` object.
Could you please clarify if the connection would be released to the pool for reuse if the response is read though `.json()` method instead of the `content` property?
|
{
"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/4819/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4819/timeline
| null |
completed
| null | null | false |
[
"If you're not using `stream=True` the connection will always be released to the pool.\r\n\r\nIf you do use `stream=True` then anything that reads the body of the response (`.content`, `.text`, `.json()`) will release the connection upon successfully consuming the body."
] |
https://api.github.com/repos/psf/requests/issues/4818
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4818/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4818/comments
|
https://api.github.com/repos/psf/requests/issues/4818/events
|
https://github.com/psf/requests/issues/4818
| 367,518,675 |
MDU6SXNzdWUzNjc1MTg2NzU=
| 4,818 |
Unit tests failing
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/31825993?v=4",
"events_url": "https://api.github.com/users/hook-s3c/events{/privacy}",
"followers_url": "https://api.github.com/users/hook-s3c/followers",
"following_url": "https://api.github.com/users/hook-s3c/following{/other_user}",
"gists_url": "https://api.github.com/users/hook-s3c/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hook-s3c",
"id": 31825993,
"login": "hook-s3c",
"node_id": "MDQ6VXNlcjMxODI1OTkz",
"organizations_url": "https://api.github.com/users/hook-s3c/orgs",
"received_events_url": "https://api.github.com/users/hook-s3c/received_events",
"repos_url": "https://api.github.com/users/hook-s3c/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hook-s3c/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hook-s3c/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hook-s3c",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2018-10-07T03:55:48Z
|
2021-09-07T00:06:07Z
|
2018-10-26T02:29:37Z
|
NONE
|
resolved
|
Running the unit tests, many failures. Am I doing this wrong? Couldn't find docs to run the tests from source.
## Expected Result
All tests to pass
## Actual Result
Many failed
## Reproduction Steps
```
git clone https://github.com/requests/requests
cd requests
sudo make init
sudo pipenv run detox
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.2.2"
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "2.7.13"
},
"platform": {
"release": "4.15.13-041513-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1000207f",
"version": "0.15.1"
},
"requests": {
"version": "2.19.1"
},
"system_ssl": {
"version": "1010003f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": true
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4818/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4818/timeline
| null |
completed
| null | null | false |
[
"Is that right you use `sudo make init` and `sudo pipenv run detox`? It sounds a little bit strange to me that you need su rights for running tests.",
"@hook-s3c what errors do you get?",
"No response"
] |
https://api.github.com/repos/psf/requests/issues/4817
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4817/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4817/comments
|
https://api.github.com/repos/psf/requests/issues/4817/events
|
https://github.com/psf/requests/issues/4817
| 367,409,884 |
MDU6SXNzdWUzNjc0MDk4ODQ=
| 4,817 |
When making a PATCH request or any random method and using a proxy the body is not sent
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/4094535?v=4",
"events_url": "https://api.github.com/users/bucknerns/events{/privacy}",
"followers_url": "https://api.github.com/users/bucknerns/followers",
"following_url": "https://api.github.com/users/bucknerns/following{/other_user}",
"gists_url": "https://api.github.com/users/bucknerns/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bucknerns",
"id": 4094535,
"login": "bucknerns",
"node_id": "MDQ6VXNlcjQwOTQ1MzU=",
"organizations_url": "https://api.github.com/users/bucknerns/orgs",
"received_events_url": "https://api.github.com/users/bucknerns/received_events",
"repos_url": "https://api.github.com/users/bucknerns/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bucknerns/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bucknerns/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bucknerns",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 7 |
2018-10-06T01:09:49Z
|
2021-09-07T00:06:12Z
|
2018-10-07T18:26:48Z
|
NONE
|
resolved
|
When making a PATCH request or any random method and using a proxy the body is not sent.
Seen on python 3.6
with requests 2.19.1
ubuntu 18.04
setting data will cause the body to be sent
## Actual Result
Body not sent
## Reproduction Steps
```
export https_proxy=https://127.0.0.1:8080;export http_proxy=http://127.0.0.1:8080
#start burpsuite or other proxy
python
import requests
r = requests.request("POasdfST","https://www.google.com", data="test123", verify=False)
# no body sent to burpsuite
r = requests.request("POST","https://www.google.com", data="test123", verify=False)
# body sent to burpsuite
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.6.6"
},
"platform": {
"release": "4.15.0-34-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.19.1"
},
"system_ssl": {
"version": "1010007f"
},
"urllib3": {
"version": "1.22"
},
"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/4094535?v=4",
"events_url": "https://api.github.com/users/bucknerns/events{/privacy}",
"followers_url": "https://api.github.com/users/bucknerns/followers",
"following_url": "https://api.github.com/users/bucknerns/following{/other_user}",
"gists_url": "https://api.github.com/users/bucknerns/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bucknerns",
"id": 4094535,
"login": "bucknerns",
"node_id": "MDQ6VXNlcjQwOTQ1MzU=",
"organizations_url": "https://api.github.com/users/bucknerns/orgs",
"received_events_url": "https://api.github.com/users/bucknerns/received_events",
"repos_url": "https://api.github.com/users/bucknerns/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bucknerns/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bucknerns/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bucknerns",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4817/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4817/timeline
| null |
completed
| null | null | false |
[
"After a trying with postman it works, not sure if this is a proxy protocol issue of a burpsuite issue. \r\n",
"```\r\nr = requests.request(\"POasdfST\",\"https://www.google.com\", data=\"test123\", verify=False)\r\n# no body sent to burpsuite\r\n```\r\n\r\nYou mentioned \"PATCH\" but this shows that you weren't using a normal method. Were you actually testing with PATCH?\r\n\r\n```\r\nr = requests.request(\"POST\",\"https://www.google.com\", data=\"test123\", verify=False)\r\n# body sent to burpsuite\r\n```",
"It works the same for patch and random strings in the method.",
"Are there any redirects present in the history of the response for the 'random strings'?",
"No redirects. On some servers the request hangs because the content-length doesn't reflect the body size of 0 byes.",
"Just debugged this to ssl.py, the write is getting called with the correct data so the problem is probably on burpsuite side. I will open a bug with them.",
"So just to make sure I decided to try in a python2 virtualenv and it works as it should.\r\nDigging into the code a little more python2 was treating the body as bytes vs unicode string which is why it behaves differently. When the body is bytes it seems to be sent as one call to httplib.HTTPConnection.send function vs two one for url/headers and one for body. \r\nIn python 3 the method has changed and always sends the body in a seperate call to httplib.HTTPConnection.send(chunking it). Either way it's not a requests issue it seems to be a burpsuite issue with chunking on non posts.\r\n\r\n```\r\n def _send_output(self, message_body=None):\r\n \"\"\"Send the currently buffered request and clear the buffer.\r\n\r\n Appends an extra \\\\r\\\\n to the buffer.\r\n A message_body may be specified, to be appended to the request.\r\n \"\"\"\r\n self._buffer.extend((\"\", \"\"))\r\n msg = \"\\r\\n\".join(self._buffer)\r\n del self._buffer[:]\r\n # If msg and message_body are sent in a single send() call,\r\n # it will avoid performance problems caused by the interaction\r\n # between delayed ack and the Nagle algorithm.\r\n if isinstance(message_body, str):\r\n msg += message_body\r\n message_body = None\r\n self.send(msg)\r\n if message_body is not None:\r\n #message_body was not a string (i.e. it is a file) and\r\n #we must run the risk of Nagle\r\n self.send(message_body)\r\n```\r\n"
] |
https://api.github.com/repos/psf/requests/issues/4816
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4816/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4816/comments
|
https://api.github.com/repos/psf/requests/issues/4816/events
|
https://github.com/psf/requests/pull/4816
| 367,119,215 |
MDExOlB1bGxSZXF1ZXN0MjIwNjMwMDcz
| 4,816 |
Fix pep8 in docs code snippets
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/677476?v=4",
"events_url": "https://api.github.com/users/kataev/events{/privacy}",
"followers_url": "https://api.github.com/users/kataev/followers",
"following_url": "https://api.github.com/users/kataev/following{/other_user}",
"gists_url": "https://api.github.com/users/kataev/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kataev",
"id": 677476,
"login": "kataev",
"node_id": "MDQ6VXNlcjY3NzQ3Ng==",
"organizations_url": "https://api.github.com/users/kataev/orgs",
"received_events_url": "https://api.github.com/users/kataev/received_events",
"repos_url": "https://api.github.com/users/kataev/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kataev/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kataev/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kataev",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2018-10-05T08:56:31Z
|
2021-09-01T00:11:55Z
|
2018-10-05T16:29:48Z
|
NONE
|
resolved
|
Fixed some pep8 issues in docs code snippets.
|
{
"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/4816/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4816/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4816.diff",
"html_url": "https://github.com/psf/requests/pull/4816",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4816.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4816"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4816?src=pr&el=h1) Report\n> Merging [#4816](https://codecov.io/gh/requests/requests/pull/4816?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/a6cd380c640087218695bc7c62311a4843777e43?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4816?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4816 +/- ##\n=======================================\n Coverage 66.79% 66.79% \n=======================================\n Files 15 15 \n Lines 1572 1572 \n=======================================\n Hits 1050 1050 \n Misses 522 522\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4816?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4816?src=pr&el=footer). Last update [a6cd380...17ea176](https://codecov.io/gh/requests/requests/pull/4816?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"This project doesn't observe pep8",
"ok, this is your problem."
] |
https://api.github.com/repos/psf/requests/issues/4815
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4815/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4815/comments
|
https://api.github.com/repos/psf/requests/issues/4815/events
|
https://github.com/psf/requests/issues/4815
| 366,961,394 |
MDU6SXNzdWUzNjY5NjEzOTQ=
| 4,815 |
import eats 600MB of RAM
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/52880?v=4",
"events_url": "https://api.github.com/users/kamikaze/events{/privacy}",
"followers_url": "https://api.github.com/users/kamikaze/followers",
"following_url": "https://api.github.com/users/kamikaze/following{/other_user}",
"gists_url": "https://api.github.com/users/kamikaze/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kamikaze",
"id": 52880,
"login": "kamikaze",
"node_id": "MDQ6VXNlcjUyODgw",
"organizations_url": "https://api.github.com/users/kamikaze/orgs",
"received_events_url": "https://api.github.com/users/kamikaze/received_events",
"repos_url": "https://api.github.com/users/kamikaze/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kamikaze/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kamikaze/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kamikaze",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-10-04T20:40:22Z
|
2021-09-07T00:06:14Z
|
2018-10-05T13:52:58Z
|
NONE
|
resolved
|
Importing requests and doing nothing takes huge amount of RAM.
## Expected Result
Don't waste memory
## Actual Result
```
MB
4.872^ #
| @:@::::::#::
| @::::@@@:@::::::#::
| @@@::::@ @:@::::::#::
| ::@@@@::::@ @:@::::::#::
| @ :::@::::@@@@::::@ @:@::::::#::
| @ :::::::@::::@@@@::::@ @:@::::::#::
| @::: ::::@::::@@@@::::@ @:@::::::#::
| @@::: ::::@::::@@@@::::@ @:@::::::#::
| @@:@@::: ::::@::::@@@@::::@ @:@::::::#:::
| :@ :@@::: ::::@::::@@@@::::@ @:@::::::#:::
| :::::@ :@@::: ::::@::::@@@@::::@ @:@::::::#:::
| @:::@:: ::@ :@@::: ::::@::::@@@@::::@ @:@::::::#:::
| @@::@:::@:: ::@ :@@::: ::::@::::@@@@::::@ @:@::::::#:::
| ::::@@@::@:::@:: ::@ :@@::: ::::@::::@@@@::::@ @:@::::::#:::
| :: :@@@::@:::@:: ::@ :@@::: ::::@::::@@@@::::@ @:@::::::#:::
| @@:::: :@@@::@:::@:: ::@ :@@::: ::::@::::@@@@::::@ @:@::::::#:::
| ::@ : :: :@@@::@:::@:: ::@ :@@::: ::::@::::@@@@::::@ @:@::::::#:::
| ::::@ : :: :@@@::@:::@:: ::@ :@@::: ::::@::::@@@@::::@ @:@::::::#:::
| ::::::@ : :: :@@@::@:::@:: ::@ :@@::: ::::@::::@@@@::::@ @:@::::::#:::
0 +----------------------------------------------------------------------->Mi
0 653.3
```
## Reproduction Steps
```bash
valgrind --trace-children=yes --tool=massif python3.6
```
```python
import requests
```
```
ms_print massif.out.* | less
```
## System Information
$ python -m requests.help
```
$ python -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.3.1"
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.6.5"
},
"platform": {
"release": "3.10.0-862.2.3.el7.x86_64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010009f",
"version": "17.5.0"
},
"requests": {
"version": "2.19.1"
},
"system_ssl": {
"version": "100020ff"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": true
}
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/52880?v=4",
"events_url": "https://api.github.com/users/kamikaze/events{/privacy}",
"followers_url": "https://api.github.com/users/kamikaze/followers",
"following_url": "https://api.github.com/users/kamikaze/following{/other_user}",
"gists_url": "https://api.github.com/users/kamikaze/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kamikaze",
"id": 52880,
"login": "kamikaze",
"node_id": "MDQ6VXNlcjUyODgw",
"organizations_url": "https://api.github.com/users/kamikaze/orgs",
"received_events_url": "https://api.github.com/users/kamikaze/received_events",
"repos_url": "https://api.github.com/users/kamikaze/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kamikaze/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kamikaze/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kamikaze",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4815/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4815/timeline
| null |
completed
| null | null | false |
[
"w/o import requests it's only ~80MB",
"my bad... Mi is not MB... Closing this issue. Also if anybody is interested - use massif-visualizer tool for a better understanding"
] |
https://api.github.com/repos/psf/requests/issues/4814
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4814/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4814/comments
|
https://api.github.com/repos/psf/requests/issues/4814/events
|
https://github.com/psf/requests/issues/4814
| 366,736,813 |
MDU6SXNzdWUzNjY3MzY4MTM=
| 4,814 |
How to add keystore password in requests.post
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/43339535?v=4",
"events_url": "https://api.github.com/users/ashukrishna100/events{/privacy}",
"followers_url": "https://api.github.com/users/ashukrishna100/followers",
"following_url": "https://api.github.com/users/ashukrishna100/following{/other_user}",
"gists_url": "https://api.github.com/users/ashukrishna100/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ashukrishna100",
"id": 43339535,
"login": "ashukrishna100",
"node_id": "MDQ6VXNlcjQzMzM5NTM1",
"organizations_url": "https://api.github.com/users/ashukrishna100/orgs",
"received_events_url": "https://api.github.com/users/ashukrishna100/received_events",
"repos_url": "https://api.github.com/users/ashukrishna100/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ashukrishna100/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ashukrishna100/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ashukrishna100",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-10-04T11:06:28Z
|
2021-09-07T00:06:11Z
|
2018-10-05T16:34:27Z
|
NONE
|
resolved
|
my code is
`import requests`
`requests.post(URL,cert=(".jks/.pem file path","keystore password"))`
It is not working though
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4814/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4814/timeline
| null |
completed
| null | null | false |
[
"Please provide us with the output of\r\n\r\n```\r\npython -m requests.help\r\n```\r\n\r\nIf that is unavailable on your version of Requests please provide some basic information about your system (Python version, operating system, etc).",
"\"implementation\":CPython,version:3.6.6\r\nplatform: release-10,system-windows\r\nrequests version:2.19.1\r\nurlib3 version:1.23\r\n\r\n`requests.post(\"https://{url}\",cert=(\"z:/certificate.pem\",\"z:/keystore.key\",\"password\"))`\r\n\r\nThe error is `openSSL error:[('x509 certificate routines', 'X509_check_private_key', 'key values mismatch')]`"
] |
https://api.github.com/repos/psf/requests/issues/4813
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4813/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4813/comments
|
https://api.github.com/repos/psf/requests/issues/4813/events
|
https://github.com/psf/requests/issues/4813
| 366,054,069 |
MDU6SXNzdWUzNjYwNTQwNjk=
| 4,813 |
netrc parsing is overly strict
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1182361?v=4",
"events_url": "https://api.github.com/users/ianwremmel/events{/privacy}",
"followers_url": "https://api.github.com/users/ianwremmel/followers",
"following_url": "https://api.github.com/users/ianwremmel/following{/other_user}",
"gists_url": "https://api.github.com/users/ianwremmel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ianwremmel",
"id": 1182361,
"login": "ianwremmel",
"node_id": "MDQ6VXNlcjExODIzNjE=",
"organizations_url": "https://api.github.com/users/ianwremmel/orgs",
"received_events_url": "https://api.github.com/users/ianwremmel/received_events",
"repos_url": "https://api.github.com/users/ianwremmel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ianwremmel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ianwremmel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ianwremmel",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 5 |
2018-10-02T19:52:30Z
|
2021-09-07T00:06:13Z
|
2018-10-05T16:32:45Z
|
NONE
|
resolved
|
This started out as a [bug report for httpie](https://github.com/jakubroztocil/httpie/issues/717#issuecomment-426125261) and they referred me here.
> it appears that auth via netrc is broken if `~/.netrc` includes entries that are not exactly login/password tuples. For example, I have the following entries for circle ci and heroku:
>
> ```
> machine api.heroku.com
> login <redacted>
> password <redacted>
> method interactive
> machine circleci.com
> login <redacted>
> ```
>
> both of these entries prevent my entry for `github.com` from working with `httpie` (but curl works just fine).
## Expected Result
`https api.github.com/users` should return 200
## Actual Result
`https api.github.com/users` should returned 401
## Reproduction Steps
See summary section for `.netrc` configs that don't parse.
## System Information
$ python -m requests.help
> I'm not sure if this is the output you wanted since I don't know enough about python to know if the requests found this way is the same one that httpie depends on.
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "2.7.15"
},
"platform": {
"release": "18.0.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "1000210f"
},
"urllib3": {
"version": "1.22"
},
"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/4813/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4813/timeline
| null |
completed
| null | null | false |
[
"Hi there,\r\n\r\nWhat happens if you do:\r\n\r\n```py\r\nimport netrc\r\nimport os.path\r\n\r\nnetrc.netrc(os.path.expanduser('~/.netrc')).authenticators('api.github.com')\r\n```",
"I ask, because [we rely on the standard library](https://github.com/requests/requests/blob/a6cd380c640087218695bc7c62311a4843777e43/requests/utils.py#L166..L210) to parse the file. That means if anything is actually overly strict then it's Python.",
"```\r\nTraceback (most recent call last):\r\n File \"test.py\", line 4, in <module>\r\n netrc.netrc(os.path.expanduser('~/.netrc')).authenticators('api.github.com')\r\n File \"/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/netrc.py\", line 35, in __init__\r\n self._parse(file, fp, default_netrc)\r\n File \"/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/netrc.py\", line 88, in _parse\r\n file, lexer.lineno)\r\nnetrc.NetrcParseError: malformed machine entry circleci.com terminated by 'machine' (/Users/ian/.netrc, line 3)\r\n```",
"In this case, I only had circleci.com and api.github.com in netrc",
"Your traceback shows that this is in fact not the fault of Requests and there's little for us to do to work around it.\r\n\r\nPerhaps a more modern version of Python fixes the issue with the standard library."
] |
https://api.github.com/repos/psf/requests/issues/4812
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4812/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4812/comments
|
https://api.github.com/repos/psf/requests/issues/4812/events
|
https://github.com/psf/requests/pull/4812
| 365,528,185 |
MDExOlB1bGxSZXF1ZXN0MjE5NDI3NjMx
| 4,812 |
Fix no_proxy being too greedy.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/3407667?v=4",
"events_url": "https://api.github.com/users/gilbsgilbs/events{/privacy}",
"followers_url": "https://api.github.com/users/gilbsgilbs/followers",
"following_url": "https://api.github.com/users/gilbsgilbs/following{/other_user}",
"gists_url": "https://api.github.com/users/gilbsgilbs/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gilbsgilbs",
"id": 3407667,
"login": "gilbsgilbs",
"node_id": "MDQ6VXNlcjM0MDc2Njc=",
"organizations_url": "https://api.github.com/users/gilbsgilbs/orgs",
"received_events_url": "https://api.github.com/users/gilbsgilbs/received_events",
"repos_url": "https://api.github.com/users/gilbsgilbs/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gilbsgilbs/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gilbsgilbs/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gilbsgilbs",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 1 |
2018-10-01T15:55:19Z
|
2022-01-03T15:29:43Z
| null |
NONE
| null |
**Summary:** Setting `no_proxy` on `requests.com` used to enable it on `somerequests.com` also, which was unexpected and potentially dangerous. (see #4795)
Note that this delegates to urllib more often, as stated [here](https://github.com/requests/requests/issues/4795#issuecomment-425886286). I don't have the history behind `should_bypass_proxies` implementation, therefore my change is the tiniest possible (minimum thing to fix the greedy behavior). I don't know exactly why requests tries some things first and then delegates to urllib though.
Fixes #4795
| 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/4812/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4812/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4812.diff",
"html_url": "https://github.com/psf/requests/pull/4812",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4812.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4812"
}
| true |
[
"Apparently [CPython 3.4 `no_proxy` implementation was as naive as requests'](https://github.com/python/cpython/blob/cd1d5c554c40b5b348de2e77d65986aa154e4477/Lib/urllib/request.py#L2349), hence the failing build. Not sure giving the final word to `proxy_bypass` is a great idea. Can't we just use the same implementation as in [CPython 3.7](https://github.com/python/cpython/blob/655608a1112e592cd6a9155ebe774dd285f561f3/Lib/urllib/request.py#L2487)?"
] |
https://api.github.com/repos/psf/requests/issues/4811
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4811/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4811/comments
|
https://api.github.com/repos/psf/requests/issues/4811/events
|
https://github.com/psf/requests/issues/4811
| 365,307,807 |
MDU6SXNzdWUzNjUzMDc4MDc=
| 4,811 |
Decode as UTF-8 when charset is none and content-type header is "application/json"
|
{
"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 | 2 |
2018-10-01T04:48:38Z
|
2021-09-07T00:06:14Z
|
2018-10-02T01:05:17Z
|
NONE
|
resolved
|
## Actual Result
When content-type header is "application/json" and charset is none, `response.encoding` is empty.
```python:server.py
from flask import Flask, make_response, jsonify
import json
app = Flask(__name__)
@app.route('/test')
def test():
resp = jsonify({"result":"test"})
resp.headers['Content-Type'] = 'application/json;'
return resp
```
```python:client.py
r = requests.get("http://localhost:5000/test")
print(r.encoding)
// empty
```
## Feature request
In RFC8259, character encoding of JSON must be UTF-8. Please ensure it is set correctly.
>JSON text exchanged between systems that are not part of a closed ecosystem MUST be encoded using UTF-8 [RFC3629].
https://www.rfc-editor.org/rfc/rfc8259.txt
|
{
"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"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4811/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4811/timeline
| null |
completed
| null | null | false |
[
"Hi @yuji38kwmt, it's important to note RFC8259 specifies that it:\r\n> MUST be **encoded** using UTF-8\r\n\r\nThat's a directive for a client before sending JSON data outside of its ecosystem. Requests should do this [here](https://github.com/requests/requests/blob/a6cd380c640087218695bc7c62311a4843777e43/requests/models.py#L462-L468). As for receiving data, the very next line of the RFC states:\r\n> Previous specifications of JSON have not required the use of UTF-8\r\n when transmitting JSON text.\r\n\r\nMany of these implementations still exist in the wild and are actively used. We can't make a decision to blacklist or break compatibility with those clients when a new RFC is released. Requests generally works with the philosophy of ensuring what we emit conforms to the current spec, but that we tolerate receiving many of the commonly observed deviations from it.\r\n\r\nThe encoding attribute is only used on the `text` method, as noted in the documentation so it's OK for it to be None. You should find though that calling the `json` method on your response returns a properly encoded string if it is in fact utf-8. Are you observing something different?",
"Thanks.\r\n\r\n>You should find though that calling the json method on your response returns a properly encoded string if it is in fact utf-8. Are you observing something different?\r\n\r\nI didn't know `json` method , so I used `json.loads(response.text)` insted of `json` method.\r\nI close this issue."
] |
https://api.github.com/repos/psf/requests/issues/4810
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4810/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4810/comments
|
https://api.github.com/repos/psf/requests/issues/4810/events
|
https://github.com/psf/requests/issues/4810
| 365,195,132 |
MDU6SXNzdWUzNjUxOTUxMzI=
| 4,810 |
Using requests with unpatched socket
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/19701852?v=4",
"events_url": "https://api.github.com/users/kushalagrawal/events{/privacy}",
"followers_url": "https://api.github.com/users/kushalagrawal/followers",
"following_url": "https://api.github.com/users/kushalagrawal/following{/other_user}",
"gists_url": "https://api.github.com/users/kushalagrawal/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kushalagrawal",
"id": 19701852,
"login": "kushalagrawal",
"node_id": "MDQ6VXNlcjE5NzAxODUy",
"organizations_url": "https://api.github.com/users/kushalagrawal/orgs",
"received_events_url": "https://api.github.com/users/kushalagrawal/received_events",
"repos_url": "https://api.github.com/users/kushalagrawal/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kushalagrawal/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kushalagrawal/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kushalagrawal",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-09-30T05:54:34Z
|
2018-09-30T12:55:26Z
|
2018-09-30T12:55:21Z
|
NONE
|
off-topic
|
Hi,
In my python environment, I am using patched socket using eventlet. But sometimes the thread is getting stuck because of eventlet library limitation,
[https://github.com/eventlet/eventlet/issues/492](https://github.com/eventlet/eventlet/issues/492)
therefore According to event I need to use eventlet.patcher.original("requests"), while using this I am gettting this error :
`` requests = eventlet.patcher.original("requests")
File "/usr/lib/python2.7/site-packages/eventlet/patcher.py", line 194, in original
real_mod = __import__(modname, {}, {}, modname.split('.')[:-1])
File "/usr/lib/python2.7/site-packages/requests/__init__.py", line 63, in <module>
from . import utils
ImportError: cannot import name utils ``
When I debug it request.request shows me `func_code = <code object request at 0x7f4443cc7bb0, file "/usr/lib/python2.7/site-packages/requests/api.py", line 16>`
but socket.socket gives me "<class 'eventlet.greenio.base.GreenSocket'>".
So, is it possible pass unpatched socket (which comes from eventlet.patcher.original("socket")) while using requests.request ?
|
{
"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/4810/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4810/timeline
| null |
completed
| null | null | false |
[
"Based on your traceback, this seems to be an issue with how `eventlet.patcher` works. This is not an issue in Requests. It would seem eventlet doesn't understand import semantics or how to use import machinery. By default Requests uses `socket.socket` (unpatched, not eventlet) so to answer your question, yes it is possible to use that. It would be even more possible if eventlet were using the import machinery appropriately."
] |
https://api.github.com/repos/psf/requests/issues/4809
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4809/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4809/comments
|
https://api.github.com/repos/psf/requests/issues/4809/events
|
https://github.com/psf/requests/issues/4809
| 364,637,984 |
MDU6SXNzdWUzNjQ2Mzc5ODQ=
| 4,809 |
Get request for .kg domains fail on Ubuntu but not Mac OSX
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/25164676?v=4",
"events_url": "https://api.github.com/users/bsolomon1124/events{/privacy}",
"followers_url": "https://api.github.com/users/bsolomon1124/followers",
"following_url": "https://api.github.com/users/bsolomon1124/following{/other_user}",
"gists_url": "https://api.github.com/users/bsolomon1124/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bsolomon1124",
"id": 25164676,
"login": "bsolomon1124",
"node_id": "MDQ6VXNlcjI1MTY0Njc2",
"organizations_url": "https://api.github.com/users/bsolomon1124/orgs",
"received_events_url": "https://api.github.com/users/bsolomon1124/received_events",
"repos_url": "https://api.github.com/users/bsolomon1124/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bsolomon1124/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bsolomon1124/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bsolomon1124",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2018-09-27T20:19:38Z
|
2021-09-07T00:06:17Z
|
2018-09-28T12:53:46Z
|
NONE
|
resolved
|
**Edit** - after investigating this more, it looks like this issue is not specific to `requests`, per se. Please feel free to close it, but I would greatly appreciate any ideas about what could possibly be different between the two scenarios.
----
Same version of `requests` fails on a straightforward GET request for http://www.for.kg/news-515078-ru.html and a lot of other URLs for this domain as well.
The only version difference from `python3 -m requests.help` is `ssl`: 1000207f versus 1000210f. (And Python 3.6.6 versus 3.7.0, I should mention.)
**Updates at bottom** here as I've tried to debug this.
Here are the headers for each.
**Ubuntu**:
```bash
(py36) root@ip-XX-XX-XX-XX:/home/ubuntu/clipslab# curl -I http://www.for.kg/news-515078-ru.html
HTTP/1.1 302 Moved Temporarily
Server: nginx
Date: Thu, 27 Sep 2018 23:33:32 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
location: http://.amazonaws.com
Access-Control-Allow-Origin: *
X-Powered-By: PleskLin
```
**Mac**:
```
~$ curl -I http://www.for.kg/news-515078-ru.html
HTTP/1.1 200 OK
Server: nginx
Date: Thu, 27 Sep 2018 23:33:17 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Vary: Accept-Encoding
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: PHPSESSID=XXXXXXX; path=/
Set-Cookie: nlang=ru; expires=Sat, 28-Sep-2019 23:33:14 GMT; path=/
Set-Cookie: forkgnews515078=true; expires=Thu, 04-Oct-2018 23:33:17 GMT; path=/
Access-Control-Allow-Origin: *
X-Powered-By: PleskLin
```
## Expected Result
A 200 status code, a response with content, ... the works.
## Actual Result
### Traceback on Ubuntu
```python
>>> import requests
>>> url = 'http://www.for.kg/news-515078-ru.html'
>>> requests.request('GET', url)
Traceback (most recent call last):
File "/home/ubuntu/clipslab/py36/lib/python3.6/encodings/idna.py", line 165, in encode
raise UnicodeError("label empty or too long")
UnicodeError: label empty or too long
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/home/ubuntu/clipslab/py36/lib/python3.6/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/home/ubuntu/clipslab/py36/lib/python3.6/site-packages/requests/sessions.py", line 512, in request
resp = self.send(prep, **send_kwargs)
File "/home/ubuntu/clipslab/py36/lib/python3.6/site-packages/requests/sessions.py", line 644, in send
history = [resp for resp in gen] if allow_redirects else []
File "/home/ubuntu/clipslab/py36/lib/python3.6/site-packages/requests/sessions.py", line 644, in <listcomp>
history = [resp for resp in gen] if allow_redirects else []
File "/home/ubuntu/clipslab/py36/lib/python3.6/site-packages/requests/sessions.py", line 222, in resolve_redirects
**adapter_kwargs
File "/home/ubuntu/clipslab/py36/lib/python3.6/site-packages/requests/sessions.py", line 622, in send
r = adapter.send(request, **kwargs)
File "/home/ubuntu/clipslab/py36/lib/python3.6/site-packages/requests/adapters.py", line 445, in send
timeout=timeout
File "/home/ubuntu/clipslab/py36/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/home/ubuntu/clipslab/py36/lib/python3.6/site-packages/urllib3/connectionpool.py", line 354, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.6/http/client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1026, in _send_output
self.send(msg)
File "/usr/lib/python3.6/http/client.py", line 964, in send
self.connect()
File "/home/ubuntu/clipslab/py36/lib/python3.6/site-packages/urllib3/connection.py", line 196, in connect
conn = self._new_conn()
File "/home/ubuntu/clipslab/py36/lib/python3.6/site-packages/urllib3/connection.py", line 171, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw)
File "/home/ubuntu/clipslab/py36/lib/python3.6/site-packages/urllib3/util/connection.py", line 56, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/usr/lib/python3.6/socket.py", line 745, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
UnicodeError: encoding with 'idna' codec failed (UnicodeError: label empty or too long)
```
Going to throw a pdb trace in there and try to follow along but that is a hell of a traceback.
What I can tell is that:
- Original URL redirects
- Response encoding is chunked (see headers below)
### No Problem on Mac
```python
>>> import requests
>>> url = 'http://www.for.kg/news-515078-ru.html'
>>> res = requests.request('GET', url)
>>> res
<Response [200]>
>>> len(res.content)
28079
>>> res.headers
{'Server': 'nginx', 'Date': 'Thu, 27 Sep 2018 20:15:16 GMT', 'Content-Type': 'text/html; charset=utf-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Vary': 'Accept-Encoding', 'Expires': 'Thu, 19 Nov 1981 08:52:00 GMT', 'Cache-Control': 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0', 'Pragma': 'no-cache', 'Set-Cookie': 'PHPSESSID=XXXXX; path=/, nlang=ru; expires=Sat, 28-Sep-2019 20:15:16 GMT; path=/, forkgnews515078=true; expires=Thu, 04-Oct-2018 20:15:16 GMT; path=/', 'Access-Control-Allow-Origin': '*', 'X-Powered-By': 'PleskLin', 'Content-Encoding': 'gzip'}
```
## System Information
### Ubuntu
**Ubuntu 16.04.5 LTS (GNU/Linux 4.4.0-1065-aws x86_64)**
```bash
$ python -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.7"
},
"implementation": {
"name": "CPython",
"version": "3.6.6"
},
"platform": {
"release": "4.4.0-1065-aws",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.19.1"
},
"system_ssl": {
"version": "1000207f"
},
"urllib3": {
"version": "1.23"
},
"using_pyopenssl": false
}
```
### Mac
```bash
$ python -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.7"
},
"implementation": {
"name": "CPython",
"version": "3.7.0"
},
"platform": {
"release": "17.7.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.19.1"
},
"system_ssl": {
"version": "1000210f"
},
"urllib3": {
"version": "1.23"
},
"using_pyopenssl": false
}
```
## Updates
**On Ubuntu**:
From `requests/sessions.py`, `r = adapter.send(request, **kwargs)`, I can confirm there is a redirect. (In fact, when I did a similar process with aiohttp, it was the location key, `http://.amazonaws.com`, that raised an exception. Might be that here too, not sure yet.
```python
(Pdb) p r
<Response [302]>
(Pdb) p r.headers
{'Server': 'nginx', 'Date': 'Thu, 27 Sep 2018 20:49:01 GMT', 'Content-Type': 'text/html; charset=utf-8', 'Content-Length': '0', 'Connection': 'keep-alive', 'location': 'http://.amazonaws.com', 'Access-Control-Allow-Origin': '*', 'X-Powered-By': 'PleskLin'}
```
The AWS address gets used as URL [here](https://github.com/requests/requests/blob/207e83f6b63250c2251f9654f31507ea5cc7edc6/requests/sessions.py#L140); to confirm:
```python
(Pdb) url
'http://.amazonaws.com'
(Pdb) prepared_request.url
'http://.amazonaws.com'
```
So the 'location' header gets [pulled off the 302 response](https://github.com/requests/requests/blob/207e83f6b63250c2251f9654f31507ea5cc7edc6/requests/sessions.py#L106), which is the input to `get_redirect_target()`, and used as (next) the URL in the redirect resolve; this leads to another call to `self.send(..., allow_redirects=False)`.
**On Mac**:
It seems where the difference originally arises is that on Mac, I never encounter the 302 response in the first place:
```python
(Pdb)
> /usr/local/lib/python3.7/site-packages/requests/sessions.py(625)send()
-> elapsed = preferred_clock() - start
(Pdb) p r
<Response [200]>
(Pdb) p r.headers
{'Server': 'nginx', 'Date': 'Thu, 27 Sep 2018 21:23:35 GMT', 'Content-Type': 'text/html; charset=utf-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Vary': 'Accept-Encoding', 'Expires': 'Thu, 19 Nov 1981 08:52:00 GMT', 'Cache-Control': 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0', 'Pragma': 'no-cache', 'Set-Cookie': 'PHPSESSID=XXXXX; path=/, nlang=ru; expires=Sat, 28-Sep-2019 21:23:35 GMT; path=/, forkgnews515078=true; expires=Thu, 04-Oct-2018 21:23:35 GMT; path=/', 'Access-Control-Allow-Origin': '*', 'X-Powered-By': 'PleskLin', 'Content-Encoding': 'gzip'}
```
|
{
"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/4809/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4809/timeline
| null |
completed
| null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/4808
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4808/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4808/comments
|
https://api.github.com/repos/psf/requests/issues/4808/events
|
https://github.com/psf/requests/issues/4808
| 364,450,246 |
MDU6SXNzdWUzNjQ0NTAyNDY=
| 4,808 |
response cookies missing
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1035487?v=4",
"events_url": "https://api.github.com/users/perklet/events{/privacy}",
"followers_url": "https://api.github.com/users/perklet/followers",
"following_url": "https://api.github.com/users/perklet/following{/other_user}",
"gists_url": "https://api.github.com/users/perklet/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/perklet",
"id": 1035487,
"login": "perklet",
"node_id": "MDQ6VXNlcjEwMzU0ODc=",
"organizations_url": "https://api.github.com/users/perklet/orgs",
"received_events_url": "https://api.github.com/users/perklet/received_events",
"repos_url": "https://api.github.com/users/perklet/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/perklet/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/perklet/subscriptions",
"type": "User",
"url": "https://api.github.com/users/perklet",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-09-27T12:24:07Z
|
2021-09-07T00:06:17Z
|
2018-09-28T12:53:29Z
|
NONE
|
resolved
|
cookies not found in response
## Expected Result
`foo=bar` shown in cookies
## Actual Result
empty cookiejar
## Reproduction Steps
```python
In [14]: r = requests.get('http://httpbin.org/cookies/set?foo=bar')
In [15]: r.cookies
Out[15]: <RequestsCookieJar[]>
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.2.2"
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.6.5"
},
"platform": {
"release": "17.5.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "1010008f",
"version": "17.5.0"
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "100020ff"
},
"urllib3": {
"version": "1.22"
},
"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/4808/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4808/timeline
| null |
completed
| null | null | false |
[
"I have figured out why, there is a redirection. The cookies were set in first response, which is a 302 redirect, and the second response set no cookies. So r.cookies is empty, but cookies are found in s.cookies. Is this a intended behavior?",
"It is entirely intended behaviour. I believe it is documented as well."
] |
https://api.github.com/repos/psf/requests/issues/4807
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4807/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4807/comments
|
https://api.github.com/repos/psf/requests/issues/4807/events
|
https://github.com/psf/requests/issues/4807
| 364,349,307 |
MDU6SXNzdWUzNjQzNDkzMDc=
| 4,807 |
SSLError: [Errno 8] _ssl.c:508: EOF occurred in violation of protocol
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/42903999?v=4",
"events_url": "https://api.github.com/users/msuthar291086/events{/privacy}",
"followers_url": "https://api.github.com/users/msuthar291086/followers",
"following_url": "https://api.github.com/users/msuthar291086/following{/other_user}",
"gists_url": "https://api.github.com/users/msuthar291086/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/msuthar291086",
"id": 42903999,
"login": "msuthar291086",
"node_id": "MDQ6VXNlcjQyOTAzOTk5",
"organizations_url": "https://api.github.com/users/msuthar291086/orgs",
"received_events_url": "https://api.github.com/users/msuthar291086/received_events",
"repos_url": "https://api.github.com/users/msuthar291086/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/msuthar291086/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/msuthar291086/subscriptions",
"type": "User",
"url": "https://api.github.com/users/msuthar291086",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-09-27T07:58:45Z
|
2018-09-28T12:55:11Z
|
2018-09-28T12:54:51Z
|
NONE
|
off-topic
|
Hi Experts,
I am getting the following error while running a python script on my Linux box.
Script: https://github.com/coreyhines/Arista/blob/master/bugalertUpdate.py
Traceback (most recent call last):
File "./bugalertUpdate-2.py", line 84, in <module>
result = requests.post(url, data=json.dumps(jsonpost))
File "/usr/lib/python2.7/site-packages/requests/api.py", line 88, in post
return request('post', url, data=data, **kwargs)
File "/usr/lib/python2.7/site-packages/requests/api.py", line 44, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 335, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 438, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 331, in send
raise SSLError(e)
SSLError: [Errno 8] _ssl.c:508: EOF occurred in violation of protocol
Request your help on this issue.
|
{
"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/4807/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4807/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/4806
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4806/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4806/comments
|
https://api.github.com/repos/psf/requests/issues/4806/events
|
https://github.com/psf/requests/issues/4806
| 363,542,998 |
MDU6SXNzdWUzNjM1NDI5OTg=
| 4,806 |
How to set requests 'user-agent' header globally
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/7598892?v=4",
"events_url": "https://api.github.com/users/beruhan/events{/privacy}",
"followers_url": "https://api.github.com/users/beruhan/followers",
"following_url": "https://api.github.com/users/beruhan/following{/other_user}",
"gists_url": "https://api.github.com/users/beruhan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/beruhan",
"id": 7598892,
"login": "beruhan",
"node_id": "MDQ6VXNlcjc1OTg4OTI=",
"organizations_url": "https://api.github.com/users/beruhan/orgs",
"received_events_url": "https://api.github.com/users/beruhan/received_events",
"repos_url": "https://api.github.com/users/beruhan/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/beruhan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/beruhan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/beruhan",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 7 |
2018-09-25T12:01:01Z
|
2021-08-31T00:06:57Z
|
2018-09-25T16:48:34Z
|
NONE
|
resolved
|
I want to set requests 'user-agent' header globally,But I can't find any way to do it,Can anyone help me?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4806/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4806/timeline
| null |
completed
| null | null | false |
[
"Read the documentation: http://docs.python-requests.org/en/master/user/advanced/\r\n\r\n```\r\ns = requests.Session()\r\ns.headers.update({'x-test': 'true'})\r\n\r\n# both 'x-test' and 'x-test2' are sent\r\ns.get('http://httpbin.org/headers', headers={'x-test2': 'true'})\r\n```\r\n\r\n\r\n\r\n\r\n",
"Hi @beruhan, @therumbler is correct. For future reference, we use the issue tracker for defects in Requests. Questions and requests for assistance should be directed to StackOverflow.com with the python-requests tag. Thanks!",
"Long time later, but is there a way to set the user agent even for implicit requests? Like if I use a function from a library that makes a request, then it won't fall under the Session if I go that way. What would be the way in that case?",
"@aadibajpai Quoting literally the last comment here:\r\n\r\n> Questions and requests for assistance should be directed to StackOverflow.com with the python-requests tag.",
"> @aadibajpai Quoting literally the last comment here:\r\n> \r\n> > Questions and requests for assistance should be directed to StackOverflow.com with the python-requests tag.\r\n\r\nBeen there, found something (https://stackoverflow.com/questions/52497739/how-to-set-requests-user-agent-header-globally), didn't help and since the question is same then a new question would be marked a duplicate :)",
"Thta doesn't magically make this the right place to ask questions since this is officially not the place for questions or requests for support to be asked",
"> Thta doesn't magically make this the right place to ask questions since this is officially not the place for questions or requests for support to be asked\r\n\r\nFair enough, do you have a recommendation then? 🙂 "
] |
https://api.github.com/repos/psf/requests/issues/4805
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4805/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4805/comments
|
https://api.github.com/repos/psf/requests/issues/4805/events
|
https://github.com/psf/requests/pull/4805
| 362,976,709 |
MDExOlB1bGxSZXF1ZXN0MjE3NTMwNzYz
| 4,805 |
Prefer https:// for URLs throughout project
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/347634?v=4",
"events_url": "https://api.github.com/users/jdufresne/events{/privacy}",
"followers_url": "https://api.github.com/users/jdufresne/followers",
"following_url": "https://api.github.com/users/jdufresne/following{/other_user}",
"gists_url": "https://api.github.com/users/jdufresne/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jdufresne",
"id": 347634,
"login": "jdufresne",
"node_id": "MDQ6VXNlcjM0NzYzNA==",
"organizations_url": "https://api.github.com/users/jdufresne/orgs",
"received_events_url": "https://api.github.com/users/jdufresne/received_events",
"repos_url": "https://api.github.com/users/jdufresne/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jdufresne/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jdufresne/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jdufresne",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2018-09-23T20:56:44Z
|
2021-09-01T00:11:55Z
|
2018-10-01T00:27:24Z
|
CONTRIBUTOR
|
resolved
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4805/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4805/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4805.diff",
"html_url": "https://github.com/psf/requests/pull/4805",
"merged_at": "2018-10-01T00:27:24Z",
"patch_url": "https://github.com/psf/requests/pull/4805.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4805"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4805?src=pr&el=h1) Report\n> Merging [#4805](https://codecov.io/gh/requests/requests/pull/4805?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/207e83f6b63250c2251f9654f31507ea5cc7edc6?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4805?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4805 +/- ##\n=======================================\n Coverage 66.77% 66.77% \n=======================================\n Files 15 15 \n Lines 1568 1568 \n=======================================\n Hits 1047 1047 \n Misses 521 521\n```\n\n\n| [Impacted Files](https://codecov.io/gh/requests/requests/pull/4805?src=pr&el=tree) | Coverage Δ | |\n|---|---|---|\n| [requests/models.py](https://codecov.io/gh/requests/requests/pull/4805/diff?src=pr&el=tree#diff-cmVxdWVzdHMvbW9kZWxzLnB5) | `77.35% <ø> (ø)` | :arrow_up: |\n| [requests/api.py](https://codecov.io/gh/requests/requests/pull/4805/diff?src=pr&el=tree#diff-cmVxdWVzdHMvYXBpLnB5) | `36.36% <ø> (ø)` | :arrow_up: |\n| [requests/sessions.py](https://codecov.io/gh/requests/requests/pull/4805/diff?src=pr&el=tree#diff-cmVxdWVzdHMvc2Vzc2lvbnMucHk=) | `76.34% <ø> (ø)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4805?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4805?src=pr&el=footer). Last update [207e83f...839af77](https://codecov.io/gh/requests/requests/pull/4805?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"Did you verify all of these work?",
"Hi Kenneth,\r\n\r\nI've done this same change on a number of different repositories now. I automated this change using the script:\r\n\r\nhttps://github.com/jdufresne/commit-messages/blob/master/scripts/checkhttp.py\r\n\r\nAt a high level, this script does the following:\r\n\r\n1. Scans all text files for strings that look like a URL starting with `http://`\r\n2. Tries fetching the same URL but with `https://`\r\n3. Check the final destination is a 200 response with protocol `https://` (to avoid redirects back to `http://`)\r\n4. If it looks good, replace all occurrences\r\n\r\nAfter running the script, I analyze the results locally using a visual diff tool (I like [meld](https://wiki.gnome.org/Apps/Meld)). I undo the changes for tests that look to be intentionally using an `http://` URL (requests has a lot of these). I also try to remove `en/latest/` paths from readthedocs that didn't previously exist. I manually test a bunch of URLs especially any that look suspicious with a wildly different path. I re-analyze the results using GitHub's diff tool (I find looking at a diff in multiple ways can help emphasize different differences).\r\n\r\nMany of the changed URLs share a domain. So after spot checking a few from these domains, we can be confident with the rest.\r\n\r\nSo, in summary, a script has confirmed that all these changes result in `https://` URLs that 200 and several have been manually tested.\r\n\r\nPlease feel free to re-run the script to verify or do additional manual testing.\r\n",
"Thanks for catching those mistakes. Restored and fixed in the latest revision."
] |
|
https://api.github.com/repos/psf/requests/issues/4804
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4804/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4804/comments
|
https://api.github.com/repos/psf/requests/issues/4804/events
|
https://github.com/psf/requests/pull/4804
| 362,976,008 |
MDExOlB1bGxSZXF1ZXN0MjE3NTMwMjk5
| 4,804 |
Remove dead link to unixstickers.com
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/347634?v=4",
"events_url": "https://api.github.com/users/jdufresne/events{/privacy}",
"followers_url": "https://api.github.com/users/jdufresne/followers",
"following_url": "https://api.github.com/users/jdufresne/following{/other_user}",
"gists_url": "https://api.github.com/users/jdufresne/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jdufresne",
"id": 347634,
"login": "jdufresne",
"node_id": "MDQ6VXNlcjM0NzYzNA==",
"organizations_url": "https://api.github.com/users/jdufresne/orgs",
"received_events_url": "https://api.github.com/users/jdufresne/received_events",
"repos_url": "https://api.github.com/users/jdufresne/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jdufresne/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jdufresne/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jdufresne",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-09-23T20:47:10Z
|
2021-09-01T00:11:56Z
|
2018-09-30T20:04:01Z
|
CONTRIBUTOR
|
resolved
|
The link does not link Requests stickers as the text suggests.
|
{
"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/4804/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4804/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4804.diff",
"html_url": "https://github.com/psf/requests/pull/4804",
"merged_at": "2018-09-30T20:04:01Z",
"patch_url": "https://github.com/psf/requests/pull/4804.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4804"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4804?src=pr&el=h1) Report\n> Merging [#4804](https://codecov.io/gh/requests/requests/pull/4804?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/207e83f6b63250c2251f9654f31507ea5cc7edc6?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4804?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4804 +/- ##\n=======================================\n Coverage 66.77% 66.77% \n=======================================\n Files 15 15 \n Lines 1568 1568 \n=======================================\n Hits 1047 1047 \n Misses 521 521\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4804?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4804?src=pr&el=footer). Last update [207e83f...e71396a](https://codecov.io/gh/requests/requests/pull/4804?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n"
] |
https://api.github.com/repos/psf/requests/issues/4803
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4803/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4803/comments
|
https://api.github.com/repos/psf/requests/issues/4803/events
|
https://github.com/psf/requests/issues/4803
| 362,860,450 |
MDU6SXNzdWUzNjI4NjA0NTA=
| 4,803 |
Issue Passing All Tests in Suite
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1155601?v=4",
"events_url": "https://api.github.com/users/josephlane/events{/privacy}",
"followers_url": "https://api.github.com/users/josephlane/followers",
"following_url": "https://api.github.com/users/josephlane/following{/other_user}",
"gists_url": "https://api.github.com/users/josephlane/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/josephlane",
"id": 1155601,
"login": "josephlane",
"node_id": "MDQ6VXNlcjExNTU2MDE=",
"organizations_url": "https://api.github.com/users/josephlane/orgs",
"received_events_url": "https://api.github.com/users/josephlane/received_events",
"repos_url": "https://api.github.com/users/josephlane/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/josephlane/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/josephlane/subscriptions",
"type": "User",
"url": "https://api.github.com/users/josephlane",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-09-22T14:16:36Z
|
2021-09-07T00:06:16Z
|
2018-09-30T20:49:17Z
|
NONE
|
resolved
|
Hello,
In my efforts to start contributing to the requests codebase, I've run into an issue with one of the test.
<img width="1306" alt="screen shot 2018-09-22 at 8 59 54 am" src="https://user-images.githubusercontent.com/1155601/45918043-6538a780-be46-11e8-9acf-44a6fc2042a4.png">
This issue seems to relate to https://github.com/requests/requests/issues/3732 in some way but I've had no luck in tracing down the exact culprit.
The two items that stand out to me are:
> pytest-httpbin server hit an exception serving request: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:661)
> attempting to ignore so the rest of the tests can run
and
> Failed: DID NOT RAISE <class 'requests.exceptions.ConnectionError'>
Steps to reproduce against my current configuration:
I'm executing these test by tying in "Pytest" in the requests directory.
Any help will 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/4803/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4803/timeline
| null |
completed
| null | null | false |
[
"Hi @josephlane, it sounds like you have something on your network that may be intercepting this request and routing it somewhere else. Typically, this won't resolve to a valid IP address since it's not an actual service. Since the request is not over https, we don't have a way to prevent interception from happening. I would verify you don't have some sort of network manager, proxy, or possibly a bad actor intercepting this request."
] |
https://api.github.com/repos/psf/requests/issues/4802
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4802/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4802/comments
|
https://api.github.com/repos/psf/requests/issues/4802/events
|
https://github.com/psf/requests/pull/4802
| 362,687,932 |
MDExOlB1bGxSZXF1ZXN0MjE3MzM2MjUy
| 4,802 |
Update README.md to fix typo
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/10122464?v=4",
"events_url": "https://api.github.com/users/schafezp/events{/privacy}",
"followers_url": "https://api.github.com/users/schafezp/followers",
"following_url": "https://api.github.com/users/schafezp/following{/other_user}",
"gists_url": "https://api.github.com/users/schafezp/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/schafezp",
"id": 10122464,
"login": "schafezp",
"node_id": "MDQ6VXNlcjEwMTIyNDY0",
"organizations_url": "https://api.github.com/users/schafezp/orgs",
"received_events_url": "https://api.github.com/users/schafezp/received_events",
"repos_url": "https://api.github.com/users/schafezp/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/schafezp/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/schafezp/subscriptions",
"type": "User",
"url": "https://api.github.com/users/schafezp",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2018-09-21T16:23:04Z
|
2021-09-01T00:11:56Z
|
2018-09-21T16:27:13Z
|
CONTRIBUTOR
|
resolved
|
I noticed "Rquests" was used at the top of the readme instead of "Requests". If that was intentional then ignore this change.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4802/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4802/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4802.diff",
"html_url": "https://github.com/psf/requests/pull/4802",
"merged_at": "2018-09-21T16:27:13Z",
"patch_url": "https://github.com/psf/requests/pull/4802.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4802"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/4801
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4801/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4801/comments
|
https://api.github.com/repos/psf/requests/issues/4801/events
|
https://github.com/psf/requests/pull/4801
| 362,236,691 |
MDExOlB1bGxSZXF1ZXN0MjE3MDEwNjUx
| 4,801 |
Merge pull request #1 from requests/master
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/232575?v=4",
"events_url": "https://api.github.com/users/Corvan/events{/privacy}",
"followers_url": "https://api.github.com/users/Corvan/followers",
"following_url": "https://api.github.com/users/Corvan/following{/other_user}",
"gists_url": "https://api.github.com/users/Corvan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Corvan",
"id": 232575,
"login": "Corvan",
"node_id": "MDQ6VXNlcjIzMjU3NQ==",
"organizations_url": "https://api.github.com/users/Corvan/orgs",
"received_events_url": "https://api.github.com/users/Corvan/received_events",
"repos_url": "https://api.github.com/users/Corvan/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Corvan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Corvan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Corvan",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-09-20T15:16:14Z
|
2021-09-01T00:11:57Z
|
2018-09-20T15:18:44Z
|
NONE
|
resolved
|
pull from original
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/232575?v=4",
"events_url": "https://api.github.com/users/Corvan/events{/privacy}",
"followers_url": "https://api.github.com/users/Corvan/followers",
"following_url": "https://api.github.com/users/Corvan/following{/other_user}",
"gists_url": "https://api.github.com/users/Corvan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Corvan",
"id": 232575,
"login": "Corvan",
"node_id": "MDQ6VXNlcjIzMjU3NQ==",
"organizations_url": "https://api.github.com/users/Corvan/orgs",
"received_events_url": "https://api.github.com/users/Corvan/received_events",
"repos_url": "https://api.github.com/users/Corvan/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Corvan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Corvan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Corvan",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4801/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4801/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4801.diff",
"html_url": "https://github.com/psf/requests/pull/4801",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4801.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4801"
}
| true |
[
"sorry my fault, can be deleted"
] |
https://api.github.com/repos/psf/requests/issues/4800
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4800/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4800/comments
|
https://api.github.com/repos/psf/requests/issues/4800/events
|
https://github.com/psf/requests/issues/4800
| 361,930,963 |
MDU6SXNzdWUzNjE5MzA5NjM=
| 4,800 |
Please document how to make requests trust system SSL cert repository
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/4665100?v=4",
"events_url": "https://api.github.com/users/jackjansen/events{/privacy}",
"followers_url": "https://api.github.com/users/jackjansen/followers",
"following_url": "https://api.github.com/users/jackjansen/following{/other_user}",
"gists_url": "https://api.github.com/users/jackjansen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jackjansen",
"id": 4665100,
"login": "jackjansen",
"node_id": "MDQ6VXNlcjQ2NjUxMDA=",
"organizations_url": "https://api.github.com/users/jackjansen/orgs",
"received_events_url": "https://api.github.com/users/jackjansen/received_events",
"repos_url": "https://api.github.com/users/jackjansen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jackjansen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jackjansen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jackjansen",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-09-19T21:16:30Z
|
2021-09-07T00:06:19Z
|
2018-09-19T21:23:38Z
|
NONE
|
resolved
|
The documentation explains how to use a specific file or directory of certificates to trust, but I cannot find how to make it simply trust the system set (for the current system). With older versions of requests this was the default, which made it rather easy to install some extra intranet root certs on all sorts of different machines (different Linux flavours, OSX, possibly even Windows) and have the intranet certs be trusted by everything from browsers to requests-based programs. It is unclear how to get this behaviour with the current version of requests and certifi.
|
{
"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/4800/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4800/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/4799
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4799/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4799/comments
|
https://api.github.com/repos/psf/requests/issues/4799/events
|
https://github.com/psf/requests/issues/4799
| 361,907,680 |
MDU6SXNzdWUzNjE5MDc2ODA=
| 4,799 |
Consider not using single char variables in docs
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/794283?v=4",
"events_url": "https://api.github.com/users/claudijd/events{/privacy}",
"followers_url": "https://api.github.com/users/claudijd/followers",
"following_url": "https://api.github.com/users/claudijd/following{/other_user}",
"gists_url": "https://api.github.com/users/claudijd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/claudijd",
"id": 794283,
"login": "claudijd",
"node_id": "MDQ6VXNlcjc5NDI4Mw==",
"organizations_url": "https://api.github.com/users/claudijd/orgs",
"received_events_url": "https://api.github.com/users/claudijd/received_events",
"repos_url": "https://api.github.com/users/claudijd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/claudijd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/claudijd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/claudijd",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 6 |
2018-09-19T20:08:15Z
|
2021-09-07T00:06:20Z
|
2018-09-19T20:17:38Z
|
NONE
|
resolved
|
**Summary.**
I was debugging a requests example from the website here (http://docs.python-requests.org/en/master/) and was in a PDB session. Went to inspect "r" by typing "r" and <enter> it did not reference the variable "r".
**What you expected.**
I expected that it would return the object R
**What happened instead.**
It returned to the next method, because PDB uses hotkeys.
```python
import requests
r = requests.get('https://api.github.com/user', auth=('user', 'pass'))
import pdb; pdb.set_trace()
```
Then type 'r' in PDB session, will return instead of instance of 'r'.
**Suggestion.**
Update the docs to not use single-char variables. I would have sent a PR, but wanted to start here, as it's more emergent behavior of using PDB and single char vars then a direct requests issue, but is reflected in your examples.
|
{
"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/4799/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4799/timeline
| null |
completed
| null | null | false |
[
"Hi @claudijd, thanks for starting the conversation. While we want to make sure the documentation is easily accessible, I’m not sure this warrants a change. PDB has specifically added syntax to handle this issue. Whenever you’re printing a variable in the console, you should be prefixing it with an ! (e.g. !r) to avoid conflicts.\r\n\r\nGiven that we cannot control how other tools behave, the new variable could fail elsewhere and we’ll have to continue changing it. For those reasons, I think we’ll pass on this.",
"Thanks @nateprewitt ",
"@nateprewitt just for the sake of argument, should the docs then use the \"!r\" syntax as you suggest?",
"You'll end up with collisions with 'r.status_code' as well.",
">>> import requests\r\n>>> r = requests.get('https://api.github.com/user', auth=('user', 'pass'))\r\n>>> import pdb; pdb.set_trace()\r\n--Return--\r\n> <stdin>(1)<module>()->None\r\n(Pdb) r\r\n>>> r.status_code\r\n--Call--\r\n> <stdin>(1)<module>()->None\r\n(Pdb) exit()\r\nTraceback (most recent call last):\r\n File \"<stdin>\", line 1, in <module>\r\n File \"/usr/local/Cellar/python/3.6.4_3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/bdb.py\", line 50, in trace_dispatch\r\n return self.dispatch_call(frame, arg)\r\n File \"/usr/local/Cellar/python/3.6.4_3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/bdb.py\", line 83, in dispatch_call\r\n if self.quitting: raise BdbQuit\r\nbdb.BdbQuit\r\n",
"@claudijd no it shouldn't. The examples are (mostly) shown as if you've opened a python prompt, e.g., \r\n\r\n```\r\n$ python\r\n>>> import requests\r\n>>> r = requests.get('https://httpbin.org/get')\r\n>>> r\r\n```\r\n\r\nNot PDB"
] |
https://api.github.com/repos/psf/requests/issues/4798
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4798/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4798/comments
|
https://api.github.com/repos/psf/requests/issues/4798/events
|
https://github.com/psf/requests/pull/4798
| 361,744,954 |
MDExOlB1bGxSZXF1ZXN0MjE2NjM2MDM0
| 4,798 |
Improve parsing of header Digest
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/286080?v=4",
"events_url": "https://api.github.com/users/alkino/events{/privacy}",
"followers_url": "https://api.github.com/users/alkino/followers",
"following_url": "https://api.github.com/users/alkino/following{/other_user}",
"gists_url": "https://api.github.com/users/alkino/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alkino",
"id": 286080,
"login": "alkino",
"node_id": "MDQ6VXNlcjI4NjA4MA==",
"organizations_url": "https://api.github.com/users/alkino/orgs",
"received_events_url": "https://api.github.com/users/alkino/received_events",
"repos_url": "https://api.github.com/users/alkino/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alkino/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alkino/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alkino",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2018-09-19T13:17:39Z
|
2021-09-01T00:11:57Z
|
2018-09-19T16:23:54Z
|
NONE
|
resolved
|
If this header is multiline we can found 'Digest\r\n realm="..."\r\n ' instead of "Digest ".
|
{
"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/4798/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4798/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4798.diff",
"html_url": "https://github.com/psf/requests/pull/4798",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4798.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4798"
}
| true |
[
"Let's discuss about it :p",
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4798?src=pr&el=h1) Report\n> Merging [#4798](https://codecov.io/gh/requests/requests/pull/4798?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/d26f6314ab07eb8ea42ffb0a96e28deebf61ed18?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `100%`.\n\n[](https://codecov.io/gh/requests/requests/pull/4798?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4798 +/- ##\n=======================================\n Coverage 66.77% 66.77% \n=======================================\n Files 15 15 \n Lines 1568 1568 \n=======================================\n Hits 1047 1047 \n Misses 521 521\n```\n\n\n| [Impacted Files](https://codecov.io/gh/requests/requests/pull/4798?src=pr&el=tree) | Coverage Δ | |\n|---|---|---|\n| [requests/auth.py](https://codecov.io/gh/requests/requests/pull/4798/diff?src=pr&el=tree#diff-cmVxdWVzdHMvYXV0aC5weQ==) | `68.96% <100%> (ø)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4798?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4798?src=pr&el=footer). Last update [d26f631...a80148b](https://codecov.io/gh/requests/requests/pull/4798?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"No. See what @Lukasa told you in your issue"
] |
https://api.github.com/repos/psf/requests/issues/4797
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4797/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4797/comments
|
https://api.github.com/repos/psf/requests/issues/4797/events
|
https://github.com/psf/requests/issues/4797
| 361,720,236 |
MDU6SXNzdWUzNjE3MjAyMzY=
| 4,797 |
Not supported proxy scheme error
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/25459027?v=4",
"events_url": "https://api.github.com/users/oshadaamila/events{/privacy}",
"followers_url": "https://api.github.com/users/oshadaamila/followers",
"following_url": "https://api.github.com/users/oshadaamila/following{/other_user}",
"gists_url": "https://api.github.com/users/oshadaamila/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/oshadaamila",
"id": 25459027,
"login": "oshadaamila",
"node_id": "MDQ6VXNlcjI1NDU5MDI3",
"organizations_url": "https://api.github.com/users/oshadaamila/orgs",
"received_events_url": "https://api.github.com/users/oshadaamila/received_events",
"repos_url": "https://api.github.com/users/oshadaamila/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/oshadaamila/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/oshadaamila/subscriptions",
"type": "User",
"url": "https://api.github.com/users/oshadaamila",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 5 |
2018-09-19T12:16:30Z
|
2021-09-01T00:11:26Z
|
2018-09-19T12:33:51Z
|
NONE
|
resolved
|
I am conecting to the internet through a proxy server. I used the below code to send a HTTP GET request using _requests_ library in python.
```
import requests
from requests.auth import HTTPProxyAuth
url = "http://httpbin.org/get"
proxies = {"http":"my-proxy-server: port"}
auth = HTTPProxyAuth("username", "password")
r = requests.get(url, proxies=proxies, auth=auth)
print r
```
but It gives me the following error
```
Traceback (most recent call last):
File "D:\python_http_req.py", line 7, in <module>
r = requests.get(url, proxies=proxies, auth=auth)
File "C:\Python27\lib\site-packages\requests\api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "C:\Python27\lib\site-packages\requests\api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Python27\lib\site-packages\requests\sessions.py", line 512, in request
resp = self.send(prep, **send_kwargs)
File "C:\Python27\lib\site-packages\requests\sessions.py", line 622, in send
r = adapter.send(request, **kwargs)
File "C:\Python27\lib\site-packages\requests\adapters.py", line 410, in send
conn = self.get_connection(request.url, proxies)
File "C:\Python27\lib\site-packages\requests\adapters.py", line 308, in get_connection
proxy_manager = self.proxy_manager_for(proxy)
File "C:\Python27\lib\site-packages\requests\adapters.py", line 198, in proxy_manager_for
**proxy_kwargs)
File "C:\Python27\lib\site-packages\urllib3\poolmanager.py", line 449, in proxy_from_url
return ProxyManager(proxy_url=url, **kw)
File "C:\Python27\lib\site-packages\urllib3\poolmanager.py", line 400, in __init__
raise ProxySchemeUnknown(proxy.scheme)
ProxySchemeUnknown: Not supported proxy scheme my-proxy-server
```
can anybody help me to resolve this error?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/25459027?v=4",
"events_url": "https://api.github.com/users/oshadaamila/events{/privacy}",
"followers_url": "https://api.github.com/users/oshadaamila/followers",
"following_url": "https://api.github.com/users/oshadaamila/following{/other_user}",
"gists_url": "https://api.github.com/users/oshadaamila/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/oshadaamila",
"id": 25459027,
"login": "oshadaamila",
"node_id": "MDQ6VXNlcjI1NDU5MDI3",
"organizations_url": "https://api.github.com/users/oshadaamila/orgs",
"received_events_url": "https://api.github.com/users/oshadaamila/received_events",
"repos_url": "https://api.github.com/users/oshadaamila/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/oshadaamila/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/oshadaamila/subscriptions",
"type": "User",
"url": "https://api.github.com/users/oshadaamila",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4797/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4797/timeline
| null |
completed
| null | null | false |
[
"It was a issue in my proxy server",
"i too have this issue..can you please share me how did you resolve it?",
"i too have this issue..can you please share me how did you resolve it?",
"from requests.auth import HTTPProxyAuth\r\nproxyDict = {\r\n 'http' : 'http://138.197.222.35:80',\r\n 'https' : 'http://1138.197.222.35:8080'\r\n }\r\n #auth = HTTPProxyAuth('username', 'mypassword')\r\n r = requests.get('http://httpbin.org/ip', proxies=proxyDict)\r\n print (r)",
"@oshadaamila This issue is resolved with solution by @samiashton1989 Consider it closing."
] |
https://api.github.com/repos/psf/requests/issues/4796
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4796/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4796/comments
|
https://api.github.com/repos/psf/requests/issues/4796/events
|
https://github.com/psf/requests/issues/4796
| 361,640,973 |
MDU6SXNzdWUzNjE2NDA5NzM=
| 4,796 |
multiline header should be supported!
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/286080?v=4",
"events_url": "https://api.github.com/users/alkino/events{/privacy}",
"followers_url": "https://api.github.com/users/alkino/followers",
"following_url": "https://api.github.com/users/alkino/following{/other_user}",
"gists_url": "https://api.github.com/users/alkino/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alkino",
"id": 286080,
"login": "alkino",
"node_id": "MDQ6VXNlcjI4NjA4MA==",
"organizations_url": "https://api.github.com/users/alkino/orgs",
"received_events_url": "https://api.github.com/users/alkino/received_events",
"repos_url": "https://api.github.com/users/alkino/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alkino/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alkino/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alkino",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-09-19T08:44:13Z
|
2021-09-07T00:06:20Z
|
2018-09-19T09:13:19Z
|
NONE
|
resolved
|
Hi everybody.
Yes I read it #4216
It ends with @Lukasa quoting specification.
But if we read this [specification](https://tools.ietf.org/html/rfc7230#section-3.2.4) a bit further:
> A user agent that receives an obs-fold in a response message that is
> not within a message/http container MUST replace each received
> obs-fold with one or more SP octets prior to interpreting the field
> value.
So it MUST be supported, no?
Regards
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/286080?v=4",
"events_url": "https://api.github.com/users/alkino/events{/privacy}",
"followers_url": "https://api.github.com/users/alkino/followers",
"following_url": "https://api.github.com/users/alkino/following{/other_user}",
"gists_url": "https://api.github.com/users/alkino/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alkino",
"id": 286080,
"login": "alkino",
"node_id": "MDQ6VXNlcjI4NjA4MA==",
"organizations_url": "https://api.github.com/users/alkino/orgs",
"received_events_url": "https://api.github.com/users/alkino/received_events",
"repos_url": "https://api.github.com/users/alkino/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alkino/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alkino/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alkino",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4796/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4796/timeline
| null |
completed
| null | null | false |
[
"No.\r\n\r\n*Receiving* them is a MUST, emitting them is a MUST NOT."
] |
https://api.github.com/repos/psf/requests/issues/4795
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4795/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4795/comments
|
https://api.github.com/repos/psf/requests/issues/4795/events
|
https://github.com/psf/requests/issues/4795
| 361,042,061 |
MDU6SXNzdWUzNjEwNDIwNjE=
| 4,795 |
`no_proxy` implementation is too greedy
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/3407667?v=4",
"events_url": "https://api.github.com/users/gilbsgilbs/events{/privacy}",
"followers_url": "https://api.github.com/users/gilbsgilbs/followers",
"following_url": "https://api.github.com/users/gilbsgilbs/following{/other_user}",
"gists_url": "https://api.github.com/users/gilbsgilbs/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gilbsgilbs",
"id": 3407667,
"login": "gilbsgilbs",
"node_id": "MDQ6VXNlcjM0MDc2Njc=",
"organizations_url": "https://api.github.com/users/gilbsgilbs/orgs",
"received_events_url": "https://api.github.com/users/gilbsgilbs/received_events",
"repos_url": "https://api.github.com/users/gilbsgilbs/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gilbsgilbs/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gilbsgilbs/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gilbsgilbs",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 2 |
2018-09-17T20:59:31Z
|
2018-10-01T12:17:49Z
| null |
NONE
| null |
The implementation of `no_proxy` environment just checks that the hostname ends with some host present in the `no_proxy` variable. Although there is no clear specification for `no_proxy`, this behavior is very unexpected and even dangerous.
- It prevents you from bypassing only one domain and not its subdomains.
- If `no_proxy` is set for `requests.com`, `attacker-requests.com` is also whitelisted. Not sure it's really really bad, but huh, it's definitely not good.
## Expected Result
- `no_proxy=gle.com` should bypass ONLY the domain `gle.com` (optionally its subdomains, but I don't think it's desirable)
- `no_proxy=www.gle.com` should bypass ONLY the domain `www.gle.com` (optionally its subdomains, but I don't think it's desirable)
- `no_proxy=.google.com` should bypass ONLY subdomains of `google.com` (and optionally `google.com`, but I don't think it's desirable)
## Actual Result
`no_proxy=gle.com` bypasses any domain that ends with `gle.com`, including:
- `google.com`
- `www.google.com`
- `foo.gle.com`
- `foo.bar.gle.com`
## Reproduction Steps
```
$ http_proxy=http://no-proxy-here/ no_proxy=gle.com python -c "import requests; print(requests.get('http://www.google.com'))"
<Response [200]>
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.7"
},
"implementation": {
"name": "CPython",
"version": "3.7.0"
},
"platform": {
"release": "4.18.7-arch1-1-ARCH",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.19.1"
},
"system_ssl": {
"version": "1010100f"
},
"urllib3": {
"version": "1.23"
},
"using_pyopenssl": false
}
```
I can prepare a PR if needed.
| 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/4795/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4795/timeline
| null | null | null | null | false |
[
"Hi @gilbsgilbs, thanks for bringing this to our attention. NO_PROXY is a variable that unfortunately doesn't have a clear spec and has be reimplemented slightly differently in many different clients. This is a case where we've tried to follow curl for most of our implementation details. For reference, this thread was one of the more recent discussions on the curl issue tracker which has a lot of useful information (https://github.com/curl/curl/issues/1208).\r\n\r\nI agree we're being too greedy here, and want to make sure we're scoping domains correctly for the bypass. It looks like curl's [current documentation](https://curl.haxx.se/docs/manual.html) specifies this as the definition of the NO_PROXY variable (emphasis mine):\r\n> If the host name matches one of these strings, or the host is within the\r\n domain of one of these strings, transactions with that node will not be\r\n proxied. **When a domain is used, it needs to start with a period.** A user can\r\n specify that both www.example.com and foo.example.com should not uses a\r\n proxy by setting NO_PROXY to \".example.com\". By including the full name you\r\n can exclude specific host names, so to make www.example.com not use a proxy\r\n but still have foo.example.com do it, set NO_PROXY to \"www.example.com\"\r\n\r\nI think our best bet for solving this is to append the leading dot in our proxy_bypass handling if the user doesn't pass it. That means `gle.com` would be treated as `.gle.com` preventing the domain hijacking issue. We'd probably use this same method when comparing user requested domains without a leading subdomain (e.g. http://google.com).",
"Hi @nateprewitt, thanks for replying.\r\n\r\n> NO_PROXY is a variable that unfortunately doesn't have a clear spec and has be reimplemented slightly differently in many different clients.\r\n\r\nUnfortunately…\r\n\r\n> I think our best bet for solving this is to append the leading dot in our proxy_bypass handling if the user doesn't pass it. That means gle.com would be treated as .gle.com preventing the domain hijacking issue. We'd probably use this same method when comparing user requested domains without a leading subdomain (e.g. http://google.com).\r\n\r\nThis happens to work thanks to the [`proxy_bypass` function from urllib](https://github.com/python/cpython/blob/9df100286b35f1f9fa85976d573981f558805b3f/Lib/urllib/request.py#L2487) which is [delegated by requests](https://github.com/requests/requests/blob/a6cd380c640087218695bc7c62311a4843777e43/requests/utils.py#L748). I don't know the exact story behind the current implementation (why some things are inferred by requests itself and some others are delegated to urllib), but if prepending `.` to the host (if not already present) sounds like a good fix to you, I could submit a PR sometimes.\r\n\r\nThanks."
] |
https://api.github.com/repos/psf/requests/issues/4794
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4794/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4794/comments
|
https://api.github.com/repos/psf/requests/issues/4794/events
|
https://github.com/psf/requests/pull/4794
| 360,868,112 |
MDExOlB1bGxSZXF1ZXN0MjE1OTgwNTIx
| 4,794 |
Proxy headersAllow headers to be passed to proxy
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1043189?v=4",
"events_url": "https://api.github.com/users/zulrang/events{/privacy}",
"followers_url": "https://api.github.com/users/zulrang/followers",
"following_url": "https://api.github.com/users/zulrang/following{/other_user}",
"gists_url": "https://api.github.com/users/zulrang/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/zulrang",
"id": 1043189,
"login": "zulrang",
"node_id": "MDQ6VXNlcjEwNDMxODk=",
"organizations_url": "https://api.github.com/users/zulrang/orgs",
"received_events_url": "https://api.github.com/users/zulrang/received_events",
"repos_url": "https://api.github.com/users/zulrang/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/zulrang/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zulrang/subscriptions",
"type": "User",
"url": "https://api.github.com/users/zulrang",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-09-17T13:24:55Z
|
2021-09-01T00:11:56Z
|
2018-09-30T20:17:54Z
|
NONE
|
resolved
|
Adding a header field to proxies will pass any headers to the proxy connection.
|
{
"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/4794/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4794/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4794.diff",
"html_url": "https://github.com/psf/requests/pull/4794",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4794.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4794"
}
| true |
[
"Hi @zulrang, thanks for trying to help move this issue forward. Unfortunately, I don't think we'll be likely to take this approach. Adding a special cased \"headers\" entry to proxies is going to cause weird behaviour. Both because it's not a proxy, and because this is a hard thing to document and get people to use properly.\r\n\r\nAs Lukasa said in the original issue, I'm not sure if there's a clean interim solution right now. We can work towards implementing a fix in 3.0 but I don't think we want to implement a hacky solution that needs to be maintained until then. "
] |
https://api.github.com/repos/psf/requests/issues/4793
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4793/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4793/comments
|
https://api.github.com/repos/psf/requests/issues/4793/events
|
https://github.com/psf/requests/issues/4793
| 360,616,785 |
MDU6SXNzdWUzNjA2MTY3ODU=
| 4,793 |
Exceptions handling
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/40163787?v=4",
"events_url": "https://api.github.com/users/ron819/events{/privacy}",
"followers_url": "https://api.github.com/users/ron819/followers",
"following_url": "https://api.github.com/users/ron819/following{/other_user}",
"gists_url": "https://api.github.com/users/ron819/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ron819",
"id": 40163787,
"login": "ron819",
"node_id": "MDQ6VXNlcjQwMTYzNzg3",
"organizations_url": "https://api.github.com/users/ron819/orgs",
"received_events_url": "https://api.github.com/users/ron819/received_events",
"repos_url": "https://api.github.com/users/ron819/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ron819/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ron819/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ron819",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2018-09-16T08:23:53Z
|
2021-09-07T00:06:21Z
|
2018-09-16T09:17:17Z
|
NONE
|
resolved
|
Please see question here: https://stackoverflow.com/questions/52352118/local-variable-responsedata-referenced-before-assignment-using-requests-libra
```
responsedata = requests.get(url, data=data, headers=self.hed, verify=False, timeout=120)
responsedata.raise_for_status()
```
The library does not explain in which exceptions we can use the values from` raise_for_status()` as some exceptions are raised by the get before executing the raise_for_status()
The result is exceptions of referencing variable before assignment.
What I wanted is:
```
except (Exceptions that **can not use** raise_for_status ) as e:
print ("Thread {3} page #{0} run #{1} failed. Msg: {2}. Retry.".format(page, n, sys.exc_info()[0], thread_name))
continue
except (Exceptions that **can use** raise_for_status ) as e:
print ("Thread {5} page #{0} run #{1} failed. Returned status code {2}. Reason: {3}. Msg: {4}. Retry.".format(page, n, responsedata.status_code, responsedata.reason, sys.exc_info()[0], thread_name))
_handle_exception(e, tries, n, page, thread_name)
continue
```
The library does not specify information for this.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4793/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4793/timeline
| null |
completed
| null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/4791
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4791/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4791/comments
|
https://api.github.com/repos/psf/requests/issues/4791/events
|
https://github.com/psf/requests/pull/4791
| 360,528,240 |
MDExOlB1bGxSZXF1ZXN0MjE1NzYyNjI1
| 4,791 |
Tuple test_requirements was too long, PEP8
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/32190964?v=4",
"events_url": "https://api.github.com/users/juozasget/events{/privacy}",
"followers_url": "https://api.github.com/users/juozasget/followers",
"following_url": "https://api.github.com/users/juozasget/following{/other_user}",
"gists_url": "https://api.github.com/users/juozasget/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/juozasget",
"id": 32190964,
"login": "juozasget",
"node_id": "MDQ6VXNlcjMyMTkwOTY0",
"organizations_url": "https://api.github.com/users/juozasget/orgs",
"received_events_url": "https://api.github.com/users/juozasget/received_events",
"repos_url": "https://api.github.com/users/juozasget/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/juozasget/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/juozasget/subscriptions",
"type": "User",
"url": "https://api.github.com/users/juozasget",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2018-09-15T10:27:59Z
|
2021-09-01T00:11:58Z
|
2018-09-15T13:44:27Z
|
CONTRIBUTOR
|
resolved
|
Broken a long line into multiple lines inside tuple parenthesis.
|
{
"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/4791/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4791/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4791.diff",
"html_url": "https://github.com/psf/requests/pull/4791",
"merged_at": "2018-09-15T13:44:27Z",
"patch_url": "https://github.com/psf/requests/pull/4791.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4791"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/4790
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4790/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4790/comments
|
https://api.github.com/repos/psf/requests/issues/4790/events
|
https://github.com/psf/requests/issues/4790
| 360,336,719 |
MDU6SXNzdWUzNjAzMzY3MTk=
| 4,790 |
Requests timeout not working as expected
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/8787120?v=4",
"events_url": "https://api.github.com/users/garg10may/events{/privacy}",
"followers_url": "https://api.github.com/users/garg10may/followers",
"following_url": "https://api.github.com/users/garg10may/following{/other_user}",
"gists_url": "https://api.github.com/users/garg10may/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/garg10may",
"id": 8787120,
"login": "garg10may",
"node_id": "MDQ6VXNlcjg3ODcxMjA=",
"organizations_url": "https://api.github.com/users/garg10may/orgs",
"received_events_url": "https://api.github.com/users/garg10may/received_events",
"repos_url": "https://api.github.com/users/garg10may/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/garg10may/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/garg10may/subscriptions",
"type": "User",
"url": "https://api.github.com/users/garg10may",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-09-14T14:49:46Z
|
2021-09-07T00:06:21Z
|
2018-09-14T15:19:57Z
|
NONE
|
resolved
|
Please refer to our [Stack Overflow tag](https://stackoverflow.com/questions/tagged/python-requests) for guidance.
`
requests.get('http://www.google.co.in', timeout=0.001)`
Using above on one server works fine but on another server where probably outside access is not allowed requests doesn't timeout the request and only fails after few seconds with below error.
```
Traceback (most recent call last):
File "/home/utrade/utradeENV/lib/python3.6/site-packages/urllib3/connection.py", line 141, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/home/utrade/utradeENV/lib/python3.6/site-packages/urllib3/util/connection.py", line 60, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/home/utrade/python3.6_optimized/lib/python3.6/socket.py", line 743, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/utrade/utradeENV/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/home/utrade/utradeENV/lib/python3.6/site-packages/urllib3/connectionpool.py", line 356, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/home/utrade/python3.6_optimized/lib/python3.6/http/client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/home/utrade/python3.6_optimized/lib/python3.6/http/client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/home/utrade/python3.6_optimized/lib/python3.6/http/client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/home/utrade/python3.6_optimized/lib/python3.6/http/client.py", line 1026, in _send_output
self.send(msg)
File "/home/utrade/python3.6_optimized/lib/python3.6/http/client.py", line 964, in send
self.connect()
File "/home/utrade/utradeENV/lib/python3.6/site-packages/urllib3/connection.py", line 166, in connect
conn = self._new_conn()
File "/home/utrade/utradeENV/lib/python3.6/site-packages/urllib3/connection.py", line 150, in _new_conn
self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f9342c32f98>: Failed to establish a new connection: [Errno -2] Name or service
not known
```
What am I doing wrong or how can I make it timeout?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/8787120?v=4",
"events_url": "https://api.github.com/users/garg10may/events{/privacy}",
"followers_url": "https://api.github.com/users/garg10may/followers",
"following_url": "https://api.github.com/users/garg10may/following{/other_user}",
"gists_url": "https://api.github.com/users/garg10may/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/garg10may",
"id": 8787120,
"login": "garg10may",
"node_id": "MDQ6VXNlcjg3ODcxMjA=",
"organizations_url": "https://api.github.com/users/garg10may/orgs",
"received_events_url": "https://api.github.com/users/garg10may/received_events",
"repos_url": "https://api.github.com/users/garg10may/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/garg10may/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/garg10may/subscriptions",
"type": "User",
"url": "https://api.github.com/users/garg10may",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4790/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4790/timeline
| null |
completed
| null | null | false |
[
"This is because name resolution doesn't take the timeout into account. This is a lower-level issue than requests, see urllib3/urllib3#1334.",
"ok, thanks. I will try using python `signal`. "
] |
https://api.github.com/repos/psf/requests/issues/4789
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4789/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4789/comments
|
https://api.github.com/repos/psf/requests/issues/4789/events
|
https://github.com/psf/requests/pull/4789
| 360,332,909 |
MDExOlB1bGxSZXF1ZXN0MjE1NjE2MzY1
| 4,789 |
Allow headers to be passed to proxy
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1043189?v=4",
"events_url": "https://api.github.com/users/zulrang/events{/privacy}",
"followers_url": "https://api.github.com/users/zulrang/followers",
"following_url": "https://api.github.com/users/zulrang/following{/other_user}",
"gists_url": "https://api.github.com/users/zulrang/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/zulrang",
"id": 1043189,
"login": "zulrang",
"node_id": "MDQ6VXNlcjEwNDMxODk=",
"organizations_url": "https://api.github.com/users/zulrang/orgs",
"received_events_url": "https://api.github.com/users/zulrang/received_events",
"repos_url": "https://api.github.com/users/zulrang/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/zulrang/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zulrang/subscriptions",
"type": "User",
"url": "https://api.github.com/users/zulrang",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2018-09-14T14:40:33Z
|
2021-09-01T00:11:57Z
|
2018-09-17T13:22:44Z
|
NONE
|
resolved
|
Adding a `header` field to `proxies` will pass any headers to the proxy connection.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1043189?v=4",
"events_url": "https://api.github.com/users/zulrang/events{/privacy}",
"followers_url": "https://api.github.com/users/zulrang/followers",
"following_url": "https://api.github.com/users/zulrang/following{/other_user}",
"gists_url": "https://api.github.com/users/zulrang/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/zulrang",
"id": 1043189,
"login": "zulrang",
"node_id": "MDQ6VXNlcjEwNDMxODk=",
"organizations_url": "https://api.github.com/users/zulrang/orgs",
"received_events_url": "https://api.github.com/users/zulrang/received_events",
"repos_url": "https://api.github.com/users/zulrang/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/zulrang/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zulrang/subscriptions",
"type": "User",
"url": "https://api.github.com/users/zulrang",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4789/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4789/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4789.diff",
"html_url": "https://github.com/psf/requests/pull/4789",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4789.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4789"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/4788
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4788/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4788/comments
|
https://api.github.com/repos/psf/requests/issues/4788/events
|
https://github.com/psf/requests/issues/4788
| 360,291,737 |
MDU6SXNzdWUzNjAyOTE3Mzc=
| 4,788 |
Can't set ipv6 proxy
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/17798647?v=4",
"events_url": "https://api.github.com/users/deounix/events{/privacy}",
"followers_url": "https://api.github.com/users/deounix/followers",
"following_url": "https://api.github.com/users/deounix/following{/other_user}",
"gists_url": "https://api.github.com/users/deounix/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/deounix",
"id": 17798647,
"login": "deounix",
"node_id": "MDQ6VXNlcjE3Nzk4NjQ3",
"organizations_url": "https://api.github.com/users/deounix/orgs",
"received_events_url": "https://api.github.com/users/deounix/received_events",
"repos_url": "https://api.github.com/users/deounix/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/deounix/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/deounix/subscriptions",
"type": "User",
"url": "https://api.github.com/users/deounix",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2018-09-14T12:51:16Z
|
2021-09-07T00:06:22Z
|
2018-09-14T14:08:36Z
|
NONE
|
resolved
|
I'm trying to use ipv6 proxy with requests but I can't
What I'm doing is :
```
import requests
resp = requests.get('https://instagram.com', proxies=dict(http='https://xxxxxx:xxxxxx@[2604:0180:2:99b:fc3d:a70b:a7f2:7a2a]:17684', https='https://xxxxxx:xxxxxx@[2604:0180:2:99b:fc3d:a70b:a7f2:7a2a]:17684'))
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/17798647?v=4",
"events_url": "https://api.github.com/users/deounix/events{/privacy}",
"followers_url": "https://api.github.com/users/deounix/followers",
"following_url": "https://api.github.com/users/deounix/following{/other_user}",
"gists_url": "https://api.github.com/users/deounix/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/deounix",
"id": 17798647,
"login": "deounix",
"node_id": "MDQ6VXNlcjE3Nzk4NjQ3",
"organizations_url": "https://api.github.com/users/deounix/orgs",
"received_events_url": "https://api.github.com/users/deounix/received_events",
"repos_url": "https://api.github.com/users/deounix/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/deounix/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/deounix/subscriptions",
"type": "User",
"url": "https://api.github.com/users/deounix",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4788/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4788/timeline
| null |
completed
| null | null | false |
[
"Hi @deounix, we’re going to need more information to look into this.\r\n\r\nPlease provide answers to the questions originally asked in the issue template, an explanation of what you’re experiencing vs what you’re expecting, and a stack trace if applicable. Thanks!",
"Hi @nateprewitt, There is no issue template just link to stackoverflow site.\r\n\r\nI just need to know how can I set ipv6 proxy in requests. so I can do simple HTTP requests.",
"@deounix, the \"Request for Help\" template is asking for you to pose usage questions on Stackoverflow first, rather than posting them on the issue tracker. We’ll review the template and try to make that clearer.\r\n\r\nThe other issue template for reporting a bug has a series of questions. Without that information, it’ll be difficult to accurately diagnose why the ipv6 proxy setup may not be working.\r\n\r\nCan you please also verify your proxy is working with curl or some other http client?",
"@nateprewitt Thank u I think curl help me to find the problem. Instagram didn't accept the connection but google, fb ... etc accept don't know why but I think this issue located to instagram."
] |
https://api.github.com/repos/psf/requests/issues/4787
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4787/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4787/comments
|
https://api.github.com/repos/psf/requests/issues/4787/events
|
https://github.com/psf/requests/pull/4787
| 360,119,784 |
MDExOlB1bGxSZXF1ZXN0MjE1NDU1NDU0
| 4,787 |
Fix broken essay link
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/4329421?v=4",
"events_url": "https://api.github.com/users/vinayak-mehta/events{/privacy}",
"followers_url": "https://api.github.com/users/vinayak-mehta/followers",
"following_url": "https://api.github.com/users/vinayak-mehta/following{/other_user}",
"gists_url": "https://api.github.com/users/vinayak-mehta/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/vinayak-mehta",
"id": 4329421,
"login": "vinayak-mehta",
"node_id": "MDQ6VXNlcjQzMjk0MjE=",
"organizations_url": "https://api.github.com/users/vinayak-mehta/orgs",
"received_events_url": "https://api.github.com/users/vinayak-mehta/received_events",
"repos_url": "https://api.github.com/users/vinayak-mehta/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/vinayak-mehta/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vinayak-mehta/subscriptions",
"type": "User",
"url": "https://api.github.com/users/vinayak-mehta",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-09-14T01:05:10Z
|
2021-09-01T00:11:58Z
|
2018-09-15T00:08:44Z
|
CONTRIBUTOR
|
resolved
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4787/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4787/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4787.diff",
"html_url": "https://github.com/psf/requests/pull/4787",
"merged_at": "2018-09-15T00:08:44Z",
"patch_url": "https://github.com/psf/requests/pull/4787.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4787"
}
| true |
[
"Will do @nateprewitt!",
"@nateprewitt Did a `git grep` for \"kennethreitz.org\". Couldn't find any other link that is broken."
] |
|
https://api.github.com/repos/psf/requests/issues/4786
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4786/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4786/comments
|
https://api.github.com/repos/psf/requests/issues/4786/events
|
https://github.com/psf/requests/issues/4786
| 359,807,846 |
MDU6SXNzdWUzNTk4MDc4NDY=
| 4,786 |
Support for HTTP reason phrases
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/38424702?v=4",
"events_url": "https://api.github.com/users/MattSGS/events{/privacy}",
"followers_url": "https://api.github.com/users/MattSGS/followers",
"following_url": "https://api.github.com/users/MattSGS/following{/other_user}",
"gists_url": "https://api.github.com/users/MattSGS/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/MattSGS",
"id": 38424702,
"login": "MattSGS",
"node_id": "MDQ6VXNlcjM4NDI0NzAy",
"organizations_url": "https://api.github.com/users/MattSGS/orgs",
"received_events_url": "https://api.github.com/users/MattSGS/received_events",
"repos_url": "https://api.github.com/users/MattSGS/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/MattSGS/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/MattSGS/subscriptions",
"type": "User",
"url": "https://api.github.com/users/MattSGS",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-09-13T09:09:53Z
|
2021-09-07T00:06:22Z
|
2018-09-13T12:14:39Z
|
NONE
|
resolved
|
This could arguably be classified as a bug rather than a feature request.
Requests doesn't, as far as I can see, supply an API to return the server's HTTP reason phrase. What it instead supplies is an API that will return its own stringification of the server's HTTP status code.
While in many cases these will probably be the same, I am writing a reverse proxy, so I want to return to my client **exactly** what the origin server supplied to me.
For example, if the origin server said "200 Everything Is Awesome" instead of the more common "200 OK", then I want to return precisely "Everything Is Awesome" (not "OK") to my client in my reason phrase.
Note that the HTTP RFCs permit origin servers to supply custom reason phrases:
> The reason phrases listed here are only
> recommendations -- they MAY be replaced by local equivalents without
> affecting the protocol.
By my reading, the HTTP RFCs permit anyone to supply any bytes they like other than CR and LF in this 'reason phrase', and still comply with HTTP.
|
{
"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/4786/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4786/timeline
| null |
completed
| null | null | false |
[
"My point in that last paragraph is that I don't see a way in the RFCs for the server to specify a character set or encoding for its \"reason phrase\", yet arbitrary bytes seem to be permitted, so either this should be exposed as Python bytes not a Python string, or perhaps there should be a documented WONTFIX bug that the encoding is always assumed to be ASCII-7, or one of the ISO8859 extended ASCIIs, or maybe UTF-8.",
"We pull the `Response.reason` attribute from urllib3's Response. That said,\r\n\r\n> Requests doesn't, as far as I can see, supply an API to return the server's HTTP reason phrase.\r\n\r\nIs clearly wrong.\r\n\r\n```py\r\nPython 3.6.5 (default, Mar 29 2018, 18:20:46) \r\n[GCC 8.0.1 20180317 (Red Hat 8.0.1-0.19)] on linux\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import requests\r\n>>> requests.get(\"https://httpbin.org/status/418\").reason\r\n\"I'M A TEAPOT\"\r\n```\r\n\r\nAnd I can assure you that's not a standard reason. You can also access the original reason phrase from urllib3:\r\n\r\n```py\r\n>>> requests.get(\"https://httpbin.org/status/418\").raw.reason\r\n\"I'M A TEAPOT\"\r\n>>> \r\n```"
] |
https://api.github.com/repos/psf/requests/issues/4785
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4785/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4785/comments
|
https://api.github.com/repos/psf/requests/issues/4785/events
|
https://github.com/psf/requests/pull/4785
| 359,747,587 |
MDExOlB1bGxSZXF1ZXN0MjE1MTY4Mjcw
| 4,785 |
Fix a typo in a test docstring
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/301220?v=4",
"events_url": "https://api.github.com/users/alexwlchan/events{/privacy}",
"followers_url": "https://api.github.com/users/alexwlchan/followers",
"following_url": "https://api.github.com/users/alexwlchan/following{/other_user}",
"gists_url": "https://api.github.com/users/alexwlchan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alexwlchan",
"id": 301220,
"login": "alexwlchan",
"node_id": "MDQ6VXNlcjMwMTIyMA==",
"organizations_url": "https://api.github.com/users/alexwlchan/orgs",
"received_events_url": "https://api.github.com/users/alexwlchan/received_events",
"repos_url": "https://api.github.com/users/alexwlchan/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alexwlchan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alexwlchan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alexwlchan",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-09-13T05:27:55Z
|
2021-09-02T00:07:32Z
|
2018-09-13T05:57:32Z
|
CONTRIBUTOR
|
resolved
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4785/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4785/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4785.diff",
"html_url": "https://github.com/psf/requests/pull/4785",
"merged_at": "2018-09-13T05:57:32Z",
"patch_url": "https://github.com/psf/requests/pull/4785.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4785"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4785?src=pr&el=h1) Report\n> Merging [#4785](https://codecov.io/gh/requests/requests/pull/4785?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/8472dbd13408e35611a38d58f32eb531ce0ffe1e?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4785?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4785 +/- ##\n=======================================\n Coverage 66.79% 66.79% \n=======================================\n Files 15 15 \n Lines 1563 1563 \n=======================================\n Hits 1044 1044 \n Misses 519 519\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4785?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4785?src=pr&el=footer). Last update [8472dbd...d1fab0b](https://codecov.io/gh/requests/requests/pull/4785?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n"
] |
|
https://api.github.com/repos/psf/requests/issues/4784
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4784/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4784/comments
|
https://api.github.com/repos/psf/requests/issues/4784/events
|
https://github.com/psf/requests/issues/4784
| 359,570,875 |
MDU6SXNzdWUzNTk1NzA4NzU=
| 4,784 |
Remote end closed connection without response on successive Session requests
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/241185?v=4",
"events_url": "https://api.github.com/users/rvernica/events{/privacy}",
"followers_url": "https://api.github.com/users/rvernica/followers",
"following_url": "https://api.github.com/users/rvernica/following{/other_user}",
"gists_url": "https://api.github.com/users/rvernica/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rvernica",
"id": 241185,
"login": "rvernica",
"node_id": "MDQ6VXNlcjI0MTE4NQ==",
"organizations_url": "https://api.github.com/users/rvernica/orgs",
"received_events_url": "https://api.github.com/users/rvernica/received_events",
"repos_url": "https://api.github.com/users/rvernica/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rvernica/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rvernica/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rvernica",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 9 |
2018-09-12T17:01:02Z
|
2018-11-20T13:02:16Z
|
2018-09-30T20:52:00Z
|
NONE
|
resolved
|
I'm issuing successive `GET` requests to a Django server and I get `Remote end closed connection without response` on the second request. If I pause for one second it works fine.
## Expected Result
```python
>>> s = requests.Session()
>>> s.get('http://localhost:8000/'); time.sleep(1); s.get('http://localhost:8000')
<Response [404]>
<Response [404]>
```
Works as expected without `Session`:
```python
>>> requests.get('http://localhost:8000/'); requests.get('http://localhost:8000')
<Response [404]>
<Response [404]>
```
## Actual Result
```python
>>> s.get('http://localhost:8000/'); s.get('http://localhost:8000')
<Response [404]>
Traceback (most recent call last):
File "...local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "...local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 384, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "...local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 380, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib64/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/usr/lib64/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib64/python3.6/http/client.py", line 266, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "...local/lib/python3.6/site-packages/requests/adapters.py", line 445, in send
timeout=timeout
File "...local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File "...local/lib/python3.6/site-packages/urllib3/util/retry.py", line 367, in increment
raise six.reraise(type(error), error, _stacktrace)
File "...local/lib/python3.6/site-packages/urllib3/packages/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "...local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "...local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 384, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "...local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 380, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib64/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/usr/lib64/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib64/python3.6/http/client.py", line 266, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "...local/lib/python3.6/site-packages/requests/sessions.py", line 525, in get
return self.request('GET', url, **kwargs)
File "...local/lib/python3.6/site-packages/requests/sessions.py", line 512, in request
resp = self.send(prep, **send_kwargs)
File "...local/lib/python3.6/site-packages/requests/sessions.py", line 622, in send
r = adapter.send(request, **kwargs)
File "...local/lib/python3.6/site-packages/requests/adapters.py", line 495, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.3"
},
"idna": {
"version": "2.7"
},
"implementation": {
"name": "CPython",
"version": "3.6.6"
},
"platform": {
"release": "4.17.19-200.fc28.x86_64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010008f",
"version": "17.3.0"
},
"requests": {
"version": "2.19.1"
},
"system_ssl": {
"version": "1010008f"
},
"urllib3": {
"version": "1.23"
},
"using_pyopenssl": true
}
```
It might be related to #4664.
|
{
"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/4784/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4784/timeline
| null |
completed
| null | null | false |
[
"Hi @rvernica it sounds like this is a product of the Django server closing the connection. It sounds like it's either not configured to handle the number of requests you're sending without a pause, or there's some other race condition. Having an actual server between your service and client should be able to handle connection pooling and queuing. Since we can't do anything about this from Requests perspective, I'm going to close this out.",
"Hi @nateprewitt, It is it indeed a Django issue, then why does it work without `Session`?",
"@rvernica, the `Session` object establishes a connection pool and attempts to reuse the same connection for requests to the same host. When you use `requests.get` we’re establishing a new session for each call. ",
"So, are you saying the `Session` keeps the connection open and somehow Django closes it?\r\n\r\nThen, could this be related to #4664 and so, not a Django problem?",
"@rvernica without seeing what's the http message contents and probably the TCP traffic on the connection, it'll be hard to say for sure. Either way, the connection is being forcibly closed by Django while being run locally. If it's a problem with the `keep-alive` reaping, that's a urllib3 issue as noted in #4664, otherwise it's behaviour of Django. There's not a lot we can do in either case, but I would suggest trying to put Django behind an actual server and see if the behaviour persists.",
"@rvernica Any update on this? I'm running into this right now. I'm curious how you got around the issue. Did you open any tickets with django?",
"@kingbuzzman I reported the issue to Django [here](https://code.djangoproject.com/ticket/29849) but there seem to be some issues with reproducing it. Maybe you can help confirm it.",
"I've posted [a way to reproduce the error ](https://code.djangoproject.com/ticket/29849#comment:4)in the Django ticket mentioned by @rvernica, the question remains who's at fault here?",
"Seems that @jaap3 found https://github.com/django/django/commit/934acf1126995f6e6ccba5947ec8f7561633c27f to be the commit that fixes this in master. "
] |
https://api.github.com/repos/psf/requests/issues/4783
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4783/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4783/comments
|
https://api.github.com/repos/psf/requests/issues/4783/events
|
https://github.com/psf/requests/issues/4783
| 359,070,515 |
MDU6SXNzdWUzNTkwNzA1MTU=
| 4,783 |
SSLError propagets urllib3 SSLError exception object as message
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/10330520?v=4",
"events_url": "https://api.github.com/users/NikosVlagoidis/events{/privacy}",
"followers_url": "https://api.github.com/users/NikosVlagoidis/followers",
"following_url": "https://api.github.com/users/NikosVlagoidis/following{/other_user}",
"gists_url": "https://api.github.com/users/NikosVlagoidis/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/NikosVlagoidis",
"id": 10330520,
"login": "NikosVlagoidis",
"node_id": "MDQ6VXNlcjEwMzMwNTIw",
"organizations_url": "https://api.github.com/users/NikosVlagoidis/orgs",
"received_events_url": "https://api.github.com/users/NikosVlagoidis/received_events",
"repos_url": "https://api.github.com/users/NikosVlagoidis/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/NikosVlagoidis/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/NikosVlagoidis/subscriptions",
"type": "User",
"url": "https://api.github.com/users/NikosVlagoidis",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-09-11T14:21:23Z
|
2021-09-07T00:06:15Z
|
2018-10-01T03:28:38Z
|
CONTRIBUTOR
|
resolved
|
Summary.
On adapter.py [link](https://github.com/requests/requests/blob/8472dbd13408e35611a38d58f32eb531ce0ffe1e/requests/adapters.py#L524) we pass as the first parameter of the error an SSLError exception object. this has a result if you catch the error e.message is an object and not a string. Is this intented?
Maybe we need to pass
```python
except (_SSLError, _HTTPError) as e:
if isinstance(e, _SSLError):
# This branch is for urllib3 versions earlier than v1.22
raise SSLError(e.message, request=request)
```
## Expected Result
```
from requests.exceptions import SSLError
from urllib3.exceptions import SSLError as _SSLError
a = SSLError(_SSLError, request="TEST")
print a.message
```
What you expected.
> "An SSL error occured"
## Actual Result
What happened instead.
> <class 'urllib3.exceptions.SSLError'>
## Reproduction Steps
```python
import requests
from requests.exceptions import SSLError
from urllib3.exceptions import SSLError as _SSLError
a = SSLError(_SSLError, request="TEST")
print a.message
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.2.2"
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "2.7.12"
},
"platform": {
"release": "4.15.0-33-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010008f",
"version": "18.0.0"
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "1000207f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": true
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4783/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4783/timeline
| null |
completed
| null | null | false |
[
"Hi @NikosVlagoidis, I'm a little confused about what we're expecting here. All of our wrapped exceptions should return an instantiation of the exception that we're wrapped which is represented by the `e` variable in the code your referenced. When that exception is returned, you should be able to call the `message` attribute on it and get what you want.\r\n\r\nThe reproduction code you've provided is wrapping an exception with the SSLError **class** rather than an SSLError **object** instantiation. I think we'd expect the output to be the class reference at that point which matches your observed behaviour.\r\n\r\nI'm going to close this out for now since it doesn't seem there's an issue here. If you have more information, please feel free to provide it hear and reopen the issue. Thanks!"
] |
https://api.github.com/repos/psf/requests/issues/4782
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4782/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4782/comments
|
https://api.github.com/repos/psf/requests/issues/4782/events
|
https://github.com/psf/requests/pull/4782
| 358,772,082 |
MDExOlB1bGxSZXF1ZXN0MjE0NDI2OTcw
| 4,782 |
Fix CSS error
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/791279?v=4",
"events_url": "https://api.github.com/users/sayzlim/events{/privacy}",
"followers_url": "https://api.github.com/users/sayzlim/followers",
"following_url": "https://api.github.com/users/sayzlim/following{/other_user}",
"gists_url": "https://api.github.com/users/sayzlim/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sayzlim",
"id": 791279,
"login": "sayzlim",
"node_id": "MDQ6VXNlcjc5MTI3OQ==",
"organizations_url": "https://api.github.com/users/sayzlim/orgs",
"received_events_url": "https://api.github.com/users/sayzlim/received_events",
"repos_url": "https://api.github.com/users/sayzlim/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sayzlim/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sayzlim/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sayzlim",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-09-10T20:01:19Z
|
2021-09-02T00:07:32Z
|
2018-09-10T20:02:01Z
|
CONTRIBUTOR
|
resolved
|
Sorry about this one. I made an error when requesting last pull request.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4782/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4782/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4782.diff",
"html_url": "https://github.com/psf/requests/pull/4782",
"merged_at": "2018-09-10T20:02:01Z",
"patch_url": "https://github.com/psf/requests/pull/4782.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4782"
}
| true |
[
"no worries at all! i appreciate your efforts :)"
] |
https://api.github.com/repos/psf/requests/issues/4781
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4781/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4781/comments
|
https://api.github.com/repos/psf/requests/issues/4781/events
|
https://github.com/psf/requests/pull/4781
| 358,716,433 |
MDExOlB1bGxSZXF1ZXN0MjE0Mzg1MTgw
| 4,781 |
Adjust padding and button placements
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/791279?v=4",
"events_url": "https://api.github.com/users/sayzlim/events{/privacy}",
"followers_url": "https://api.github.com/users/sayzlim/followers",
"following_url": "https://api.github.com/users/sayzlim/following{/other_user}",
"gists_url": "https://api.github.com/users/sayzlim/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sayzlim",
"id": 791279,
"login": "sayzlim",
"node_id": "MDQ6VXNlcjc5MTI3OQ==",
"organizations_url": "https://api.github.com/users/sayzlim/orgs",
"received_events_url": "https://api.github.com/users/sayzlim/received_events",
"repos_url": "https://api.github.com/users/sayzlim/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sayzlim/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sayzlim/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sayzlim",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-09-10T17:18:03Z
|
2021-09-02T00:07:32Z
|
2018-09-10T19:35:08Z
|
CONTRIBUTOR
|
resolved
|
Move the CTA button so the floating version label doesn’t overlap with the ad. Make the expanded ad more compact to take less vertical space. Hope I don’t make more edit to the ads. 😟
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4781/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4781/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4781.diff",
"html_url": "https://github.com/psf/requests/pull/4781",
"merged_at": "2018-09-10T19:35:08Z",
"patch_url": "https://github.com/psf/requests/pull/4781.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4781"
}
| true |
[
"The preview screenshot: https://d.pr/i/0N0SE9",
"many thanks!"
] |
https://api.github.com/repos/psf/requests/issues/4780
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4780/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4780/comments
|
https://api.github.com/repos/psf/requests/issues/4780/events
|
https://github.com/psf/requests/pull/4780
| 358,660,178 |
MDExOlB1bGxSZXF1ZXN0MjE0MzQyMzUy
| 4,780 |
Correct fixed footer width
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/791279?v=4",
"events_url": "https://api.github.com/users/sayzlim/events{/privacy}",
"followers_url": "https://api.github.com/users/sayzlim/followers",
"following_url": "https://api.github.com/users/sayzlim/following{/other_user}",
"gists_url": "https://api.github.com/users/sayzlim/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sayzlim",
"id": 791279,
"login": "sayzlim",
"node_id": "MDQ6VXNlcjc5MTI3OQ==",
"organizations_url": "https://api.github.com/users/sayzlim/orgs",
"received_events_url": "https://api.github.com/users/sayzlim/received_events",
"repos_url": "https://api.github.com/users/sayzlim/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sayzlim/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sayzlim/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sayzlim",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2018-09-10T14:52:54Z
|
2021-09-02T00:07:33Z
|
2018-09-10T15:06:14Z
|
CONTRIBUTOR
|
resolved
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4780/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4780/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4780.diff",
"html_url": "https://github.com/psf/requests/pull/4780",
"merged_at": "2018-09-10T15:06:14Z",
"patch_url": "https://github.com/psf/requests/pull/4780.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4780"
}
| true |
[] |
|
https://api.github.com/repos/psf/requests/issues/4779
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4779/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4779/comments
|
https://api.github.com/repos/psf/requests/issues/4779/events
|
https://github.com/psf/requests/pull/4779
| 358,658,026 |
MDExOlB1bGxSZXF1ZXN0MjE0MzQwNzc3
| 4,779 |
Integrate Native CPC by BuySellAds
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/791279?v=4",
"events_url": "https://api.github.com/users/sayzlim/events{/privacy}",
"followers_url": "https://api.github.com/users/sayzlim/followers",
"following_url": "https://api.github.com/users/sayzlim/following{/other_user}",
"gists_url": "https://api.github.com/users/sayzlim/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sayzlim",
"id": 791279,
"login": "sayzlim",
"node_id": "MDQ6VXNlcjc5MTI3OQ==",
"organizations_url": "https://api.github.com/users/sayzlim/orgs",
"received_events_url": "https://api.github.com/users/sayzlim/received_events",
"repos_url": "https://api.github.com/users/sayzlim/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sayzlim/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sayzlim/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sayzlim",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-09-10T14:48:20Z
|
2021-09-02T00:07:33Z
|
2018-09-10T14:49:31Z
|
CONTRIBUTOR
|
resolved
|
Replacing Carbon zone key with the direct key and install CPC ad unit on the site.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4779/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4779/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4779.diff",
"html_url": "https://github.com/psf/requests/pull/4779",
"merged_at": "2018-09-10T14:49:31Z",
"patch_url": "https://github.com/psf/requests/pull/4779.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4779"
}
| true |
[
"✨🍰✨"
] |
https://api.github.com/repos/psf/requests/issues/4778
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4778/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4778/comments
|
https://api.github.com/repos/psf/requests/issues/4778/events
|
https://github.com/psf/requests/issues/4778
| 358,277,508 |
MDU6SXNzdWUzNTgyNzc1MDg=
| 4,778 |
requests.exceptions.ConnectionError: ('Connection aborted.', BrokenPipeError(32, 'Broken pipe'))
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/34645187?v=4",
"events_url": "https://api.github.com/users/creslinux/events{/privacy}",
"followers_url": "https://api.github.com/users/creslinux/followers",
"following_url": "https://api.github.com/users/creslinux/following{/other_user}",
"gists_url": "https://api.github.com/users/creslinux/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/creslinux",
"id": 34645187,
"login": "creslinux",
"node_id": "MDQ6VXNlcjM0NjQ1MTg3",
"organizations_url": "https://api.github.com/users/creslinux/orgs",
"received_events_url": "https://api.github.com/users/creslinux/received_events",
"repos_url": "https://api.github.com/users/creslinux/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/creslinux/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/creslinux/subscriptions",
"type": "User",
"url": "https://api.github.com/users/creslinux",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2018-09-08T08:50:23Z
|
2021-09-07T00:06:23Z
|
2018-09-08T21:03:04Z
|
NONE
|
resolved
|
Summary.
When uploading a large amount of plaintext data into influxdb HTTP api via requests the connection dies with the error:
`requests.exceptions.ConnectionError: ('Connection aborted.', BrokenPipeError(32, 'Broken pipe'))`
after around 30MB of the upload; the file being loaded is 54.3MBs.
The script is processing around 340,000 "candles" of data read form json flatfile being loaded into a influxdb over thei HTTP api - these are timetamp, open, high, low, close, volume. At around 200,000 candles sent in batches of 5,000 requests dies, with +- 150,000 remaining.
## Expected Result
The file uploads without problem
## Actual Result
Upload fails and requests reports BrokenPipeError, with around 150,000 candles remaining.
```
Traceback (most recent call last):
File "/Users/creslin/PycharmProjects/rtmtb/env/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/Users/creslin/PycharmProjects/rtmtb/env/lib/python3.6/site-packages/urllib3/connectionpool.py", line 357, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1065, in _send_output
self.send(chunk)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 986, in send
self.sock.sendall(data)
BrokenPipeError: [Errno 32] Broken pipe
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/creslin/PycharmProjects/rtmtb/env/lib/python3.6/site-packages/requests/adapters.py", line 445, in send
timeout=timeout
File "/Users/creslin/PycharmProjects/rtmtb/env/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "/Users/creslin/PycharmProjects/rtmtb/env/lib/python3.6/site-packages/urllib3/util/retry.py", line 357, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/Users/creslin/PycharmProjects/rtmtb/env/lib/python3.6/site-packages/urllib3/packages/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/Users/creslin/PycharmProjects/rtmtb/env/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/Users/creslin/PycharmProjects/rtmtb/env/lib/python3.6/site-packages/urllib3/connectionpool.py", line 357, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1065, in _send_output
self.send(chunk)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 986, in send
self.sock.sendall(data)
urllib3.exceptions.ProtocolError: ('Connection aborted.', BrokenPipeError(32, 'Broken pipe'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/creslin/PycharmProjects/rtmtb/influxdb/creslin_influx_scratch/write_read_toy.py", line 179, in <module>
"high": float(candle[2]),
File "/Users/creslin/PycharmProjects/rtmtb/env/lib/python3.6/site-packages/influxdb/client.py", line 490, in write_points
tags=tags, protocol=protocol)
File "/Users/creslin/PycharmProjects/rtmtb/env/lib/python3.6/site-packages/influxdb/client.py", line 551, in _write_points
protocol=protocol
File "/Users/creslin/PycharmProjects/rtmtb/env/lib/python3.6/site-packages/influxdb/client.py", line 327, in write
headers=headers
File "/Users/creslin/PycharmProjects/rtmtb/env/lib/python3.6/site-packages/influxdb/client.py", line 267, in request
timeout=self._timeout
File "/Users/creslin/PycharmProjects/rtmtb/env/lib/python3.6/site-packages/requests/sessions.py", line 512, in request
resp = self.send(prep, **send_kwargs)
File "/Users/creslin/PycharmProjects/rtmtb/env/lib/python3.6/site-packages/requests/sessions.py", line 622, in send
r = adapter.send(request, **kwargs)
File "/Users/creslin/PycharmProjects/rtmtb/env/lib/python3.6/site-packages/requests/adapters.py", line 495, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', BrokenPipeError(32, 'Broken pipe'))
```
## Reproduction Steps
```Python
#######################
# Load candles - batches of 5,000: error
# requests.exceptions.ConnectionError: ('Connection aborted.', BrokenPipeError(32, 'Broken pipe'))
from influxdb import InfluxDBClient
from influxdb import DataFrameClient
import json
'''
create a client
'''
dbname = 'crypto'
host = 'localhost'
port = '8086'
user = ''
password = ''
client = InfluxDBClient(host, port, user, password, dbname)
df_client = DataFrameClient(host, port, user, password, dbname)
##### load 9months 1min eth candles (342,000) items
f = open('/Users/creslin/PycharmProjects/rtmtb/influxdb/json_candles/Binance_ETHBTC_1m_1514764800000-1535760000000.json','r')
candles = json.loads(f.read())
total_len = len(candles)
candle_records = []
exchange = 'binance'
symbol = 'ETH/USDT'
count = 0
for candle in candles:
candle_item = {}
candle_item ={
"measurement": "crypto_1m",
"tags": {
"exchange": exchange,
"symbol": symbol
},
"time": candle[0],
"fields": {
"open": float(candle[1]),
"high": float(candle[2]),
"low": float(candle[3]),
"close": float(candle[4]),
"volume": float(candle[5])
}
}
candle_records.append(candle_item)
count = count + 1
#Write candles in batches of 5000,
if count >= 5000:
'''
Write Eth/btc candles in batches of 5000
'''
#print("Write points: {0}".format(candle_records))
client.write_points(candle_records, time_precision='ms')
count = 0
total_len = int(total_len) - 5000
print(total_len)
```
## System Information
```
python3 -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.6.5"
},
"platform": {
"release": "17.7.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "100020ff"
},
"urllib3": {
"version": "1.22"
},
"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/4778/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4778/timeline
| null |
completed
| null | null | false |
[
"The influxDB is a their standard provide vanilla docker:\r\nhttps://hub.docker.com/_/influxdb/\r\n\r\nI can share the json input file if helpful, it p7 zips to around 10MB ",
"By using a series helper Ive avoided the above problem\r\nIm unsure is this is a bug or not, ie expected behaviour if passing to much data \r\n\r\nBut if requests team wish a repeatable plaintext example of the issue it may be a good model\r\n\r\nPlease feel free to close or use, im not too sure of the bug or not.\r\n\r\nFor reference the below code works with 5000 deep chunked inserts \r\n\r\n```\r\nfrom influxdb import InfluxDBClient\r\nfrom influxdb import DataFrameClient\r\nfrom influxdb import SeriesHelper\r\n\r\nimport pandas as pd\r\npd.set_option('display.max_rows', 500)\r\npd.set_option('display.max_columns', 500)\r\npd.set_option('display.width', 1000)\r\n\r\nimport json\r\n\r\n'''\r\ncreate a client\r\n'''\r\ndbname = 'crypto'\r\nhost = 'ibm'\r\nport = '8086'\r\nuser = ''\r\npassword = ''\r\n\r\nclient = InfluxDBClient(host, port, user, password, dbname)\r\ndf_client = DataFrameClient(host, port, user, password, dbname)\r\n\r\n\r\n### Useful in test - nuke it make it\r\nprint(\"Drop database: \" + dbname)\r\nclient.drop_database(dbname)\r\n\r\nprint(\"Create database: \" + dbname)\r\nclient.create_database(dbname)\r\n\r\n\r\nclass MySeriesHelper(SeriesHelper):\r\n '''\r\n Instantiate SeriesHelper to write points to the backend.\r\n This is to write streams of records / bulk inserts\r\n '''\r\n\r\n class Meta:\r\n \"\"\"Meta class stores time series helper configuration.\"\"\"\r\n\r\n # The client should be an instance of InfluxDBClient.\r\n client = client\r\n\r\n # The series name must be a string. Add dependent fields/tags\r\n # in curly brackets.\r\n #series_name = 'crypto_1.{exchange}.{symbol}'\r\n series_name = 'crypto_1'\r\n\r\n # Defines all the fields in this time series.\r\n fields = ['open', 'high', 'low', 'close', 'volume']\r\n\r\n # Defines all the tags for the series.\r\n tags = ['exchange', 'symbol']\r\n\r\n # Defines the number of data points to store prior to writing\r\n # on the wire.\r\n bulk_size = 5000\r\n\r\n # set the time precision to ms (\"s\"|\"ns\"|\"ms\"|\"u\") - make use use the right one!\r\n time_precision = 'ms'\r\n\r\n # autocommit must be set to True when using bulk_size\r\n autocommit = True\r\n\r\n\r\n# ##### load 9months 1min eth candles (342,000) items\r\nf = open('/Users/creslin/PycharmProjects/rtmtb/influxdb/json_candles/Binance_ETHBTC_1m_1514764800000-1535760000000.json','r')\r\ncandles = json.loads(f.read())\r\n\r\nexchange = 'binance'\r\nsymbol = 'ETH/USDT'\r\n\r\n# Since bulk_size is set to 5000, upon the 5,000th construction call, *all* data\r\n# points will be written / committed on the wire via MySeriesHelper.Meta.client.\r\ncount = 0\r\nfor candle in candles:\r\n MySeriesHelper(exchange=exchange, symbol=symbol,\r\n open =float(candle[1]),\r\n high =float(candle[2]),\r\n low =float(candle[3]),\r\n close =float(candle[4]),\r\n volume=float(candle[5]),\r\n time =candle[0])\r\n\r\n count = count + 1\r\n print(count)\r\n\r\n# To manually submit data points which are not yet written, call commit:\r\nMySeriesHelper.commit()\r\n\r\n# To inspect the JSON which will be written, call _json_body_():\r\nMySeriesHelper._json_body_()\r\n\r\n\r\n'''\r\nRead last 10,000 candles into a dataframe\r\n'''\r\nquery = 'select time, open, high, low, close, volume from crypto_1 ORDER by time DESC LIMIT 10000'\r\nprint(\"Querying data to a dataframe: \" + query)\r\nprint('')\r\ndf_result = df_client.query(query)\r\n#df_result = df_result['crypto_1m'].describe()\r\nprint(df_result)\r\n```",
"A broken pipe error means that something in the socket broke, likely because the server did something silly or unexpected. Thus, it's outside the realm of Requests."
] |
https://api.github.com/repos/psf/requests/issues/4777
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4777/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4777/comments
|
https://api.github.com/repos/psf/requests/issues/4777/events
|
https://github.com/psf/requests/issues/4777
| 357,674,401 |
MDU6SXNzdWUzNTc2NzQ0MDE=
| 4,777 |
What about `before_request` hook?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/8261179?v=4",
"events_url": "https://api.github.com/users/RStatkevych/events{/privacy}",
"followers_url": "https://api.github.com/users/RStatkevych/followers",
"following_url": "https://api.github.com/users/RStatkevych/following{/other_user}",
"gists_url": "https://api.github.com/users/RStatkevych/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/RStatkevych",
"id": 8261179,
"login": "RStatkevych",
"node_id": "MDQ6VXNlcjgyNjExNzk=",
"organizations_url": "https://api.github.com/users/RStatkevych/orgs",
"received_events_url": "https://api.github.com/users/RStatkevych/received_events",
"repos_url": "https://api.github.com/users/RStatkevych/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/RStatkevych/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/RStatkevych/subscriptions",
"type": "User",
"url": "https://api.github.com/users/RStatkevych",
"user_view_type": "public"
}
|
[
{
"color": "1cff91",
"default": false,
"description": "",
"id": 860696300,
"name": "3.0",
"node_id": "MDU6TGFiZWw4NjA2OTYzMDA=",
"url": "https://api.github.com/repos/psf/requests/labels/3.0"
}
] |
closed
| false | null |
[] |
{
"closed_at": null,
"closed_issues": 29,
"created_at": "2024-05-19T18:29:04Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4",
"events_url": "https://api.github.com/users/sethmlarson/events{/privacy}",
"followers_url": "https://api.github.com/users/sethmlarson/followers",
"following_url": "https://api.github.com/users/sethmlarson/following{/other_user}",
"gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sethmlarson",
"id": 18519037,
"login": "sethmlarson",
"node_id": "MDQ6VXNlcjE4NTE5MDM3",
"organizations_url": "https://api.github.com/users/sethmlarson/orgs",
"received_events_url": "https://api.github.com/users/sethmlarson/received_events",
"repos_url": "https://api.github.com/users/sethmlarson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sethmlarson",
"user_view_type": "public"
},
"description": "",
"due_on": null,
"html_url": "https://github.com/psf/requests/milestone/34",
"id": 11073254,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/34/labels",
"node_id": "MI_kwDOABTKOs4AqPbm",
"number": 34,
"open_issues": 0,
"state": "open",
"title": "Bankruptcy",
"updated_at": "2024-05-20T14:37:16Z",
"url": "https://api.github.com/repos/psf/requests/milestones/34"
}
| 8 |
2018-09-06T14:12:51Z
|
2024-05-20T14:37:16Z
|
2024-05-20T14:37:16Z
|
NONE
| null |
Didn't find a correct place where to post my question.
Hook system is a cool idea but I'm wondered why there is no some kind of 'before_request' hook?
Let's assume I want to create `requests.Session`, and do some preparation steps for upcoming requests (like body formatting or simply log what URL and method). One of possible ways to do that is to override `requests.Session.request` method, but adding one more hook sounds more reasonable. It is possible to put it here https://github.com/requests/requests/blob/master/requests/sessions.py#L623
Is there any reason of not having this hook? Or is there some appropriate way to execute some piece of code before each request within Session?
|
{
"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": 3,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 3,
"url": "https://api.github.com/repos/psf/requests/issues/4777/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4777/timeline
| null |
completed
| null | null | false |
[
"We had many more hooks pre-1.0. They were removed. There hasn't been enough demand to add them back since. Further, as you might have read before creating this issue, Requests is under a feature-freeze so we will likely not accept this feature request",
"yeah, we used to have this. \r\n\r\nWe can consider it for 3.0 — can you explain your use case?",
"Here is an example, how I would implement some common logic for all requests within session without hooks by overriding `requests.Session.request` method\r\n\r\n```\r\nclass CustomSession(requests.Session):\r\n\r\n session = None\r\n _base_url = None\r\n\r\n def __init__(self, base_url):\r\n requests.Session.__init__(self)\r\n self._base_url = base_url\r\n\r\n def request(self, method, url, *args, **kwargs):\r\n \"\"\"\r\n Overriden method of requests.Session.request.\r\n\r\n You may add any request preprocessing or response postprocessing logic here.\r\n \"\"\"\r\n full_url = self._base_url + url # I want to make requests without specifying base url\r\n LOGGER.debug(\"Sending request %s %s\", method, full_url) # \r\n\r\n return requests.Session.request(self, method, full_url, *args, **kwargs)\r\n\r\n```\r\nHere is how it can be used\r\n```\r\nsession = CustomSession('http://test.com')\r\n\r\nsession.get('/v1/something') \r\nsession.delete('/v1/something/23')\r\n\r\nsession.post('/v1/something/23') \r\n```\r\n\r\nI think we can have some kind of hooks to do the same logic. That can be functions or callable objects like this :\r\n\r\n```\r\nclass BaseURLHook(object):\r\n def __init__(self, base_url):\r\n self.base_url = base_url\r\n\r\n def __call__(self, request, *args, **kwargs):\r\n request.url = self.base_url + request.url\r\n return request\r\n\r\n\r\ndef log_request_hook(request, *args, **kwargs):\r\n LOGGER.debug(\"Sending request %s %s\", request.method, request.url) \r\n\r\n....\r\nhooks = {\r\n 'before_request': [\r\n BaseURLHook('http://test.com'),\r\n log_request_hook\r\n ]\r\n}\r\nsession = request.Session()\r\nsession.hooks = hooks\r\n```\r\n\r\nHaving such kind of hooks can allow to perform preprocessing of request and postprocessing of response without overriding `requests.Session` methods.\r\n\r\nI hope I clarified my idea :)",
"But probably hooks is a wrong abstraction for this purposes. What I'm thinking about is some king of Request Factory, that provides Prototypes of requests (it can be an extension of PreparedRequest).",
"This could also be useful for adding distributed tracing support to requests. I had thought about using a TransportAdapter for that though, so really `before_request` isn't entirely necessary",
"I have a vary similar idea about base url. I'm not sure if there is a need to have `before_request` hook, but it would be really useful to have base url.\r\n\r\nHere is example:\r\n\r\n```python\r\ns = requests.Session()\r\ns.auth = ('user', 'pass')\r\ns.base = 'https://httpbin.org'\r\ns.get('/headers')\r\n```\r\n\r\nUnder the hood, if `base` is set, then for each request, [urljoin](https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urljoin) would be called.\r\n\r\nI think, that would be really useful.\r\n\r\nNow in most cases, I must configure base url somewhere else and pass it everywhere and construct urls manually.",
"Howdy.\r\n\r\nIf you support the concept of hooks in the requets API, they should be comprehensive and allow a lot of control over how the API works. So far only a \"response\" hook is partially useful.\r\n\r\nMy use case: I want to run the API in either capturing mode (write all responses to disk, for that the response hook works) or read back mode (for this case I'd need a \"request\" hook before the request is sent to produce a response. And/or, a global hook when a session is created so I can override the HTTPAdapters to an adapter that reads back from the cache.\r\n\r\nThank you.\r\n ",
"In an effort to clean up the issue tracker to only have issues that are still relevant to the project we've done a quick pass and decided this issue may no longer be relevant for a variety of potential reasons, including:\r\n\r\n* Applies to a much older version, unclear whether the issue still applies.\r\n* Change requires a backwards incompatible release and it's unclear if the benefits are worth the migration effort from the community.\r\n* There isn't a clear demand from the community on the change landing in Requests.\r\n\r\nIf you think the issue should remain open, please comment so below or open a new issue and link back to the original issue. Again, thank you for opening the issue and for the discussion, it's much appreciated."
] |
https://api.github.com/repos/psf/requests/issues/4776
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4776/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4776/comments
|
https://api.github.com/repos/psf/requests/issues/4776/events
|
https://github.com/psf/requests/issues/4776
| 357,588,099 |
MDU6SXNzdWUzNTc1ODgwOTk=
| 4,776 |
how to send bytes data
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/18509346?v=4",
"events_url": "https://api.github.com/users/nighter233/events{/privacy}",
"followers_url": "https://api.github.com/users/nighter233/followers",
"following_url": "https://api.github.com/users/nighter233/following{/other_user}",
"gists_url": "https://api.github.com/users/nighter233/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nighter233",
"id": 18509346,
"login": "nighter233",
"node_id": "MDQ6VXNlcjE4NTA5MzQ2",
"organizations_url": "https://api.github.com/users/nighter233/orgs",
"received_events_url": "https://api.github.com/users/nighter233/received_events",
"repos_url": "https://api.github.com/users/nighter233/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nighter233/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nighter233/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nighter233",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2018-09-06T10:14:25Z
|
2021-09-07T00:06:24Z
|
2018-09-06T12:19:25Z
|
NONE
|
resolved
|
Please refer to our [Stack Overflow tag](https://stackoverflow.com/questions/tagged/python-requests) for guidance.
how to send bytes data
|
{
"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/4776/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4776/timeline
| null |
completed
| null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/4775
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4775/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4775/comments
|
https://api.github.com/repos/psf/requests/issues/4775/events
|
https://github.com/psf/requests/issues/4775
| 357,239,890 |
MDU6SXNzdWUzNTcyMzk4OTA=
| 4,775 |
fails on older TLS stacks with OpenSSL 1.1.1pre9
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/796623?v=4",
"events_url": "https://api.github.com/users/anarcat/events{/privacy}",
"followers_url": "https://api.github.com/users/anarcat/followers",
"following_url": "https://api.github.com/users/anarcat/following{/other_user}",
"gists_url": "https://api.github.com/users/anarcat/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/anarcat",
"id": 796623,
"login": "anarcat",
"node_id": "MDQ6VXNlcjc5NjYyMw==",
"organizations_url": "https://api.github.com/users/anarcat/orgs",
"received_events_url": "https://api.github.com/users/anarcat/received_events",
"repos_url": "https://api.github.com/users/anarcat/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/anarcat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/anarcat/subscriptions",
"type": "User",
"url": "https://api.github.com/users/anarcat",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 13 |
2018-09-05T13:51:51Z
|
2022-02-26T04:00:36Z
|
2021-11-28T03:19:38Z
|
NONE
|
resolved
|
The upcoming adoption of [OpenSSL 1.1](https://www.openssl.org/news/openssl-1.1.0-notes.html) (or more specifically, [1.1.1](https://www.openssl.org/news/changelog.html)) by Linux distributions might cause problems for requests when checking old websites.
This was first reported in the Debian bugtracker as [bug #907807](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=907807), originally against the [linkchecker](https://github.com/linkchecker/linkchecker/) program (and forwarded upstream as https://github.com/linkchecker/linkchecker/issues/188), but it was found that the requests library directly suffers from this problem as well.
~This issue will probably block requests from being released with buster, the current "testing" release and upcoming (mid 2019?) stable release unless it is somewhat fixed.~ That assertion was incorrect: the bug is currently marked with a "normal" severity which is not blocking release.
The tested sites were:
* https://get.adobe.com/
* https://caniuse.com
* https://www.nada.kth.se/~snilsson/publications/IP-address-lookup-using-LC-tries/
All sites load correctly in Firefox 60.1.0 and although I haven't tested *that* with OpenSSL 1.1.1, I doubt it would be affected as Firefox (and Chromium) have their own TLS library (NSS). Also note that `urllib3` seems to have no problem loading those sites itself:
```
>>> import urllib3
>>> http = urllib3.PoolManager()
>>> r = http.request('GET', 'https://get.adobe.com/')
>>>
```
## Expected Result
All sites should load correctly, and do load correctly in Debian buster (which still has OpenSSL 1.1.0):
```
$ python
Python 2.7.15+ (default, Aug 31 2018, 11:56:52)
[GCC 8.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> requests.get('https://get.adobe.com')
<Response [200]>
```
## Actual Result
```
(unstable-amd64-sbuild)anarcat@curie:/$ python
Python 2.7.15+ (default, Aug 31 2018, 11:56:52)
[GCC 8.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> requests.get('https://get.adobe.com')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/requests/api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "/usr/lib/python2.7/dist-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 506, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='get.adobe.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, u'[SSL: WRONG_SIGNATURE_TYPE] wrong signature type (_ssl.c:726)'),))
>>> requests.get('https://www.nada.kth.se')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/requests/api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "/usr/lib/python2.7/dist-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 506, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='www.nada.kth.se', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, u'[SSL: DH_KEY_TOO_SMALL] dh key too small (_ssl.c:726)'),))
>>> requests.get('https://caniuse.com')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/requests/api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "/usr/lib/python2.7/dist-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 506, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='caniuse.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, u'[SSL: VERSION_TOO_LOW] version too low (_ssl.c:726)'),))
```
## Reproduction Steps
Run a Debian unstable machine to get the latest 1.1.1~~pre9 package. This can be done with Docker with:
docker run -it debian:unstable
If you do not have access to such an environment, the latest OpenSSL code can be found in [their project page](https://github.com/openssl/openssl).
```python
import requests
for url in ('https://get.adobe.com/', 'https://caniuse.com',
'https://www.nada.kth.se/~snilsson/publications/IP-address-lookup-using-LC-tries/'):
requests.get(url)
```
## System Information
$ python -m requests.help
```
(unstable-amd64-sbuild)anarcat@curie:/$ python -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "2.7.15+"
},
"platform": {
"release": "4.17.0-3-amd64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "10101009"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}
```
I am aware that we are one minor version behind upstream in Debian, and this is being worked on. But I have reviewed the requests changelog and there didn't seem to be any change relevant to this. I am therefore going under the assertion that current versions also suffer from the same problem.
Also note that this might be a regression in OpenSSL itself. I am filing this here to see what your opinion is regarding this issue and whether it is something that belongs in requests or the upstream cryptographic library(ies).
|
{
"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": 5,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 5,
"url": "https://api.github.com/repos/psf/requests/issues/4775/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4775/timeline
| null |
completed
| null | null | false |
[
"For the adobe problem I've opened: https://github.com/openssl/openssl/issues/7126",
"The caniuse problem is: https://github.com/Fyrd/caniuse/issues/4198\r\n\r\nIt's caused by Debian setting a minimum TLS version of 1.2. They really should add at least TLS 1.2 support.",
"For the SNI problem, see: https://wiki.openssl.org/index.php/TLS1.3#Server_Name_Indication\r\n\r\nYou will get that problem for anything hosted by Google.",
"So some of those issues are caused by Debian increasing the security level of openssl by default. The proper fix is to get the websites fixed. But it's possible to lower those security settings as a work around. Please don't override the defaults by default.\r\n\r\nThe SNI problem is something you really should fix. I don't know which part doesn't set it.",
"Hi, could you provide the workarounds? I have tried to lower the security connection to avoid `DH_KEY_TOO_SMALL`, but I couldn't find any solution which would work for me (Debian testing, requests installed from debian package). Specifically for `https://www.ceskatelevize.cz/`. It's not very likely they will fix their security any time soon.",
"See /usr/share/doc/libssl1.1/NEWS.Debian.gz\n",
"I've seen that, but I don't want to lower the security for the whole system, just for specific script. I've also tried https://stackoverflow.com/q/38015537/2440346, but change of `urllib3.util.ssl_.DEFAULT_CIPHERS` doesn't work either.",
"If you want to lower the security setting in an other file than\n/etc/ssl/openssl.cfg you need to use DEFAULT@SECLEVEL=1\n",
"I've tried number of approaches, but none work, see\r\n```python\r\nimport requests\r\nfrom requests.adapters import HTTPAdapter\r\nfrom requests.packages.urllib3.util.ssl_ import create_urllib3_context\r\n\r\n# Attempt 1:\r\n# requests.packages.urllib3.util.ssl_.DEFAULT_CIPHERS = '@SECLEVEL=1'\r\n# Attempt 2:\r\n# requests.packages.urllib3.util.ssl_.DEFAULT_CIPHERS = 'DEFAULT@SECLEVEL=1'\r\n# Attempt 3:\r\n# requests.packages.urllib3.util.ssl_.DEFAULT_CIPHERS = 'ALL'\r\nrequests.get('https://www.ceskatelevize.cz/')\r\n\r\n# Attempt 4:\r\n# CIPHERS = '@SECLEVEL=1'\r\n# Attempt 5:\r\n# CIPHERS = 'DEFAULT@SECLEVEL=1'\r\n# Attempt 6:\r\nCIPHERS = 'ALL'\r\nclass CustomAdapter(HTTPAdapter):\r\n \"\"\"\r\n A TransportAdapter that re-enables 3DES support in Requests.\r\n \"\"\"\r\n def init_poolmanager(self, *args, **kwargs):\r\n context = create_urllib3_context(ciphers=CIPHERS)\r\n kwargs['ssl_context'] = context\r\n return super(CustomAdapter, self).init_poolmanager(*args, **kwargs)\r\n\r\n def proxy_manager_for(self, *args, **kwargs):\r\n context = create_urllib3_context(ciphers=CIPHERS)\r\n kwargs['ssl_context'] = context\r\n return super(CustomAdapter, self).proxy_manager_for(*args, **kwargs)\r\n\r\nsession = requests.Session()\r\nsession.mount('https://www.ceskatelevize.cz', CustomAdapter())\r\nsession.get('https://www.ceskatelevize.cz/')\r\n```",
"The following works for me:\r\n\r\n```\r\nimport requests\r\nfrom requests import adapters\r\nimport ssl\r\nfrom urllib3 import poolmanager\r\n\r\n\r\nclass TLSAdapter(adapters.HTTPAdapter):\r\n\r\n def init_poolmanager(self, connections, maxsize, block=False):\r\n \"\"\"Create and initialize the urllib3 PoolManager.\"\"\"\r\n ctx = ssl.create_default_context()\r\n ctx.set_ciphers('DEFAULT@SECLEVEL=1')\r\n self.poolmanager = poolmanager.PoolManager(\r\n num_pools=connections,\r\n maxsize=maxsize,\r\n block=block,\r\n ssl_version=ssl.PROTOCOL_TLS,\r\n ssl_context=ctx)\r\n\r\nsession = requests.session()\r\nsession.mount('https://', TLSAdapter())\r\nsession.get(TARGET)\r\n```",
"> The following works for me:\r\n> \r\n> ```\r\n> import requests\r\n> from requests import adapters\r\n> import ssl\r\n> from urllib3 import poolmanager\r\n> \r\n> \r\n> class TLSAdapter(adapters.HTTPAdapter):\r\n> \r\n> def init_poolmanager(self, connections, maxsize, block=False):\r\n> \"\"\"Create and initialize the urllib3 PoolManager.\"\"\"\r\n> ctx = ssl.create_default_context()\r\n> ctx.set_ciphers('DEFAULT@SECLEVEL=1')\r\n> self.poolmanager = poolmanager.PoolManager(\r\n> num_pools=connections,\r\n> maxsize=maxsize,\r\n> block=block,\r\n> ssl_version=ssl.PROTOCOL_TLS,\r\n> ssl_context=ctx)\r\n> \r\n> session = requests.session()\r\n> session.mount('https://', TLSAdapter())\r\n> session.get(TARGET)\r\n> ```\r\n\r\nThanks!\r\nIts helpfuly for my SSLError [SSL: DH_KEY_TOO_SMALL]",
"@codefather-labs thanks I had the same issue, very odd",
"This very much seems like a server-side/OpenSSL config problem instead of anything Requests can \"work-around\". How OpenSSL is configured on a platform can't be controlled by Requests maintainers. Going to close this as not a defect in Requests."
] |
https://api.github.com/repos/psf/requests/issues/4774
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4774/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4774/comments
|
https://api.github.com/repos/psf/requests/issues/4774/events
|
https://github.com/psf/requests/issues/4774
| 357,155,288 |
MDU6SXNzdWUzNTcxNTUyODg=
| 4,774 |
ConnectionResetError: [Errno 104] Connection reset by peer
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/40163787?v=4",
"events_url": "https://api.github.com/users/ron819/events{/privacy}",
"followers_url": "https://api.github.com/users/ron819/followers",
"following_url": "https://api.github.com/users/ron819/following{/other_user}",
"gists_url": "https://api.github.com/users/ron819/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ron819",
"id": 40163787,
"login": "ron819",
"node_id": "MDQ6VXNlcjQwMTYzNzg3",
"organizations_url": "https://api.github.com/users/ron819/orgs",
"received_events_url": "https://api.github.com/users/ron819/received_events",
"repos_url": "https://api.github.com/users/ron819/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ron819/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ron819/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ron819",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2018-09-05T10:01:01Z
|
2021-09-07T00:06:23Z
|
2018-09-05T23:15:44Z
|
NONE
|
resolved
|
`Traceback (most recent call last):
File "/home/ubuntu/.local/lib/python3.5/site-packages/urllib3/response.py", line 331, in _error_catcher
yield
File "/home/ubuntu/.local/lib/python3.5/site-packages/urllib3/response.py", line 640, in read_chunked
chunk = self._handle_chunk(amt)
File "/home/ubuntu/.local/lib/python3.5/site-packages/urllib3/response.py", line 595, in _handle_chunk
returned_chunk = self._fp._safe_read(self.chunk_left)
File "/usr/lib/python3.5/http/client.py", line 607, in _safe_read
chunk = self.fp.read(min(amt, MAXAMOUNT))
File "/usr/lib/python3.5/socket.py", line 575, in readinto
return self._sock.recv_into(b)
ConnectionResetError: [Errno 104] Connection reset by peer`
exception is not catched using:
`except requests.exceptions.RequestException as e:`
See stack overflow for more details.
https://stackoverflow.com/questions/52181161/handling-exceptions-from-python-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/4774/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4774/timeline
| null |
completed
| null | null | false |
[
"Based on your traceback, this doesn't actually involve Requests. Something else is using urllib3 directly. If you're using urllib3 directly, you can't use Requests to catch exceptions.",
"@sigmavirus24 I'm not using urlib3 directly. Only requests",
"@ron819 Then you've modified your traceback to the extent with which we cannot do anything. Your traceback includes nothing from requests. Is it possible you're using another library that uses urllib3 directly?"
] |
https://api.github.com/repos/psf/requests/issues/4773
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4773/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4773/comments
|
https://api.github.com/repos/psf/requests/issues/4773/events
|
https://github.com/psf/requests/issues/4773
| 355,959,019 |
MDU6SXNzdWUzNTU5NTkwMTk=
| 4,773 |
POST, PUT and PATCH on 301 redirect re-POST without body
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/3470382?v=4",
"events_url": "https://api.github.com/users/jokejuke/events{/privacy}",
"followers_url": "https://api.github.com/users/jokejuke/followers",
"following_url": "https://api.github.com/users/jokejuke/following{/other_user}",
"gists_url": "https://api.github.com/users/jokejuke/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jokejuke",
"id": 3470382,
"login": "jokejuke",
"node_id": "MDQ6VXNlcjM0NzAzODI=",
"organizations_url": "https://api.github.com/users/jokejuke/orgs",
"received_events_url": "https://api.github.com/users/jokejuke/received_events",
"repos_url": "https://api.github.com/users/jokejuke/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jokejuke/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jokejuke/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jokejuke",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2018-08-31T12:22:30Z
|
2021-09-07T00:06:24Z
|
2018-08-31T15:12:49Z
|
NONE
|
resolved
|
Summary.
If ``allow_redirects = True`` and if redirect response 301 is returned, then POST, PUT and PATCH requests should save body.
Similar [issue 1084](https://github.com/requests/requests/issues/1084) was satisfied for 307 responses.
[RFC](http://www.faqs.org/rfcs/rfc2616.html) says the same thing about 307 and 301 responses.
Actual result - body is cleaned on 301 response.
Requests version
```
requests==2.19.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"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4773/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4773/timeline
| null |
completed
| null | null | false |
[
"Hi @skybobbi, the RFC linked is quite outdated. I believe you may have meant RFC 7231 section 6.4.2, which discusses changing POST to GET on redirect.\r\n\r\nThis behavior was implemented in Requests quite a while ago and is intentional. There is potential for malicious redirects to capture the contents of what you’re trying to send to another server. You’ll find this is implemented by every major browser and many http-related tools.\r\n\r\nThat said, we did revisit this a year or two ago and decided we’d scope the body stripping down to only POST requests per the RFC. This code is merged into the current 3.0 branch but won’t be released in the 2.X series due to it being a breaking change.",
"Thanks. \r\nAs I understood, all request types except POST will save body on 301 redirects since 3.* version of requests. Am i right?",
"@skybobbi 3.0 has not been released yet, but yes, that is the functionality that is currently implemented on that branch.\r\n\r\nIf you need to handle this in the interim, you’ll need to handle the redirecting in your code. I would suggest looking at the SessionRedirectMixin in sessions.py",
"Thank you!"
] |
https://api.github.com/repos/psf/requests/issues/4772
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4772/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4772/comments
|
https://api.github.com/repos/psf/requests/issues/4772/events
|
https://github.com/psf/requests/issues/4772
| 355,097,032 |
MDU6SXNzdWUzNTUwOTcwMzI=
| 4,772 |
Error 404 in documentation home page
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/417485?v=4",
"events_url": "https://api.github.com/users/pkirk/events{/privacy}",
"followers_url": "https://api.github.com/users/pkirk/followers",
"following_url": "https://api.github.com/users/pkirk/following{/other_user}",
"gists_url": "https://api.github.com/users/pkirk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pkirk",
"id": 417485,
"login": "pkirk",
"node_id": "MDQ6VXNlcjQxNzQ4NQ==",
"organizations_url": "https://api.github.com/users/pkirk/orgs",
"received_events_url": "https://api.github.com/users/pkirk/received_events",
"repos_url": "https://api.github.com/users/pkirk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pkirk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pkirk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pkirk",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2018-08-29T10:28:57Z
|
2021-09-07T00:06:24Z
|
2018-08-29T11:02:01Z
|
NONE
|
resolved
|
In the docs/index.rst file there is a link to
https://www.kennethreitz.org/requests3
but that link is a 404.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4772/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4772/timeline
| null |
completed
| null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/4771
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4771/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4771/comments
|
https://api.github.com/repos/psf/requests/issues/4771/events
|
https://github.com/psf/requests/issues/4771
| 354,077,499 |
MDU6SXNzdWUzNTQwNzc0OTk=
| 4,771 |
ChunkedEncodingError isn't explained properly
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/40163787?v=4",
"events_url": "https://api.github.com/users/ron819/events{/privacy}",
"followers_url": "https://api.github.com/users/ron819/followers",
"following_url": "https://api.github.com/users/ron819/following{/other_user}",
"gists_url": "https://api.github.com/users/ron819/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ron819",
"id": 40163787,
"login": "ron819",
"node_id": "MDQ6VXNlcjQwMTYzNzg3",
"organizations_url": "https://api.github.com/users/ron819/orgs",
"received_events_url": "https://api.github.com/users/ron819/received_events",
"repos_url": "https://api.github.com/users/ron819/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ron819/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ron819/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ron819",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-08-26T08:37:27Z
|
2021-09-07T00:06:15Z
|
2018-10-01T03:48:36Z
|
NONE
|
resolved
|
The [docs ](http://docs.python-requests.org/en/master/_modules/requests/exceptions/) says about `ChunkedEncodingError`:
```
class ChunkedEncodingError(RequestException):
"""The server declared chunked encoding but sent an invalid chunk."""
```
While this true it's highly confusing. What actually happens is that the server did not respond in time so the connection was closed. The solution is to retry the code and attempt again:
```
def get(tries=5):
for n in range(tries):
try:
GET call
return whatever
except ChunkedEncodingError as e:
if n == tries - 1:
raise e
```
This has been asked many time over the internet including even here: https://github.com/requests/requests/issues/4484
I recommend adding an **optional** argument for the `GET `call which will specify the tries number and that will be handled by the get call itself. This will avoid this problem and allow the user more control.
meaning that the GET will return the exception only when the max retries has been reached.
If my suggestion is not accepted at least edit the docs and suggest the template of the solution to avoid the problem.
|
{
"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/4771/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4771/timeline
| null |
completed
| null | null | false |
[
"Hi @ron819, while the exception we're wrapping isn't the clearest, it does convey the connection has been broken with the server. The cause of that could be a multitude of things, but is likely the server forcing the connection closed.\r\n```\r\nrequests.exceptions.ChunkedEncodingError: (\"Connection broken: error(10054, '')\", error(10054, ''))\r\n```\r\n\r\nI don't think it's clear that most users would want to retry in the case of a misbehaving server. Our API for Requests is currently frozen, so changes to the `get` method are unlikely unless there's significant oversight in functionality. Your example shows this should be easily implementable in 10-15 lines of code in your application, giving your complete control over how it will work. For those reasons, I don't think we'll be adding anything new to the Requests code base at this time."
] |
https://api.github.com/repos/psf/requests/issues/4770
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4770/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4770/comments
|
https://api.github.com/repos/psf/requests/issues/4770/events
|
https://github.com/psf/requests/issues/4770
| 353,443,618 |
MDU6SXNzdWUzNTM0NDM2MTg=
| 4,770 |
HTTPSConnectionPool, SOCKSHTTPSConnectionPool errors
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/24619483?v=4",
"events_url": "https://api.github.com/users/JonhSilver/events{/privacy}",
"followers_url": "https://api.github.com/users/JonhSilver/followers",
"following_url": "https://api.github.com/users/JonhSilver/following{/other_user}",
"gists_url": "https://api.github.com/users/JonhSilver/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JonhSilver",
"id": 24619483,
"login": "JonhSilver",
"node_id": "MDQ6VXNlcjI0NjE5NDgz",
"organizations_url": "https://api.github.com/users/JonhSilver/orgs",
"received_events_url": "https://api.github.com/users/JonhSilver/received_events",
"repos_url": "https://api.github.com/users/JonhSilver/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JonhSilver/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JonhSilver/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JonhSilver",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-08-23T15:48:25Z
|
2021-09-07T00:06:15Z
|
2018-10-01T03:52:19Z
|
NONE
|
resolved
|
Using this code a long time, but few month ago, it started to craching with error
--------------------------------------
```
import requests
def get_tor_session():
session = requests.session()
session.proxies = {'http': 'socks5://127.0.0.1:9150',
'https': 'socks5://127.0.0.1:9150'}
return session
requests.packages.urllib3.disable_warnings()
session = get_tor_session()
IpUrl = 'https://api.ipify.org'
TorResponse = session.get(IpUrl)
print('tor ip: {}'.format(TorResponse.text.strip()))
```
--------------------------------------------------------------
Error:
`HTTPSConnectionPool(host='', port=443): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', error(10053, 'An established connection was aborted by the software in your host machine')))`
----------------------------
if clear all proxy fields in internet explorer options, got another error:
`SOCKSHTTPSConnectionPool(host='', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<requests.packages.urllib3.contrib.socks.SOCKSHTTPSConnection object at 0x0383A1F0>: Failed to establish a new connection: 0x05: Connection refused',))`
-----------------------------
changing socks5:// to socks5h:// make error:
`ValueError: Unable to determine SOCKS version from socks5h://127.0.0.1:9150`
------------------------
`c:\Python27>pip show requests
Name: requests
Version: 2.19.1
Summary: Python HTTP for Humans.
Home-page: http://python-requests.org
Author: Kenneth Reitz
Author-email: [email protected]
License: Apache 2.0
Location: c:\python36\lib\site-packages
Requires: idna, chardet, urllib3, certifi
You are using pip version 9.0.1, however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' comm
and.
c:\Python27>pip show urllib3
Name: urllib3
Version: 1.23
Summary: HTTP library with thread-safe connection pooling, file post, and more.
Home-page: https://urllib3.readthedocs.io/
Author: Andrey Petrov
Author-email: [email protected]
License: MIT
Location: c:\python36\lib\site-packages
Requires:
You are using pip version 9.0.1, however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' comm
and.`
Installed requests[socks], ssl and everithig else available in internet
Directly in Tor browser all site links opening ok
------------------------------
How to solve problem?
|
{
"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/4770/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4770/timeline
| null |
completed
| null | null | false |
[
"Hi @JonhSilver, this appears to be a request for help. The information provided points towards a possible issue with your proxy which is outside of the scope of Requests. These kinds of questions for specific setups should be directed to [StackOverflow](https://stackoverflow.com) since we reserve the use of this issue tracker for defects in Requests.\r\n\r\nIf you can provide an isolated example of this issue and which version of Requests it breaks between, we may be able to investigate more. Until then I'm going to close this out. Thank you!"
] |
https://api.github.com/repos/psf/requests/issues/4769
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4769/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4769/comments
|
https://api.github.com/repos/psf/requests/issues/4769/events
|
https://github.com/psf/requests/pull/4769
| 353,085,069 |
MDExOlB1bGxSZXF1ZXN0MjEwMjM0NTQ4
| 4,769 |
Use a with statement when sending multipart data in quickstart guide
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1240121?v=4",
"events_url": "https://api.github.com/users/Ares513/events{/privacy}",
"followers_url": "https://api.github.com/users/Ares513/followers",
"following_url": "https://api.github.com/users/Ares513/following{/other_user}",
"gists_url": "https://api.github.com/users/Ares513/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Ares513",
"id": 1240121,
"login": "Ares513",
"node_id": "MDQ6VXNlcjEyNDAxMjE=",
"organizations_url": "https://api.github.com/users/Ares513/orgs",
"received_events_url": "https://api.github.com/users/Ares513/received_events",
"repos_url": "https://api.github.com/users/Ares513/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Ares513/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Ares513/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Ares513",
"user_view_type": "public"
}
|
[] |
closed
| false | null |
[] |
{
"closed_at": null,
"closed_issues": 29,
"created_at": "2024-05-19T18:29:04Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4",
"events_url": "https://api.github.com/users/sethmlarson/events{/privacy}",
"followers_url": "https://api.github.com/users/sethmlarson/followers",
"following_url": "https://api.github.com/users/sethmlarson/following{/other_user}",
"gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sethmlarson",
"id": 18519037,
"login": "sethmlarson",
"node_id": "MDQ6VXNlcjE4NTE5MDM3",
"organizations_url": "https://api.github.com/users/sethmlarson/orgs",
"received_events_url": "https://api.github.com/users/sethmlarson/received_events",
"repos_url": "https://api.github.com/users/sethmlarson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sethmlarson",
"user_view_type": "public"
},
"description": "",
"due_on": null,
"html_url": "https://github.com/psf/requests/milestone/34",
"id": 11073254,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/34/labels",
"node_id": "MI_kwDOABTKOs4AqPbm",
"number": 34,
"open_issues": 0,
"state": "open",
"title": "Bankruptcy",
"updated_at": "2024-05-20T14:37:16Z",
"url": "https://api.github.com/repos/psf/requests/milestones/34"
}
| 5 |
2018-08-22T19:09:15Z
|
2024-05-20T14:36:00Z
|
2024-05-20T14:35:59Z
|
NONE
| null |
The original documentation implies that `requests` will close the file for you; this is not the case. Since it is up to the user to release the resources, I think it should be reflected as such in the docs.
|
{
"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/4769/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4769/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4769.diff",
"html_url": "https://github.com/psf/requests/pull/4769",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4769.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4769"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4769?src=pr&el=h1) Report\n> Merging [#4769](https://codecov.io/gh/requests/requests/pull/4769?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/9cfd292da33f3b8324ce2c20e01db0e2f8b9210b?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4769?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4769 +/- ##\n=======================================\n Coverage 66.79% 66.79% \n=======================================\n Files 15 15 \n Lines 1563 1563 \n=======================================\n Hits 1044 1044 \n Misses 519 519\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4769?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4769?src=pr&el=footer). Last update [9cfd292...4245d21](https://codecov.io/gh/requests/requests/pull/4769?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"> The original documentation implies that requests will close the file for you; this is not the case. \r\n\r\nCan you explain where it implies it? The code is just an example, not documentation of best practices. it is demonstrating how one might send a `multipart/form-data` request with the syntactic sugar of Requests. It also demonstrates the functional API, which is great for testing and getting up-and-running, but also not a best practice. At what point does the documentation have to become solely best practices?",
"The current documentation does an excellent job of demonstrating behavior specific to Requests. That said, documentation should really be a source of truth. It should strive to demonstrate best practices, because on mature libraries, my expectation is generally that the instructions and examples it gives are the \"right\" way to do it. If the documentation is not showing me the right way to do it in production, without warning the user that it's only an example, then it's ineffective; I need to know what I need to do to make this work in the real world. \r\n\r\nI think an analogy is apt here. Suppose you get an instruction manual for a forklift. On page 93, it suggests using a particular lever in a particular way. Now, people who really know their forklifts should know better, that that's not really the right way, it's just an example. But who reads the manual? Not the experts. They already know it; the manual is most useful to the people who have the most to learn. If it is incorrect, only the experts will know. \r\n\r\nI'm sure you've seen this happen elsewhere, too; someone posts an example solution, and it gets copied and used in hundreds of code bases. It doesn't even really matter if it's good or bad. It's the \"dictionary definition\" and thus is generally accepted as truth. \r\n\r\nAuthoritative documents that are trusted are how antipatterns spread; people trust what they say, even when they're wrong, because _what else is there to trust?_",
"@Ares513 a more apt analogy, in my opinion, is someone receiving a kit to construct a bookcase and being told how screws work, how to turn a screwdriver, how to swing a hammer, etc. The Requests documentation is not the place for generic Python best practices (i.e., closing a file once it's been opened). In no way do we say that we close the file on behalf of the user. I don't even think that's entirely implied. The `>>>` preface is what you would see if you did `python` and were toying around with Requests in a terminal or interactive shell. I don't think we're required to show you how to use a file such that it auto-closes either. Yes, folks may be learning Python from our docs. No, I don't believe it's entirely our responsibility to teach them how to write perfect Python. It's only our responsibility to show them how to use Requests to do what they want.",
"In an effort to clean up the issue tracker to only have issues that are still relevant to the project we've done a quick pass and decided this issue may no longer be relevant for a variety of potential reasons, including:\r\n\r\n* Applies to a much older version, unclear whether the issue still applies.\r\n* Change requires a backwards incompatible release and it's unclear if the benefits are worth the migration effort from the community.\r\n* There isn't a clear demand from the community on the change landing in Requests.\r\n\r\nIf you think the issue should remain open, please comment so below or open a new issue and link back to the original issue. Again, thank you for opening the issue and for the discussion, it's much appreciated."
] |
https://api.github.com/repos/psf/requests/issues/4768
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4768/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4768/comments
|
https://api.github.com/repos/psf/requests/issues/4768/events
|
https://github.com/psf/requests/issues/4768
| 351,012,438 |
MDU6SXNzdWUzNTEwMTI0Mzg=
| 4,768 |
Crash when using requests + concurrent.futures.ProcessPoolExecutor
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/16804460?v=4",
"events_url": "https://api.github.com/users/TylerADavis/events{/privacy}",
"followers_url": "https://api.github.com/users/TylerADavis/followers",
"following_url": "https://api.github.com/users/TylerADavis/following{/other_user}",
"gists_url": "https://api.github.com/users/TylerADavis/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/TylerADavis",
"id": 16804460,
"login": "TylerADavis",
"node_id": "MDQ6VXNlcjE2ODA0NDYw",
"organizations_url": "https://api.github.com/users/TylerADavis/orgs",
"received_events_url": "https://api.github.com/users/TylerADavis/received_events",
"repos_url": "https://api.github.com/users/TylerADavis/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/TylerADavis/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/TylerADavis/subscriptions",
"type": "User",
"url": "https://api.github.com/users/TylerADavis",
"user_view_type": "public"
}
|
[
{
"color": "fef2c0",
"default": false,
"description": null,
"id": 298537994,
"name": "Needs More Information",
"node_id": "MDU6TGFiZWwyOTg1Mzc5OTQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Needs%20More%20Information"
}
] |
closed
| true | null |
[] | null | 7 |
2018-08-16T00:23:06Z
|
2024-05-17T00:03:20Z
|
2023-05-15T23:15:29Z
|
NONE
|
resolved
|
I am attempting to make an asynchronous request using `requests.get()` via `concurrent.futures.ProcessPoolExecutor` and then perform analysis with numpy in the same script, all running on macOS 10.13.6 with Python 3.6.5. However, attempting to do so results in an error being thrown and a crash.
This issue only arises when numpy is imported and `executor.submit(requests.get ...` is called. There is no issue if numpy is not imported, and there is no issue if a function other than one from requests is passed to `executor.submit()`. The error only occurs when a process pool is used to execute a request while numpy is imported.
I am unsure why it is that attempting to execute `requests.get()` with the process pool is causing a crash. It seems that numpy is launching a thread when imported, which explains part of the error message. Other functions can be run without issue using the process pool, only requests causes it to crash.
This article provides some insight into the error being thrown, and the logic behind it. http://sealiesoftware.com/blog/archive/2017/6/5/Objective-C_and_fork_in_macOS_1013.html
## Expected Result
I expect the request to execute in one of the processes managed by the process pool executor, with the response available through the returned future.
## Actual Result
An error is thrown. Specifically, the error is the following:
```
objc[56600]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called.
objc[56600]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
```
## Reproduction Steps
**Must run on macOS 10.13 (High Sierra)**
```python
import requests
import numpy
import concurrent.futures
executor = concurrent.futures.ProcessPoolExecutor(max_workers=2)
future = executor.submit(requests.get, 'https://google.com')
print(future.result())
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.7"
},
"implementation": {
"name": "CPython",
"version": "3.6.5"
},
"platform": {
"release": "17.7.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.19.1"
},
"system_ssl": {
"version": "100020ff"
},
"urllib3": {
"version": "1.23"
},
"using_pyopenssl": false
}
```
`numpy.__version__` gives `1.15.0rc1`
|
{
"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/4768/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4768/timeline
| null |
not_planned
| null | null | false |
[
"Hi there,\r\n\r\nThat's an awfully odd error message. Are you using https://github.com/ross/requests-futures as well?",
"Yes, I was originally using requests-futures when I encountered this error. After poking around a bit, I found that using requests-futures was not necessary to reproduce the error message.",
"So I finally had time to read the blog you linked to.\r\n\r\nThreads and multiprocessing on *nix systems (like OSX) tend to work as one would expect, including sharing resources. It's possible this is due to an issue with `numpy`'s thread and our use of one (or more) of the following:\r\n\r\n- sockets\r\n- the queue library (involved with threading and multiprocessing)\r\n- the compiled ssl extension\r\n\r\nIt's unclear which is the actual cause and it's unclear which project is actually at fault here. I can't imagine how we could change at this point though",
"I've recently seen a similar issue. In my case it was while running an ansible-playbook which included a filter (which I wrote) using requests to dynamically locate the appropriate Linux repositories to use based on the RHEL release version; e.g., 7.6.\r\n\r\nThere were multiple targeted systems being provisioned and it seems that as a consequence of that ansible-playbook forked separate threads to parallelize the processing. During this the following occurred:\r\n\r\n`objc[74357]: +[NSValue initialize] may have been in progress in another thread when fork() was called.`\r\n`objc[74357]: +[NSValue initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.\r\n`\r\n\r\nIt wasn't obvious where the problem originated (ansible? requests? python?), but using canned data in place of calling requests succeeded. Replacing the use of requests with httplib also worked implying the problem begins with requests, even if not actually a problem with requests but rather something requests brings out.\r\n\r\n---\r\nrequests version: 2.22.0\r\nSystem info:\r\n> sw_vers\r\nProductName: Mac OS X\r\nProductVersion: 10.14.6\r\nBuildVersion: 18G95\r\n\r\n> ansible-playbook --version\r\nansible-playbook 2.8.2\r\n config file = None\r\n configured module search path = [u'/Users/jshimkus/.ansible/plugins/modules', u'/opt/local/share/ansible/plugins/modules']\r\n ansible python module location = /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ansible\r\n executable location = /opt/local/bin/ansible-playbook\r\n python version = 2.7.16 (default, Apr 1 2019, 14:50:41) [GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.46.3)]\r\n",
"It seems that python 3.8 Introduces some[ changes to how multiprocessing works on Mac](https://bugs.python.org/issue33725) (now using spawn instead of fork), so it might be worth rerunning your playbook on 3.8 if that's an option for you?",
"Just tested on python 3.8, and with a slight modification, my snippet for reproducing this error no longer causes a failure. As such, it might be possible to close this issue thanks to the changes in Python 3.8.\r\n\r\nThis is also using a freshly installed numpy+requests from pip, as well as macOS 10.15.\r\n\r\nError message when rerunning original snippet on 3.8:\r\n```\r\nRuntimeError: \r\n An attempt has been made to start a new process before the\r\n current process has finished its bootstrapping phase.\r\n\r\n This probably means that you are not using fork to start your\r\n child processes and you have forgotten to use the proper idiom\r\n in the main module:\r\n\r\n if __name__ == '__main__':\r\n freeze_support()\r\n ...\r\n\r\n The \"freeze_support()\" line can be omitted if the program\r\n is not going to be frozen to produce an executable.\r\n```\r\n\r\nModifying my snippet by moving my functions inside of `if __name__ == '__main__':` as follows resolved the issue for me.\r\n```python\r\nimport requests\r\nimport numpy\r\nimport concurrent.futures\r\n\r\n\r\nif __name__ == \"__main__\":\r\n executor = concurrent.futures.ProcessPoolExecutor(max_workers=2)\r\n\r\n future = executor.submit(requests.get, 'https://google.com')\r\n\r\n print(future.result())\r\n```",
"For future finders of this problem:\r\nI have hit this bug while writing my own lookup extension that was required to use urllib (in order to perform mtls with a passphrase which isn't possible in the builtin url fetch methods).\r\nI have further root caused this to a cpython bug that is essentially not-to-be-fixed:\r\nhttps://github.com/python/cpython/issues/58037"
] |
https://api.github.com/repos/psf/requests/issues/4767
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4767/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4767/comments
|
https://api.github.com/repos/psf/requests/issues/4767/events
|
https://github.com/psf/requests/issues/4767
| 350,525,587 |
MDU6SXNzdWUzNTA1MjU1ODc=
| 4,767 |
Docs: Requests 3 info link at top of main page points to a 404
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/288405?v=4",
"events_url": "https://api.github.com/users/joshstaiger/events{/privacy}",
"followers_url": "https://api.github.com/users/joshstaiger/followers",
"following_url": "https://api.github.com/users/joshstaiger/following{/other_user}",
"gists_url": "https://api.github.com/users/joshstaiger/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/joshstaiger",
"id": 288405,
"login": "joshstaiger",
"node_id": "MDQ6VXNlcjI4ODQwNQ==",
"organizations_url": "https://api.github.com/users/joshstaiger/orgs",
"received_events_url": "https://api.github.com/users/joshstaiger/received_events",
"repos_url": "https://api.github.com/users/joshstaiger/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/joshstaiger/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/joshstaiger/subscriptions",
"type": "User",
"url": "https://api.github.com/users/joshstaiger",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2018-08-14T17:32:59Z
|
2021-09-08T01:21:02Z
|
2018-08-15T13:33:04Z
|
NONE
|
resolved
|
The link that states "Requests 3.0 development is underway, and your financial help is appreciated!"
at the top of every doc page (eg: http://docs.python-requests.org/en/master/), currently points to the url:
https://www.kennethreitz.org/requests3
Which, at the time of writing is a "404 not found" page.
I'd like to learn about requests 3, so this should point somewhere useful :) (or be removed temporarily)
|
{
"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/4767/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4767/timeline
| null |
completed
| null | null | false |
[
"Just noticed the same. Looks like it's been down a while according to Internet Archive but https://web.archive.org/web/20180701201816/https://www.kennethreitz.org/requests3 should work for the moment, @joshstaiger =)",
"Duplicate of https://github.com/requests/requests/issues/4743\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/4766
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4766/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4766/comments
|
https://api.github.com/repos/psf/requests/issues/4766/events
|
https://github.com/psf/requests/pull/4766
| 350,155,881 |
MDExOlB1bGxSZXF1ZXN0MjA4MDc0NjE4
| 4,766 |
Fix several ResourceWarnings in test_requests.py
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2033598?v=4",
"events_url": "https://api.github.com/users/BoboTiG/events{/privacy}",
"followers_url": "https://api.github.com/users/BoboTiG/followers",
"following_url": "https://api.github.com/users/BoboTiG/following{/other_user}",
"gists_url": "https://api.github.com/users/BoboTiG/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/BoboTiG",
"id": 2033598,
"login": "BoboTiG",
"node_id": "MDQ6VXNlcjIwMzM1OTg=",
"organizations_url": "https://api.github.com/users/BoboTiG/orgs",
"received_events_url": "https://api.github.com/users/BoboTiG/received_events",
"repos_url": "https://api.github.com/users/BoboTiG/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/BoboTiG/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/BoboTiG/subscriptions",
"type": "User",
"url": "https://api.github.com/users/BoboTiG",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2018-08-13T19:11:49Z
|
2023-05-12T00:03:06Z
|
2022-05-11T01:04:18Z
|
CONTRIBUTOR
|
resolved
|
Hello,
I do not know if you are interested in fixing `ResourceWarning`s in tests, but I will take my chance :)
There was 10 unclosed files in `test_requests.py`.
|
{
"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/4766/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4766/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4766.diff",
"html_url": "https://github.com/psf/requests/pull/4766",
"merged_at": "2022-05-11T01:04:18Z",
"patch_url": "https://github.com/psf/requests/pull/4766.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4766"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4766?src=pr&el=h1) Report\n> Merging [#4766](https://codecov.io/gh/requests/requests/pull/4766?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/5c1f72e80a7d7ac129631ea5b0c34c7876bc6ed7?src=pr&el=desc) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[](https://codecov.io/gh/requests/requests/pull/4766?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4766 +/- ##\n=======================================\n Coverage 66.89% 66.89% \n=======================================\n Files 15 15 \n Lines 1577 1577 \n=======================================\n Hits 1055 1055 \n Misses 522 522\n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4766?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4766?src=pr&el=footer). Last update [5c1f72e...fdab4fb](https://codecov.io/gh/requests/requests/pull/4766?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n",
"@nateprewitt, thanks for the review. You are totally right and I applied changes + rebase on master :)\r\n\r\nWe only need to keep `r.prepare*()` at the same indentation level as the definition of `r` to prevent `models.py:159: ValueError: read of closed file`.",
"What is the status of the PR? Would you mind trigger the request-CI job?",
"Ping :)"
] |
https://api.github.com/repos/psf/requests/issues/4765
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4765/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4765/comments
|
https://api.github.com/repos/psf/requests/issues/4765/events
|
https://github.com/psf/requests/pull/4765
| 349,759,946 |
MDExOlB1bGxSZXF1ZXN0MjA3NzkwMjgy
| 4,765 |
wrap url parsing exceptions from urllib3's PoolManager
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-08-11T20:00:13Z
|
2021-09-01T00:11:55Z
|
2018-10-01T02:23:58Z
|
MEMBER
|
resolved
|
This should address #4746 by catching and wrapping all `LocationValueError`s and rewrapping them under the Requests namespace as `InvalidURL`.
|
{
"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/4765/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4765/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/4765.diff",
"html_url": "https://github.com/psf/requests/pull/4765",
"merged_at": "2018-10-01T02:23:57Z",
"patch_url": "https://github.com/psf/requests/pull/4765.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4765"
}
| true |
[
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4765?src=pr&el=h1) Report\n> Merging [#4765](https://codecov.io/gh/requests/requests/pull/4765?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/8f20b7dc8f79046d0a1015b9605df5c30fa44197?src=pr&el=desc) will **increase** coverage by `0.02%`.\n> The diff coverage is `80%`.\n\n[](https://codecov.io/gh/requests/requests/pull/4765?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #4765 +/- ##\n==========================================\n+ Coverage 66.77% 66.79% +0.02% \n==========================================\n Files 15 15 \n Lines 1568 1572 +4 \n==========================================\n+ Hits 1047 1050 +3 \n- Misses 521 522 +1\n```\n\n\n| [Impacted Files](https://codecov.io/gh/requests/requests/pull/4765?src=pr&el=tree) | Coverage Δ | |\n|---|---|---|\n| [requests/adapters.py](https://codecov.io/gh/requests/requests/pull/4765/diff?src=pr&el=tree#diff-cmVxdWVzdHMvYWRhcHRlcnMucHk=) | `70.27% <80%> (+0.08%)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/requests/requests/pull/4765?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/requests/requests/pull/4765?src=pr&el=footer). Last update [8f20b7d...f3ec42f](https://codecov.io/gh/requests/requests/pull/4765?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n"
] |
https://api.github.com/repos/psf/requests/issues/4764
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4764/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4764/comments
|
https://api.github.com/repos/psf/requests/issues/4764/events
|
https://github.com/psf/requests/issues/4764
| 349,509,335 |
MDU6SXNzdWUzNDk1MDkzMzU=
| 4,764 |
InvalidSchema("No connection adapters were found for '%s'" % url)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/21367367?v=4",
"events_url": "https://api.github.com/users/Blah237/events{/privacy}",
"followers_url": "https://api.github.com/users/Blah237/followers",
"following_url": "https://api.github.com/users/Blah237/following{/other_user}",
"gists_url": "https://api.github.com/users/Blah237/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Blah237",
"id": 21367367,
"login": "Blah237",
"node_id": "MDQ6VXNlcjIxMzY3MzY3",
"organizations_url": "https://api.github.com/users/Blah237/orgs",
"received_events_url": "https://api.github.com/users/Blah237/received_events",
"repos_url": "https://api.github.com/users/Blah237/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Blah237/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Blah237/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Blah237",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 13 |
2018-08-10T13:09:38Z
|
2021-08-27T00:08:33Z
|
2018-08-13T13:32:25Z
|
NONE
|
resolved
|
```
raise InvalidSchema("No connection adapters were found for '%s'" % url)
requests.exceptions.InvalidSchema: <exception str() failed>
```
Getting the above error when I do:
```
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36'}
r = requests.get(page_url, headers=headers)
```
Where page_url is the URL of the webpage I'm requesting. I've confirmed the URL is correct and stored in page_url properly; the issue appears to be the fact that I'm grabbing the URL from a file. Replacing page_url with the actual URL removes the error. Is there some issue with using a URL that's stored in a variable rather than hardcoding it or something?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/21367367?v=4",
"events_url": "https://api.github.com/users/Blah237/events{/privacy}",
"followers_url": "https://api.github.com/users/Blah237/followers",
"following_url": "https://api.github.com/users/Blah237/following{/other_user}",
"gists_url": "https://api.github.com/users/Blah237/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Blah237",
"id": 21367367,
"login": "Blah237",
"node_id": "MDQ6VXNlcjIxMzY3MzY3",
"organizations_url": "https://api.github.com/users/Blah237/orgs",
"received_events_url": "https://api.github.com/users/Blah237/received_events",
"repos_url": "https://api.github.com/users/Blah237/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Blah237/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Blah237/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Blah237",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 5,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 5,
"url": "https://api.github.com/repos/psf/requests/issues/4764/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4764/timeline
| null |
completed
| null | null | false |
[
"It'd be really helpful to see the value of \"page_url\". Also are redirects occurring after visiting that url?",
"Hi @Blah237, this is almost certainly a parsing issue in how you’re reading the url. If the scheme for the url isn’t http or https, you’ll need to provide a custom adapter. If it is one of the two we support, I’d ensure you aren’t leaving extra white space on the url or accidentally removing a leading character.\r\n\r\nSince there isn’t evidence of a bug here, I’m going to close this out. If you find anything conclusive, please feel free to reopen. Thanks!",
"Apologies @Blah237, rereading the exception, whatever you’re passing as the url is an object which either hasn’t implemented `__repr__`/`__str__` or is raising an exception when executing its str method. We only support strings in the Requests api, so I’d verify the object type of what you’re passing to the url param.",
"@nateprewitt No worries, thank you for the fast response and the help! When I print out the type directly before, I get `<class 'str'>`. I'm originally grabbing the url from a csv (also tried grabbing it from a text file which caused the same issue), and then I'm casting it to a string right before `requests.get` is called.\r\n\r\nI admit I am completely lost--the type appears to be correct, and I know the URL is valid because the code works when I copy and paste the URL as a string into it.",
"Looks like you're printing the `str` type?\r\n\r\n```python\r\nprint(str) # <class 'str'>\r\n\r\nprint(str('abc')) # abc\r\n```",
"@SethMichaelLarson Apologies, I misspoke. My code is as follows:\r\n\r\n```\r\nheaders = {\r\n 'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36'}\r\n\r\nprint(type(page_url))\r\nr = requests.get(page_url.strip(), headers=headers)\r\n```\r\n\r\nWhich prints `<class 'str'>` before giving me the error.",
"Well `Request.url` is just whatever was passed into `requests.get()` so whatever you're passing in can't be converted into a string? What is the value of page_url?",
"@Blah237 so the fact it’s getting to this exception shows that it’s at least string like because we call .lower() and .startswith() on it prior to raising this exception.\r\n\r\nOne thing I realized we haven’t gotten from you yet is the version of Requests you’re using. Can you please supply the info that was requested when the ticket was opened?\r\n\r\nI’m still not sure if there’s a bug here but it doesn’t make sense looking at the code how we’d get here if this isn’t a valid string. Other exceptions should have triggered before we got here.\r\n\r\nIf you are able to provide the url privately, my email is listed in the project, or I have a keybase account (https://keybase.io/nateprewitt). If you aren’t able to do that, have you tried to reproduce this with a public url? That would be my next step for debugging to determine if it’s the service (possibly redirects) or the file parsing code.",
"Apologies for the late reply--I unfortunately can't share the url, but the result remains the same no matter the url used (something like https://google.com doesn't even work). No redirects are taking place.\r\n\r\nAfter playing around with it for a bit (and updating all my code for Python 3), the error is now this:\r\n\r\n```\r\nraise InvalidSchema(\"No connection adapters were found for '%s'\" % url)\r\nrequests.exceptions.InvalidSchema: No connection adapters were found for 'https://google.com'\r\n```\r\nI'm using version 2.19.1.",
"Solved it! Reading from a csv file includes a character which appears at the beginning of files, `u'\\ufeff'`. I had to manually remove the character with `page_url.replace(u'\\ufeff', '')` to get it to work.\r\n",
"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5OjcBCgoKDQwNGg8PGjclHyU3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3N//AABEIAIQAhAMBIgACEQEDEQH/xAAbAAEBAQEBAQEBAAAAAAAAAAAABgUEAwcCAf/EAEAQAAEDAgEGCggEBQUAAAAAAAEAAgMEEQUGEiFRsdETFBUiMTVBU3GTNFRhcnOBgpIyM5GhFiOyweFCQ1JiY//EABoBAQADAQEBAAAAAAAAAAAAAAABAgMFBAb/xAAsEQACAgECAwYGAwAAAAAAAAAAAQIDEQQxEhMhBRRRU3HRFSIyMzRhQUJS/9oADAMBAAIRAxEAPwCmREXxx5QiIgCIiAIiIAiIgCIiAIiIAiIgCIiAIiIAuylwutq2Z8MDiw9DnWAP6phFO2qxGGKQXYXXI120qwxGR0NO2KnIjkkcGMPYNf7Ar3aXSxti5zfRGkY56slhgGJH/YH3hOQMS7hvmN3qhnq3PpaCThjAJZA2RwI0c11xc+0LykqpGwvtVExCoYxtQM3S02vptbRrXr7nR+y3AjD5BxLuB943pyDiXcD7wqnDJXSmYcLw0TXWjlNucLaejQbFd1lpHs6mSz1HLREcg4l3A+8JyDiXcD7wreyWVvhlX7J5aIjkDEu4H3hOQMS7gfeN6t7LxfURRvzXOsb2Og2HiUfZtK3bI5aI12BYi0X4vfweFwSRvieWSMcx46WuFivoHGYjJmB46bXsbX1X6LrGyrpY3UjKpoHCMcGk6wV5tRoIQg5wexDgkuhKoiLkmQREQBERAaeTnXEH1bCqupo2VNRG+YMkjY02je24zjbSpTJzriD6thWhlXPLFU04ilkYCw3DXEdq6+lsVelcmsrPsaxeImsMOzeDa17RFHUGVrM3oBaRm/qSV0VNNw8cbGuDQyRr+jUb2ULx2r9aqPNdvTjtX63P5rt6LtGtf0HMRdUtOad0oDgYnOzmtt+Enp+S6Lr57x2r9an8129OOVfrU/mO3q67UglhRHMR9DX8Xz3jlX61Uea7enHKv1qo8129T8Vj/kcw+hErgqY5nvkbeYh2hua5oZYjt7VGccq/Wp/NdvTjlX61P5hVZdpwkscI5iK+GleImQSGYgWBc14zdGrtXllR1Q7327VLx1lUZG3qZjp7wqoyn6od77dqvG+NtE+FYwi2U0yOREXDMAiIgCIiA08nOuIPB2wrtyw9JpvhnauLJzriD6thXblh6TT/AAztXRh+FL19jRfQZ+FYTNiLiWuEcTTYvOwBbBwvBaUZlVMC/tD5LfsFPU1XPSh4glcwPFnWXgdJJOknpJWNd1VcFiGX+yFJJbFNUYBSVMHC4dKQbaOdnNKm5GOie6ORtnNNiNRW1knK9tdJELmN7Lke0LxynY1mKuzf9TGuPjpH9lrfCudKugsdSZLKyZKIunD6N9dVMhZ0E84/8R2leGMXJqKKJZNDA8HFc18tQXNhGhuabEleGPUEWH1ccUBeWmPO5xv2kLeqKmOlq6HDaYWAcM63YOwfNZeV3WMXwRtK6d1FUNO0t1jLNJJKJjRfmN8VXZUdUH327VIxfmN8VXZUdUO99u1U0n2LPQiOzI5ERc0zCIiAIiIDTyc64g+rYV25YelU/wAM7VxZOdcQfVsK7csPSaf4Z2row/Cl6+xovoJ9EWtgWFGuk4WUEU7Dp/7HUvFXXKyajFFEsvBo5L0hgikrpuaHizL6u0rDxWq45XzTj8JNm31DQtbKDFWlpoaQ2jGiRzf6Qp5erVWRjFUw2W/qXk/4CqqKOPAsLdUzAcYkHR7ewLgyaw7jExqZR/KiPNB7Xf4X4xySrr6vm00/Ax6GDg3fr0K1EeTXzWur29xFYWTnwuV82NQSyuznvluSuzK7rGL4I2lc2EUtSzE6Zz6eZrQ/STGQAu3KqCaWujdFDI9oiAu1hI6SpjGfdZZXXIw+FmDH+Y3xCr8p+qHe+3apFoLZg1wIcHWIOghV2U/U599u1TpPsW+gjsyOREXNMwiIgCIiA08nOuIPB2wrtyw9Jp/hnauLJzriD6thXblh6VT+4dq6MPwpevsaL6DPwfDJMQn7WwsPPd/Ye1auNYpHSQcQoC1pAzXFp/CNXivHB8bpqGhbBLHK5wc4ktAtpPiuo5Q4aTc0stz/AObd61pVUacRnhvf2JWEujJa41/ungf0VT/EGGeqyeW3esrG8Qpq8w8VidHmZ2dnNAve2oryW0VxjlTyyrSS3P3heOOw+m4EU4k5xdfPt0/Jdf8AFUnqbfN/wp1FENZfFcKfQKbRWYZj7q6tZTupmszgecH36B4L0xjGXYdUMhEAkzmZ18+3aRq9inMHqY6PEI55b5jQb2Fz0Fe2PV0NfVxyQZ2a2PNNxbtO9exayfd23L5sluP5dzikk4esfLm5vCSF1r3tc3VXlP1Q7327VIR/mN8Qq/Kfqh3vt2rPStui1vwIjsyOREXNMwiIgCIiA0snSBjEF/bsK0MsI3cJTy25maQT2XusCGV8MrJYzZ7DcFVdLlBRTRDjX8uS2kFtx8l0dLKE6ZUyeDSOGsMkfmE+YVryzhPes8s7k5YwnvmeWdynuNXmongXiRXzCfMK15ZwnvWeWdycsYT3zPLO5O41+YhwLxIrRrT5hWvLOE96zyzuTljCe+Z5Z3J3GvzUOBeJFaNYTRrCteWcJ71nlncnLOFd6zyzuTuVXmIcC8SOgYZJ42MBc4uAACrcpzbCCDoJe1fs41hbRdsrbjVGb7FP43ivKD2sjBbAzSAeknWrtVaamaU8uQwkjLREXKMwiIhAREQBERAEREJCIiAIiIAiIgCIiEBERAEREAREQBERAEREAREQBERAEREAREQBERAEREB//9k=\r\n\r\nthis is image url... I am getting this error \"No connection adapters were found for\" when I try to send request in python.\r\n\r\n",
"That is not an image url. This is the whole image encoded as base64. \r\nyou cannot send a request to that url since it is not a resource the server is offering but rather encoded data that is already present locally.\r\n\r\nto decode it you can use import base64 and decode the data. (everything after data:image/jpeg;base64,)\r\n\r\nim not sure if there is a feature native to 'requests' that handles this.",
"i have this issue too. below is the code.\r\nimport os\r\nimport json \r\nimport io\r\nimport requests \r\nimport numpy as np\r\nimport tensorflow as tf\r\nfrom PIL import Image\r\nimport matplotlib.pyplot as plt\r\nimport PIL\r\n\r\n\r\nASSETS_DIR = r\"C:\\Users\\Sortol\\Documents\\adesoji-fastapi\\assets\"\r\nTEST_IMAGES_DIR = r\"C:\\Users\\Sortol\\Documents\\adesoji-fastapi\\images\"\r\n\r\nclasses = json.load(open(os.path.join(ASSETS_DIR,'categories.json')))\r\nclasses = {v:k for k,v in classes.items()}\r\n\r\nURL = \"/v1/models/flower-classification:predict\"\r\n\r\ndef read_img_file(file) -> Image.Image:\r\n img = Image.open(io.BytesIO(file))\r\n if img.mode == \"RGBA\":\r\n img = img.convert(\"RGB\")\r\n img = img.resize((224,224), Image.ANTIALIAS)\r\n img = tf.expand_dims(np.asarray(img)/255, 0)\r\n return img\r\n\r\ndef load_img(img_path, show:bool=False):\r\n # img_path = random.choice(glob.glob(f\"{DATASET_DIR}/test/{cls}/*.jpg\"))\r\n img = PIL.Image.open(img_path)\r\n img = img.resize((224,224), PIL.Image.ANTIALIAS)\r\n if show:\r\n plt.imshow(img)\r\n plt.title('cls')\r\n img = tf.expand_dims(np.asarray(img)/255, 0)\r\n return img\r\n\r\ndef predict(img):\r\n headers = {\r\n \"content-type\" : \"application/json\"\r\n }\r\n data = json.dumps({\r\n \"signature_name\": \"serving_default\", \"instances\": img.numpy().tolist()\r\n })\r\n response = requests.post(URL, data=data, headers=headers)\r\n response_data = json.loads(response.text)['predictions'][0]\r\n confidence = np.max(response_data)\r\n predicted_class = classes[np.argmax(response_data)]\r\n return response_data,confidence,predicted_class\r\n\r\nnow i get this error below\r\n\r\nC:\\Users\\Sortol\\Documents\\adesoji-fastapi\\app>uvicorn main:app\r\n2021-03-01 23:18:10.330558: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll\r\nINFO: Started server process [6912]\r\nINFO: Waiting for application startup.\r\nINFO: Application startup complete.\r\nINFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)\r\nINFO: 127.0.0.1:54121 - \"GET / HTTP/1.1\" 404 Not Found\r\nINFO: 127.0.0.1:54129 - \"GET /docs HTTP/1.1\" 200 OK\r\nINFO: 127.0.0.1:54129 - \"GET /openapi.json HTTP/1.1\" 200 OK\r\n2021-03-01 23:18:39.587847: I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set\r\n2021-03-01 23:18:39.596337: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library nvcuda.dll\r\n2021-03-01 23:18:39.686352: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1720] Found device 0 with properties: \r\npciBusID: 0000:03:00.0 name: GeForce 840M computeCapability: 5.0\r\ncoreClock: 1.124GHz coreCount: 3 deviceMemorySize: 2.00GiB deviceMemoryBandwidth: 13.41GiB/s\r\n2021-03-01 23:18:39.687791: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll\r\n2021-03-01 23:18:39.782907: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cublas64_11.dll\r\n2021-03-01 23:18:39.783942: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cublasLt64_11.dll\r\n2021-03-01 23:18:39.832809: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cufft64_10.dll\r\n2021-03-01 23:18:39.844951: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library curand64_10.dll\r\n2021-03-01 23:18:39.939685: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cusolver64_10.dll\r\n2021-03-01 23:18:39.961540: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cusparse64_11.dll\r\n2021-03-01 23:18:39.965590: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudnn64_8.dll\r\n2021-03-01 23:18:39.966611: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1862] Adding visible gpu devices: 0\r\n2021-03-01 23:18:39.981739: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2\r\nTo enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.\r\n2021-03-01 23:18:39.985255: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1720] Found device 0 with properties: \r\npciBusID: 0000:03:00.0 name: GeForce 840M computeCapability: 5.0\r\ncoreClock: 1.124GHz coreCount: 3 deviceMemorySize: 2.00GiB deviceMemoryBandwidth: 13.41GiB/s\r\n2021-03-01 23:18:39.987565: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll\r\n2021-03-01 23:18:39.988770: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cublas64_11.dll\r\n2021-03-01 23:18:39.989115: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cublasLt64_11.dll\r\n2021-03-01 23:18:39.989445: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cufft64_10.dll\r\n2021-03-01 23:18:39.989775: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library curand64_10.dll\r\n2021-03-01 23:18:39.991063: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cusolver64_10.dll\r\n2021-03-01 23:18:39.991441: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cusparse64_11.dll\r\n2021-03-01 23:18:39.991842: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudnn64_8.dll\r\n2021-03-01 23:18:39.993129: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1862] Adding visible gpu devices: 0\r\n2021-03-01 23:18:43.086253: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1261] Device interconnect StreamExecutor with strength 1 edge matrix:\r\n2021-03-01 23:18:43.088620: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1267] 0 \r\n2021-03-01 23:18:43.089128: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1280] 0: N\r\n2021-03-01 23:18:43.107867: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1406] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with \r\n1369 MB memory) -> physical GPU (device: 0, name: GeForce 840M, pci bus id: 0000:03:00.0, compute capability: 5.0)\r\n2021-03-01 23:18:43.156687: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set\r\ntf.Tensor(\r\n[[[[0.64705882 0.65490196 0.48627451]\r\n [0.58823529 0.60392157 0.46666667]\r\n [0.54117647 0.56078431 0.42352941]\r\n ...\r\n [0.35686275 0.52941176 0.32941176]\r\n [0.20392157 0.34509804 0.23529412]\r\n [0.13333333 0.25882353 0.14117647]]\r\n\r\n [[0.6627451 0.69411765 0.51372549]\r\n [0.58431373 0.60784314 0.4627451 ]\r\n [0.50588235 0.50980392 0.4 ]\r\n ...\r\n [0.39607843 0.55294118 0.36470588]\r\n [0.15294118 0.29411765 0.18431373]\r\n [0.05098039 0.18823529 0.06666667]]\r\n\r\n [[0.61960784 0.64313725 0.50196078]\r\n [0.63921569 0.62745098 0.52156863]\r\n [0.57254902 0.51764706 0.47843137]\r\n ...\r\n [0.38039216 0.52156863 0.36862745]\r\n [0.16862745 0.30980392 0.21568627]\r\n [0.0745098 0.21960784 0.09411765]]\r\n\r\n ...\r\n\r\n [[0.32941176 0.48627451 0.33333333]\r\n [0.32941176 0.48627451 0.3254902 ]\r\n [0.31764706 0.50196078 0.32156863]\r\n ...\r\n [0.57254902 0.68235294 0.66666667]\r\n [0.23529412 0.34509804 0.36078431]\r\n [0.20784314 0.3254902 0.29411765]]\r\n\r\n [[0.36078431 0.48235294 0.3372549 ]\r\n [0.35686275 0.49019608 0.32941176]\r\n [0.34117647 0.52156863 0.3372549 ]\r\n ...\r\n [0.53333333 0.67058824 0.63137255]\r\n [0.22745098 0.36078431 0.37254902]\r\n [0.27843137 0.40392157 0.37647059]]\r\n\r\n [[0.34509804 0.4745098 0.32941176]\r\n [0.34117647 0.49019608 0.32156863]\r\n [0.33333333 0.52156863 0.3254902 ]\r\n ...\r\n [0.51764706 0.67843137 0.61568627]\r\n [0.25098039 0.40392157 0.40784314]\r\n [0.22352941 0.37647059 0.33333333]]]], shape=(1, 224, 224, 3), dtype=float64)\r\nINFO: 127.0.0.1:54141 - \"POST /predict HTTP/1.1\" 500 Internal Server Error\r\nERROR: Exception in ASGI application\r\nTraceback (most recent call last):\r\n File \"c:\\users\\sortol\\anaconda3\\lib\\site-packages\\uvicorn\\protocols\\http\\h11_impl.py\", line 396, in run_asgi\r\n result = await app(self.scope, self.receive, self.send)\r\n File \"c:\\users\\sortol\\anaconda3\\lib\\site-packages\\uvicorn\\middleware\\proxy_headers.py\", line 45, in __call__\r\n return await self.app(scope, receive, send)\r\n File \"c:\\users\\sortol\\anaconda3\\lib\\site-packages\\fastapi\\applications.py\", line 199, in __call__\r\n await super().__call__(scope, receive, send)\r\n File \"c:\\users\\sortol\\anaconda3\\lib\\site-packages\\starlette\\applications.py\", line 111, in __call__\r\n await self.middleware_stack(scope, receive, send)\r\n File \"c:\\users\\sortol\\anaconda3\\lib\\site-packages\\starlette\\middleware\\errors.py\", line 181, in __call__\r\n raise exc from None\r\n File \"c:\\users\\sortol\\anaconda3\\lib\\site-packages\\starlette\\middleware\\errors.py\", line 159, in __call__\r\n await self.app(scope, receive, _send)\r\n File \"c:\\users\\sortol\\anaconda3\\lib\\site-packages\\starlette\\exceptions.py\", line 82, in __call__\r\n raise exc from None\r\n File \"c:\\users\\sortol\\anaconda3\\lib\\site-packages\\starlette\\exceptions.py\", line 71, in __call__\r\n await self.app(scope, receive, sender)\r\n File \"c:\\users\\sortol\\anaconda3\\lib\\site-packages\\starlette\\routing.py\", line 566, in __call__\r\n await route.handle(scope, receive, send)\r\n File \"c:\\users\\sortol\\anaconda3\\lib\\site-packages\\starlette\\routing.py\", line 227, in handle\r\n await self.app(scope, receive, send)\r\n File \"c:\\users\\sortol\\anaconda3\\lib\\site-packages\\starlette\\routing.py\", line 41, in app\r\n response = await func(request)\r\n File \"c:\\users\\sortol\\anaconda3\\lib\\site-packages\\fastapi\\routing.py\", line 201, in app\r\n raw_response = await run_endpoint_function(\r\n File \"c:\\users\\sortol\\anaconda3\\lib\\site-packages\\fastapi\\routing.py\", line 148, in run_endpoint_function\r\n return await dependant.call(**values)\r\n File \".\\main.py\", line 21, in predict_image\r\n predictions = predict(flower_img)\r\n File \".\\helpers.py\", line 46, in predict\r\n response = requests.post(URL, data=data, headers=headers)\r\n File \"c:\\users\\sortol\\anaconda3\\lib\\site-packages\\requests\\api.py\", line 119, in post\r\n return request('post', url, data=data, json=json, **kwargs)\r\n File \"c:\\users\\sortol\\anaconda3\\lib\\site-packages\\requests\\api.py\", line 61, in request\r\n return session.request(method=method, url=url, **kwargs)\r\n File \"c:\\users\\sortol\\anaconda3\\lib\\site-packages\\requests\\sessions.py\", line 530, in request\r\n resp = self.send(prep, **send_kwargs)\r\n File \"c:\\users\\sortol\\anaconda3\\lib\\site-packages\\requests\\sessions.py\", line 637, in send\r\n adapter = self.get_adapter(url=request.url)\r\n File \"c:\\users\\sortol\\anaconda3\\lib\\site-packages\\requests\\sessions.py\", line 730, in get_adapter\r\n raise InvalidSchema(\"No connection adapters were found for {!r}\".format(url))\r\nrequests.exceptions.InvalidSchema: No connection adapters were found for '/v1/models/flower-classification:predict'\r\n"
] |
https://api.github.com/repos/psf/requests/issues/4763
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4763/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4763/comments
|
https://api.github.com/repos/psf/requests/issues/4763/events
|
https://github.com/psf/requests/issues/4763
| 349,442,892 |
MDU6SXNzdWUzNDk0NDI4OTI=
| 4,763 |
-
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/31931159?v=4",
"events_url": "https://api.github.com/users/tkoskinen1/events{/privacy}",
"followers_url": "https://api.github.com/users/tkoskinen1/followers",
"following_url": "https://api.github.com/users/tkoskinen1/following{/other_user}",
"gists_url": "https://api.github.com/users/tkoskinen1/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tkoskinen1",
"id": 31931159,
"login": "tkoskinen1",
"node_id": "MDQ6VXNlcjMxOTMxMTU5",
"organizations_url": "https://api.github.com/users/tkoskinen1/orgs",
"received_events_url": "https://api.github.com/users/tkoskinen1/received_events",
"repos_url": "https://api.github.com/users/tkoskinen1/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tkoskinen1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tkoskinen1/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tkoskinen1",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2018-08-10T09:31:58Z
|
2021-09-05T00:06:50Z
|
2018-08-10T09:37:55Z
|
NONE
|
resolved
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/31931159?v=4",
"events_url": "https://api.github.com/users/tkoskinen1/events{/privacy}",
"followers_url": "https://api.github.com/users/tkoskinen1/followers",
"following_url": "https://api.github.com/users/tkoskinen1/following{/other_user}",
"gists_url": "https://api.github.com/users/tkoskinen1/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tkoskinen1",
"id": 31931159,
"login": "tkoskinen1",
"node_id": "MDQ6VXNlcjMxOTMxMTU5",
"organizations_url": "https://api.github.com/users/tkoskinen1/orgs",
"received_events_url": "https://api.github.com/users/tkoskinen1/received_events",
"repos_url": "https://api.github.com/users/tkoskinen1/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tkoskinen1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tkoskinen1/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tkoskinen1",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4763/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4763/timeline
| null |
completed
| null | null | false |
[] |
|
https://api.github.com/repos/psf/requests/issues/4762
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/4762/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/4762/comments
|
https://api.github.com/repos/psf/requests/issues/4762/events
|
https://github.com/psf/requests/issues/4762
| 349,309,459 |
MDU6SXNzdWUzNDkzMDk0NTk=
| 4,762 |
Closing response or session does not immediately terminate the response stream
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2375201?v=4",
"events_url": "https://api.github.com/users/hiranya911/events{/privacy}",
"followers_url": "https://api.github.com/users/hiranya911/followers",
"following_url": "https://api.github.com/users/hiranya911/following{/other_user}",
"gists_url": "https://api.github.com/users/hiranya911/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hiranya911",
"id": 2375201,
"login": "hiranya911",
"node_id": "MDQ6VXNlcjIzNzUyMDE=",
"organizations_url": "https://api.github.com/users/hiranya911/orgs",
"received_events_url": "https://api.github.com/users/hiranya911/received_events",
"repos_url": "https://api.github.com/users/hiranya911/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hiranya911/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hiranya911/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hiranya911",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2018-08-09T22:11:25Z
|
2021-09-08T01:21:02Z
|
2018-08-11T12:48:51Z
|
NONE
|
resolved
|
I'm using `requests` to stream an SSE response. The actual streaming takes place on a separate thread:
```
import threading
import time
import requests
import sys
def read_response(resp):
try:
resp_iterator = resp.iter_content(decode_unicode=True)
for ch in resp_iterator:
sys.stdout.write(ch)
sys.stdout.flush()
except Exception as ex:
print ex
print 'Exited at:', time.time()
session = requests.Session()
headers = {}
headers['Cache-Control'] = 'no-cache'
headers['Accept'] = 'text/event-stream'
resp = session.get(my_url, headers=headers, stream=True)
# Kick off the stream in a different thread
thread = threading.Thread(target=read_response, args=[resp])
thread.start()
# Keep streaming for 5 seconds
time.sleep(5)
# Try to close the response
print 'Closing response...'
resp.close()
print 'Closing session...'
session.close()
print 'Closed at:', time.time()
thread.join()
```
In the above example I kick off the stream, wait for 5 seconds, and then close the response and the session. I expected the response iterator to end at this point (either normally or by throwing an exception). But it doesn't end for 25-30 additional seconds. Here's the output I get:
```
Closing response...
Closing session...
Closed at: 1533852042.74
('Connection broken: error("(9, \'EBADF\')",)', error("(9, 'EBADF')",))
Exited at: 1533852067.98
```
Notice the difference between `Closed at` and `Exited at` timestamps.
Any idea why this is? I assume it has something to do with the underlying socket remaining active for a period of time. Is there some way to force termination of the stream/iterator when the response is closed?
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.1.4"
},
"idna": {
"version": "2.7"
},
"implementation": {
"name": "CPython",
"version": "2.7.13"
},
"platform": {
"release": "4.9.0-6-amd64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010007f",
"version": "17.5.0"
},
"requests": {
"version": "2.19.1"
},
"system_ssl": {
"version": "1010008f"
},
"urllib3": {
"version": "1.23"
},
"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/4762/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/4762/timeline
| null |
completed
| null | null | false |
[
"Sessions and responses aren't thread-safe so the behaviour of calling `response.close()` and `session.close()` outside the thread is undefined."
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.