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/5397
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5397/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5397/comments
|
https://api.github.com/repos/psf/requests/issues/5397/events
|
https://github.com/psf/requests/pull/5397
| 588,453,120 |
MDExOlB1bGxSZXF1ZXN0Mzk0MTk2NDIz
| 5,397 |
sessions module always tries to use a monotonic clock on any platform
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2626029?v=4",
"events_url": "https://api.github.com/users/polyvertex/events{/privacy}",
"followers_url": "https://api.github.com/users/polyvertex/followers",
"following_url": "https://api.github.com/users/polyvertex/following{/other_user}",
"gists_url": "https://api.github.com/users/polyvertex/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/polyvertex",
"id": 2626029,
"login": "polyvertex",
"node_id": "MDQ6VXNlcjI2MjYwMjk=",
"organizations_url": "https://api.github.com/users/polyvertex/orgs",
"received_events_url": "https://api.github.com/users/polyvertex/received_events",
"repos_url": "https://api.github.com/users/polyvertex/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/polyvertex/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/polyvertex/subscriptions",
"type": "User",
"url": "https://api.github.com/users/polyvertex",
"user_view_type": "public"
}
|
[] |
closed
| false | null |
[] | null | 0 |
2020-03-26T14:14:02Z
|
2024-05-19T18:51:37Z
|
2024-05-19T18:51:37Z
|
NONE
| null |
Any reason for not using monotonic clock on recent Python on Unix platforms?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+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/5397/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5397/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5397.diff",
"html_url": "https://github.com/psf/requests/pull/5397",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5397.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5397"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/5396
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5396/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5396/comments
|
https://api.github.com/repos/psf/requests/issues/5396/events
|
https://github.com/psf/requests/pull/5396
| 587,032,430 |
MDExOlB1bGxSZXF1ZXN0MzkzMDUwMTg4
| 5,396 |
Bump bleach from 3.1.1 to 3.1.2
|
{
"avatar_url": "https://avatars.githubusercontent.com/in/29110?v=4",
"events_url": "https://api.github.com/users/dependabot%5Bbot%5D/events{/privacy}",
"followers_url": "https://api.github.com/users/dependabot%5Bbot%5D/followers",
"following_url": "https://api.github.com/users/dependabot%5Bbot%5D/following{/other_user}",
"gists_url": "https://api.github.com/users/dependabot%5Bbot%5D/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/apps/dependabot",
"id": 49699333,
"login": "dependabot[bot]",
"node_id": "MDM6Qm90NDk2OTkzMzM=",
"organizations_url": "https://api.github.com/users/dependabot%5Bbot%5D/orgs",
"received_events_url": "https://api.github.com/users/dependabot%5Bbot%5D/received_events",
"repos_url": "https://api.github.com/users/dependabot%5Bbot%5D/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dependabot%5Bbot%5D/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dependabot%5Bbot%5D/subscriptions",
"type": "Bot",
"url": "https://api.github.com/users/dependabot%5Bbot%5D",
"user_view_type": "public"
}
|
[
{
"color": "0366d6",
"default": false,
"description": "Pull requests that update a dependency file",
"id": 1868210094,
"name": "dependencies",
"node_id": "MDU6TGFiZWwxODY4MjEwMDk0",
"url": "https://api.github.com/repos/psf/requests/labels/dependencies"
}
] |
closed
| true | null |
[] | null | 1 |
2020-03-24T15:11:07Z
|
2021-08-29T00:06:58Z
|
2020-03-30T19:50:01Z
|
CONTRIBUTOR
|
resolved
|
Bumps [bleach](https://github.com/mozilla/bleach) from 3.1.1 to 3.1.2.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/mozilla/bleach/blob/master/CHANGES">bleach's changelog</a>.</em></p>
<blockquote>
<h2>Version 3.1.2 (March 11th, 2020)</h2>
<p><strong>Security fixes</strong></p>
<ul>
<li>
<p><code>bleach.clean</code> behavior parsing embedded MathML and SVG content
with RCDATA tags did not match browser behavior and could result in
a mutation XSS.</p>
<p>Calls to <code>bleach.clean</code> with <code>strip=False</code> and <code>math</code> or
<code>svg</code> tags and one or more of the RCDATA tags <code>script</code>,
<code>noscript</code>, <code>style</code>, <code>noframes</code>, <code>iframe</code>, <code>noembed</code>, or
<code>xmp</code> in the allowed tags whitelist were vulnerable to a mutation
XSS.</p>
<p>This security issue was confirmed in Bleach version v3.1.1. Earlier
versions are likely affected too.</p>
<p>Anyone using Bleach <=v3.1.1 is encouraged to upgrade.</p>
<p><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1621692">https://bugzilla.mozilla.org/show_bug.cgi?id=1621692</a></p>
</li>
</ul>
<p><strong>Backwards incompatible changes</strong></p>
<p>None</p>
<p><strong>Features</strong></p>
<p>None</p>
<p><strong>Bug fixes</strong></p>
<p>None</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/mozilla/bleach/commit/78a06726dd6c72a42c90c1f7a8fa5d21ebcfa587"><code>78a0672</code></a> Update for v3.1.2 release</li>
<li><a href="https://github.com/mozilla/bleach/commit/7b625ff9f6888a08037700269fb23e3ef863b8a7"><code>7b625ff</code></a> add wheel to requirements-dev</li>
<li><a href="https://github.com/mozilla/bleach/commit/e4e9e21e7aebff40c88fafa4319bba4636a602d9"><code>e4e9e21</code></a> fix bug 1621692</li>
<li>See full diff in <a href="https://github.com/mozilla/bleach/compare/v3.1.1...v3.1.2">compare view</a></li>
</ul>
</details>
<br />
[](https://help.github.com/articles/configuring-automated-security-fixes)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/psf/requests/network/alerts).
</details>
|
{
"avatar_url": "https://avatars.githubusercontent.com/in/29110?v=4",
"events_url": "https://api.github.com/users/dependabot%5Bbot%5D/events{/privacy}",
"followers_url": "https://api.github.com/users/dependabot%5Bbot%5D/followers",
"following_url": "https://api.github.com/users/dependabot%5Bbot%5D/following{/other_user}",
"gists_url": "https://api.github.com/users/dependabot%5Bbot%5D/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/apps/dependabot",
"id": 49699333,
"login": "dependabot[bot]",
"node_id": "MDM6Qm90NDk2OTkzMzM=",
"organizations_url": "https://api.github.com/users/dependabot%5Bbot%5D/orgs",
"received_events_url": "https://api.github.com/users/dependabot%5Bbot%5D/received_events",
"repos_url": "https://api.github.com/users/dependabot%5Bbot%5D/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dependabot%5Bbot%5D/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dependabot%5Bbot%5D/subscriptions",
"type": "Bot",
"url": "https://api.github.com/users/dependabot%5Bbot%5D",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5396/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5396/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5396.diff",
"html_url": "https://github.com/psf/requests/pull/5396",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5396.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5396"
}
| true |
[
"Superseded by #5407."
] |
https://api.github.com/repos/psf/requests/issues/5395
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5395/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5395/comments
|
https://api.github.com/repos/psf/requests/issues/5395/events
|
https://github.com/psf/requests/issues/5395
| 585,800,346 |
MDU6SXNzdWU1ODU4MDAzNDY=
| 5,395 |
ssl.SSLError: [SSL: KRB5_S_TKT_NYV]
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/27058472?v=4",
"events_url": "https://api.github.com/users/faizanwahla/events{/privacy}",
"followers_url": "https://api.github.com/users/faizanwahla/followers",
"following_url": "https://api.github.com/users/faizanwahla/following{/other_user}",
"gists_url": "https://api.github.com/users/faizanwahla/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/faizanwahla",
"id": 27058472,
"login": "faizanwahla",
"node_id": "MDQ6VXNlcjI3MDU4NDcy",
"organizations_url": "https://api.github.com/users/faizanwahla/orgs",
"received_events_url": "https://api.github.com/users/faizanwahla/received_events",
"repos_url": "https://api.github.com/users/faizanwahla/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/faizanwahla/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/faizanwahla/subscriptions",
"type": "User",
"url": "https://api.github.com/users/faizanwahla",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2020-03-22T20:03:50Z
|
2021-09-01T00:11:32Z
|
2020-04-03T18:04:16Z
|
NONE
|
resolved
|
Please refer to our [Stack Overflow tag](https://stackoverflow.com/questions/tagged/python-requests) for guidance.
I was logging in with facebook on this python script the day before
it was working good but now it throw the following error
> Traceback (most recent call last):
File "fbwv2b.py", line 553, in
login()
File "fbwv2b.py", line 116, in login
br.select_form(nr=0)
File "/data/data/com.termux/files/usr/lib/python2.7/s
ite-packages/mechanize/_mechanize.py", line 633, in sel
ect_form
global_form = self._factory.global_form
File "/data/data/com.termux/files/usr/lib/python2.7/s
ite-packages/mechanize/_html.py", line 313, in global_f
orm
self.forms()
File "/data/data/com.termux/files/usr/lib/python2.7/s
ite-packages/mechanize/_html.py", line 320, in forms
self._current_forms, self._current_global_form = se
lf._get_forms()
File "/data/data/com.termux/files/usr/lib/python2.7/s
ite-packages/mechanize/_html.py", line 335, in _get_for
ms
if self.root is None:
File "/data/data/com.termux/files/usr/lib/python2.7/s
ite-packages/mechanize/_html.py", line 289, in root
raw = self._response.read() if self._response else
b''
File "/data/data/com.termux/files/usr/lib/python2.7/s
ite-packages/mechanize/_response.py", line 199, in read
self.__cache.write(self.wrapped.read())
File "/data/data/com.termux/files/usr/lib/python2.7/s
ocket.py", line 355, in read
data = self._sock.recv(rbufsize)
File "/data/data/com.termux/files/usr/lib/python2.7/h
ttplib.py", line 607, in read
s = self.fp.read(amt)
File "/data/data/com.termux/files/usr/lib/python2.7/s
ocket.py", line 384, in read
data = self._sock.recv(left)
File "/data/data/com.termux/files/usr/lib/python2.7/s
sl.py", line 754, in recv
return self.read(buflen)
File "/data/data/com.termux/files/usr/lib/python2.7/s
sl.py", line 641, in read
v = self._sslobj.read(len)
ssl.SSLError: [SSL: KRB5_S_TKT_NYV] unexpected eof whil
e reading (_ssl.c:1946)
|
{
"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": 1,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/5395/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5395/timeline
| null |
completed
| null | null | false |
[
"What is your openssl version? Try to update the openssl to the most recently version.",
"@eliasfank i was problem only in the termux new verision in old version it worked fine ",
"Hi @faizanwahla,\r\n\r\nThis is an SSL issue with how you're accessing Facebook. This isn't in the scope of what we support on this issue tracker though. Please follow the instructions at the top of your issue to get assistance with this. Thanks!"
] |
https://api.github.com/repos/psf/requests/issues/5394
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5394/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5394/comments
|
https://api.github.com/repos/psf/requests/issues/5394/events
|
https://github.com/psf/requests/issues/5394
| 585,697,084 |
MDU6SXNzdWU1ODU2OTcwODQ=
| 5,394 |
time limit / lifetime of request
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/12517945?v=4",
"events_url": "https://api.github.com/users/flipchan/events{/privacy}",
"followers_url": "https://api.github.com/users/flipchan/followers",
"following_url": "https://api.github.com/users/flipchan/following{/other_user}",
"gists_url": "https://api.github.com/users/flipchan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/flipchan",
"id": 12517945,
"login": "flipchan",
"node_id": "MDQ6VXNlcjEyNTE3OTQ1",
"organizations_url": "https://api.github.com/users/flipchan/orgs",
"received_events_url": "https://api.github.com/users/flipchan/received_events",
"repos_url": "https://api.github.com/users/flipchan/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/flipchan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/flipchan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/flipchan",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2020-03-22T11:27:15Z
|
2021-09-01T00:11:28Z
|
2020-04-03T18:13:31Z
|
NONE
|
resolved
|
I have a program and in order verify that the user doesnt download such big files using input i need a time limit on how long each request is allowed to take.
Does anyone know a good way to put a time limit(/lifetime) on each python requests get requests so if it takes 10 seconds an exception will be thrown.
Thanks
Please refer to the [Stack Overflow question here as well](https://stackoverflow.com/questions/60798728/put-a-time-limit-on-a-request).
|
{
"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/5394/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5394/timeline
| null |
completed
| null | null | false |
[
"Hi @flipchan,\r\n\r\nRequests doesn't currently support duration timeouts, only read and connect. We've had various discussions about this over the past and have mostly arrived at using [timeout-decorator](https://github.com/pnpnpn/timeout-decorator) or something similar to wrap your requests. This should be pretty simple to implement and avoids a lot of the technical complexities of introducing this functionality in Requests.\r\n\r\n**Edit:**\r\n\r\nPrevious tickets for reference:\r\n* #2327\r\n* #2685\r\n* #1928\r\n* requests/toolbelt#51",
" okay"
] |
https://api.github.com/repos/psf/requests/issues/5393
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5393/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5393/comments
|
https://api.github.com/repos/psf/requests/issues/5393/events
|
https://github.com/psf/requests/issues/5393
| 584,360,231 |
MDU6SXNzdWU1ODQzNjAyMzE=
| 5,393 |
requests.get failed with AuthenticationRequired error but urllib.request.urlopen works
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/33146359?v=4",
"events_url": "https://api.github.com/users/jiongjiongli/events{/privacy}",
"followers_url": "https://api.github.com/users/jiongjiongli/followers",
"following_url": "https://api.github.com/users/jiongjiongli/following{/other_user}",
"gists_url": "https://api.github.com/users/jiongjiongli/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jiongjiongli",
"id": 33146359,
"login": "jiongjiongli",
"node_id": "MDQ6VXNlcjMzMTQ2MzU5",
"organizations_url": "https://api.github.com/users/jiongjiongli/orgs",
"received_events_url": "https://api.github.com/users/jiongjiongli/received_events",
"repos_url": "https://api.github.com/users/jiongjiongli/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jiongjiongli/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jiongjiongli/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jiongjiongli",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2020-03-19T11:57:14Z
|
2021-09-01T00:11:31Z
|
2020-04-03T18:22:55Z
|
NONE
|
resolved
|
Summary.
requests.get failed with AuthenticationRequired error but urllib.request.urlopen works.
The computer access google url with shadowsocks client.
```
>>> requests.__version__
'2.23.0'
>>>
>>> url = 'http://storage.googleapis.com/tfds-data'
>>>
>>> response = requests.get(url)
>>> response
<Response [401]>
>>> response.content
b"<?xml version='1.0' encoding='UTF-8'?><Error><Code>AuthenticationRequired</Code><Message>Authentication required.</Message></Error>"
>>>
>>> urllib.request.urlopen(url).msg
'OK'
```
## Expected Result
requests.get(url) works.
## Actual Result
```
>>> response
<Response [401]>
>>> response.content
b"<?xml version='1.0' encoding='UTF-8'?><Error><Code>AuthenticationRequired</Code><Message>Authentication required.</Message></Error>"
```
## Reproduction Steps
The computer access google url with shadowsocks client.
```python
import requests
import urllib.request
url = 'http://storage.googleapis.com/tfds-data'
response = requests.get(url) # It doesn't work.
response
response.content
urllib.request.urlopen(url).msg # It works.
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.7.3"
},
"platform": {
"release": "19.3.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.23.0"
},
"system_ssl": {
"version": "1000213f"
},
"urllib3": {
"version": "1.24.3"
},
"using_pyopenssl": false
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5393/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5393/timeline
| null |
completed
| null | null | false |
[
"Hi @jiongjiongli,\r\n\r\nI'm unable to reproduce this issue with the code provided, I get identical responses across both Requests. Something you're sending in the first request is triggering an authentication challenge. I'd verify you're not providing credentials from a .netrc file or another mechanism. The easiest way to check is seeing if there's an `Authentication` header in your initial `request` object. You can access that off your response with `response.request`.\r\n\r\nIf that doesn't resolve the issue, I'd suggest opening a new question on Stackoverflow.com to continue debugging. This is a local configuration issue rather than a defect in Requests, so I don't believe this is the best place to track. I'm going to resolve for now.",
"@nateprewitt OK. Thanks a lot!"
] |
https://api.github.com/repos/psf/requests/issues/5392
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5392/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5392/comments
|
https://api.github.com/repos/psf/requests/issues/5392/events
|
https://github.com/psf/requests/issues/5392
| 584,171,674 |
MDU6SXNzdWU1ODQxNzE2NzQ=
| 5,392 |
Requests+Gevnet trigger SSLERROR when use goproxy
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/24947060?v=4",
"events_url": "https://api.github.com/users/djerryz/events{/privacy}",
"followers_url": "https://api.github.com/users/djerryz/followers",
"following_url": "https://api.github.com/users/djerryz/following{/other_user}",
"gists_url": "https://api.github.com/users/djerryz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/djerryz",
"id": 24947060,
"login": "djerryz",
"node_id": "MDQ6VXNlcjI0OTQ3MDYw",
"organizations_url": "https://api.github.com/users/djerryz/orgs",
"received_events_url": "https://api.github.com/users/djerryz/received_events",
"repos_url": "https://api.github.com/users/djerryz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/djerryz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/djerryz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/djerryz",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2020-03-19T05:26:44Z
|
2021-09-02T00:07:13Z
|
2020-03-19T05:44:15Z
|
NONE
|
resolved
|
Summary.
## Expected Result
<Response [200]>
## Actual Result
HTTPSConnectionPool(host='www.baidu.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_read_bytes', 'sslv3 alert unexpected message')],)",),))
## Reproduction Steps
```bash
echo "ignore timeout error!"
echo "
import gevent
from gevent import monkey, pool
from gevent.subprocess import Popen, PIPE
monkey.patch_all(select=False)
import requests
requests.packages.urllib3.disable_warnings()
import time
import os
def poc():
return requests.get('https://www.qq.com:443/', proxies={'http': 'http://127.0.0.1:30000', 'https': 'http://127.0.0.1:30000'},verify=False,timeout=5)
for i in range(10):
try:
print(poc())
except Exception as e:
print(e)
" > error.py
echo "
import requests
requests.packages.urllib3.disable_warnings()
import time
import os
def poc():
return requests.get('https://www.qq.com:443/', proxies={'http': 'http://127.0.0.1:30000', 'https': 'http://127.0.0.1:30000'},verify=False,timeout=5)
for i in range(10):
try:
print(poc())
except Exception as e:
print(e)
" > success.py
python3 error.py
python3 success.py
```
Result:
```
# python3 error.py
<Response [200]>
HTTPSConnectionPool(host='www.qq.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_record', 'wrong version number')],)",),))
HTTPSConnectionPool(host='www.qq.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_record', 'wrong version number')],)",),))
HTTPSConnectionPool(host='www.qq.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_record', 'wrong version number')],)",),))
HTTPSConnectionPool(host='www.qq.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_record', 'wrong version number')],)",),))
HTTPSConnectionPool(host='www.qq.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_record', 'wrong version number')],)",),))
HTTPSConnectionPool(host='www.qq.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_record', 'wrong version number')],)",),))
HTTPSConnectionPool(host='www.qq.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_record', 'wrong version number')],)",),))
HTTPSConnectionPool(host='www.qq.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_record', 'wrong version number')],)",),))
HTTPSConnectionPool(host='www.qq.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_record', 'wrong version number')],)",),))
# python3 success.py
<Response [200]>
<Response [200]>
<Response [200]>
<Response [200]>
<Response [200]>
<Response [200]>
<Response [200]>
<Response [200]>
<Response [200]>
<Response [200]>
```
## System Information
```
1. ubuntu 18.04
2. gevent is lastest
3. request.help:
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.8"
},
"idna": {
"version": "2.9"
},
"implementation": {
"name": "CPython",
"version": "3.6.8"
},
"platform": {
"release": "4.15.0-45-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010104f",
"version": "19.1.0"
},
"requests": {
"version": "2.23.0"
},
"system_ssl": {
"version": "1010100f"
},
"urllib3": {
"version": "1.25.8"
},
"using_pyopenssl": true
}
```
## the proxy i use
```bash
wget https://github.com/snail007/goproxy/releases/download/v8.9/proxy-linux-386.tar.gz
mkdir proxy_here
tar -xzvf proxy-linux-386.tar.gz -C proxy_here
cd proxy_here
chmod +x proxy
./proxy http -p "127.0.0.1:30000"
# you can try other parament for test:
# eg.1 daemon model
# ./proxy http -p "127.0.0.1:30000" --daemon --forever --max-conns-rate 0
# eg.2 https cert model
# proxy keygen -C proxy
# proxy http -p "127.0.0.1:30000" -C proxy.crt -K proxy.key -T tls
```
when i use eg.2:
python3 error.py
```
HTTPSConnectionPool(host='www.qq.com', port=443): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', ConnectionResetError(104, 'Connection reset by peer')))
HTTPSConnectionPool(host='www.qq.com', port=443): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response',)))
HTTPSConnectionPool(host='www.qq.com', port=443): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', ConnectionResetError(104, 'Connection reset by peer')))
HTTPSConnectionPool(host='www.qq.com', port=443): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', ConnectionResetError(104, 'Connection reset by peer')))
HTTPSConnectionPool(host='www.qq.com', port=443): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response',)))
HTTPSConnectionPool(host='www.qq.com', port=443): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response',)))
HTTPSConnectionPool(host='www.qq.com', port=443): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', ConnectionResetError(104, 'Connection reset by peer')))
HTTPSConnectionPool(host='www.qq.com', port=443): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response',)))
HTTPSConnectionPool(host='www.qq.com', port=443): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', ConnectionResetError(104, 'Connection reset by peer')))
HTTPSConnectionPool(host='www.qq.com', port=443): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', ConnectionResetError(104, 'Connection reset by peer')))
```
python3 success.py
```
<Response [200]>
<Response [200]>
<Response [200]>
<Response [200]>
<Response [200]>
<Response [200]>
<Response [200]>
<Response [200]>
<Response [200]>
HTTPSConnectionPool(host='www.qq.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_record', 'wrong version number')],)",),))
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/24947060?v=4",
"events_url": "https://api.github.com/users/djerryz/events{/privacy}",
"followers_url": "https://api.github.com/users/djerryz/followers",
"following_url": "https://api.github.com/users/djerryz/following{/other_user}",
"gists_url": "https://api.github.com/users/djerryz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/djerryz",
"id": 24947060,
"login": "djerryz",
"node_id": "MDQ6VXNlcjI0OTQ3MDYw",
"organizations_url": "https://api.github.com/users/djerryz/orgs",
"received_events_url": "https://api.github.com/users/djerryz/received_events",
"repos_url": "https://api.github.com/users/djerryz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/djerryz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/djerryz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/djerryz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5392/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5392/timeline
| null |
completed
| null | null | false |
[
"~~the reason is that proxy have almost 500 Concurrent request at that time.\r\nso maybe proxy cannot solve too much requests at same time, i stop other program's request ,and all is fine~~\r\n\r\nthe problem not in proxy , even though 1 Concurrent request still have SSLError ssl3_get_record happend.\r\n\r\nI solve the problem,by change this:\r\n```\r\n{'http': 'http://127.0.0.1:30000', 'https': 'http://127.0.0.1:30000'}\r\n```\r\nto\r\n```\r\nproxies={'http': 'http://127.0.0.1:30000'}\r\n```\r\nand , everything is fine."
] |
https://api.github.com/repos/psf/requests/issues/5391
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5391/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5391/comments
|
https://api.github.com/repos/psf/requests/issues/5391/events
|
https://github.com/psf/requests/pull/5391
| 583,325,279 |
MDExOlB1bGxSZXF1ZXN0MzkwMTAwMDY0
| 5,391 |
Send only one Host header in chunked request
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2493157?v=4",
"events_url": "https://api.github.com/users/hodbn/events{/privacy}",
"followers_url": "https://api.github.com/users/hodbn/followers",
"following_url": "https://api.github.com/users/hodbn/following{/other_user}",
"gists_url": "https://api.github.com/users/hodbn/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hodbn",
"id": 2493157,
"login": "hodbn",
"node_id": "MDQ6VXNlcjI0OTMxNTc=",
"organizations_url": "https://api.github.com/users/hodbn/orgs",
"received_events_url": "https://api.github.com/users/hodbn/received_events",
"repos_url": "https://api.github.com/users/hodbn/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hodbn/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hodbn/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hodbn",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] |
{
"closed_at": "2021-12-30T21:48:07Z",
"closed_issues": 11,
"created_at": "2021-09-02T07:23:33Z",
"creator": {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
},
"description": "",
"due_on": null,
"html_url": "https://github.com/psf/requests/milestone/29",
"id": 7115399,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/29/labels",
"node_id": "MI_kwDOABTKOs4AbJKH",
"number": 29,
"open_issues": 0,
"state": "closed",
"title": "2.27.0",
"updated_at": "2021-12-30T21:48:07Z",
"url": "https://api.github.com/repos/psf/requests/milestones/29"
}
| 4 |
2020-03-17T22:01:53Z
|
2022-02-27T16:00:27Z
|
2021-11-29T15:58:32Z
|
CONTRIBUTOR
|
resolved
|
Send only one Host header when specifying a custom Host header in a chunked request.
Before this fix, the default Host header was sent along with the custom Host header.
Closes #5274
|
{
"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/5391/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5391/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5391.diff",
"html_url": "https://github.com/psf/requests/pull/5391",
"merged_at": "2021-11-29T15:58:32Z",
"patch_url": "https://github.com/psf/requests/pull/5391.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5391"
}
| true |
[
"Hi @AaronRobson :)\r\nCan you take another look at this?",
"@nateprewitt What's the state of this PR?",
"It's ready, it just needs to be rebased to rerun tests and we can merge. It's on my list for Monday now that 2.27.0 is unblocked.",
"Thanks again @hodbn!"
] |
https://api.github.com/repos/psf/requests/issues/5390
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5390/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5390/comments
|
https://api.github.com/repos/psf/requests/issues/5390/events
|
https://github.com/psf/requests/issues/5390
| 583,126,226 |
MDU6SXNzdWU1ODMxMjYyMjY=
| 5,390 |
[Question/Suggest] Session requests return
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4",
"events_url": "https://api.github.com/users/ghost/events{/privacy}",
"followers_url": "https://api.github.com/users/ghost/followers",
"following_url": "https://api.github.com/users/ghost/following{/other_user}",
"gists_url": "https://api.github.com/users/ghost/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ghost",
"id": 10137,
"login": "ghost",
"node_id": "MDQ6VXNlcjEwMTM3",
"organizations_url": "https://api.github.com/users/ghost/orgs",
"received_events_url": "https://api.github.com/users/ghost/received_events",
"repos_url": "https://api.github.com/users/ghost/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ghost/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ghost",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2020-03-17T16:08:44Z
|
2021-09-01T00:11:32Z
|
2020-04-03T18:24:35Z
|
NONE
|
resolved
|
As most of the people who will make requests to web sites will need to have the source, why don't you implement an optional parameter so when creating the session object we can set it to true so we have an attribute of the object that store the return of the last requests, with that we wouldn't need to create a new variable each time, that will save lot of times for coders and is easy to implement (from my point of view), I can do a PR if you think this suggestion is Good. Of course, I could modify my local version to do that but that wouldn't make any sense when sharing to others
|
{
"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/5390/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5390/timeline
| null |
completed
| null | null | false |
[
"It sounds like you're suggesting that a session store the last response on the session itself. In a single-threaded context, that's all well and good. In a multi-threaded/coroutine context this just flat out doesn't work.",
"Yep, sigmavirus24 is correct. This brings a lot of issues in with shared state in a parallelized environment. I don't think we'll be able to implement this due to those constraints. Thanks for the suggestion though @Rasko1!"
] |
https://api.github.com/repos/psf/requests/issues/5389
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5389/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5389/comments
|
https://api.github.com/repos/psf/requests/issues/5389/events
|
https://github.com/psf/requests/issues/5389
| 582,376,408 |
MDU6SXNzdWU1ODIzNzY0MDg=
| 5,389 |
Close connection immediately after proxies fail.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/48416425?v=4",
"events_url": "https://api.github.com/users/ZeRoss0000/events{/privacy}",
"followers_url": "https://api.github.com/users/ZeRoss0000/followers",
"following_url": "https://api.github.com/users/ZeRoss0000/following{/other_user}",
"gists_url": "https://api.github.com/users/ZeRoss0000/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ZeRoss0000",
"id": 48416425,
"login": "ZeRoss0000",
"node_id": "MDQ6VXNlcjQ4NDE2NDI1",
"organizations_url": "https://api.github.com/users/ZeRoss0000/orgs",
"received_events_url": "https://api.github.com/users/ZeRoss0000/received_events",
"repos_url": "https://api.github.com/users/ZeRoss0000/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ZeRoss0000/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ZeRoss0000/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ZeRoss0000",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2020-03-16T15:13:38Z
|
2021-09-02T00:07:13Z
|
2020-03-16T22:52:43Z
|
NONE
|
resolved
|
I'm using proxy list that include proxies that sometimes stop working and that slow down the process a lot even if i'm using timeout is there anyway to bypass that?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/48416425?v=4",
"events_url": "https://api.github.com/users/ZeRoss0000/events{/privacy}",
"followers_url": "https://api.github.com/users/ZeRoss0000/followers",
"following_url": "https://api.github.com/users/ZeRoss0000/following{/other_user}",
"gists_url": "https://api.github.com/users/ZeRoss0000/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ZeRoss0000",
"id": 48416425,
"login": "ZeRoss0000",
"node_id": "MDQ6VXNlcjQ4NDE2NDI1",
"organizations_url": "https://api.github.com/users/ZeRoss0000/orgs",
"received_events_url": "https://api.github.com/users/ZeRoss0000/received_events",
"repos_url": "https://api.github.com/users/ZeRoss0000/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ZeRoss0000/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ZeRoss0000/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ZeRoss0000",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5389/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5389/timeline
| null |
completed
| null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/5388
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5388/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5388/comments
|
https://api.github.com/repos/psf/requests/issues/5388/events
|
https://github.com/psf/requests/issues/5388
| 580,653,057 |
MDU6SXNzdWU1ODA2NTMwNTc=
| 5,388 |
RequestsCookieJar appends ".local" to cookie from localhost
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/49956725?v=4",
"events_url": "https://api.github.com/users/dominickj-tdi/events{/privacy}",
"followers_url": "https://api.github.com/users/dominickj-tdi/followers",
"following_url": "https://api.github.com/users/dominickj-tdi/following{/other_user}",
"gists_url": "https://api.github.com/users/dominickj-tdi/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dominickj-tdi",
"id": 49956725,
"login": "dominickj-tdi",
"node_id": "MDQ6VXNlcjQ5OTU2NzI1",
"organizations_url": "https://api.github.com/users/dominickj-tdi/orgs",
"received_events_url": "https://api.github.com/users/dominickj-tdi/received_events",
"repos_url": "https://api.github.com/users/dominickj-tdi/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dominickj-tdi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dominickj-tdi/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dominickj-tdi",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 3 |
2020-03-13T14:54:34Z
|
2020-04-09T20:45:32Z
| null |
NONE
| null |
When I make a request to localhost (on my development machine), Requests changes the domain from "localhost" to "localhost.local" when saving the cookie. Thus, I am unable to access the cookie if I specify the domain parameter in the get method.
My app requires me to get and set cookies on the session object as a persistence mechanism; I need to persist this cookie over more than one session in the python app.
## Expected Result
I would expect the domain in `RequestCookieJar` to always match the domain I used to make the request.
## Actual Result
If I make a request to localhost, instead I get the cookie saved to the domain "localhost.local". (Note that I cannot actually make requests to "localhost.local", they fail.) This puts me in a position where I must make requests to "localhost" but use "localhost.local" to get or set the cookie.
## Reproduction Steps
```
>>> import requests
>>> ses = requests.Session()
>>> ses.get('http://localhost/')
<Response [200]>
>>> ses.cookies
<RequestsCookieJar[Cookie(version=0, name='PHPSESSID', value='ui1hr334bmcr1r85jlu8k3rq65', port=None, port_specified=False, domain='localhost.local', domain_specified=False, domain_initial_dot=False, path='/', path_specified=True, secure=False, expires=None, discard=True, comment=None, comment_url=None, rest={}, rfc2109=False)]>
>>> ses.cookies.get('PHPSESSID')
'ui1hr334bmcr1r85jlu8k3rq65'
>>> ses.cookies.get('PHPSESSID', domain='localhost')
>>> ses.cookies.get('PHPSESSID', domain='localhost.local')
'ui1hr334bmcr1r85jlu8k3rq65'
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.7.3"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "101000af"
},
"urllib3": {
"version": "1.25.3"
},
"using_pyopenssl": false
}
```
| 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/5388/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5388/timeline
| null | null | null | null | false |
[
"Hi,\r\n\r\nRequests uses `cookielib.make_cookies` to fill its `RequestsCookieJar`.\r\nIn turn, `cookielib.make_cookies` uses `cookielib.eff_request_host` to extract the `erhn`.\r\n`cookielib` conforms to [rfc2965](https://www.ietf.org/rfc/rfc2965.txt) which states:\r\n> The term effective host name is related to host name. If a host name\r\n contains no dots, the effective host name is that name with the\r\n string .local appended to it\r\n\r\nTherefore, unless `cookielib` adds support and defaults its policy to [rfc6265](https://www.ietf.org/rfc/rfc6265.txt), I think this is unavoidable :(\r\n\r\nDo you have any ideas?",
"What if we just added a line like this to `RequestsCookieJar.get()` and `RequestCookieJar.set()` then?\r\n\r\n```python\r\nif '.' not in domain:\r\n domain += '.local'\r\n```\r\n\r\nThat would be a pretty minor change that I don't imagine would cause issues for existing scripts, but would allow scripts to use host names without dots.",
"Just as a note, I am using the above two lines in my own code where I call `session.cookies.set()` and `session.cookies.get()`. Everything works as expected with that workaround. But I still think it would be good to include in the main library. I'd be happy to submit a pull request if the team would be willing to merge it."
] |
https://api.github.com/repos/psf/requests/issues/5387
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5387/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5387/comments
|
https://api.github.com/repos/psf/requests/issues/5387/events
|
https://github.com/psf/requests/issues/5387
| 579,812,944 |
MDU6SXNzdWU1Nzk4MTI5NDQ=
| 5,387 |
kali linux mimtf installation error
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/62097137?v=4",
"events_url": "https://api.github.com/users/dr55555/events{/privacy}",
"followers_url": "https://api.github.com/users/dr55555/followers",
"following_url": "https://api.github.com/users/dr55555/following{/other_user}",
"gists_url": "https://api.github.com/users/dr55555/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dr55555",
"id": 62097137,
"login": "dr55555",
"node_id": "MDQ6VXNlcjYyMDk3MTM3",
"organizations_url": "https://api.github.com/users/dr55555/orgs",
"received_events_url": "https://api.github.com/users/dr55555/received_events",
"repos_url": "https://api.github.com/users/dr55555/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dr55555/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dr55555/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dr55555",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2020-03-12T09:44:58Z
|
2021-09-02T00:07:14Z
|
2020-03-12T14:56:54Z
|
NONE
|
resolved
|
Received response with content-encoding: gzip, but failed to decode it error -3 while installing mimtf
|
{
"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/5387/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5387/timeline
| null |
completed
| null | null | false |
[
"Hi @dr55555, there isn't enough information here for us to work with. It's not clear what Requests has to do with the installation of mimtf. If you can provide a full stack trace or a small reproduction sample that shows a defect in Requests that would be helpful.\r\n\r\nFor the time being I'm going to resolve the ticket since there aren't any actions we can take."
] |
https://api.github.com/repos/psf/requests/issues/5386
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5386/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5386/comments
|
https://api.github.com/repos/psf/requests/issues/5386/events
|
https://github.com/psf/requests/pull/5386
| 579,735,823 |
MDExOlB1bGxSZXF1ZXN0Mzg3MDc1ODU1
| 5,386 |
Fixed a decode problem when missing `charset`
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/17252049?v=4",
"events_url": "https://api.github.com/users/shimmeris/events{/privacy}",
"followers_url": "https://api.github.com/users/shimmeris/followers",
"following_url": "https://api.github.com/users/shimmeris/following{/other_user}",
"gists_url": "https://api.github.com/users/shimmeris/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shimmeris",
"id": 17252049,
"login": "shimmeris",
"node_id": "MDQ6VXNlcjE3MjUyMDQ5",
"organizations_url": "https://api.github.com/users/shimmeris/orgs",
"received_events_url": "https://api.github.com/users/shimmeris/received_events",
"repos_url": "https://api.github.com/users/shimmeris/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shimmeris/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shimmeris/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shimmeris",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2020-03-12T07:05:56Z
|
2021-08-29T00:06:56Z
|
2020-05-06T09:58:52Z
|
NONE
|
resolved
|
When the `charset` is not declared in `Content-type`, the `get_encoding_from_headers` function returns `ISO-8859-1` as the response encoding by default, but the encoding is a single-byte encoding system, so if the response contains other multi-byte encoding languages like Chinese, `Response.text` will return garbage characters.
So I think it's better to leave it to `Response.apparent_encoding` to determine the encoding.
for example, if the response is like this
```python
r.headers['Content-Type'] == 'text/html'
r.content == b'<title>\xe4\xb8\xad\xe6\x96\x87</title>'
r.encoding == 'ISO-8859-1'
r.text == '<title>ä¸\xadæ\x96\x87</title>' # garbage characters
# but if we leave it to `Response.apparent_encoding`
r.encoding == 'utf-8'
r.text == '<title>中文</title>'
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/17252049?v=4",
"events_url": "https://api.github.com/users/shimmeris/events{/privacy}",
"followers_url": "https://api.github.com/users/shimmeris/followers",
"following_url": "https://api.github.com/users/shimmeris/following{/other_user}",
"gists_url": "https://api.github.com/users/shimmeris/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shimmeris",
"id": 17252049,
"login": "shimmeris",
"node_id": "MDQ6VXNlcjE3MjUyMDQ5",
"organizations_url": "https://api.github.com/users/shimmeris/orgs",
"received_events_url": "https://api.github.com/users/shimmeris/received_events",
"repos_url": "https://api.github.com/users/shimmeris/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shimmeris/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shimmeris/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shimmeris",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5386/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5386/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5386.diff",
"html_url": "https://github.com/psf/requests/pull/5386",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5386.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5386"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/5385
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5385/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5385/comments
|
https://api.github.com/repos/psf/requests/issues/5385/events
|
https://github.com/psf/requests/issues/5385
| 579,680,368 |
MDU6SXNzdWU1Nzk2ODAzNjg=
| 5,385 |
Segmentation fault on response.json()
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/8114665?v=4",
"events_url": "https://api.github.com/users/akshayamaldhure/events{/privacy}",
"followers_url": "https://api.github.com/users/akshayamaldhure/followers",
"following_url": "https://api.github.com/users/akshayamaldhure/following{/other_user}",
"gists_url": "https://api.github.com/users/akshayamaldhure/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/akshayamaldhure",
"id": 8114665,
"login": "akshayamaldhure",
"node_id": "MDQ6VXNlcjgxMTQ2NjU=",
"organizations_url": "https://api.github.com/users/akshayamaldhure/orgs",
"received_events_url": "https://api.github.com/users/akshayamaldhure/received_events",
"repos_url": "https://api.github.com/users/akshayamaldhure/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/akshayamaldhure/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/akshayamaldhure/subscriptions",
"type": "User",
"url": "https://api.github.com/users/akshayamaldhure",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 6 |
2020-03-12T04:12:59Z
|
2021-09-01T00:11:37Z
|
2020-03-12T04:31:37Z
|
NONE
|
resolved
|
Here's the nearly full trace of the issue.
Thread 0x00007f6c37fff700 (most recent call first):
File "/usr/lib/python3.6/threading.py", line 295 in wait
File "/usr/lib/python3.6/queue.py", line 164 in get
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 67 in _worker
File "/usr/lib/python3.6/threading.py", line 864 in run
File "/usr/lib/python3.6/threading.py", line 916 in _bootstrap_inner
File "/usr/lib/python3.6/threading.py", line 884 in _bootstrap
Thread 0x00007f6c54e79700 (most recent call first):
File "/usr/lib/python3.6/threading.py", line 295 in wait
File "/usr/lib/python3.6/queue.py", line 164 in get
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 67 in _worker
File "/usr/lib/python3.6/threading.py", line 864 in run
File "/usr/lib/python3.6/threading.py", line 916 in _bootstrap_inner
File "/usr/lib/python3.6/threading.py", line 884 in _bootstrap
Thread 0x00007f6c5567a700 (most recent call first):
File "/usr/lib/python3.6/threading.py", line 295 in wait
File "/usr/lib/python3.6/queue.py", line 164 in get
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 67 in _worker
File "/usr/lib/python3.6/threading.py", line 864 in run
File "/usr/lib/python3.6/threading.py", line 916 in _bootstrap_inner
File "/usr/lib/python3.6/threading.py", line 884 in _bootstrap
Thread 0x00007f6c55e7b700 (most recent call first):
File "/usr/lib/python3.6/threading.py", line 295 in wait
File "/usr/lib/python3.6/queue.py", line 164 in get
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 67 in _worker
File "/usr/lib/python3.6/threading.py", line 864 in run
File "/usr/lib/python3.6/threading.py", line 916 in _bootstrap_inner
File "/usr/lib/python3.6/threading.py", line 884 in _bootstrap
Thread 0x00007f6c566bc700 (most recent call first):
File "/usr/lib/python3.6/threading.py", line 295 in wait
File "/usr/lib/python3.6/queue.py", line 164 in get
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 67 in _worker
File "/usr/lib/python3.6/threading.py", line 864 in run
File "/usr/lib/python3.6/threading.py", line 916 in _bootstrap_inner
File "/usr/lib/python3.6/threading.py", line 884 in _bootstrap
Thread 0x00007f6c56ebd700 (most recent call first):
File "/usr/lib/python3.6/threading.py", line 295 in wait
File "/usr/lib/python3.6/queue.py", line 164 in get
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 67 in _worker
File "/usr/lib/python3.6/threading.py", line 864 in run
File "/usr/lib/python3.6/threading.py", line 916 in _bootstrap_inner
File "/usr/lib/python3.6/threading.py", line 884 in _bootstrap
Thread 0x00007f6c576be700 (most recent call first):
File "/usr/lib/python3.6/threading.py", line 295 in wait
File "/usr/lib/python3.6/queue.py", line 164 in get
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 67 in _worker
File "/usr/lib/python3.6/threading.py", line 864 in run
File "/usr/lib/python3.6/threading.py", line 916 in _bootstrap_inner
File "/usr/lib/python3.6/threading.py", line 884 in _bootstrap
Thread 0x00007f6c57f7f700 (most recent call first):
File "/usr/lib/python3.6/threading.py", line 295 in wait
File "/usr/lib/python3.6/queue.py", line 164 in get
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 67 in _worker
File "/usr/lib/python3.6/threading.py", line 864 in run
File "/usr/lib/python3.6/threading.py", line 916 in _bootstrap_inner
File "/usr/lib/python3.6/threading.py", line 884 in _bootstrap
Thread 0x00007f6c6ced6700 (most recent call first):
File "/usr/lib/python3.6/threading.py", line 295 in wait
File "/usr/lib/python3.6/queue.py", line 164 in get
File "/usr/lib/python3.6/multiprocessing/pool.py", line 463 in _handle_results
File "/usr/lib/python3.6/threading.py", line 864 in run
File "/usr/lib/python3.6/threading.py", line 916 in _bootstrap_inner
File "/usr/lib/python3.6/threading.py", line 884 in _bootstrap
Thread 0x00007f6c6d6d7700 (most recent call first):
File "/usr/lib/python3.6/threading.py", line 295 in wait
File "/usr/lib/python3.6/queue.py", line 164 in get
File "/usr/lib/python3.6/multiprocessing/pool.py", line 415 in _handle_tasks
File "/usr/lib/python3.6/threading.py", line 864 in run
File "/usr/lib/python3.6/threading.py", line 916 in _bootstrap_inner
File "/usr/lib/python3.6/threading.py", line 884 in _bootstrap
Thread 0x00007f6c6ded8700 (most recent call first):
File "/usr/lib/python3.6/multiprocessing/pool.py", line 406 in _handle_workers
File "/usr/lib/python3.6/threading.py", line 864 in run
File "/usr/lib/python3.6/threading.py", line 916 in _bootstrap_inner
File "/usr/lib/python3.6/threading.py", line 884 in _bootstrap
Current thread 0x00007f6c6e6d9700 (most recent call first):
File "/usr/lib/python3.6/json/decoder.py", line 355 in raw_decode
File "/usr/lib/python3.6/json/decoder.py", line 339 in decode
File "/usr/lib/python3.6/json/__init__.py", line 354 in loads
File "/var/lib/jenkins/.local/lib/python3.6/site-packages/requests/models.py", line 897 in json
**File "/var/lib/jenkins/workspace/my_job/consumers/api_helpers/some_helper.py", line 13 in hit_an_api_and_get_some_status**
At the last line indicated in bold, my code is this:
`return response.json()["status"] if response.status_code == 200 else None`
## Expected Result
There should be no segmentation fault.
## Actual Result
My code fails with a segmentation fault.
## Reproduction Steps
```python
import requests
```
(the code is indicated above)
## System Information
requests version 2.22.0
Python version 3.6 running on Ubuntu 16.04 LTS
|
{
"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/5385/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5385/timeline
| null |
completed
| null | null | false |
[
"Hi @akshayamaldhure, do you actually mean a seg fault, or are your referring to the traceback? Requests doesn't run any C code, so it would be very difficult if not impossible to be the cause of that.\r\n\r\nLooking at the stack trace you provided, there's no information on what the actual exception is. Would you be able to provide that?",
"It looks like you're experiencing this same issue with [aiohttp](https://github.com/slackapi/python-slackclient/issues/624) as well which would point to this not being an issue specific to Requests.\r\n\r\nIf you're able to reproduce with with a minimal example only using Requests, please feel free to reopen the ticket. Thanks!",
"> Hi @akshayamaldhure, do you actually mean a seg fault, or are your referring to the traceback? Requests doesn't run any C code, so it would be very difficult if not impossible to be the cause of that.\r\n> \r\n> Looking at the stack trace you provided, there's no information on what the actual exception is. Would you be able to provide that?\r\n\r\n@nateprewitt Before enabling the full logging of the seg fault using the [faulthandler](https://docs.python.org/3/library/faulthandler.html) module, I used to see only \"SEGMENTATION FAULT\" on the console logs on the corresponding Linux machine. Looking at the stack trace I provided, don't you think the fault is originating from the file `requests/models.py`?",
"Requests is entirely python code, so a SEGFAULT shouldn't be originating from us. If you look at the stacktrace, the failure point is calling [`json.loads`](https://github.com/psf/requests/blob/v2.22.0/requests/models.py#L897) which is part of the standard library unless you've either a.) installed simplejson or b.) patched the `json` module for your python interpreter in some way.\r\n\r\nLooking at the stacktrace, you're using /usr/lib/python3.6/json which may be the next place to look if you're certain it's not related to your threading implementation.",
"@nateprewitt Here are the contents of my `requirements.txt` file.\r\n\r\naiohttp==3.6.2\r\nasync-timeout==3.0.1\r\nattrs==19.3.0\r\ncertifi==2019.11.28\r\nchardet==3.0.4\r\ncolorama==0.4.3\r\nidna==2.9\r\nlemoncheesecake==1.4.5\r\nmultidict==4.7.5\r\npython-slugify==4.0.0\r\nrequests==2.22.0\r\nsix==1.14.0\r\nslackclient==2.5.0\r\ntermcolor==1.1.0\r\nterminaltables==3.1.0\r\ntext-unidecode==1.3\r\ntyping==3.7.4.1\r\nurllib3==1.25.8\r\nyarl==1.4.2",
"Apparently, it seems pip was pointing to the incorrect Python version (Python 3.5) on the target machine. After fixing the same, this issue is not seen anymore.\r\n\r\n`pip 20.0.2 from /usr/local/lib/python3.6/dist-packages/pip (python 3.6)`"
] |
https://api.github.com/repos/psf/requests/issues/5384
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5384/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5384/comments
|
https://api.github.com/repos/psf/requests/issues/5384/events
|
https://github.com/psf/requests/issues/5384
| 579,552,189 |
MDU6SXNzdWU1Nzk1NTIxODk=
| 5,384 |
request.get(url, proxies=proxies) is possibly sending CONNECT as two TCP transmission, breaking custom readers and TLS handshakes.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/20964930?v=4",
"events_url": "https://api.github.com/users/zveinn/events{/privacy}",
"followers_url": "https://api.github.com/users/zveinn/followers",
"following_url": "https://api.github.com/users/zveinn/following{/other_user}",
"gists_url": "https://api.github.com/users/zveinn/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/zveinn",
"id": 20964930,
"login": "zveinn",
"node_id": "MDQ6VXNlcjIwOTY0OTMw",
"organizations_url": "https://api.github.com/users/zveinn/orgs",
"received_events_url": "https://api.github.com/users/zveinn/received_events",
"repos_url": "https://api.github.com/users/zveinn/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/zveinn/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zveinn/subscriptions",
"type": "User",
"url": "https://api.github.com/users/zveinn",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 7 |
2020-03-11T21:20:33Z
|
2021-08-30T00:06:07Z
|
2020-08-04T15:41:30Z
|
NONE
|
resolved
|
Hey there, I have been experiencing something strange when using python to send requests to proxies. The python library is either slow(unlikely) or is sending the last two \r\n of the CONNECT request as a seperate transmission somehow.
# Expected Result
❯ python test.py
{
"ip": "82.76.235.76",
"hostname": "82-76-235-76.rdsnet.ro",
"city": "Bucharest",
"region": "Bucureşti",
"country": "RO",
"loc": "44.4323,26.1063",
"org": "AS8708 RCS & RDS SA",
"postal": "020011",
"timezone": "Europe/Bucharest",
"readme": "https://ipinfo.io/missingauth"
}
# Actual Result
❯ python test.py
Traceback (most recent call last):
File "/home/zkynet/.local/lib/python3.7/site-packages/requests/packages/urllib3/contrib/pyopenssl.py", line 348, in ssl_wrap_socket
cnx.do_handshake()
File "/home/zkynet/.local/lib/python3.7/site-packages/OpenSSL/SSL.py", line 1934, in do_handshake
self._raise_ssl_error(self._ssl, result)
File "/home/zkynet/.local/lib/python3.7/site-packages/OpenSSL/SSL.py", line 1671, in _raise_ssl_error
_raise_current_error()
File "/home/zkynet/.local/lib/python3.7/site-packages/OpenSSL/_util.py", line 54, in exception_from_error_queue
raise exception_type(errors)
OpenSSL.SSL.Error: [('SSL routines', 'ssl3_read_bytes', 'tlsv1 alert protocol version')]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/zkynet/.local/lib/python3.7/site-packages/requests/packages/urllib3/connectionpool.py", line 589, in urlopen
self._prepare_proxy(conn)
File "/home/zkynet/.local/lib/python3.7/site-packages/requests/packages/urllib3/connectionpool.py", line 797, in _prepare_proxy
conn.connect()
File "/home/zkynet/.local/lib/python3.7/site-packages/requests/packages/urllib3/connection.py", line 289, in connect
ssl_version=resolved_ssl_version)
File "/home/zkynet/.local/lib/python3.7/site-packages/requests/packages/urllib3/contrib/pyopenssl.py", line 355, in ssl_wrap_socket
raise ssl.SSLError('bad handshake: %r' % e)
ssl.SSLError: ("bad handshake: Error([('SSL routines', 'ssl3_read_bytes', 'tlsv1 alert protocol version')])",)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/zkynet/.local/lib/python3.7/site-packages/requests/adapters.py", line 423, in send
timeout=timeout
File "/home/zkynet/.local/lib/python3.7/site-packages/requests/packages/urllib3/connectionpool.py", line 621, in urlopen
raise SSLError(e)
requests.packages.urllib3.exceptions.SSLError: ("bad handshake: Error([('SSL routines', 'ssl3_read_bytes', 'tlsv1 alert protocol version')])",)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "test.py", line 8, in <module>
response = requests.get("https://ipinfo.io/json", proxies=proxies)
File "/home/zkynet/.local/lib/python3.7/site-packages/requests/api.py", line 70, in get
return request('get', url, params=params, **kwargs)
File "/home/zkynet/.local/lib/python3.7/site-packages/requests/api.py", line 56, in request
return session.request(method=method, url=url, **kwargs)
File "/home/zkynet/.local/lib/python3.7/site-packages/requests/sessions.py", line 475, in request
resp = self.send(prep, **send_kwargs)
File "/home/zkynet/.local/lib/python3.7/site-packages/requests/sessions.py", line 596, in send
r = adapter.send(request, **kwargs)
File "/home/zkynet/.local/lib/python3.7/site-packages/requests/adapters.py", line 497, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: ("bad handshake: Error([('SSL routines', 'ssl3_read_bytes', 'tlsv1 alert protocol version')])",)
# Reproduction Steps
```python
import requests
proxies = {"https": "http://IP:PORT"}
response = requests.get("https://ipinfo.io/json", proxies=proxies)
print(response.text)
```
# What request sends to the proxy server:
1. Transmission:
CONNECT ipinfo.io:443 HTTP/1.0\r\n
**67 79 78 78 69 67 84 32 105 112 105 110 102 111 46 105 111 58 52 52 51 32 72 84 84 80 47 49 46 48 13 10**
2. Transmission:
\r\n
**13 10**
# What should have been sent to the proxy server in a single transmission:
**67 79 78 78 69 67 84 32 105 112 105 110 102 111 46 105 111 58 52 52 51 32 72 84 84 80 47 49 46 48 13 10 13 10**
CONNECT ipinfo.io:443 HTTP/1.0\r\n\r\n
## System Information
$ python -m requests.help ( I could not execute this command for some reason)
**here is my version info:**
```
❯ pip install requests
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: requests in /home/zkynet/.local/lib/python3.7/site-packages (2.11.1)
❯ python
Python 3.7.6 (default, Jan 30 2020, 09:44:41)
[GCC 9.2.1 20190827 (Red Hat 9.2.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
```
# Note on version
I did upgrade to 2.16.4 a bit later and found the same behaviour
`
pip3.7 install 'requests==2.16.4'
Defaulting to user installation because normal site-packages is not writeable
Collecting requests==2.16.4
Downloading requests-2.16.4-py2.py3-none-any.whl (87 kB)
|████████████████████████████████| 87 kB 603 kB/s
Collecting idna<2.6,>=2.5
Downloading idna-2.5-py2.py3-none-any.whl (55 kB)
|████████████████████████████████| 55 kB 2.9 MB/s
Requirement already satisfied: certifi>=2017.4.17 in ./.local/lib/python3.7/site-packages (from requests==2.16.4) (2019.11.28)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/lib/python3.7/site-packages (from requests==2.16.4) (3.0.4)
Collecting urllib3<1.22,>=1.21.1
Downloading urllib3-1.21.1-py2.py3-none-any.whl (131 kB)
|████████████████████████████████| 131 kB 5.5 MB/s
Installing collected packages: idna, urllib3, requests
Successfully installed idna-2.5 requests-2.16.4 urllib3-1.21.1
`
# So let's disect this
What is happening is that this library is first sending the connect request and then somehow in a seperate transmission you are sending the last \r\n (13 10) and it's breaking the TLS handshake because the receiving end thinks it's the start of the handshake.
## Possible reasons why this could be happening
1. You might be parsing/trying to inject something inn between the CONNECT and the closing tag ? maybe headers, cookies .. something like that. It could be causing a delay in the seinding of the closing tag. This forces TCP to split your transmission into two parts.
2. Python might simple be slow at putting these bytes on the wire, causing my app to think the last 13 10 are a part of another series ( highly unlikely )
3. You might be putting some kind of 0 bytes in between the first \r\n and the last \r\n. Many TCP readers consider the 0 byte an EOF or a delimiter between messages. ( I am too lazy to open wireshark and dig through the packets to verify this one since I also think it's highly unlikely )
I personally suspect you might be doing 2x writes to the connection. The reason why I think so is because NO OTHER tools exhibits this behaviour. I've tested browsers, proxy plugins, golang, nodejs, bash, curl, wget.. to name a few.
**Disclaimer: I know I can easily work around this bit either waiting for the second \r\n or just dismissing it when it arrives as the second transmission. But making special cases is something that shakes me to the bone.**
# Where to go from here
I would love it if someone could look into this a little more. I don't know python and it would take me forever to try to understand this library.
# What I (and possibly others) would LOVE to see happen
If you could compose your full CONNECT method and send it in a single transmission over the wire, you would save a lot of people a lot of time in the future. Not only that but make sure any developer making their own custom TCP listener/proxy service could easily integrade with your package without having to do some special cases.
Please let me know if I can help in any way, Peace and Love.
|
{
"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/5384/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5384/timeline
| null |
completed
| null | null | false |
[
"# Some follow up\r\nIt seems that your request is being sent as a single networking frame. The plot thickens..\r\n\r\nHere is a CONNECT request made in golang using the http library:\r\n\r\n\r\n\r\nhere is one with this library:\r\n\r\n\r\n\r\n# Side node on the host header\r\n [The mozila developer forums seem to suggest that the Host header is a part of the Connect request](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/CONNECT)\r\nAdditionally: [The IETF seems to lay out the specs like this](https://www.ietf.org/rfc/rfc2817.txt)\r\n```\r\n 5.2 Requesting a Tunnel with CONNECT\r\n\r\n A CONNECT method requests that a proxy establish a tunnel connection\r\n on its behalf. The Request-URI portion of the Request-Line is always\r\n an 'authority' as defined by URI Generic Syntax [2], which is to say\r\n the host name and port number destination of the requested connection\r\n separated by a colon:\r\n\r\n CONNECT server.example.com:80 HTTP/1.1\r\n Host: server.example.com:80\r\n\r\n```\r\n\r\nI don't know if the missing Host header has anything to do with the split reads though... \r\n\r\nBut for fun I tried to add it manually...\r\n\r\n```\r\nimport requests\r\n\r\nproxies = {\r\n \"https\": \"http://127.0.0.1:10010\",\r\n}\r\n\r\nresponse = requests.get(\"https://ipinfo.io/json\",headers={\"Host\":\"ipinfo.io:443\"}, proxies=proxies)\r\nprint(response.text)\r\n```\r\n\r\nBut it does not get delivered. Prehapse I am doing something wrong, i'm not that good at python :S\r\n\r\n",
"Have you tested this with a different proxy server? It's possible your proxy was blacklisted by IPinfo.io",
"This has been tested on multiple proxy server AND on localhost. It is harder to reproduce this on localhost since the two seperate writes are really fast. You need to create a bit of latency on your loopback interface in order to see it.",
"Hello. I am seeing the same behavior with a squid server in my lab. In this case, client --> squid is encrypted in a TLS session and squid is NOT performing man-in-the-middle or bump. \r\nEverything seems to work until the CONNECT is sent. This is sent outside of the TLS tunnel in clear text! I did a capture of my cURL, which works, and I do not see any additional connections spun up and certainly not in clear text. [Here is a screen shot](https://i.stack.imgur.com/3hLx3.png) of the specific transaction. After the 3-way handshake, request sends a push, squid responds with an ack, and then requests sends the connect message but the message is not encrypted in the TLS tunnel. After which, squid acknowledges receipt of the CONNECT and immediately follows with a TCP RESET.\r\nThe squid logs show this: `NONE/000 0 NONE error:transaction-end-before-headers - HIER_NONE/- -`",
"@aaronhackney I'm not sure if it's the same problem .. you should try logging the bytes being sent back and forth and check in which order they are sent. \r\n\r\nAlso, bump ..",
"@zkynet Did you find any workaround to make this work? i've extactly the same problem",
"@zkynet The tone is unwarranted here. Keep in mind that the two people maintaining this project are volunteers.\r\n\r\nThis issue actually resides within Python's [`http.client.HTTPConnection._tunnel()`](https://github.com/python/cpython/blob/master/Lib/http/client.py#L903) method, there isn't much that Requests or urllib3 can do to resolve this problem. Perhaps you can try raising this issue on the Python issue tracker."
] |
https://api.github.com/repos/psf/requests/issues/5383
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5383/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5383/comments
|
https://api.github.com/repos/psf/requests/issues/5383/events
|
https://github.com/psf/requests/issues/5383
| 579,289,675 |
MDU6SXNzdWU1NzkyODk2NzU=
| 5,383 |
How can call my C# rest api using requests lib?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/10062672?v=4",
"events_url": "https://api.github.com/users/SaddamBInSyed/events{/privacy}",
"followers_url": "https://api.github.com/users/SaddamBInSyed/followers",
"following_url": "https://api.github.com/users/SaddamBInSyed/following{/other_user}",
"gists_url": "https://api.github.com/users/SaddamBInSyed/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/SaddamBInSyed",
"id": 10062672,
"login": "SaddamBInSyed",
"node_id": "MDQ6VXNlcjEwMDYyNjcy",
"organizations_url": "https://api.github.com/users/SaddamBInSyed/orgs",
"received_events_url": "https://api.github.com/users/SaddamBInSyed/received_events",
"repos_url": "https://api.github.com/users/SaddamBInSyed/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/SaddamBInSyed/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/SaddamBInSyed/subscriptions",
"type": "User",
"url": "https://api.github.com/users/SaddamBInSyed",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2020-03-11T14:05:44Z
|
2021-09-02T00:07:14Z
|
2020-03-11T16:54:34Z
|
NONE
|
resolved
|
I want to consume my existing webapi (.NET) from python?
How can I do the same?
please advise
|
{
"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/5383/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5383/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/5382
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5382/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5382/comments
|
https://api.github.com/repos/psf/requests/issues/5382/events
|
https://github.com/psf/requests/pull/5382
| 578,140,081 |
MDExOlB1bGxSZXF1ZXN0Mzg1Nzc2Mzc0
| 5,382 |
Make the `data` vs `json` parameters more clear
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/566632?v=4",
"events_url": "https://api.github.com/users/gdubicki/events{/privacy}",
"followers_url": "https://api.github.com/users/gdubicki/followers",
"following_url": "https://api.github.com/users/gdubicki/following{/other_user}",
"gists_url": "https://api.github.com/users/gdubicki/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gdubicki",
"id": 566632,
"login": "gdubicki",
"node_id": "MDQ6VXNlcjU2NjYzMg==",
"organizations_url": "https://api.github.com/users/gdubicki/orgs",
"received_events_url": "https://api.github.com/users/gdubicki/received_events",
"repos_url": "https://api.github.com/users/gdubicki/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gdubicki/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gdubicki/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gdubicki",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2020-03-09T19:29:32Z
|
2022-03-29T21:00:35Z
|
2021-12-29T17:46:21Z
|
CONTRIBUTOR
|
resolved
|
As https://stackoverflow.com/q/26685248/2693875 question
and answer popularity shows that there is a lot of people who
do not understand the distinction.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 6,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 6,
"url": "https://api.github.com/repos/psf/requests/issues/5382/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5382/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5382.diff",
"html_url": "https://github.com/psf/requests/pull/5382",
"merged_at": "2021-12-29T17:46:21Z",
"patch_url": "https://github.com/psf/requests/pull/5382.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5382"
}
| true |
[
"Ping! Can I get a review, pretty please? :) ",
"Can we get this merged? I just lost half an hour on this",
"The current wording is counter intuitive, I recommend @gdubicki's PR."
] |
https://api.github.com/repos/psf/requests/issues/5381
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5381/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5381/comments
|
https://api.github.com/repos/psf/requests/issues/5381/events
|
https://github.com/psf/requests/issues/5381
| 578,126,536 |
MDU6SXNzdWU1NzgxMjY1MzY=
| 5,381 |
timeout exception: session.get() vs requests.get() behavior discrepancy
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/31391912?v=4",
"events_url": "https://api.github.com/users/simrigh/events{/privacy}",
"followers_url": "https://api.github.com/users/simrigh/followers",
"following_url": "https://api.github.com/users/simrigh/following{/other_user}",
"gists_url": "https://api.github.com/users/simrigh/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simrigh",
"id": 31391912,
"login": "simrigh",
"node_id": "MDQ6VXNlcjMxMzkxOTEy",
"organizations_url": "https://api.github.com/users/simrigh/orgs",
"received_events_url": "https://api.github.com/users/simrigh/received_events",
"repos_url": "https://api.github.com/users/simrigh/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simrigh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simrigh/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simrigh",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2020-03-09T19:03:01Z
|
2021-09-01T00:11:30Z
|
2020-04-10T18:55:19Z
|
NONE
|
resolved
|
When testing my code for its behavior in case of time-outs, I have run into the following observation. When I issue my request through:
***A.*** `requests.get('http://xxx.yy.com:8080/', timeout=(10.0001,0.000001))`, the stack-trace and the Exception triggered look as such:
/.../anaconda3/lib/python3.4/site-packages/requests/sessions.py in send(self, request, **kwargs)
571
572 # Send the request
--> 573 r = adapter.send(request, **kwargs)
574
575 # Total elapsed time of the request (approximately)
/.../anaconda3/lib/python3.4/site-packages/requests/adapters.py in send(self, request, stream, timeout, verify, cert, proxies)
431 raise SSLError(e, request=request)
432 elif isinstance(e, ReadTimeoutError):
--> 433 raise ReadTimeout(e, request=request)
434 else:
435 raise
ReadTimeout: HTTPConnectionPool(host='xxx.yy.com', port=8080): Read timed out. (read timeout=1e-06)
***B.*** `session.get('http://xxx.yy.com:8080/', timeout=(10.0001,0.000001))`, the stack-trace and the Exception triggered look as such:
/.../anaconda3/lib/python3.4/site-packages/requests/sessions.py in send(self, request, **kwargs)
571
572 # Send the request
--> 573 r = adapter.send(request, **kwargs)
574
575 # Total elapsed time of the request (approximately)
/.../anaconda3/lib/python3.4/site-packages/requests/adapters.py in send(self, request, stream, timeout, verify, cert, proxies)
422 raise RetryError(e, request=request)
423
--> 424 raise ConnectionError(e, request=request)
425
426 except _ProxyError as e:
ConnectionError: HTTPConnectionPool(host='xxx.yy.com', port=8080): Max retries exceeded with url: / (Caused by ReadTimeoutError("HTTPConnectionPool(host='xxx.yy.com', port=8080): Read timed out. (read timeout=1e-06)",))
This is however to a fundamentally different end-result in terms of Exception handling, as - surprisingly ! - it looks as if when using the `session.get`, one needs to catch `ConnectionError` rather than `ReadTimeout`? This is quite counter intuitive. Can someone advise? Why the difference, and how/what to catch in the code? Is that a bug?
This is for requests 2.7.0.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5381/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5381/timeline
| null |
completed
| null | null | false |
[
"Hi @lakokaz, would you mind seeing if this is reproducible with 2.23.0? The version you’re using is 5 years old and no longer supported.",
"I could not reproduce this for the newer version.\r\n\r\nBut I'm experiencing something related for 2.22.0. Namely:\r\n\r\n```\r\nfrom requests.sessions import Session\r\nfrom requests.adapters import HTTPAdapter\r\nfrom requests.exceptions import Timeout\r\nfrom requests.exceptions import ConnectionError\r\n\r\nMAX_RETRIES = 1\r\nreq_session = Session()\r\nreq_session.mount('http://',HTTPAdapter(max_retries=MAX_RETRIES))\r\ntry:\r\n req_session.get(\"http://github.com/\", timeout=(10.,0.000001))\r\nexcept Exception as exc:\r\n assert(isinstance(exc,Timeout)), \\\r\n \"Nope, not a Timeout, but rather: {}\".format(exc.__class__)\r\n```\r\nwhere I use deliberately the ridiculous value for the read time-out. Now, for `MAX_RETRIES=0` this results (as one would expect) in `requests.exceptions.Timeout`. But as soon as `MAX_RETRIES>0`, this throws (surprisingly, to me at least) `requests.exceptions.ConnectionError`.\r\n\r\nI find that very counterintuitive... Is that a feature? Is that a bug? \r\n",
"Thanks for the update @lakokaz. So for this specific example, I do agree it looks odd at first glance. The problem here is these are two separate failure types and the second could have a number of underlying causes.\r\n\r\nWhen MAX_RETRIES is 0, urllib3 bypasses the retry mechanism and throws a `urllib3.exceptions.ReadTimeoutError`, which we surface as an appropriate `requests.exceptions.ReadTimeout`. When `MAX_RETRIES` is > 0, urllib3 raises a generic `MaxRetryError` which we'll present as a `requests.exceptions.ConnectionError`. The possible triggers for `MaxRetryError` are more than just timeouts so we need to raise something sensible to handle all potential cases.\r\n\r\nWe could potentially have a more detailed exception object presented by urllib3 in this case, and then perform some introspection to surface a more specific error. That introduces its own new set of inconsistencies though and would be a breaking change. Right now, I don't see us changing the behaviour around this.",
"Resolving since we haven't heard any further feedback."
] |
https://api.github.com/repos/psf/requests/issues/5380
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5380/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5380/comments
|
https://api.github.com/repos/psf/requests/issues/5380/events
|
https://github.com/psf/requests/pull/5380
| 577,869,739 |
MDExOlB1bGxSZXF1ZXN0Mzg1NTU0NTUy
| 5,380 |
Added a better way to assign default values to variables
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/13462247?v=4",
"events_url": "https://api.github.com/users/sukurcf/events{/privacy}",
"followers_url": "https://api.github.com/users/sukurcf/followers",
"following_url": "https://api.github.com/users/sukurcf/following{/other_user}",
"gists_url": "https://api.github.com/users/sukurcf/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sukurcf",
"id": 13462247,
"login": "sukurcf",
"node_id": "MDQ6VXNlcjEzNDYyMjQ3",
"organizations_url": "https://api.github.com/users/sukurcf/orgs",
"received_events_url": "https://api.github.com/users/sukurcf/received_events",
"repos_url": "https://api.github.com/users/sukurcf/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sukurcf/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sukurcf/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sukurcf",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2020-03-09T12:30:06Z
|
2021-08-29T00:07:00Z
|
2020-03-09T14:02:56Z
|
NONE
|
resolved
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5380/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5380/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5380.diff",
"html_url": "https://github.com/psf/requests/pull/5380",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5380.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5380"
}
| true |
[
"Hey @sukurcf,\r\n\r\nThanks for contributing! Unfortunately, the suggestion isn’t directly equivalent to the logic that’s currently in place. You’re now defaulting for any “false-y” value instead of explicitly None. This would be considered a breaking change, so we can’t accept it at this time."
] |
|
https://api.github.com/repos/psf/requests/issues/5379
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5379/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5379/comments
|
https://api.github.com/repos/psf/requests/issues/5379/events
|
https://github.com/psf/requests/pull/5379
| 577,863,198 |
MDExOlB1bGxSZXF1ZXN0Mzg1NTQ5MTkx
| 5,379 |
Added type hints in api.py file for better understanding.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/13462247?v=4",
"events_url": "https://api.github.com/users/sukurcf/events{/privacy}",
"followers_url": "https://api.github.com/users/sukurcf/followers",
"following_url": "https://api.github.com/users/sukurcf/following{/other_user}",
"gists_url": "https://api.github.com/users/sukurcf/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sukurcf",
"id": 13462247,
"login": "sukurcf",
"node_id": "MDQ6VXNlcjEzNDYyMjQ3",
"organizations_url": "https://api.github.com/users/sukurcf/orgs",
"received_events_url": "https://api.github.com/users/sukurcf/received_events",
"repos_url": "https://api.github.com/users/sukurcf/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sukurcf/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sukurcf/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sukurcf",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2020-03-09T12:17:26Z
|
2021-08-29T00:07:00Z
|
2020-03-09T12:22:59Z
|
NONE
|
resolved
|
I have gone through the code for request module and I think it makes it easy to understand in future if we add type hints to the code. And I just started it by adding hints in **api.py**. I'll be adding more if this is approved.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/13462247?v=4",
"events_url": "https://api.github.com/users/sukurcf/events{/privacy}",
"followers_url": "https://api.github.com/users/sukurcf/followers",
"following_url": "https://api.github.com/users/sukurcf/following{/other_user}",
"gists_url": "https://api.github.com/users/sukurcf/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sukurcf",
"id": 13462247,
"login": "sukurcf",
"node_id": "MDQ6VXNlcjEzNDYyMjQ3",
"organizations_url": "https://api.github.com/users/sukurcf/orgs",
"received_events_url": "https://api.github.com/users/sukurcf/received_events",
"repos_url": "https://api.github.com/users/sukurcf/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sukurcf/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sukurcf/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sukurcf",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5379/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5379/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5379.diff",
"html_url": "https://github.com/psf/requests/pull/5379",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5379.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5379"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/5378
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5378/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5378/comments
|
https://api.github.com/repos/psf/requests/issues/5378/events
|
https://github.com/psf/requests/issues/5378
| 577,105,122 |
MDU6SXNzdWU1NzcxMDUxMjI=
| 5,378 |
Hostname resolution slow
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/22171518?v=4",
"events_url": "https://api.github.com/users/LsHallo/events{/privacy}",
"followers_url": "https://api.github.com/users/LsHallo/followers",
"following_url": "https://api.github.com/users/LsHallo/following{/other_user}",
"gists_url": "https://api.github.com/users/LsHallo/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/LsHallo",
"id": 22171518,
"login": "LsHallo",
"node_id": "MDQ6VXNlcjIyMTcxNTE4",
"organizations_url": "https://api.github.com/users/LsHallo/orgs",
"received_events_url": "https://api.github.com/users/LsHallo/received_events",
"repos_url": "https://api.github.com/users/LsHallo/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/LsHallo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/LsHallo/subscriptions",
"type": "User",
"url": "https://api.github.com/users/LsHallo",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2020-03-06T18:35:53Z
|
2021-09-02T00:07:15Z
|
2020-03-11T00:18:02Z
|
NONE
|
resolved
|
When making a request to a hostname it is very slow. In my case I have multiple docker containers with different services that communicate using requests. Every container has it's own cherrypy server and is adressed like so: `requests.get('http://main:8083')` or `requests.get('http://controller:8082')`. The docker version is `Docker version 18.03.1-ce, build 9ee9f40` on Ubuntu 18.04 LTS. All containers are part of a compose stack and have a common network created by docker-compose.
I've written a small bench application since the problem also exists on my host machine running windows and trying to get a localhost page.
The request work just fine when using the ip address (127.0.0.1) in this case but that is not an option since the ip's of the containers might change.
Weirdly however I don't have the problem on the host machine of the docker daemon. If I run my bench program on there (Ubuntu 18.04 LTS) it works just fine with `localhost` and `127.0.0.1`.
bench.py
```python
import http.client
from math import floor
import urllib3
import requests
from time import time
import socket
def print_with_dashes(text: str, length: int = 50, symbol: str = '-'):
text_len = len(text)
part = length - text_len
if part % 2 == 1:
part = floor(part / 2)
print(symbol * part + text + symbol * part)
else:
part = floor(part / 2)
print(symbol * part + text + symbol * (part - 1))
print_with_dashes('urllib3')
urllib_3 = urllib3.PoolManager()
pre = time()
urllib_3.request('GET', 'http://localhost')
print('localhost:', time() - pre)
pre = time()
urllib_3.request('GET', 'http://127.0.0.1')
print('127.0.0.1:', time() - pre)
# ---------------------------------------------------
print_with_dashes('requests')
pre = time()
requests.get('http://localhost')
print('localhost:', time() - pre)
pre = time()
requests.get('http://127.0.0.1')
print('127.0.0.1:', time() - pre)
# ---------------------------------------------------
print_with_dashes('requests with session')
session = requests.session()
session.trust_env = False
session.proxies = {
'http': None
}
pre = time()
session.get('http://localhost')
print('localhost:', time() - pre)
pre = time()
session.get('http://127.0.0.1')
print('127.0.0.1:', time() - pre)
# ---------------------------------------------------
# testing if it might be caching
print_with_dashes('requests repeated x3')
pre = time()
for i in range(0, 3):
requests.get('http://localhost')
print('localhost:', time() - pre)
pre = time()
for i in range(0, 3):
requests.get('http://127.0.0.1')
print('127.0.0.1:', time() - pre)
# ---------------------------------------------------
print_with_dashes('http.client.HTTPConnection')
pre = time()
conn = http.client.HTTPConnection("localhost", 80)
conn.request("GET", "/")
print('localhost:', time() - pre)
pre = time()
conn = http.client.HTTPConnection("127.0.0.1", 80)
conn.request("GET", "/")
print('127.0.0.1:', time() - pre)
# ---------------------------------------------------
print()
print_with_dashes('Possible Solutions', symbol='#')
print_with_dashes('socket.gethostbyname')
pre = time()
address = socket.gethostbyname('localhost')
requests.get('http://' + address)
print('localhost:', time() - pre)
pre = time()
address = socket.gethostbyname('127.0.0.1')
requests.get('http://' + address)
print('127.0.0.1:', time() - pre)
```
server.py
```python
import cherrypy
class HelloWorld(object):
@cherrypy.expose
def index(self):
return "Hello World"
cherrypy.config.update({'server.socket_port': 80})
cherrypy.quickstart(HelloWorld())
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/22171518?v=4",
"events_url": "https://api.github.com/users/LsHallo/events{/privacy}",
"followers_url": "https://api.github.com/users/LsHallo/followers",
"following_url": "https://api.github.com/users/LsHallo/following{/other_user}",
"gists_url": "https://api.github.com/users/LsHallo/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/LsHallo",
"id": 22171518,
"login": "LsHallo",
"node_id": "MDQ6VXNlcjIyMTcxNTE4",
"organizations_url": "https://api.github.com/users/LsHallo/orgs",
"received_events_url": "https://api.github.com/users/LsHallo/received_events",
"repos_url": "https://api.github.com/users/LsHallo/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/LsHallo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/LsHallo/subscriptions",
"type": "User",
"url": "https://api.github.com/users/LsHallo",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5378/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5378/timeline
| null |
completed
| null | null | false |
[
"Closing this as it seems to be windows related and only appears at random times.\r\nTo any one having the same issues i would recommend resolving the hostname with socket.gethostbyname() (ipv4 only!) or socket.gethostbyaddr() (ipv4 and ipv6) this will resolve the ip in <0.01s and the request will be equally as fast using the ip address."
] |
https://api.github.com/repos/psf/requests/issues/5376
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5376/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5376/comments
|
https://api.github.com/repos/psf/requests/issues/5376/events
|
https://github.com/psf/requests/issues/5376
| 574,903,945 |
MDU6SXNzdWU1NzQ5MDM5NDU=
| 5,376 |
Response object's text and json provides different output for specific input pattern "~{~}"
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/29891327?v=4",
"events_url": "https://api.github.com/users/contactparthshah/events{/privacy}",
"followers_url": "https://api.github.com/users/contactparthshah/followers",
"following_url": "https://api.github.com/users/contactparthshah/following{/other_user}",
"gists_url": "https://api.github.com/users/contactparthshah/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/contactparthshah",
"id": 29891327,
"login": "contactparthshah",
"node_id": "MDQ6VXNlcjI5ODkxMzI3",
"organizations_url": "https://api.github.com/users/contactparthshah/orgs",
"received_events_url": "https://api.github.com/users/contactparthshah/received_events",
"repos_url": "https://api.github.com/users/contactparthshah/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/contactparthshah/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/contactparthshah/subscriptions",
"type": "User",
"url": "https://api.github.com/users/contactparthshah",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2020-03-03T19:54:56Z
|
2021-09-02T00:07:14Z
|
2020-03-12T04:39:39Z
|
NONE
|
resolved
|
## Reproduction Steps
STEP-1) Create Dummy HTTP Server:
```
#-----------------------------
from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer
class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(200)
self.end_headers()
self.wfile.write(b'{"a":"~{~}"}')
httpd = HTTPServer(('localhost', 8000), SimpleHTTPRequestHandler)
httpd.serve_forever()
#-----------------------------
```
STEP-2) By using requests library get the details and check obj.text and obj.json output is different.
```
Python 3.6.9
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> requests.__version__
'2.22.0'
>>> obj = requests.get('http://localhost:8000/')
>>> obj.text
'{"a":""}'
>>> obj.json()
{'a': '~{~}'}
>>>
```
## Expected Result
For text, it should be
```
'{"a":"~{~}"}'
```
## Actual Result
```
'{"a":""}'
```
What happened instead.
|
{
"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/5376/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5376/timeline
| null |
completed
| null | null | false |
[
"You have not included the `Content-Type` header in the response. \r\n\r\nRequests attempts to guess the character encoding using [chardet](https://github.com/chardet/chardet). Chardet detects `HZ-GB-2312` encoding when given your data. Which I guess is a [bug](https://github.com/chardet/chardet/issues/82) in `chardet`.\r\n\r\nAdd this header and `requests` will no longer try to guess: \r\n`Content-Type: application/json; charset=utf-8`",
"@ozzywalsh , Thank you for providing quick work around.",
"Yep, @ozzywalsh is on point. Since `text` relies on chardet, this will likely remain an edge case until they're able to resolve the detection issue. The workaround provided should be able to unblock anyone else who hits this though, assuming they know the content to be JSON.\r\n\r\nThanks everyone!",
"As an extra note, you can also set the `encoding` attribute on your response before calling `text` to force a specific encoding like JSON. That's what's happening when the Content-Type header is being passed."
] |
https://api.github.com/repos/psf/requests/issues/5375
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5375/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5375/comments
|
https://api.github.com/repos/psf/requests/issues/5375/events
|
https://github.com/psf/requests/pull/5375
| 574,269,484 |
MDExOlB1bGxSZXF1ZXN0MzgyNjI0ODUx
| 5,375 |
Added a warning when stripping authentication from requests on a redirect
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/7690337?v=4",
"events_url": "https://api.github.com/users/kmaork/events{/privacy}",
"followers_url": "https://api.github.com/users/kmaork/followers",
"following_url": "https://api.github.com/users/kmaork/following{/other_user}",
"gists_url": "https://api.github.com/users/kmaork/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kmaork",
"id": 7690337,
"login": "kmaork",
"node_id": "MDQ6VXNlcjc2OTAzMzc=",
"organizations_url": "https://api.github.com/users/kmaork/orgs",
"received_events_url": "https://api.github.com/users/kmaork/received_events",
"repos_url": "https://api.github.com/users/kmaork/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kmaork/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kmaork/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kmaork",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 8 |
2020-03-02T21:46:23Z
|
2022-03-17T02:21:46Z
|
2021-12-17T02:16:58Z
|
NONE
|
resolved
|
Hello!
After seeing this [question](https://stackoverflow.com/questions/60358216/python-requests-post-request-dropping-authorization-header), I thought a warning should be added when authentication is stripped from redirected requests, in order to save users a significant amount of debugging time.
Apparently the matter has already been discussed in [this issue](https://github.com/psf/requests/issues/2949), and it has been agreed upon that *some* message should be passed to the user, like a debug log or a warning. But requests still does not use logs, and it seems people are still confused by this.
Maybe it is time to add a warning?
|
{
"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/5375/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5375/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5375.diff",
"html_url": "https://github.com/psf/requests/pull/5375",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5375.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5375"
}
| true |
[
"Does the PR need another review?",
"Can we make progress with this? 🙂 @yanz-androidify ",
"Great PR, lost an hour today trying to understand why my service was broken after moved to OpenShift (it internally redirected requests). This warning could have helped me a lot.",
"This PR would come really handy @yanz-androidify @kmaork why does it still say that the merging is blocked? How can we get someone with write access to review and approve this PR? It's waiting since May. \r\nThe current state of requests makes it nearly unusable for me when the host is on some cloud provider's server which does automatic redirects on ingress.",
"I've lost a good 2 hours trying to find out what's wrong when I was playing around with PyGithub, which is using requests under the hood.\r\n\r\n@nateprewitt, could you please take a look and provide some feedback? It would be great if requests could be a bit more helpful in such scenarios.",
"Please add this. The current behavior is annoyingly implicit!",
"Hey @nateprewitt , @sigmavirus24 , @sethmlarson - this PR was approved ages ago by @yanz-androidify but seems to have been forgotten since. Any chance of it getting reviewed?",
"@kmaork I don't see an approval from that account nor are they a maintainer (nor does that account seem to exist any longer).\r\n\r\nAs it stands, yes this can be annoyingly secure and hidden from the user but this usage of warnings is inappropriate for the solution. It's not the right mechanism and it will result in more issues generated here than users helped."
] |
https://api.github.com/repos/psf/requests/issues/5374
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5374/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5374/comments
|
https://api.github.com/repos/psf/requests/issues/5374/events
|
https://github.com/psf/requests/issues/5374
| 573,996,813 |
MDU6SXNzdWU1NzM5OTY4MTM=
| 5,374 |
tfds.load() gives ConnectionResetError
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/45806135?v=4",
"events_url": "https://api.github.com/users/anas0001/events{/privacy}",
"followers_url": "https://api.github.com/users/anas0001/followers",
"following_url": "https://api.github.com/users/anas0001/following{/other_user}",
"gists_url": "https://api.github.com/users/anas0001/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/anas0001",
"id": 45806135,
"login": "anas0001",
"node_id": "MDQ6VXNlcjQ1ODA2MTM1",
"organizations_url": "https://api.github.com/users/anas0001/orgs",
"received_events_url": "https://api.github.com/users/anas0001/received_events",
"repos_url": "https://api.github.com/users/anas0001/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/anas0001/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/anas0001/subscriptions",
"type": "User",
"url": "https://api.github.com/users/anas0001",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2020-03-02T14:04:38Z
|
2021-09-02T00:07:15Z
|
2020-03-03T01:03:44Z
|
NONE
|
resolved
|
I am running tensorflow 2.0.0 (python 3.7.4) on a conda virtual environment on Mac. I am trying to get the IMDb dataset through the following code:
```
import tensorflow_datasets as tfds
tfds.load('imdb_reviews/subwords8k', split=(tfds.Split.TRAIN, tfds.Split.TEST), with_info = True, as_supervised = True)
```
to which I am getting the following error:
> ConnectionError: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))
I have asked github tensorflow support (here: https://github.com/tensorflow/tensorflow/issues/36561) and they have concluded that the issue is raised by getresponse() method and it's not a TF issue.
They showed a similar stackoverflow error which involved Requests library. It was solved by installing security packages. I have installed security packages for Requests, Tensorflow and Tensorflow-Datasets using these commands:
> conda install -c anaconda pyasn1 ndg-httpsclient pyopenssl
> conda install -c anaconda "requests[security]"
> conda install -c anaconda "tensorflow[security]"
> conda install -c anaconda "tensorflow-datasets[security]"
But the issue is persistent. The stacktrace is:
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen chunked=chunked,
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/site-packages/urllib3/connectionpool.py", line 421, in _make_request six.raise_from(e, None)
>
> File "", line 3, in raise_from
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/site-packages/urllib3/connectionpool.py", line 416, in _make_request httplib_response = conn.getresponse()
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/http/client.py", line 1344, in getresponse response.begin()
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/http/client.py", line 306, in begin version, status, reason = self._read_status()
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/http/client.py", line 267, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/socket.py", line 589, in readinto return self._sock.recv_into(b)
>
> ConnectionResetError: [Errno 54] Connection reset by peer
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/site-packages/requests/adapters.py", line 449, in send timeout=timeout
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/site-packages/urllib3/connectionpool.py", line 720, in urlopen method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/site-packages/urllib3/util/retry.py", line 400, in increment raise six.reraise(type(error), error, _stacktrace)
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/site-packages/urllib3/packages/six.py", line 734, in reraise raise value.with_traceback(tb)
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen chunked=chunked,
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/site-packages/urllib3/connectionpool.py", line 421, in _make_request six.raise_from(e, None)
>
> File "", line 3, in raise_from
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/site-packages/urllib3/connectionpool.py", line 416, in _make_request httplib_response = conn.getresponse()
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/http/client.py", line 1344, in getresponse response.begin()
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/http/client.py", line 306, in begin version, status, reason = self._read_status()
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/http/client.py", line 267, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/socket.py", line 589, in readinto return self._sock.recv_into(b)
>
> ProtocolError: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>
> File "/Users/User/nlp1.py", line 13, in (train_data, test_data), info = tfds.load('imdb_reviews/subwords8k', split=(tfds.Split.TRAIN, tfds.Split.TEST), with_info = True, as_supervised = True)
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/site-packages/tensorflow_datasets/core/api_utils.py", line 52, in disallow_positional_args_dec return fn(*args, **kwargs)
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/site-packages/tensorflow_datasets/core/registered.py", line 300, in load dbuilder.download_and_prepare(**download_and_prepare_kwargs)
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/site-packages/tensorflow_datasets/core/api_utils.py", line 52, in disallow_positional_args_dec return fn(*args, **kwargs)
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/site-packages/tensorflow_datasets/core/dataset_builder.py", line 287, in download_and_prepare download_config=download_config)
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/site-packages/tensorflow_datasets/core/dataset_builder.py", line 948, in _download_and_prepare max_examples_per_split=download_config.max_examples_per_split,
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/site-packages/tensorflow_datasets/core/dataset_builder.py", line 804, in _download_and_prepare for split_generator in self._split_generators(dl_manager):
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/site-packages/tensorflow_datasets/text/imdb.py", line 129, in _split_generators arch_path = dl_manager.download(_DOWNLOAD_URL)
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/site-packages/tensorflow_datasets/core/download/download_manager.py", line 301, in download return _map_promise(self._download, url_or_urls)
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/site-packages/tensorflow_datasets/core/download/download_manager.py", line 395, in _map_promise res = utils.map_nested(_wait_on_promise, all_promises)
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/site-packages/tensorflow_datasets/core/utils/py_utils.py", line 143, in map_nested return function(data_struct)
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/site-packages/tensorflow_datasets/core/download/download_manager.py", line 379, in _wait_on_promise return p.get()
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/site-packages/promise/promise.py", line 510, in get return self._target_settled_value(_raise=True)
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/site-packages/promise/promise.py", line 514, in _target_settled_value return self._target()._settled_value(_raise)
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/site-packages/promise/promise.py", line 224, in _settled_value reraise(type(raise_val), raise_val, self._traceback)
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/site-packages/six.py", line 703, in reraise raise value
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/site-packages/promise/promise.py", line 842, in handle_future_result resolve(future.result())
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/concurrent/futures/_base.py", line 428, in result return self.__get_result()
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result raise self._exception
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs)
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/site-packages/tensorflow_datasets/core/download/downloader.py", line 231, in _sync_download response = session.get(url, stream=True)
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/site-packages/requests/sessions.py", line 546, in get return self.request('GET', url, **kwargs)
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/site-packages/requests/sessions.py", line 533, in request resp = self.send(prep, **send_kwargs)
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/site-packages/requests/sessions.py", line 646, in send r = adapter.send(request, **kwargs)
>
> File "/Users/User/anaconda3/envs/tf/lib/python3.7/site-packages/requests/adapters.py", line 498, in send raise ConnectionError(err, request=request)
>
> ConnectionError: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))
I am unable to find any support with this issue anywhere.
|
{
"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/5374/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5374/timeline
| null |
completed
| null | null | false |
[
"Hi @anas0001,\r\n\r\nThe exception you’re receiving is due to the remote server you’re connecting to resetting the connection. Requests has no control over that and there isn’t enough info here to determine what’s happening.\r\n\r\nThat said, this isn’t a defect in Requests which is the purpose for this issue tracker. I’d recommend creating an issue on StackOverflow if you haven’t already and perhaps trying your script on another network to see if it persists.",
"thank you"
] |
https://api.github.com/repos/psf/requests/issues/5373
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5373/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5373/comments
|
https://api.github.com/repos/psf/requests/issues/5373/events
|
https://github.com/psf/requests/pull/5373
| 573,634,887 |
MDExOlB1bGxSZXF1ZXN0MzgyMTA5OTU5
| 5,373 |
Update structures.py
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/28630627?v=4",
"events_url": "https://api.github.com/users/AkDavies/events{/privacy}",
"followers_url": "https://api.github.com/users/AkDavies/followers",
"following_url": "https://api.github.com/users/AkDavies/following{/other_user}",
"gists_url": "https://api.github.com/users/AkDavies/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/AkDavies",
"id": 28630627,
"login": "AkDavies",
"node_id": "MDQ6VXNlcjI4NjMwNjI3",
"organizations_url": "https://api.github.com/users/AkDavies/orgs",
"received_events_url": "https://api.github.com/users/AkDavies/received_events",
"repos_url": "https://api.github.com/users/AkDavies/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/AkDavies/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/AkDavies/subscriptions",
"type": "User",
"url": "https://api.github.com/users/AkDavies",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2020-03-01T23:02:36Z
|
2021-08-29T00:07:01Z
|
2020-03-03T00:58:12Z
|
NONE
|
resolved
|
Changed lower_items() to use iterable unpacking to clarify the intent of the function. Changed copy() and __eq__() to retrieve the class via inspection using type() -- this way behavior will be preserved in classes that inherit from CaseInsensitiveDict.
|
{
"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/5373/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5373/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5373.diff",
"html_url": "https://github.com/psf/requests/pull/5373",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5373.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5373"
}
| true |
[
"> this way behavior will be preserved in classes that inherit from CaseInsensitiveDict.\r\n\r\nI don't believe this is meant to be reused in consumers of the library and using `type(self)` makes this less understandable than it was previously",
"I agree with Sigmavirus24, this makes the code a bit harder to read. The structures are implementation details of Requests and aren’t really intended for extension beyond the library. I think we’ll pass on this but thanks for the contribution!"
] |
https://api.github.com/repos/psf/requests/issues/5372
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5372/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5372/comments
|
https://api.github.com/repos/psf/requests/issues/5372/events
|
https://github.com/psf/requests/issues/5372
| 572,873,384 |
MDU6SXNzdWU1NzI4NzMzODQ=
| 5,372 |
close() does not work instantly on streaming requests
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/46822538?v=4",
"events_url": "https://api.github.com/users/NovaNekmit/events{/privacy}",
"followers_url": "https://api.github.com/users/NovaNekmit/followers",
"following_url": "https://api.github.com/users/NovaNekmit/following{/other_user}",
"gists_url": "https://api.github.com/users/NovaNekmit/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/NovaNekmit",
"id": 46822538,
"login": "NovaNekmit",
"node_id": "MDQ6VXNlcjQ2ODIyNTM4",
"organizations_url": "https://api.github.com/users/NovaNekmit/orgs",
"received_events_url": "https://api.github.com/users/NovaNekmit/received_events",
"repos_url": "https://api.github.com/users/NovaNekmit/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/NovaNekmit/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/NovaNekmit/subscriptions",
"type": "User",
"url": "https://api.github.com/users/NovaNekmit",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2020-02-28T16:53:23Z
|
2021-09-01T00:11:31Z
|
2020-04-03T19:06:29Z
|
NONE
|
resolved
|
I am writing a multi-threaded application, where one thread is using `iter_lines` to get data line-by-line from a streaming API with low latency but no consistent frequency.
I needed a way to gracefully stop that thread, so I tried calling `close()` on the request object from the main thread. I then found out close does not close the connection
## Expected Result
`iter_lines` should stop close to instantly once the underlaying response was closed.
## Actual Result
`iter_lines` keeps blocking until the next data arrives from the server.
`close()` is also blocking until then.
```
...84.5876732 started 0x7f314ad61e90
...84.5878367 Got line: 'start'
...86.5874267 closing 0x7f314ad61e90
...89.59543 Got line: 'e'
...89.5955482 exit
...89.5958514 done
```
## Reproduction Steps
```python
#! /usr/bin/env python3
import requests
import threading
import time
def print_t(*args):
print(time.time(), *args)
print_t("starting server")
# example streaming api using flask and a generator
def run_server():
from flask import Flask, Response
app = Flask("TestServer")
@app.route("/get_lines")
def get_lines():
def generator():
yield "start\n"
time.sleep(5)
yield "end\n"
return Response(generator(), mimetype="text/plain", )
app.run("127.0.0.1", 5555)
threading.Thread(target=run_server, name="ServerThread", daemon=True).start()
time.sleep(1)
print_t("Server started")
class worker:
def get_lines(self):
self.r = requests.get("http://127.0.0.1:5555/get_lines", stream=True)
print_t("started", hex(id(self.r)))
for line in self.r.iter_lines(chunk_size=1, decode_unicode=True):
print_t(f"Got line: '{line}'")
print_t("exit")
def stop(self):
print_t("closing", hex(id(self.r)))
self.r.close()
print_t("done")
w = worker()
threading.Thread(target=w.get_lines, name="getter_thread").start()
time.sleep(2)
w.stop()
```
## System Information
```
python3 -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.7.5"
},
"platform": {
"release": "5.3.0-40-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.21.0"
},
"system_ssl": {
"version": "1010103f"
},
"urllib3": {
"version": "1.24.1"
},
"using_pyopenssl": false
}
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5372/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5372/timeline
| null |
completed
| null | null | false |
[
"It's not documented to behave the way you thought it _might_. It's not a bug because it's documented that the socket has to be exhausted (all data has to have been read from the socket) before calling `close()` last time I checked",
"Ok didn't see that in the docs and misinterpreted the `unless you consume all the data or call Response.close.` then.\r\n\r\nI'll guess the only way to do what i want would be reading the data manually then, since `iter_content` has the same problem.\r\n\r\nAnd \"Ability to close streaming connections early\" would be feature request then.",
"I'm not a maintainer but it's not something supported by urllib3 iirc so the feature-request belongs there as we rely 99% on them to support something like this",
"@NovaNekmit, sigmavirus24 is right that this would need to be supported at a lower level than Requests. urllib3 doesn't currently have support for this and until they move off of Python's standard http implementation, I don't know how feasible this would be.\r\n\r\nI'd recommend following up there to track the feature request. Thanks!"
] |
https://api.github.com/repos/psf/requests/issues/5371
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5371/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5371/comments
|
https://api.github.com/repos/psf/requests/issues/5371/events
|
https://github.com/psf/requests/issues/5371
| 572,641,263 |
MDU6SXNzdWU1NzI2NDEyNjM=
| 5,371 |
Trying to access the latest en documentation from doc.python-requests.org domain causes a faulty redirect and a HTTP404
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5284980?v=4",
"events_url": "https://api.github.com/users/1a8e/events{/privacy}",
"followers_url": "https://api.github.com/users/1a8e/followers",
"following_url": "https://api.github.com/users/1a8e/following{/other_user}",
"gists_url": "https://api.github.com/users/1a8e/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/1a8e",
"id": 5284980,
"login": "1a8e",
"node_id": "MDQ6VXNlcjUyODQ5ODA=",
"organizations_url": "https://api.github.com/users/1a8e/orgs",
"received_events_url": "https://api.github.com/users/1a8e/received_events",
"repos_url": "https://api.github.com/users/1a8e/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/1a8e/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/1a8e/subscriptions",
"type": "User",
"url": "https://api.github.com/users/1a8e",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 9 |
2020-02-28T09:46:04Z
|
2021-11-05T03:00:27Z
|
2021-08-07T02:45:00Z
|
NONE
|
resolved
|
When using the url `http://docs.python-requests.org/en/latest/`, it redirects to `https://2.python-requests.org//en/latest/` (notice the extra / before `en`). This causes a HTTP 404.
## Expected Result
The redirect should be to `https://2.python-requests.org/en/latest/`
## Actual Result
HTTP 404
## Reproduction Steps
Try to visit the latest en documentation for requests using the link `http://docs.python-requests.org/en/latest/`, for example from [certifi](https://github.com/certifi/python-certifi)
## System Information
Not applicable
|
{
"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/5371/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5371/timeline
| null |
completed
| null | null | false |
[
"I wanted to contribute a fix for it, and was trying to find in the source code where this is defined but I couldn't find it.\r\nBut after looking at https://docs.readthedocs.io/en/stable/user-defined-redirects.html, seems like the redirects are defined somewhere else outside the source code. (It starts with `Log into your readthedocs.org account.`)\r\n\r\nIn that case, this might not be a good first issue for someone to look at, as it is listed in https://github.com/psf/requests/contribute",
"@nateprewitt do you by chance have access to the project on read the docs? If so could you share access to my user? (same username: `ewdurbin`)",
"@ewdurbin, I don’t have access to any of the doc infrastructure actually. We’d need @kennethreitz to get us added.",
"@nateprewitt do you have a RTD username I can add to the project?",
"It should be the same `nateprewitt`. Thanks!",
"Hi @ewdurbin , @nateprewitt \r\n\r\nThanks for responding. If I understand correctly, the RTD username will help solve this issue as it will grant access to readthedocs?",
"Hi @deveshks, apologies for the back and forth. Yes, I think we're getting RTD setup so we have proper access and then can hopefully address the underlying issue.",
"Any update on this?",
"Docs have been rendering correctly for a while now, but it looks like this never got closed."
] |
https://api.github.com/repos/psf/requests/issues/5370
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5370/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5370/comments
|
https://api.github.com/repos/psf/requests/issues/5370/events
|
https://github.com/psf/requests/pull/5370
| 572,492,896 |
MDExOlB1bGxSZXF1ZXN0MzgxMTgwMDg4
| 5,370 |
Also update GitHub's Security Disclosure document
|
{
"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"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2020-02-28T03:15:32Z
|
2021-08-29T00:07:02Z
|
2020-02-28T03:33:10Z
|
MEMBER
|
resolved
|
Forgot to update this document with new disclosure info.
|
{
"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/5370/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5370/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5370.diff",
"html_url": "https://github.com/psf/requests/pull/5370",
"merged_at": "2020-02-28T03:33:10Z",
"patch_url": "https://github.com/psf/requests/pull/5370.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5370"
}
| true |
[
"Don't think there is a nice way except maybe pointing to one from the other? Maybe the documentation link can point to the GitHub disclosure workflow?"
] |
https://api.github.com/repos/psf/requests/issues/5369
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5369/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5369/comments
|
https://api.github.com/repos/psf/requests/issues/5369/events
|
https://github.com/psf/requests/pull/5369
| 571,820,017 |
MDExOlB1bGxSZXF1ZXN0MzgwNjM2MjI2
| 5,369 |
Updating disclosure contact info
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2020-02-27T04:51:32Z
|
2021-08-29T00:07:02Z
|
2020-02-27T18:05:07Z
|
MEMBER
|
resolved
|
Updating disclosure info so things reach the correct parties.
@sethmlarson: PRing for you to proof I have all of your contact info correct.
|
{
"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/5369/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5369/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5369.diff",
"html_url": "https://github.com/psf/requests/pull/5369",
"merged_at": "2020-02-27T18:05:07Z",
"patch_url": "https://github.com/psf/requests/pull/5369.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5369"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/5368
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5368/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5368/comments
|
https://api.github.com/repos/psf/requests/issues/5368/events
|
https://github.com/psf/requests/issues/5368
| 570,875,067 |
MDU6SXNzdWU1NzA4NzUwNjc=
| 5,368 |
Passing in public/private key as ASCII encoded strings.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/15831661?v=4",
"events_url": "https://api.github.com/users/tshrmthw/events{/privacy}",
"followers_url": "https://api.github.com/users/tshrmthw/followers",
"following_url": "https://api.github.com/users/tshrmthw/following{/other_user}",
"gists_url": "https://api.github.com/users/tshrmthw/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tshrmthw",
"id": 15831661,
"login": "tshrmthw",
"node_id": "MDQ6VXNlcjE1ODMxNjYx",
"organizations_url": "https://api.github.com/users/tshrmthw/orgs",
"received_events_url": "https://api.github.com/users/tshrmthw/received_events",
"repos_url": "https://api.github.com/users/tshrmthw/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tshrmthw/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tshrmthw/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tshrmthw",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2020-02-25T22:22:59Z
|
2021-09-02T00:07:16Z
|
2020-03-01T21:05:39Z
|
NONE
|
resolved
|
I have the ASCII encoded public and private key that I want to pass along with the request. However I believe the library only takes in the cert argument as a file path or tuple of file paths. Is there a way around this?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/15831661?v=4",
"events_url": "https://api.github.com/users/tshrmthw/events{/privacy}",
"followers_url": "https://api.github.com/users/tshrmthw/followers",
"following_url": "https://api.github.com/users/tshrmthw/following{/other_user}",
"gists_url": "https://api.github.com/users/tshrmthw/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tshrmthw",
"id": 15831661,
"login": "tshrmthw",
"node_id": "MDQ6VXNlcjE1ODMxNjYx",
"organizations_url": "https://api.github.com/users/tshrmthw/orgs",
"received_events_url": "https://api.github.com/users/tshrmthw/received_events",
"repos_url": "https://api.github.com/users/tshrmthw/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tshrmthw/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tshrmthw/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tshrmthw",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5368/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5368/timeline
| null |
completed
| null | null | false |
[
"You may want to read this, especially a part about the private keys - https://howhttps.works/",
"@c2d628ba98 Thanks for responding with the link above! It was a good read but I don't think it was what I was looking for. I think what you were trying to convey is why and how certification works and the reason you don't just pass it around as a byte-string.\r\n\r\nI do believe it also led up to restarting this https://bugs.python.org/issue16487 . This was basically what I was looking for, however I guess it is still an unresolved issue.\r\n\r\nAfter some more researching on this topic I decided to go with a temp_file approach and using the temp_file path within a context so that it is unlinked after the request is made.\r\n\r\nThanks again! I am closing this for now."
] |
https://api.github.com/repos/psf/requests/issues/5367
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5367/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5367/comments
|
https://api.github.com/repos/psf/requests/issues/5367/events
|
https://github.com/psf/requests/issues/5367
| 570,448,899 |
MDU6SXNzdWU1NzA0NDg4OTk=
| 5,367 |
Getting http://.example.com raises UnicodeError
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/61315678?v=4",
"events_url": "https://api.github.com/users/o-felixz/events{/privacy}",
"followers_url": "https://api.github.com/users/o-felixz/followers",
"following_url": "https://api.github.com/users/o-felixz/following{/other_user}",
"gists_url": "https://api.github.com/users/o-felixz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/o-felixz",
"id": 61315678,
"login": "o-felixz",
"node_id": "MDQ6VXNlcjYxMzE1Njc4",
"organizations_url": "https://api.github.com/users/o-felixz/orgs",
"received_events_url": "https://api.github.com/users/o-felixz/received_events",
"repos_url": "https://api.github.com/users/o-felixz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/o-felixz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/o-felixz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/o-felixz",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2020-02-25T10:00:19Z
|
2022-03-29T02:29:06Z
|
2021-12-29T01:39:36Z
|
NONE
|
resolved
|
Attempting to get e.g. `http://.example.com` results in a `UnicodeError`. It seems like the intention so far has been to raise `InvalidUrl` instead (see e.g. [this line](https://github.com/psf/requests/blob/ca6f9af5dba09591007b15a7368bc0f006b7cc50/requests/models.py#L401)).
I see there was some hesitation in fixing a similar issue (#4168) and would like to add that even catching the error just to rethrow as a requests exception would be beneficial.
## Expected Result
Based on PR #774: `InvalidUrl: URL has an invalid label.`
## Actual Result
`UnicodeError: encoding with 'idna' codec failed (UnicodeError: label empty or too long)`
## Reproduction Steps
```python3
import requests
requests.get("http://.example.com")
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.8"
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.8.0"
},
"platform": {
"release": "5.3.0-40-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010104f",
"version": "19.1.0"
},
"requests": {
"version": "2.23.0"
},
"system_ssl": {
"version": "1010103f"
},
"urllib3": {
"version": "1.25.8"
},
"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/5367/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5367/timeline
| null |
completed
| null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/5366
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5366/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5366/comments
|
https://api.github.com/repos/psf/requests/issues/5366/events
|
https://github.com/psf/requests/issues/5366
| 570,445,785 |
MDU6SXNzdWU1NzA0NDU3ODU=
| 5,366 |
License hiccup?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/743912?v=4",
"events_url": "https://api.github.com/users/HWiese1980/events{/privacy}",
"followers_url": "https://api.github.com/users/HWiese1980/followers",
"following_url": "https://api.github.com/users/HWiese1980/following{/other_user}",
"gists_url": "https://api.github.com/users/HWiese1980/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/HWiese1980",
"id": 743912,
"login": "HWiese1980",
"node_id": "MDQ6VXNlcjc0MzkxMg==",
"organizations_url": "https://api.github.com/users/HWiese1980/orgs",
"received_events_url": "https://api.github.com/users/HWiese1980/received_events",
"repos_url": "https://api.github.com/users/HWiese1980/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/HWiese1980/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/HWiese1980/subscriptions",
"type": "User",
"url": "https://api.github.com/users/HWiese1980",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2020-02-25T09:55:27Z
|
2021-04-26T00:55:22Z
|
2020-02-25T11:22:02Z
|
NONE
| null |
You have a dependency `chardet` in your tree that is licensed under LGPLv2.1. Does this not mean that you have to adopt that license as well? Correct me if I'm wrong. **I'm not a lawyer**
## Expected Result
License should be LGPLv2.1 because `chardet-3.0.4` is under LGPLv2.1.
## Actual Result
License is Apache...
## Reproduction Steps
See license of `chardet-3.0.4` dependency.
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.8"
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.7.5"
},
"platform": {
"release": "19.3.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "1010104f",
"version": "19.1.0"
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1010104f"
},
"urllib3": {
"version": "1.25.7"
},
"using_pyopenssl": true
}
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/743912?v=4",
"events_url": "https://api.github.com/users/HWiese1980/events{/privacy}",
"followers_url": "https://api.github.com/users/HWiese1980/followers",
"following_url": "https://api.github.com/users/HWiese1980/following{/other_user}",
"gists_url": "https://api.github.com/users/HWiese1980/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/HWiese1980",
"id": 743912,
"login": "HWiese1980",
"node_id": "MDQ6VXNlcjc0MzkxMg==",
"organizations_url": "https://api.github.com/users/HWiese1980/orgs",
"received_events_url": "https://api.github.com/users/HWiese1980/received_events",
"repos_url": "https://api.github.com/users/HWiese1980/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/HWiese1980/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/HWiese1980/subscriptions",
"type": "User",
"url": "https://api.github.com/users/HWiese1980",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5366/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5366/timeline
| null |
completed
| null | null | false |
[
"A solution (and my personally preferred one too) would be to ditch `chardet` and use another lib for encoding detection that does not enforce LGPL... just sayin...",
"My bad. It's LGPL without Copyleft, not GPL. Consider this issue solved. ",
"LGPLv2.1 is also not compatible with the Apache license see [1] \r\n\r\n1. https://www.apache.org/legal/resolved.html#category-x",
"Requests doesn't modify or distribute chardet therefore doesn't trigger the clause in LGPL. Python isn't the same as C or compiled languages. "
] |
https://api.github.com/repos/psf/requests/issues/5365
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5365/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5365/comments
|
https://api.github.com/repos/psf/requests/issues/5365/events
|
https://github.com/psf/requests/issues/5365
| 570,012,387 |
MDU6SXNzdWU1NzAwMTIzODc=
| 5,365 |
Request: Limit SSL monkey patching for SNI support
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/8205967?v=4",
"events_url": "https://api.github.com/users/JustinMaxwell/events{/privacy}",
"followers_url": "https://api.github.com/users/JustinMaxwell/followers",
"following_url": "https://api.github.com/users/JustinMaxwell/following{/other_user}",
"gists_url": "https://api.github.com/users/JustinMaxwell/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JustinMaxwell",
"id": 8205967,
"login": "JustinMaxwell",
"node_id": "MDQ6VXNlcjgyMDU5Njc=",
"organizations_url": "https://api.github.com/users/JustinMaxwell/orgs",
"received_events_url": "https://api.github.com/users/JustinMaxwell/received_events",
"repos_url": "https://api.github.com/users/JustinMaxwell/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JustinMaxwell/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JustinMaxwell/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JustinMaxwell",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2020-02-24T17:39:10Z
|
2021-08-31T00:06:55Z
|
2020-04-30T16:14:22Z
|
NONE
|
resolved
|
I'm requesting we reconsider the unconditional use of "urllib3.contrib.pyopenssl.inject_into_urllib3()".
Added 7 years ago, the goal was to "add SNI support for Python 2" #749
"urllib3.contrib.pyopenssl.inject_into_urllib3()" is described to "Monkey-patch urllib3 with PyOpenSSL-backed SSL-support.": (https://github.com/urllib3/urllib3/blob/master/src/urllib3/contrib/pyopenssl.py)
Request justification:
1: Security/stability: Monkey patching to swap out standard library use for a 3rd party library should arguably be more surgical, especially for ssl. If the patch is for support in Python2, then at least check for a major version. Or even better, check if SNI support is already present ssl.HAS_SNI.
2: Unnecessary: As of Dec. 10, 2014, the entirety of Python 3.4's ssl module has been backported for Python 2.7.9. See PEP 466 for justification. https://www.python.org/downloads/release/python-279/. This enables SNI support in the standard library for > v2.7.9
3: Inflexible: As implemented, there is no way to disable this behavior. The only option to prevent requests use of pyopenssl context is to uninstall pyopenssl for my entire python environment.
Summary.
@WhyNotHugo
|
{
"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/5365/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5365/timeline
| null |
completed
| null | null | false |
[
"Resolving as duplicate of #5267. We have a PR up now with the goal of only loading this as necessary going forward.",
" \r\nDon't use pyOpenSSL unless no SNI is detected #5443"
] |
https://api.github.com/repos/psf/requests/issues/5364
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5364/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5364/comments
|
https://api.github.com/repos/psf/requests/issues/5364/events
|
https://github.com/psf/requests/pull/5364
| 570,011,885 |
MDExOlB1bGxSZXF1ZXN0Mzc5MTE3Mzc2
| 5,364 |
Bump bleach from 3.1.0 to 3.1.1
|
{
"avatar_url": "https://avatars.githubusercontent.com/in/29110?v=4",
"events_url": "https://api.github.com/users/dependabot%5Bbot%5D/events{/privacy}",
"followers_url": "https://api.github.com/users/dependabot%5Bbot%5D/followers",
"following_url": "https://api.github.com/users/dependabot%5Bbot%5D/following{/other_user}",
"gists_url": "https://api.github.com/users/dependabot%5Bbot%5D/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/apps/dependabot",
"id": 49699333,
"login": "dependabot[bot]",
"node_id": "MDM6Qm90NDk2OTkzMzM=",
"organizations_url": "https://api.github.com/users/dependabot%5Bbot%5D/orgs",
"received_events_url": "https://api.github.com/users/dependabot%5Bbot%5D/received_events",
"repos_url": "https://api.github.com/users/dependabot%5Bbot%5D/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dependabot%5Bbot%5D/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dependabot%5Bbot%5D/subscriptions",
"type": "Bot",
"url": "https://api.github.com/users/dependabot%5Bbot%5D",
"user_view_type": "public"
}
|
[
{
"color": "0366d6",
"default": false,
"description": "Pull requests that update a dependency file",
"id": 1868210094,
"name": "dependencies",
"node_id": "MDU6TGFiZWwxODY4MjEwMDk0",
"url": "https://api.github.com/repos/psf/requests/labels/dependencies"
}
] |
closed
| true | null |
[] | null | 1 |
2020-02-24T17:38:10Z
|
2021-08-29T00:07:02Z
|
2020-02-27T04:24:39Z
|
CONTRIBUTOR
|
resolved
|
Bumps [bleach](https://github.com/mozilla/bleach) from 3.1.0 to 3.1.1.
<details>
<summary>Changelog</summary>
*Sourced from [bleach's changelog](https://github.com/mozilla/bleach/blob/master/CHANGES).*
> Version 3.1.1 (February 13th, 2020)
> -----------------------------------
>
> **Security fixes**
>
> * ``bleach.clean`` behavior parsing ``noscript`` tags did not match
> browser behavior.
>
> Calls to ``bleach.clean`` allowing ``noscript`` and one or more of
> the raw text tags (``title``, ``textarea``, ``script``, ``style``,
> ``noembed``, ``noframes``, ``iframe``, and ``xmp``) were vulnerable
> to a mutation XSS.
>
> This security issue was confirmed in Bleach versions v2.1.4, v3.0.2,
> and v3.1.0. Earlier versions are probably affected too.
>
> Anyone using Bleach <=v3.1.0 is highly encouraged to upgrade.
>
> https://bugzilla.mozilla.org/show_bug.cgi?id=1615315
>
> **Backwards incompatible changes**
>
> None
>
> **Features**
>
> None
>
> **Bug fixes**
>
> None
>
> Bleach changes
> ==============
</details>
<details>
<summary>Commits</summary>
- [`0d88dd8`](https://github.com/mozilla/bleach/commit/0d88dd83e425c4ba381d5b83fe61bfae5bbbd627) Update for v3.1.1 release
- [`996cde7`](https://github.com/mozilla/bleach/commit/996cde7a2439a2323f9c4b2567c8b8449d393351) fix bug 1615315
- See full diff in [compare view](https://github.com/mozilla/bleach/compare/v3.1.0...v3.1.1)
</details>
<br />
[](https://help.github.com/articles/configuring-automated-security-fixes)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/psf/requests/network/alerts).
</details>
|
{
"avatar_url": "https://avatars.githubusercontent.com/in/29110?v=4",
"events_url": "https://api.github.com/users/dependabot%5Bbot%5D/events{/privacy}",
"followers_url": "https://api.github.com/users/dependabot%5Bbot%5D/followers",
"following_url": "https://api.github.com/users/dependabot%5Bbot%5D/following{/other_user}",
"gists_url": "https://api.github.com/users/dependabot%5Bbot%5D/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/apps/dependabot",
"id": 49699333,
"login": "dependabot[bot]",
"node_id": "MDM6Qm90NDk2OTkzMzM=",
"organizations_url": "https://api.github.com/users/dependabot%5Bbot%5D/orgs",
"received_events_url": "https://api.github.com/users/dependabot%5Bbot%5D/received_events",
"repos_url": "https://api.github.com/users/dependabot%5Bbot%5D/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dependabot%5Bbot%5D/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dependabot%5Bbot%5D/subscriptions",
"type": "Bot",
"url": "https://api.github.com/users/dependabot%5Bbot%5D",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5364/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5364/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5364.diff",
"html_url": "https://github.com/psf/requests/pull/5364",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5364.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5364"
}
| true |
[
"Looks like bleach is up-to-date now, so this is no longer needed."
] |
https://api.github.com/repos/psf/requests/issues/5363
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5363/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5363/comments
|
https://api.github.com/repos/psf/requests/issues/5363/events
|
https://github.com/psf/requests/issues/5363
| 569,080,068 |
MDU6SXNzdWU1NjkwODAwNjg=
| 5,363 |
The connection using socks5 failed, it was weird.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/48444178?v=4",
"events_url": "https://api.github.com/users/re1oaded/events{/privacy}",
"followers_url": "https://api.github.com/users/re1oaded/followers",
"following_url": "https://api.github.com/users/re1oaded/following{/other_user}",
"gists_url": "https://api.github.com/users/re1oaded/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/re1oaded",
"id": 48444178,
"login": "re1oaded",
"node_id": "MDQ6VXNlcjQ4NDQ0MTc4",
"organizations_url": "https://api.github.com/users/re1oaded/orgs",
"received_events_url": "https://api.github.com/users/re1oaded/received_events",
"repos_url": "https://api.github.com/users/re1oaded/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/re1oaded/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/re1oaded/subscriptions",
"type": "User",
"url": "https://api.github.com/users/re1oaded",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2020-02-21T17:14:38Z
|
2021-08-31T00:06:40Z
|
2020-07-12T16:22:30Z
|
NONE
|
resolved
|
```python
import requests
r = requests.get('https://www.google.com/', proxies={
'http': 'SOCKS5://127.0.0.1:1234',
'https': 'SOCKS5://127.0.0.1:1234'
}, timeout=5)
print(r.text)
```
A month ago, it worked!
Just these days, I re-run it and it went wrong, I don't understand where the error happened, and it is the same on other computers, I made no changes, Including python version, package version, any changes.
exception:
```
Traceback (most recent call last):
File "/Users/jack/Documents/code/py-test/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen
chunked=chunked,
File "/Users/jack/Documents/code/py-test/lib/python3.7/site-packages/urllib3/connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "/Users/jack/Documents/code/py-test/lib/python3.7/site-packages/urllib3/connectionpool.py", line 994, in _validate_conn
conn.connect()
File "/Users/jack/Documents/code/py-test/lib/python3.7/site-packages/urllib3/connection.py", line 394, in connect
ssl_context=context,
File "/Users/jack/Documents/code/py-test/lib/python3.7/site-packages/urllib3/util/ssl_.py", line 370, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 423, in wrap_socket
session=session
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 870, in _create
self.do_handshake()
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 1139, in do_handshake
self._sslobj.do_handshake()
OSError: [Errno 0] Error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/jack/Documents/code/py-test/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/Users/jack/Documents/code/py-test/lib/python3.7/site-packages/urllib3/connectionpool.py", line 720, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/Users/jack/Documents/code/py-test/lib/python3.7/site-packages/urllib3/util/retry.py", line 400, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/Users/jack/Documents/code/py-test/lib/python3.7/site-packages/urllib3/packages/six.py", line 734, in reraise
raise value.with_traceback(tb)
File "/Users/jack/Documents/code/py-test/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen
chunked=chunked,
File "/Users/jack/Documents/code/py-test/lib/python3.7/site-packages/urllib3/connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "/Users/jack/Documents/code/py-test/lib/python3.7/site-packages/urllib3/connectionpool.py", line 994, in _validate_conn
conn.connect()
File "/Users/jack/Documents/code/py-test/lib/python3.7/site-packages/urllib3/connection.py", line 394, in connect
ssl_context=context,
File "/Users/jack/Documents/code/py-test/lib/python3.7/site-packages/urllib3/util/ssl_.py", line 370, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 423, in wrap_socket
session=session
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 870, in _create
self.do_handshake()
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 1139, in do_handshake
self._sslobj.do_handshake()
urllib3.exceptions.ProtocolError: ('Connection aborted.', OSError(0, 'Error'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "test.py", line 45, in <module>
}, timeout=5)
File "/Users/jack/Documents/code/py-test/lib/python3.7/site-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/Users/jack/Documents/code/py-test/lib/python3.7/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/Users/jack/Documents/code/py-test/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/Users/jack/Documents/code/py-test/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/Users/jack/Documents/code/py-test/lib/python3.7/site-packages/requests/adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', OSError(0, 'Error'))
```
I tried to solve it, but I don't know where to start.
I see that #5314 is similar to me, I tried to modify:
```python
import requests
r = requests.get('https://www.google.com/', proxies={
'http': 'SOCKS5h://127.0.0.1:1234', # or 'httph': 'SOCKS5://127.0.0.1:1234'
'https': 'SOCKS5h://127.0.0.1:1234' # or 'httpsh': 'SOCKS5://127.0.0.1:1234'
}, timeout=5)
print(r.text)
```
It works again, it's really weird, I want to know why, thanks!
## System Information
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.7.5"
},
"platform": {
"release": "18.7.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1010104f"
},
"urllib3": {
"version": "1.25.7"
},
"using_pyopenssl": false
}
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/48444178?v=4",
"events_url": "https://api.github.com/users/re1oaded/events{/privacy}",
"followers_url": "https://api.github.com/users/re1oaded/followers",
"following_url": "https://api.github.com/users/re1oaded/following{/other_user}",
"gists_url": "https://api.github.com/users/re1oaded/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/re1oaded",
"id": 48444178,
"login": "re1oaded",
"node_id": "MDQ6VXNlcjQ4NDQ0MTc4",
"organizations_url": "https://api.github.com/users/re1oaded/orgs",
"received_events_url": "https://api.github.com/users/re1oaded/received_events",
"repos_url": "https://api.github.com/users/re1oaded/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/re1oaded/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/re1oaded/subscriptions",
"type": "User",
"url": "https://api.github.com/users/re1oaded",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5363/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5363/timeline
| null |
completed
| null | null | false |
[
"Did you change your pc? have you ran\r\n`pip install -u requests[SOCKS]`",
"> Did you change your pc? have you ran\r\n> `pip install -u requests[SOCKS]`\r\n\r\nI haven't changed the PC.\r\n`pip install -u requests[SOCKS]` requests are the latest version."
] |
https://api.github.com/repos/psf/requests/issues/5356
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5356/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5356/comments
|
https://api.github.com/repos/psf/requests/issues/5356/events
|
https://github.com/psf/requests/pull/5356
| 567,756,609 |
MDExOlB1bGxSZXF1ZXN0Mzc3MzIyMzkw
| 5,356 |
v2.23.0
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2020-02-19T18:29:54Z
|
2021-08-29T00:07:03Z
|
2020-02-19T18:44:28Z
|
MEMBER
|
resolved
|
2.23.0 (2020-02-19)
-------------------
**Improvements**
- Remove defunct reference to `prefetch` in Session `__attrs__` (#5110)
**Bugfixes**
- Requests no longer outputs password in basic auth usage warning. (#5099)
**Dependencies**
- Pinning for `chardet` and `idna` now uses major version instead of minor.
This hopefully reduces the need for releases everytime a dependency is updated.
|
{
"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/5356/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5356/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5356.diff",
"html_url": "https://github.com/psf/requests/pull/5356",
"merged_at": "2020-02-19T18:44:28Z",
"patch_url": "https://github.com/psf/requests/pull/5356.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5356"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/5353
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5353/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5353/comments
|
https://api.github.com/repos/psf/requests/issues/5353/events
|
https://github.com/psf/requests/pull/5353
| 567,216,907 |
MDExOlB1bGxSZXF1ZXN0Mzc2ODg0MzQ1
| 5,353 |
Revert incomplete PRs
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2020-02-18T23:16:02Z
|
2021-08-28T00:06:13Z
|
2020-02-19T00:56:40Z
|
MEMBER
|
resolved
|
A number of PRs were merged back in September without any proper review. There are some outstanding issues with the ones included in this PR that will need to be redone before we can put them in an official release.
I'm going to revert for now to get 2.23.0 out the door, and we can revisit them afterwards as needed. attn: #4965, #4976, #5128
|
{
"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/5353/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5353/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5353.diff",
"html_url": "https://github.com/psf/requests/pull/5353",
"merged_at": "2020-02-19T00:56:40Z",
"patch_url": "https://github.com/psf/requests/pull/5353.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5353"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/5352
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5352/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5352/comments
|
https://api.github.com/repos/psf/requests/issues/5352/events
|
https://github.com/psf/requests/pull/5352
| 566,886,178 |
MDExOlB1bGxSZXF1ZXN0Mzc2NjExOTc1
| 5,352 |
Fix document about getting cookies in Document
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/16687062?v=4",
"events_url": "https://api.github.com/users/skokado/events{/privacy}",
"followers_url": "https://api.github.com/users/skokado/followers",
"following_url": "https://api.github.com/users/skokado/following{/other_user}",
"gists_url": "https://api.github.com/users/skokado/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/skokado",
"id": 16687062,
"login": "skokado",
"node_id": "MDQ6VXNlcjE2Njg3MDYy",
"organizations_url": "https://api.github.com/users/skokado/orgs",
"received_events_url": "https://api.github.com/users/skokado/received_events",
"repos_url": "https://api.github.com/users/skokado/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/skokado/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/skokado/subscriptions",
"type": "User",
"url": "https://api.github.com/users/skokado",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2020-02-18T13:16:39Z
|
2021-08-29T00:07:04Z
|
2020-02-18T23:49:44Z
|
NONE
|
resolved
|
relevant to #5351
|
{
"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/5352/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5352/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5352.diff",
"html_url": "https://github.com/psf/requests/pull/5352",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5352.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5352"
}
| true |
[
"Resolving with clarification in #5351."
] |
https://api.github.com/repos/psf/requests/issues/5351
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5351/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5351/comments
|
https://api.github.com/repos/psf/requests/issues/5351/events
|
https://github.com/psf/requests/issues/5351
| 566,875,495 |
MDU6SXNzdWU1NjY4NzU0OTU=
| 5,351 |
Document description about getting cookies.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/16687062?v=4",
"events_url": "https://api.github.com/users/skokado/events{/privacy}",
"followers_url": "https://api.github.com/users/skokado/followers",
"following_url": "https://api.github.com/users/skokado/following{/other_user}",
"gists_url": "https://api.github.com/users/skokado/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/skokado",
"id": 16687062,
"login": "skokado",
"node_id": "MDQ6VXNlcjE2Njg3MDYy",
"organizations_url": "https://api.github.com/users/skokado/orgs",
"received_events_url": "https://api.github.com/users/skokado/received_events",
"repos_url": "https://api.github.com/users/skokado/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/skokado/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/skokado/subscriptions",
"type": "User",
"url": "https://api.github.com/users/skokado",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2020-02-18T12:57:29Z
|
2021-09-02T00:07:17Z
|
2020-02-18T23:49:17Z
|
NONE
|
resolved
|
I am very grateful for this project
The documentation seems to be incorrect about getting cookies of request.
You must disable redirects to get a cookie for a request to an endpoint.
I have confirmed this behavior locally like below.
```python
>>> url = 'http://httpbin.org/cookies/set/hoge/fuga' # It is expected that a cookie "hoge = fuga" can be getted.
# Case: Does not work
>>> res = requests.get(url)
>>> res.cookies
# => <RequestsCookieJar[]>
# Case: Does work well
>>> res = requests.get(url, allow_redirects=False)
>>> res.cookies
# => <RequestsCookieJar[Cookie(version=0, name='hoge', value='hogehoge', port=None, port_specified=False, domain='httpbin.org', domain_specified=False, domain_initial_dot=False, path='/', path_specified=True, secure=False, expires=None, discard=True, comment=None, comment_url=None, rest={}, rfc2109=False)]>
```
This is because the response to the URL after the redirect is automatically replaced by allow_redirects at the time of the request.
I believe the documentation should be correct as it is reasonable that the default is True,
so I think that it is user-friendly to correct the document showing the use case.
|
{
"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/5351/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5351/timeline
| null |
completed
| null | null | false |
[
"Hi @skokado,\r\n\r\nI think what you may want here is the `history` attribute on your response. It will keep the trail of the requests, along with the state of each request hop. That way you can go back to the first response (e.g. `res.history[0].cookies`).\r\n\r\nYou should be able to find [more documentation](https://requests.readthedocs.io/en/master/user/quickstart/#redirection-and-history) on this immediately under the cookie section in the docs.",
"Hi @nateprewitt \r\n\r\nThank you for reply and great tips.\r\nI didn't know that... and I'm convined your answer :)",
"Great to hear! I’m going to resolve this and the PR since we have this easier mechanism to access the redirects. If you have further suggestions for the docs, please let us know!"
] |
https://api.github.com/repos/psf/requests/issues/5348
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5348/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5348/comments
|
https://api.github.com/repos/psf/requests/issues/5348/events
|
https://github.com/psf/requests/issues/5348
| 566,817,921 |
MDU6SXNzdWU1NjY4MTc5MjE=
| 5,348 |
Cookie with empty value crashes when wrapping jar into dict
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2026469?v=4",
"events_url": "https://api.github.com/users/undera/events{/privacy}",
"followers_url": "https://api.github.com/users/undera/followers",
"following_url": "https://api.github.com/users/undera/following{/other_user}",
"gists_url": "https://api.github.com/users/undera/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/undera",
"id": 2026469,
"login": "undera",
"node_id": "MDQ6VXNlcjIwMjY0Njk=",
"organizations_url": "https://api.github.com/users/undera/orgs",
"received_events_url": "https://api.github.com/users/undera/received_events",
"repos_url": "https://api.github.com/users/undera/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/undera/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/undera/subscriptions",
"type": "User",
"url": "https://api.github.com/users/undera",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 0 |
2020-02-18T11:08:08Z
|
2020-02-18T11:08:08Z
| null |
NONE
| null |
KeyError is raised instead of returning the single cookie, if the cookie value is empty.
From the source code it is obvious that it will fail like that. Specifically, line https://github.com/psf/requests/blob/master/requests/cookies.py#L397 says:
```python
if toReturn:
return toReturn
```
Which mean empty value will be considered as invalid (RFC allows empty cookie value).
The fix is simple - make the check `if toReturn is not None`.
## Expected Result
Expected to get dict printed.
## Actual Result
`KeyError: "name='authCke', domain=None, path=None"` raised
## Reproduction Steps
Bear with bootstrapping, I made it to avoid actual network code that needs to authenticate first.
```python
from http.client import HTTPMessage
from requests import PreparedRequest
from requests.cookies import RequestsCookieJar, MockResponse, MockRequest
raw = 'authCke=; domain=.opentable.com; expires=Mon, 18-May-2020 08:38:10 GMT; path=/;SameSite=None'
headers = HTTPMessage()
headers.add_header('set-cookie', raw)
jar = RequestsCookieJar()
resp = MockResponse(headers)
req = PreparedRequest()
req.headers = {}
req.url = 'https://opentable.com/'
req = MockRequest(req)
jar.extract_cookies(resp, req)
print(dict(jar))
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.1.4"
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.6.9"
},
"platform": {
"release": "4.15.0-76-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010100f",
"version": "18.0.0"
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1010100f"
},
"urllib3": {
"version": "1.25.7"
},
"using_pyopenssl": true
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
| null |
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5348/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5348/timeline
| null | null | null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/5347
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5347/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5347/comments
|
https://api.github.com/repos/psf/requests/issues/5347/events
|
https://github.com/psf/requests/pull/5347
| 566,812,900 |
MDExOlB1bGxSZXF1ZXN0Mzc2NTUwNzkw
| 5,347 |
Bump maximum version of idna
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1610850?v=4",
"events_url": "https://api.github.com/users/jacobtomlinson/events{/privacy}",
"followers_url": "https://api.github.com/users/jacobtomlinson/followers",
"following_url": "https://api.github.com/users/jacobtomlinson/following{/other_user}",
"gists_url": "https://api.github.com/users/jacobtomlinson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jacobtomlinson",
"id": 1610850,
"login": "jacobtomlinson",
"node_id": "MDQ6VXNlcjE2MTA4NTA=",
"organizations_url": "https://api.github.com/users/jacobtomlinson/orgs",
"received_events_url": "https://api.github.com/users/jacobtomlinson/received_events",
"repos_url": "https://api.github.com/users/jacobtomlinson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jacobtomlinson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jacobtomlinson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jacobtomlinson",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2020-02-18T10:59:12Z
|
2021-08-29T00:07:05Z
|
2020-02-18T15:16:39Z
|
NONE
|
resolved
|
Looks like `idna` 2.9 was released yesterday. Bumping maximum version.
|
{
"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/5347/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5347/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5347.diff",
"html_url": "https://github.com/psf/requests/pull/5347",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5347.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5347"
}
| true |
[
"I've just seen #5342 which would be a more preferable solution.",
"Closed in favor of #5342."
] |
https://api.github.com/repos/psf/requests/issues/5346
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5346/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5346/comments
|
https://api.github.com/repos/psf/requests/issues/5346/events
|
https://github.com/psf/requests/pull/5346
| 566,532,800 |
MDExOlB1bGxSZXF1ZXN0Mzc2MzI3MDYy
| 5,346 |
Update pipenv links in README and installation guide.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/14124978?v=4",
"events_url": "https://api.github.com/users/stock1218/events{/privacy}",
"followers_url": "https://api.github.com/users/stock1218/followers",
"following_url": "https://api.github.com/users/stock1218/following{/other_user}",
"gists_url": "https://api.github.com/users/stock1218/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/stock1218",
"id": 14124978,
"login": "stock1218",
"node_id": "MDQ6VXNlcjE0MTI0OTc4",
"organizations_url": "https://api.github.com/users/stock1218/orgs",
"received_events_url": "https://api.github.com/users/stock1218/received_events",
"repos_url": "https://api.github.com/users/stock1218/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/stock1218/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/stock1218/subscriptions",
"type": "User",
"url": "https://api.github.com/users/stock1218",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2020-02-17T21:53:32Z
|
2021-08-29T00:07:08Z
|
2020-02-18T05:44:34Z
|
CONTRIBUTOR
|
resolved
|
http://pipenv.org is unavailable, so I changed all of the links to https://pipenv.kennethreitz.org.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5346/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5346/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5346.diff",
"html_url": "https://github.com/psf/requests/pull/5346",
"merged_at": "2020-02-18T05:44:34Z",
"patch_url": "https://github.com/psf/requests/pull/5346.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5346"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/5344
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5344/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5344/comments
|
https://api.github.com/repos/psf/requests/issues/5344/events
|
https://github.com/psf/requests/pull/5344
| 566,431,310 |
MDExOlB1bGxSZXF1ZXN0Mzc2MjQ1MTQx
| 5,344 |
Added .editorconfig according to PEP 8
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240344?v=4",
"events_url": "https://api.github.com/users/KOLANICH/events{/privacy}",
"followers_url": "https://api.github.com/users/KOLANICH/followers",
"following_url": "https://api.github.com/users/KOLANICH/following{/other_user}",
"gists_url": "https://api.github.com/users/KOLANICH/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/KOLANICH",
"id": 240344,
"login": "KOLANICH",
"node_id": "MDQ6VXNlcjI0MDM0NA==",
"organizations_url": "https://api.github.com/users/KOLANICH/orgs",
"received_events_url": "https://api.github.com/users/KOLANICH/received_events",
"repos_url": "https://api.github.com/users/KOLANICH/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/KOLANICH/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/KOLANICH/subscriptions",
"type": "User",
"url": "https://api.github.com/users/KOLANICH",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2020-02-17T17:17:58Z
|
2021-08-29T00:07:08Z
|
2020-02-18T05:43:22Z
|
NONE
|
resolved
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5344/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5344/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5344.diff",
"html_url": "https://github.com/psf/requests/pull/5344",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5344.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5344"
}
| true |
[
"Thanks @KOLANICH, we typically won't include non-packaging dot files in Requests. I think we'll pass on this one."
] |
|
https://api.github.com/repos/psf/requests/issues/5343
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5343/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5343/comments
|
https://api.github.com/repos/psf/requests/issues/5343/events
|
https://github.com/psf/requests/pull/5343
| 566,431,211 |
MDExOlB1bGxSZXF1ZXN0Mzc2MjQ1MDYy
| 5,343 |
Moved some metadata from setup.py into setup.cfg.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240344?v=4",
"events_url": "https://api.github.com/users/KOLANICH/events{/privacy}",
"followers_url": "https://api.github.com/users/KOLANICH/followers",
"following_url": "https://api.github.com/users/KOLANICH/following{/other_user}",
"gists_url": "https://api.github.com/users/KOLANICH/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/KOLANICH",
"id": 240344,
"login": "KOLANICH",
"node_id": "MDQ6VXNlcjI0MDM0NA==",
"organizations_url": "https://api.github.com/users/KOLANICH/orgs",
"received_events_url": "https://api.github.com/users/KOLANICH/received_events",
"repos_url": "https://api.github.com/users/KOLANICH/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/KOLANICH/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/KOLANICH/subscriptions",
"type": "User",
"url": "https://api.github.com/users/KOLANICH",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2020-02-17T17:17:44Z
|
2021-08-29T00:07:04Z
|
2020-02-18T05:54:28Z
|
NONE
|
resolved
|
And fixed metadata extraction from files.
|
{
"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/5343/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5343/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5343.diff",
"html_url": "https://github.com/psf/requests/pull/5343",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5343.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5343"
}
| true |
[
"Thanks for getting the ball rolling on this @KOLANICH. We know the PyPA packages have started to move to this layout for their setup.{py,cfg} files. We're watching adoption right now before moving the Requests layout over. We can probably revisit this in another few months. I'm going to close this for now though.",
">We know the PyPA packages have started to move to this layout for their setup.{py,cfg} files. \r\n\r\nMetadata in `setup.cfg` is available since 2016-12.\r\n\r\n>We're watching adoption right now before moving\r\n\r\nIMHO looking to other packages is completely unneeded. You know, changing it is a piece of work with almost no benefits for package owners. And sometimes with drawbacks. Using `setup.cfg` usually benefits not developer, but other people, since the format is machine-readable, machine-editable (for example, as I have said, I deeply dislike versions pinnings you use, so I feel like I have to write a script removing pinnings, unfortunately for `setup.py` it is nearly impossible task because its structure can be arbitrary and cannot be parsed in general) and non-Turing-complete (so in future it can be possible to get rid of `setup.py` as a possible place for malware, also it is easier to audit).",
"> Metadata in setup.cfg is available since 2016-12.\r\n\r\n Right, but moving things like the trove classifiers and other setup config has only become common in the last 6ish months and is predominantly limited to packages managed by the PyPA.\r\n\r\n> You know, changing it is a piece of work with almost no benefits for package owners. And sometimes with drawbacks. Using setup.cfg usually benefits not developer, but other people, since the format is machine-readable, machine-editable [...]\r\n\r\nYep, we're not doing this for our sake. We'd like to be cognizant about all of our users needs but need to do what's best for the common user. Like I said, I'm not against this but I'd like to see how it shakes out in the rest of the ecosystem before we \"endorse\" this as the format going forward. I'm happy to revisit the layout maybe mid-year.",
">moving things like the trove classifiers and other setup config has only become common in the last 6ish months\r\n\r\nI don't want to check, but it feels like I use it at least for 2 years. I have started using setup.cfg almost immediately it has landed into release, I remember that for the first time it required explicit reading of it, but somwhen it has changed. In 2018, if I remember right, I was already using `setup.cfg` without explicit reading."
] |
https://api.github.com/repos/psf/requests/issues/5342
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5342/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5342/comments
|
https://api.github.com/repos/psf/requests/issues/5342/events
|
https://github.com/psf/requests/pull/5342
| 566,427,260 |
MDExOlB1bGxSZXF1ZXN0Mzc2MjQxODI0
| 5,342 |
Limit to major releases rather than second point.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/632049?v=4",
"events_url": "https://api.github.com/users/cjw296/events{/privacy}",
"followers_url": "https://api.github.com/users/cjw296/followers",
"following_url": "https://api.github.com/users/cjw296/following{/other_user}",
"gists_url": "https://api.github.com/users/cjw296/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cjw296",
"id": 632049,
"login": "cjw296",
"node_id": "MDQ6VXNlcjYzMjA0OQ==",
"organizations_url": "https://api.github.com/users/cjw296/orgs",
"received_events_url": "https://api.github.com/users/cjw296/received_events",
"repos_url": "https://api.github.com/users/cjw296/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cjw296/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cjw296/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cjw296",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 7 |
2020-02-17T17:09:06Z
|
2021-08-29T00:07:05Z
|
2020-02-18T14:58:28Z
|
CONTRIBUTOR
|
resolved
|
requests should trust dependent packages to do semver rather than artificially limiting version compatibility, which causes problems for pip.
Fixes https://github.com/psf/requests/issues/5341, https://github.com/psf/requests/issues/5337 and supercedes https://github.com/psf/requests/pull/5226.
|
{
"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": 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/5342/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5342/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5342.diff",
"html_url": "https://github.com/psf/requests/pull/5342",
"merged_at": "2020-02-18T14:58:27Z",
"patch_url": "https://github.com/psf/requests/pull/5342.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5342"
}
| true |
[
"Thanks for the patch, @cjw296! I'm a bit torn on this one. I agree that logistically this is a painful process for all parties involved. A minor version bump *should* be backwards compatible, but inevitably, that rule will be broken. The question comes down to how should a library used in a number of pieces of critical infrastructure handle that case?\r\n\r\nWe've had a lot of discussion on this in #4673 (Reasoning: [1](https://github.com/psf/requests/issues/4673#issuecomment-395069592), [2](https://github.com/psf/requests/issues/4673#issuecomment-395449858)). The specifics of that ticket are for urllib3, but it applies similarly to chardet and idna. The short of it being we'd rather be explicit on what we support in the event issues arise. The way pip handles conflicting dependencies makes this case more complicated, but that's unfortunately the environment we're currently in.\r\n\r\nI'm happy to have the discussion again if we've got opinions from Seth or others on the Requests team.\r\n\r\n",
"@sethmlarson seems in agreement with what I've suggested, and I didn't realise how intertwined the `urllib3` usage was, so what you've both said makes sense. Would you be amenable to merge and release if I rebase, and change the `urllib3` spec to the one I suggest above?",
"chardet is pretty stable and dormant now, so I'm not so concerned about that pin. idna is kind of an unknown. It's probably safe, I'm just not excited on having to do an emergency release to pin it in the future after any potential damage has already been done.\r\n\r\nIf Seth wants to approve and merge, I'm ok with it once the urllib3 pins are reverted.",
"To be clear: I've had to do emergency releases of at least three packages as a result of this pin and the idna release. It's a risk call for you, the requests maintainers: do you want to do emergency releases of requests on every new release of a dependency, or do you want to do an emergency release under the, hopefully rare, circumstances that a dependency doesn't do semver right.",
"@sethmlarson - over to you :-)",
"Just to add weight to @cjw296 I have also had to take emergency action as a result of the idna release and requests pinning it to a minor version.\r\n\r\nFrom my perspective the risk of a minor release being breaking is valid but hopefully low. Though I completely acknowledge that it must be frustrating for the requests maintainers to have to resolve it with an emergency release when it inevitably happens. \r\n\r\nHowever debugging the issues caused today by the idna release, because requests has pinned a minor version, has been unpleasant. One specific example is that a package I maintain does not depend on requests, but a dependency does. Another dependency has idna as a dependency but is pinned on major versions. It seems pip was unable to resolve this dependency graph correctly and pulled in 2.9, breaking requests, the dependency of my package and therefore the whole package. Adding requests as a dependency to my package and pinning to `<2.9` has resolved it and resulted in an emergency release. \r\n\r\nThis has been frustrating to untangle and has fallen on those that depend on requests to resolve.",
"Yep, I'll work on getting a cleaned up release out today or tomorrow."
] |
https://api.github.com/repos/psf/requests/issues/5341
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5341/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5341/comments
|
https://api.github.com/repos/psf/requests/issues/5341/events
|
https://github.com/psf/requests/issues/5341
| 566,423,932 |
MDU6SXNzdWU1NjY0MjM5MzI=
| 5,341 |
idna requirement causing problems now idna 2.9 has been released.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/632049?v=4",
"events_url": "https://api.github.com/users/cjw296/events{/privacy}",
"followers_url": "https://api.github.com/users/cjw296/followers",
"following_url": "https://api.github.com/users/cjw296/following{/other_user}",
"gists_url": "https://api.github.com/users/cjw296/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cjw296",
"id": 632049,
"login": "cjw296",
"node_id": "MDQ6VXNlcjYzMjA0OQ==",
"organizations_url": "https://api.github.com/users/cjw296/orgs",
"received_events_url": "https://api.github.com/users/cjw296/received_events",
"repos_url": "https://api.github.com/users/cjw296/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cjw296/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cjw296/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cjw296",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 7 |
2020-02-17T17:01:50Z
|
2021-01-11T16:54:17Z
|
2020-02-18T14:58:28Z
|
CONTRIBUTOR
|
resolved
|
requrests pins idna to <2.9, which causes problems for pip now that 2.9 has been released.
## Expected Result
projects that require requests to install cleanly when new second-point idna releases are made.
## Actual Result
```
pip install .[dev]
...
Collecting idna>=2.0.0; extra == "secure"
...
ERROR: requests 2.22.0 has requirement idna<2.9,>=2.5, but you'll have idna 2.9 which is incompatible.
...
```
Then, when you try and use a setuptools entrypoint script:
```
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (idna 2.9 (.../site-packages), Requirement.parse('idna<2.9,>=2.5'), {'requests'})
```
## Reproduction Steps
See above.
## System Information
```
Python 3.6
setuptools 45.2.0
pip 20.0.2
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4",
"events_url": "https://api.github.com/users/sethmlarson/events{/privacy}",
"followers_url": "https://api.github.com/users/sethmlarson/followers",
"following_url": "https://api.github.com/users/sethmlarson/following{/other_user}",
"gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sethmlarson",
"id": 18519037,
"login": "sethmlarson",
"node_id": "MDQ6VXNlcjE4NTE5MDM3",
"organizations_url": "https://api.github.com/users/sethmlarson/orgs",
"received_events_url": "https://api.github.com/users/sethmlarson/received_events",
"repos_url": "https://api.github.com/users/sethmlarson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sethmlarson",
"user_view_type": "public"
}
|
{
"+1": 4,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 4,
"url": "https://api.github.com/repos/psf/requests/issues/5341/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5341/timeline
| null |
completed
| null | null | false |
[
"See also https://github.com/psf/requests/issues/5337 and https://github.com/psf/requests/pull/5226",
"I am also experiencing this.",
"@sethmlarson - any chance we could keep this issue open until the release goes out? Saves people reporting dupes...",
"Yes please. A timeline on the new release would also be appreciated.",
"@dralley The release just went up onto PyPI.",
"I resolved this by upgrading requests:\r\n`pip install requests --upgrade`\r\nfrom version 0.22 to 0.23, then dependency is `idna<3,>=2.5`",
"> I resolved this by upgrading requests:\r\n> `pip install requests --upgrade`\r\n> from version 0.22 to 0.23, then dependency is `idna<3,>=2.5`\r\n\r\nthis actually worked, thanks"
] |
https://api.github.com/repos/psf/requests/issues/5338
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5338/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5338/comments
|
https://api.github.com/repos/psf/requests/issues/5338/events
|
https://github.com/psf/requests/pull/5338
| 566,109,092 |
MDExOlB1bGxSZXF1ZXN0Mzc1OTgzMDI2
| 5,338 |
Removed pass from the warnings and fixed the docstrings
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/30027932?v=4",
"events_url": "https://api.github.com/users/rednafi/events{/privacy}",
"followers_url": "https://api.github.com/users/rednafi/followers",
"following_url": "https://api.github.com/users/rednafi/following{/other_user}",
"gists_url": "https://api.github.com/users/rednafi/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rednafi",
"id": 30027932,
"login": "rednafi",
"node_id": "MDQ6VXNlcjMwMDI3OTMy",
"organizations_url": "https://api.github.com/users/rednafi/orgs",
"received_events_url": "https://api.github.com/users/rednafi/received_events",
"repos_url": "https://api.github.com/users/rednafi/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rednafi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rednafi/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rednafi",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2020-02-17T07:36:47Z
|
2021-08-29T00:07:03Z
|
2020-02-23T17:56:47Z
|
CONTRIBUTOR
|
resolved
|
* Removed multiple redundant `pass` from the `Warnings` in `requests/requests/exceptions.py`. This maintains consistency with the previously defined exceptions.
* Added missing `.` to the docstring for keeping consistency
|
{
"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/5338/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5338/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5338.diff",
"html_url": "https://github.com/psf/requests/pull/5338",
"merged_at": "2020-02-23T17:56:46Z",
"patch_url": "https://github.com/psf/requests/pull/5338.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5338"
}
| true |
[
"Thanks. Noted."
] |
https://api.github.com/repos/psf/requests/issues/5337
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5337/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5337/comments
|
https://api.github.com/repos/psf/requests/issues/5337/events
|
https://github.com/psf/requests/issues/5337
| 565,869,947 |
MDU6SXNzdWU1NjU4Njk5NDc=
| 5,337 |
Stop downgrading dependencies
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240344?v=4",
"events_url": "https://api.github.com/users/KOLANICH/events{/privacy}",
"followers_url": "https://api.github.com/users/KOLANICH/followers",
"following_url": "https://api.github.com/users/KOLANICH/following{/other_user}",
"gists_url": "https://api.github.com/users/KOLANICH/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/KOLANICH",
"id": 240344,
"login": "KOLANICH",
"node_id": "MDQ6VXNlcjI0MDM0NA==",
"organizations_url": "https://api.github.com/users/KOLANICH/orgs",
"received_events_url": "https://api.github.com/users/KOLANICH/received_events",
"repos_url": "https://api.github.com/users/KOLANICH/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/KOLANICH/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/KOLANICH/subscriptions",
"type": "User",
"url": "https://api.github.com/users/KOLANICH",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2020-02-16T08:26:52Z
|
2021-09-02T00:07:21Z
|
2020-02-17T21:15:17Z
|
NONE
|
resolved
|
`requests` has restricted dependencies versions with `<` conditions. This causes dependencies downgrades.
## Expected Result
It must never have been done.
## Actual Result
It has been done.
## Reproduction Steps
```bash
git clone --depth 1 https://github.com/chardet/chardet
cd chardet
python3 ./setup.py bdist_wheel
pip install --upgrade ./dist/*.whl
```
`Successfully installed chardet-4.0.0`
```bash
git clone --depth 1 https://github.com/psf/requests
cd requests
python3 ./setup.py bdist_wheel
pip install --no-index ./dist/*.whl
```
`No matching distribution found for chardet<3.1.0,>=3.0.2 (from requests==2.22.0)`
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5337/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5337/timeline
| null |
completed
| null | null | false |
[
"Resolving in favor of #5341."
] |
https://api.github.com/repos/psf/requests/issues/5336
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5336/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5336/comments
|
https://api.github.com/repos/psf/requests/issues/5336/events
|
https://github.com/psf/requests/pull/5336
| 564,968,036 |
MDExOlB1bGxSZXF1ZXN0Mzc1MTAyODU3
| 5,336 |
Remove explicit unicode literal in README.md and doc
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/19170381?v=4",
"events_url": "https://api.github.com/users/aless10/events{/privacy}",
"followers_url": "https://api.github.com/users/aless10/followers",
"following_url": "https://api.github.com/users/aless10/following{/other_user}",
"gists_url": "https://api.github.com/users/aless10/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/aless10",
"id": 19170381,
"login": "aless10",
"node_id": "MDQ6VXNlcjE5MTcwMzgx",
"organizations_url": "https://api.github.com/users/aless10/orgs",
"received_events_url": "https://api.github.com/users/aless10/received_events",
"repos_url": "https://api.github.com/users/aless10/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/aless10/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/aless10/subscriptions",
"type": "User",
"url": "https://api.github.com/users/aless10",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2020-02-13T21:44:12Z
|
2021-08-29T00:06:59Z
|
2020-03-25T19:44:52Z
|
CONTRIBUTOR
|
resolved
|
As the end of python 2 has come, I open this PR in order to get rid of the explicit unicode literal in the README file and the documentation.
I know that this could be against the PEP 414 https://www.python.org/dev/peps/pep-0414/ but it should be harmless for the project.
|
{
"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/5336/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5336/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5336.diff",
"html_url": "https://github.com/psf/requests/pull/5336",
"merged_at": "2020-03-25T19:44:52Z",
"patch_url": "https://github.com/psf/requests/pull/5336.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5336"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/5335
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5335/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5335/comments
|
https://api.github.com/repos/psf/requests/issues/5335/events
|
https://github.com/psf/requests/issues/5335
| 562,977,101 |
MDU6SXNzdWU1NjI5NzcxMDE=
| 5,335 |
Cannot got parent Session object from Response object
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/108767?v=4",
"events_url": "https://api.github.com/users/rgov/events{/privacy}",
"followers_url": "https://api.github.com/users/rgov/followers",
"following_url": "https://api.github.com/users/rgov/following{/other_user}",
"gists_url": "https://api.github.com/users/rgov/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rgov",
"id": 108767,
"login": "rgov",
"node_id": "MDQ6VXNlcjEwODc2Nw==",
"organizations_url": "https://api.github.com/users/rgov/orgs",
"received_events_url": "https://api.github.com/users/rgov/received_events",
"repos_url": "https://api.github.com/users/rgov/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rgov/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rgov/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rgov",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2020-02-11T04:52:04Z
|
2021-09-02T00:07:21Z
|
2020-02-18T06:41:50Z
|
NONE
|
resolved
|
Since this project has not accepted feature requests for nearly two years, I'll pose this as a bug:
It's very useful to set response hooks on a `Session`. For example:
```python
def check_for_http_error(response, *args, **kwargs):
response.raise_for_status()
s = requests.Session()
s.hooks['response'] = (check_for_http_error,)
```
Inside my hook, I want to use `response.request.session` or `response.session` to get the associated `Session` object, but I get an `AttributeError` on Requests 2.22.0. It does work to get the `Request` object with `response.request`, though.
I want to do this because I may want to set a custom attribute on my `Session` that is available to my hook. For a simple example, take:
```python
def wait_after(response, *args, **kwargs):
if response.status_code == requests.codes.ok:
time.sleep(response.session.delay) # oops
```
As a workaround to this bug, I can use `functools.partial(wait_after, 1)`, or `functools.partial(set_session, s)`, or use global variables, but most things in Requests are beautiful, and these solutions aren't.
|
{
"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/5335/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5335/timeline
| null |
completed
| null | null | false |
[
"Hi @rgov, thanks for the suggestion. Cyclical or complex references like this are something we'd typically try to avoid. They often lead to unexpected references left behind and can be hard to reason about when multiple Requests reference the same mutable Session.\r\n\r\n I don't think a hook is necessarily the best approach to accomplish what you're looking for. It sounds like you're already subclassing the Session or using a mixin to add your new attributes. You might consider continuing down that route and subclassing the `Request`s yourself. Otherwise, you may be better to look at having something like a Request manager to manage Request state/retries, or perhaps the retry functionality in urllib3."
] |
https://api.github.com/repos/psf/requests/issues/5334
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5334/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5334/comments
|
https://api.github.com/repos/psf/requests/issues/5334/events
|
https://github.com/psf/requests/pull/5334
| 560,262,620 |
MDExOlB1bGxSZXF1ZXN0MzcxMjgyNDgy
| 5,334 |
Refactored check_compatibility function
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/34836226?v=4",
"events_url": "https://api.github.com/users/Hayashi-Yudai/events{/privacy}",
"followers_url": "https://api.github.com/users/Hayashi-Yudai/followers",
"following_url": "https://api.github.com/users/Hayashi-Yudai/following{/other_user}",
"gists_url": "https://api.github.com/users/Hayashi-Yudai/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Hayashi-Yudai",
"id": 34836226,
"login": "Hayashi-Yudai",
"node_id": "MDQ6VXNlcjM0ODM2MjI2",
"organizations_url": "https://api.github.com/users/Hayashi-Yudai/orgs",
"received_events_url": "https://api.github.com/users/Hayashi-Yudai/received_events",
"repos_url": "https://api.github.com/users/Hayashi-Yudai/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Hayashi-Yudai/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Hayashi-Yudai/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Hayashi-Yudai",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2020-02-05T10:02:42Z
|
2021-11-26T05:00:35Z
|
2021-08-28T04:29:07Z
|
NONE
|
resolved
|
In `check_compatibility` function in `requests/__init__.py` some codes are redundant. This function distribute three elements of `urllib3_version` and `chardet_version` and after that transform them to integer values. It can be written with `map` function.
|
{
"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/5334/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5334/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5334.diff",
"html_url": "https://github.com/psf/requests/pull/5334",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5334.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5334"
}
| true |
[
"Hi @Hayashi-Yudai, thanks for the PR. We typically don't accept minor cosmetic changes as it sets a precedent increasing general maintenance churn for the library. We appreciate it though."
] |
https://api.github.com/repos/psf/requests/issues/5333
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5333/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5333/comments
|
https://api.github.com/repos/psf/requests/issues/5333/events
|
https://github.com/psf/requests/issues/5333
| 559,484,948 |
MDU6SXNzdWU1NTk0ODQ5NDg=
| 5,333 |
Error pls help
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/60638449?v=4",
"events_url": "https://api.github.com/users/hariharan2004/events{/privacy}",
"followers_url": "https://api.github.com/users/hariharan2004/followers",
"following_url": "https://api.github.com/users/hariharan2004/following{/other_user}",
"gists_url": "https://api.github.com/users/hariharan2004/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hariharan2004",
"id": 60638449,
"login": "hariharan2004",
"node_id": "MDQ6VXNlcjYwNjM4NDQ5",
"organizations_url": "https://api.github.com/users/hariharan2004/orgs",
"received_events_url": "https://api.github.com/users/hariharan2004/received_events",
"repos_url": "https://api.github.com/users/hariharan2004/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hariharan2004/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hariharan2004/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hariharan2004",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2020-02-04T04:45:25Z
|
2021-09-02T00:07:29Z
|
2020-02-04T16:05:22Z
|
NONE
|
resolved
|
Please refer to our [Stack Overflow tag](https://stackoverflow.com/questions/tagged/python-requests) for guidance.
Traceback (most recent call last):
File "crackinsta.py", line 134, in <module>
instabrute = Instabrute(Input('Please enter a username: '))
File "crackinsta.py", line 28, in __init__
self.IsUserExists()
File "crackinsta.py", line 72, in IsUserExists
r = requests.get('https://www.instagram.com/%s/?__a=1' % self.username)
AttributeError: module 'requests' has no attribute '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/5333/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5333/timeline
| null |
completed
| null | null | false |
[
"> File \"crackinsta.py\", line 134, in\r\n> instabrute = Instabrute(Input('Please enter a username: '))\r\n\r\n:popcorn: ",
"Hi @hariharan2004,\r\n\r\nThis isn’t a defect with Requests, please open a question on StackOverflow if you need further assistance. Thanks."
] |
https://api.github.com/repos/psf/requests/issues/5332
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5332/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5332/comments
|
https://api.github.com/repos/psf/requests/issues/5332/events
|
https://github.com/psf/requests/issues/5332
| 558,961,402 |
MDU6SXNzdWU1NTg5NjE0MDI=
| 5,332 |
requests.exceptions.ProxyError: Cannot connect to proxy
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/45927310?v=4",
"events_url": "https://api.github.com/users/fulganta/events{/privacy}",
"followers_url": "https://api.github.com/users/fulganta/followers",
"following_url": "https://api.github.com/users/fulganta/following{/other_user}",
"gists_url": "https://api.github.com/users/fulganta/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/fulganta",
"id": 45927310,
"login": "fulganta",
"node_id": "MDQ6VXNlcjQ1OTI3MzEw",
"organizations_url": "https://api.github.com/users/fulganta/orgs",
"received_events_url": "https://api.github.com/users/fulganta/received_events",
"repos_url": "https://api.github.com/users/fulganta/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/fulganta/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fulganta/subscriptions",
"type": "User",
"url": "https://api.github.com/users/fulganta",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2020-02-03T09:42:27Z
|
2021-09-02T00:07:30Z
|
2020-02-03T21:05:20Z
|
NONE
|
resolved
|
I was trying to use the following tutorial to run a Graph/Python/Django server tutorial:
https://docs.microsoft.com/en-us/graph/tutorials/python
I get the following error message:
`requests.exceptions.ProxyError: HTTPSConnectionPool(host='login.microsoftonline.com', port=443): Max retries exceeded with url: /groupebpcestaging.onmicrosoft.com/oauth2/v2.0/token (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 authenticationrequired',)))`
I use a proxy indeed.
I saw some post saying that it's not for sure supporting. So I'm wondering what's the status here. It's a http proxy.
|
{
"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/5332/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5332/timeline
| null |
completed
| null | null | false |
[
"From the error message it looks like you need to authenticate with your proxy. Please use Stack Overflow if you're looking for help, this issue tracker is only for defects in Requests. "
] |
https://api.github.com/repos/psf/requests/issues/5331
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5331/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5331/comments
|
https://api.github.com/repos/psf/requests/issues/5331/events
|
https://github.com/psf/requests/issues/5331
| 558,246,302 |
MDU6SXNzdWU1NTgyNDYzMDI=
| 5,331 |
datadome blocked me,
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/24720309?v=4",
"events_url": "https://api.github.com/users/adlaneKadri/events{/privacy}",
"followers_url": "https://api.github.com/users/adlaneKadri/followers",
"following_url": "https://api.github.com/users/adlaneKadri/following{/other_user}",
"gists_url": "https://api.github.com/users/adlaneKadri/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/adlaneKadri",
"id": 24720309,
"login": "adlaneKadri",
"node_id": "MDQ6VXNlcjI0NzIwMzA5",
"organizations_url": "https://api.github.com/users/adlaneKadri/orgs",
"received_events_url": "https://api.github.com/users/adlaneKadri/received_events",
"repos_url": "https://api.github.com/users/adlaneKadri/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/adlaneKadri/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/adlaneKadri/subscriptions",
"type": "User",
"url": "https://api.github.com/users/adlaneKadri",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2020-01-31T16:51:56Z
|
2021-09-03T00:10:39Z
|
2020-01-31T17:00:29Z
|
NONE
|
resolved
|
> I've been dealing with that issue for 2 days and haven't come up with any sort of solution. am trying to send requests.get to get the html of a webpage but am blocked this is the error i got:

```
<!--
Need permission to access data? Contact: [email protected]
-->
<html><head><title>You have been blocked</title><style>#cmsg{animation: A 1.5s;}@keyframes A{0%{opacity:0;}99%{opacity:0;}100%{opacity:1;}}</style></head><body style="margin:0"><p id="cmsg">Please enable JS and disable any ad blocker</p><script>var dd={'cid':'AHrlqAAAAAMAo0yXfobywkcAsK83Ww==','hsh':'53505CB4534F4422CC81E4A9499234','t':'fe','host':'c.datado.me'}</script><script src="https://ct.datado.me/c.js"></script><script async type="text/javascript" src="/_Incapsula_Resource?SWJIYLWA=719d34d31c8e3a6e6fffd425f7e032f3&ns=2&cb=7844627"></script>
</body></html>
```
|
{
"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/5331/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5331/timeline
| null |
completed
| null | null | false |
[
"Requests maintainers can't help with this issue. "
] |
https://api.github.com/repos/psf/requests/issues/5330
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5330/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5330/comments
|
https://api.github.com/repos/psf/requests/issues/5330/events
|
https://github.com/psf/requests/issues/5330
| 558,072,098 |
MDU6SXNzdWU1NTgwNzIwOTg=
| 5,330 |
Unable to connect to api.telegram.org through proxy
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/60438666?v=4",
"events_url": "https://api.github.com/users/threadedstream/events{/privacy}",
"followers_url": "https://api.github.com/users/threadedstream/followers",
"following_url": "https://api.github.com/users/threadedstream/following{/other_user}",
"gists_url": "https://api.github.com/users/threadedstream/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/threadedstream",
"id": 60438666,
"login": "threadedstream",
"node_id": "MDQ6VXNlcjYwNDM4NjY2",
"organizations_url": "https://api.github.com/users/threadedstream/orgs",
"received_events_url": "https://api.github.com/users/threadedstream/received_events",
"repos_url": "https://api.github.com/users/threadedstream/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/threadedstream/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/threadedstream/subscriptions",
"type": "User",
"url": "https://api.github.com/users/threadedstream",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2020-01-31T11:19:29Z
|
2021-09-03T00:10:38Z
|
2020-01-31T20:14:48Z
|
NONE
|
resolved
|
I've been dealing with that issue for 2 days and haven't come up with any sort of solution. I'm trying to write telegram bot with python using telebot library. Once i run the program, i get the following error:
'No connection could be made because the target machine actively refused it'
Well, i was disappointed and decided to look up the issue on the internet. After some time passed, i got that the proxy may be the possible solution, so i utilized it. And, full of joy and delight, i started writing some code.
That's what i got so far:
import telebot
from telebot import apihelper
TOKEN = "token"
bot_obj = telebot.TeleBot(token=TOKEN, threaded=False)
@bot_obj.message_handler(comands=['start'])
def start(message):
bot_obj.send_message(message.from_user.id, "Howdy")
bot_obj.polling()
And that's what i ended up with:
"Not supported proxy scheme socks5"
|
{
"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/5330/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5330/timeline
| null |
completed
| null | null | false |
[
"I'd try `pip install -U requests[socks]` to make sure you have the SOCKS proxy requirements. If that doesn't work, you may want to ask whoever is maintaining the telebot package you're using, rather than Requests.",
"So, i have installed necessary package. The only thing that changed is an error message, which is ConnectTimeoutError now. \r\n\r\n",
"That's not an issue with requests; you can't connect. Try [asking your question on StackOverflow](https://stackoverflow.com/questions/ask)",
"Thank you, dear stranger. "
] |
https://api.github.com/repos/psf/requests/issues/5329
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5329/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5329/comments
|
https://api.github.com/repos/psf/requests/issues/5329/events
|
https://github.com/psf/requests/issues/5329
| 556,957,429 |
MDU6SXNzdWU1NTY5NTc0Mjk=
| 5,329 |
AttributeError: module 'requests' has no attribute 'Session'
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4",
"events_url": "https://api.github.com/users/ghost/events{/privacy}",
"followers_url": "https://api.github.com/users/ghost/followers",
"following_url": "https://api.github.com/users/ghost/following{/other_user}",
"gists_url": "https://api.github.com/users/ghost/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ghost",
"id": 10137,
"login": "ghost",
"node_id": "MDQ6VXNlcjEwMTM3",
"organizations_url": "https://api.github.com/users/ghost/orgs",
"received_events_url": "https://api.github.com/users/ghost/received_events",
"repos_url": "https://api.github.com/users/ghost/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ghost/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ghost",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2020-01-29T16:00:09Z
|
2021-09-03T00:10:42Z
|
2020-01-29T16:26:00Z
|
NONE
|
resolved
|
On Arch Linux, with Python 3.8.1, using requests **v2.22.0**, both from the distribution repository, and from `pip`, `requests.Session()` returns an error.
## Expected Result
`requests.Session()` return a Session.
## Actual Result
```
$ python
Python 3.8.1 (default, Jan 22 2020, 06:38:00)
[GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> requests.Session()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'requests' has no attribute 'Session'
```
## Reproduction Steps
1. Installing `requests` from the distribution packages, or from `pip`
2.
```python
import requests
requests.Session()
```
## System Information
$ python -m requests.help
```
/usr/bin/python: Error while finding module specification for 'requests.help' (ModuleNotFoundError: __path__ attribute not found on 'requests' while trying to find 'requests.help')
```
### Operating system
Arch Linux
```
$ uname -a
Linux mydesktop 5.4.15-zen1-1-zen #1 ZEN SMP PREEMPT Sun, 26 Jan 2020 09:48:57 +0000 x86_64 GNU/Linux
```
### Python version
```
$ python
Python 3.8.1 (default, Jan 22 2020, 06:38:00)
[GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
```
### `requests` version
```
$ pip show requests
Name: requests
Version: 2.22.0
Summary: Python HTTP for Humans.
Home-page: http://python-requests.org
Author: Kenneth Reitz
Author-email: [email protected]
License: Apache 2.0
Location: /usr/lib/python3.8/site-packages
Requires: urllib3, certifi, chardet, idna
Required-by: Kivy-Garden, CacheControl
```
## Additional information
I have already tried to uninstall completely and reinstall `requests`.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4",
"events_url": "https://api.github.com/users/sethmlarson/events{/privacy}",
"followers_url": "https://api.github.com/users/sethmlarson/followers",
"following_url": "https://api.github.com/users/sethmlarson/following{/other_user}",
"gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sethmlarson",
"id": 18519037,
"login": "sethmlarson",
"node_id": "MDQ6VXNlcjE4NTE5MDM3",
"organizations_url": "https://api.github.com/users/sethmlarson/orgs",
"received_events_url": "https://api.github.com/users/sethmlarson/received_events",
"repos_url": "https://api.github.com/users/sethmlarson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sethmlarson",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5329/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5329/timeline
| null |
completed
| null | null | false |
[
"Not able to reproduce via running in Docker:\r\n\r\n```\r\n$ docker run --rm -it archlinux\r\n$ pacman -Sy python3 python-requests\r\n$ python -c \"import requests; http = requests.Session()\"\r\n```\r\n\r\nThis seems like an error with your environment or Python setup. Try using a virtual environment."
] |
https://api.github.com/repos/psf/requests/issues/5328
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5328/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5328/comments
|
https://api.github.com/repos/psf/requests/issues/5328/events
|
https://github.com/psf/requests/issues/5328
| 556,530,192 |
MDU6SXNzdWU1NTY1MzAxOTI=
| 5,328 |
requests.packages.urllib3.exceptions.ProtocolError: ('Connection aborted.', OSError(0, 'Error'))
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/7831981?v=4",
"events_url": "https://api.github.com/users/Battant/events{/privacy}",
"followers_url": "https://api.github.com/users/Battant/followers",
"following_url": "https://api.github.com/users/Battant/following{/other_user}",
"gists_url": "https://api.github.com/users/Battant/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Battant",
"id": 7831981,
"login": "Battant",
"node_id": "MDQ6VXNlcjc4MzE5ODE=",
"organizations_url": "https://api.github.com/users/Battant/orgs",
"received_events_url": "https://api.github.com/users/Battant/received_events",
"repos_url": "https://api.github.com/users/Battant/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Battant/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Battant/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Battant",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2020-01-28T22:52:11Z
|
2021-09-03T00:10:42Z
|
2020-01-29T17:56:31Z
|
NONE
|
resolved
|
Summary.
Hello,
I try to connect from a python3.7 script to the marrytts text to spetch server to read a text
to reproduce this issue, please install a marrytts server abd run it with
./bin/marrytts-server &
befor test a script
## Expected Result
What you expected.
what request api don't work in my case ?
## Actual Result
textUrl = https://127.0.0.1:59125/?INPUT_TEXT=input+text
&INPUT_TYPE=text&OUTPUT_TYPE=audio&AUDIO=waveE&LOCALE=en
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/requests/packages/urllib3/connectionpool.py", line 518, in urlopen
body=body, headers=headers)
File "/usr/local/lib/python3.7/dist-packages/requests/packages/urllib3/connectionpool.py", line 322, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.7/dist-packages/requests/packages/urllib3/connectionpool.py", line 727, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.7/dist-packages/requests/packages/urllib3/connection.py", line 238, in connect
ssl_version=resolved_ssl_version)
File "/usr/local/lib/python3.7/dist-packages/requests/packages/urllib3/util/ssl_.py", line 253, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/lib/python3.7/ssl.py", line 423, in wrap_socket
session=session
File "/usr/lib/python3.7/ssl.py", line 870, in _create
self.do_handshake()
File "/usr/lib/python3.7/ssl.py", line 1139, in do_handshake
self._sslobj.do_handshake()
OSError: [Errno 0] Error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "callMarryTTs.py", line 78, in <module>
callMarrytts(sys.stdin.read())
File "callMarryTTs.py", line 47, in callMarrytts
r = requests.get(textUrl)
File "/usr/local/lib/python3.7/dist-packages/requests/api.py", line 65, in get
return request('get', url, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/requests/api.py", line 49, in request
response = session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 461, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 573, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/requests/adapters.py", line 370, in send
timeout=timeout
File "/usr/local/lib/python3.7/dist-packages/requests/packages/urllib3/connectionpool.py", line 564, in urlopen
_pool=self, _stacktrace=stacktrace)
File "/usr/local/lib/python3.7/dist-packages/requests/packages/urllib3/util/retry.py", line 245, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/local/lib/python3.7/dist-packages/requests/packages/urllib3/packages/six.py", line 309, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.7/dist-packages/requests/packages/urllib3/connectionpool.py", line 518, in urlopen
body=body, headers=headers)
File "/usr/local/lib/python3.7/dist-packages/requests/packages/urllib3/connectionpool.py", line 322, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.7/dist-packages/requests/packages/urllib3/connectionpool.py", line 727, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.7/dist-packages/requests/packages/urllib3/connection.py", line 238, in connect
ssl_version=resolved_ssl_version)
File "/usr/local/lib/python3.7/dist-packages/requests/packages/urllib3/util/ssl_.py", line 253, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/lib/python3.7/ssl.py", line 423, in wrap_socket
session=session
File "/usr/lib/python3.7/ssl.py", line 870, in _create
self.do_handshake()
File "/usr/lib/python3.7/ssl.py", line 1139, in do_handshake
self._sslobj.do_handshake()
requests.packages.urllib3.exceptions.ProtocolError: ('Connection aborted.', OSError(0, 'Error'))
What happened instead.
## Reproduction Steps
```python
import requests
# https://toolbelt.readthedocs.io/en/latest/user.html#ssladapter
import requests
from requests_toolbelt import SSLAdapter
import ssl
def callMarrytts (text , lang="en",output_type="audio",output_format="wave") :
#https://stackoverflow.com/questions/50300028/send-xml-file-to-rest-api-in-python3
textReplace = text.replace(" ","+")
textUrl = r'https://127.0.0.1:59125/?INPUT_TEXT{}&INPUT_TYPE=text&OUTPUT_TYPE={}&AUDIO={}E&LOCALE={}'.format(textReplace,output_type,output_format,lang)
```
## System Information
$ python -m requests.help
python3.7 -m requests.help
/usr/bin/python3.7: No module named 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,
python3.7 --version
Python 3.7.5
operating system, &c).
mparchet@mparchet-Default-string:~/src/code-reader$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 19.10
Release: 19.10
Codename: eoan
apt policy python3.7
python3.7:
Installed: 3.7.5-2~19.10
Candidate: 3.7.5-2~19.10
Version table:
*** 3.7.5-2~19.10 500
500 http://mirror.serverius.net/ubuntu eoan-updates/main amd64 Packages
100 /var/lib/dpkg/status
3.7.5~rc1-2 500
500 http://mirror.serverius.net/ubuntu eoan/main amd64 Packages
uname -r
5.3.0-26-generic
could you help me please to fix this issue ?
Thanks by advance for your support
Best regards
Battant
|
{
"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/5328/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5328/timeline
| null |
completed
| null | null | false |
[
"Hi @Battant, this appears to be a connection issue with the server you have set up, likely with the TLS configuration.\r\n\r\nThis doesn’t appear to be a defect specifically with Requests from the information provided. I’d recommend testing some other tools like curl and/or postman and seeing if it’s reproducible there. If not, you can open a question on stackoverflow with the python-requests tag and look at debugging options there. Thanks!"
] |
https://api.github.com/repos/psf/requests/issues/5327
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5327/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5327/comments
|
https://api.github.com/repos/psf/requests/issues/5327/events
|
https://github.com/psf/requests/issues/5327
| 556,324,337 |
MDU6SXNzdWU1NTYzMjQzMzc=
| 5,327 |
Using requests.packages.urllib3.disable_warnings()
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/12223407?v=4",
"events_url": "https://api.github.com/users/bostonareahuman/events{/privacy}",
"followers_url": "https://api.github.com/users/bostonareahuman/followers",
"following_url": "https://api.github.com/users/bostonareahuman/following{/other_user}",
"gists_url": "https://api.github.com/users/bostonareahuman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bostonareahuman",
"id": 12223407,
"login": "bostonareahuman",
"node_id": "MDQ6VXNlcjEyMjIzNDA3",
"organizations_url": "https://api.github.com/users/bostonareahuman/orgs",
"received_events_url": "https://api.github.com/users/bostonareahuman/received_events",
"repos_url": "https://api.github.com/users/bostonareahuman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bostonareahuman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bostonareahuman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bostonareahuman",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2020-01-28T16:28:32Z
|
2021-09-03T00:10:39Z
|
2020-01-29T18:32:45Z
|
NONE
|
resolved
|
requests.packages.urllib3.disable_warnings()
throws
requests.packages.urllib3.disable_warnings()
AttributeError: 'module' object has no attribute 'packages'
Traceback (most recent call last):
File "/usr/local/tdproxy/USERIMP/userupload_prod.py", line 12, in <module>
requests.packages.urllib3.disable_warnings()
AttributeError: 'module' object has no attribute 'packages'
## Expected Result
no error
What you expected.
## Actual Result
requests.packages.urllib3.disable_warnings()
AttributeError: 'module' object has no attribute 'packages'
Traceback (most recent call last):
File "/usr/local/tdproxy/USERIMP/userupload_prod.py", line 12, in <module>
requests.packages.urllib3.disable_warnings()
AttributeError: 'module' object has no attribute 'packages'
## Reproduction Steps
```python
#!/usr/bin/env python
import sys,os
import requests
import datetime
import json
import ldap
import inspect
from time import sleep
import urllib3
import fn_group_functions_prod as group_functions
urllib3.disable_warnings()
requests.packages.urllib3.disable_warnings()
print('11')
print os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
sys.path.insert(0,os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))+'/../../CONFIGS/')
print(sys.path)
#sys.exit(1)
import config
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "2.7.5"
},
"platform": {
"release": "3.10.0-1062.9.1.el7.x86_64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "100020bf"
},
"urllib3": {
"version": "1.25.8"
},
"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/5327/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5327/timeline
| null |
completed
| null | null | false |
[
"Hi @bostonmacosx, have you validated other parts of requests work in this run environment? It looks like you may have another file named `requests.py` that’s on the Python path.",
"> Hi @bostonmacosx, have you validated other parts of requests work in this run environment? It looks like you may have another file named `requests.py` that’s on the Python path.\r\n@nateprewitt \r\nI'm sorry how are you useeing that?\r\n\r\nand yes. if I remove that line everything works swimmingly.. \r\n",
"You aren’t using requests anywhere else in that script. What I was asking is if other calls to requests work in the same environment in this script.\r\n\r\nEither way, the issue doesn’t appear to be reproducible with the versions of Requests and urllib3 you provided. It looks like you either have another file taking over the requests namespace, or have multiple versions of requests on your path which are old enough to not have `packages` defined.\r\n\r\nI’d suggest starting with a fresh virtualenv and working from there. If you’re still having issues, Stackoverflow is the best forum for debugging issues like this. Thanks!"
] |
https://api.github.com/repos/psf/requests/issues/5326
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5326/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5326/comments
|
https://api.github.com/repos/psf/requests/issues/5326/events
|
https://github.com/psf/requests/pull/5326
| 555,153,585 |
MDExOlB1bGxSZXF1ZXN0MzY3MTY1NTA1
| 5,326 |
Fix intersphinx_mapping config for Python standard library
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1156625?v=4",
"events_url": "https://api.github.com/users/nawatts/events{/privacy}",
"followers_url": "https://api.github.com/users/nawatts/followers",
"following_url": "https://api.github.com/users/nawatts/following{/other_user}",
"gists_url": "https://api.github.com/users/nawatts/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nawatts",
"id": 1156625,
"login": "nawatts",
"node_id": "MDQ6VXNlcjExNTY2MjU=",
"organizations_url": "https://api.github.com/users/nawatts/orgs",
"received_events_url": "https://api.github.com/users/nawatts/received_events",
"repos_url": "https://api.github.com/users/nawatts/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nawatts/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nawatts/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nawatts",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2020-01-25T23:32:59Z
|
2021-08-29T00:07:09Z
|
2020-02-01T00:24:53Z
|
CONTRIBUTOR
|
resolved
|
Currently, the [intersphinx_mapping](https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#confval-intersphinx_mapping) for `python` is set to the Requests documentation. This prevents some references from being linked to the Python standard library documentation.
This PR reverts the configuration change made in #5236 and sets the URL for `python` back to https://docs.python.org/3/ as (shown in the example in the intersphinx_mapping documentation).
Some effects of this change can be seen on the Developer Interface page.
Before:

After:

|
{
"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/5326/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5326/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5326.diff",
"html_url": "https://github.com/psf/requests/pull/5326",
"merged_at": "2020-02-01T00:24:53Z",
"patch_url": "https://github.com/psf/requests/pull/5326.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5326"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/5325
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5325/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5325/comments
|
https://api.github.com/repos/psf/requests/issues/5325/events
|
https://github.com/psf/requests/pull/5325
| 555,110,323 |
MDExOlB1bGxSZXF1ZXN0MzY3MTM0ODEw
| 5,325 |
Change link for pip installation instructions
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1156625?v=4",
"events_url": "https://api.github.com/users/nawatts/events{/privacy}",
"followers_url": "https://api.github.com/users/nawatts/followers",
"following_url": "https://api.github.com/users/nawatts/following{/other_user}",
"gists_url": "https://api.github.com/users/nawatts/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nawatts",
"id": 1156625,
"login": "nawatts",
"node_id": "MDQ6VXNlcjExNTY2MjU=",
"organizations_url": "https://api.github.com/users/nawatts/orgs",
"received_events_url": "https://api.github.com/users/nawatts/received_events",
"repos_url": "https://api.github.com/users/nawatts/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nawatts/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nawatts/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nawatts",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2020-01-25T17:15:41Z
|
2021-08-29T00:07:10Z
|
2020-01-25T18:19:35Z
|
CONTRIBUTOR
|
resolved
|
After #5236, the [Installation of Requests](https://requests.readthedocs.io/en/master/user/install/) documentation page links to itself for instructions on how to install pip.
This restores the previous link to https://docs.python-guide.org/starting/installation/.
|
{
"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/5325/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5325/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5325.diff",
"html_url": "https://github.com/psf/requests/pull/5325",
"merged_at": "2020-01-25T18:19:35Z",
"patch_url": "https://github.com/psf/requests/pull/5325.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5325"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/5324
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5324/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5324/comments
|
https://api.github.com/repos/psf/requests/issues/5324/events
|
https://github.com/psf/requests/issues/5324
| 554,829,912 |
MDU6SXNzdWU1NTQ4Mjk5MTI=
| 5,324 |
Issue with Parsing URIs in urllib3 - Breaks Security Tools when testing for Path Traversal
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/8996052?v=4",
"events_url": "https://api.github.com/users/mazen160/events{/privacy}",
"followers_url": "https://api.github.com/users/mazen160/followers",
"following_url": "https://api.github.com/users/mazen160/following{/other_user}",
"gists_url": "https://api.github.com/users/mazen160/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mazen160",
"id": 8996052,
"login": "mazen160",
"node_id": "MDQ6VXNlcjg5OTYwNTI=",
"organizations_url": "https://api.github.com/users/mazen160/orgs",
"received_events_url": "https://api.github.com/users/mazen160/received_events",
"repos_url": "https://api.github.com/users/mazen160/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mazen160/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mazen160/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mazen160",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2020-01-24T16:22:20Z
|
2021-09-03T00:10:41Z
|
2020-01-29T18:01:16Z
|
NONE
|
resolved
|
Hi all,
This is a ticket related to a bug I found when using requests. It appears that the root cause is in urlib3 that requests module use.
## Ticket: https://github.com/urllib3/urllib3/issues/1790
|
{
"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/5324/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5324/timeline
| null |
completed
| null | null | false |
[
"Hi @mazen160,\r\n\r\nFrom Requests perspective we’ve aimed to give users a simple interface to do http requests but may not support every use case, especially if it has potential security risks.\r\n\r\nThis is ultimately a decision urllib3 owns though. I’m going to resolve this ticket in favor of the one you linked. Thanks for bringing this to everyone’s attention!"
] |
https://api.github.com/repos/psf/requests/issues/5323
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5323/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5323/comments
|
https://api.github.com/repos/psf/requests/issues/5323/events
|
https://github.com/psf/requests/pull/5323
| 554,415,859 |
MDExOlB1bGxSZXF1ZXN0MzY2NTc0ODg2
| 5,323 |
Add response context to errors raised by iter_content
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/464726?v=4",
"events_url": "https://api.github.com/users/millerdev/events{/privacy}",
"followers_url": "https://api.github.com/users/millerdev/followers",
"following_url": "https://api.github.com/users/millerdev/following{/other_user}",
"gists_url": "https://api.github.com/users/millerdev/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/millerdev",
"id": 464726,
"login": "millerdev",
"node_id": "MDQ6VXNlcjQ2NDcyNg==",
"organizations_url": "https://api.github.com/users/millerdev/orgs",
"received_events_url": "https://api.github.com/users/millerdev/received_events",
"repos_url": "https://api.github.com/users/millerdev/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/millerdev/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/millerdev/subscriptions",
"type": "User",
"url": "https://api.github.com/users/millerdev",
"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"
}
| 1 |
2020-01-23T21:25:48Z
|
2024-05-20T14:36:43Z
|
2024-05-20T14:36:43Z
|
NONE
| null |
Errors raised by `Response.iter_content` did not have request/response context.
I couldn't figure out how to simulate `StreamConsumedError` or `ConnectionError` as raised from that context, and I could not find any other tests that simulate those errors either. However, the additions are so trivial and other tests _were_ updated to test the very same thing, so I'm confident in the changes.
Except for `StreamConsumedError` ~this introduces a circular reference between the `Response` and error objects because of `<Response>._error`. One way I thought of solving that issue is to break the cycle with a weakref, but that seems annoying since it would likely involve changing the implementation of `RequestException` in a way that may make it lose references.~ Another option would be to pass `request=self.request` instead of `response=self`. I added https://github.com/psf/requests/pull/5323/commits/8bb881fe425da8e2b5043da73462e6128d728506 to do that instead since that seems like a reasonable idea.
|
{
"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/5323/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5323/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5323.diff",
"html_url": "https://github.com/psf/requests/pull/5323",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5323.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5323"
}
| true |
[
"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/5322
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5322/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5322/comments
|
https://api.github.com/repos/psf/requests/issues/5322/events
|
https://github.com/psf/requests/issues/5322
| 554,010,706 |
MDU6SXNzdWU1NTQwMTA3MDY=
| 5,322 |
In [33]: print(requests.get("http://google.com").status_code) 429
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/25875643?v=4",
"events_url": "https://api.github.com/users/guanchengliu17/events{/privacy}",
"followers_url": "https://api.github.com/users/guanchengliu17/followers",
"following_url": "https://api.github.com/users/guanchengliu17/following{/other_user}",
"gists_url": "https://api.github.com/users/guanchengliu17/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/guanchengliu17",
"id": 25875643,
"login": "guanchengliu17",
"node_id": "MDQ6VXNlcjI1ODc1NjQz",
"organizations_url": "https://api.github.com/users/guanchengliu17/orgs",
"received_events_url": "https://api.github.com/users/guanchengliu17/received_events",
"repos_url": "https://api.github.com/users/guanchengliu17/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/guanchengliu17/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/guanchengliu17/subscriptions",
"type": "User",
"url": "https://api.github.com/users/guanchengliu17",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2020-01-23T08:30:27Z
|
2021-09-03T00:10:41Z
|
2020-01-29T18:02:59Z
|
NONE
|
resolved
|
Summary.
run the command: print(requests.get("http://google.com").status_code)
it return : 429 not 200

## Expected Result
What you expected.
## Actual Result
What happened instead.
## Reproduction Steps
```python
import requests
```
## System Information
$ python -m requests.help
```
<paste here>
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/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/5322/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5322/timeline
| null |
completed
| null | null | false |
[
"Hi @guanchengliu17,\r\n\r\nYou’re being rate limited by the server you’re calling. It’a best practice to be using sensible request limits and back off strategies in whatever scripts you’re writing."
] |
https://api.github.com/repos/psf/requests/issues/5321
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5321/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5321/comments
|
https://api.github.com/repos/psf/requests/issues/5321/events
|
https://github.com/psf/requests/issues/5321
| 552,474,251 |
MDU6SXNzdWU1NTI0NzQyNTE=
| 5,321 |
How can I send a POST request without default headers attributes?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/8525533?v=4",
"events_url": "https://api.github.com/users/brunocamarggo/events{/privacy}",
"followers_url": "https://api.github.com/users/brunocamarggo/followers",
"following_url": "https://api.github.com/users/brunocamarggo/following{/other_user}",
"gists_url": "https://api.github.com/users/brunocamarggo/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/brunocamarggo",
"id": 8525533,
"login": "brunocamarggo",
"node_id": "MDQ6VXNlcjg1MjU1MzM=",
"organizations_url": "https://api.github.com/users/brunocamarggo/orgs",
"received_events_url": "https://api.github.com/users/brunocamarggo/received_events",
"repos_url": "https://api.github.com/users/brunocamarggo/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/brunocamarggo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/brunocamarggo/subscriptions",
"type": "User",
"url": "https://api.github.com/users/brunocamarggo",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2020-01-20T19:30:57Z
|
2021-09-03T00:10:41Z
|
2020-01-29T18:04:47Z
|
NONE
|
resolved
|
Please,
Just a simple question.
Someone knows how can I send a POST request without default headeres attributes?
Thanks a lot.
Example:
```
@app.route('/foobar')
def get():
headers = {
'Authorization': 'Bearer Fooobaaaarrrrrr',
'foo': 'bar',
'bar': 'foo'
}
response = requests.post(url='http://127.0.0.1:5000/post', headers=headers)
return response.text
@app.route('/post', methods=['POST'])
def post():
return str(request.headers)
```
Reponse:
```
Host: 127.0.0.1:5000
User-Agent: python-requests/2.22.0
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Authorization: Bearer Fooobaaaarrrrrr
Foo: bar
Bar: foo
Content-Length: 0
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5321/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5321/timeline
| null |
completed
| null | null | false |
[
"Hi @brunocamarggo,\r\n\r\nThese kinds of questions are best asked on Stackoverflow, as we’ve specified when you open a ticket.\r\n\r\nI’d suggest looking at the PreparedRequests workflow, and opening a question on Stackoverflow if you’re still having issues. Thanks!"
] |
https://api.github.com/repos/psf/requests/issues/5320
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5320/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5320/comments
|
https://api.github.com/repos/psf/requests/issues/5320/events
|
https://github.com/psf/requests/issues/5320
| 552,242,921 |
MDU6SXNzdWU1NTIyNDI5MjE=
| 5,320 |
Not able to connect with proxy under corporate network.Failed to establish a new connection: [Errno 11001] getaddrinfo failed')))
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/28999794?v=4",
"events_url": "https://api.github.com/users/awaisumar1/events{/privacy}",
"followers_url": "https://api.github.com/users/awaisumar1/followers",
"following_url": "https://api.github.com/users/awaisumar1/following{/other_user}",
"gists_url": "https://api.github.com/users/awaisumar1/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/awaisumar1",
"id": 28999794,
"login": "awaisumar1",
"node_id": "MDQ6VXNlcjI4OTk5Nzk0",
"organizations_url": "https://api.github.com/users/awaisumar1/orgs",
"received_events_url": "https://api.github.com/users/awaisumar1/received_events",
"repos_url": "https://api.github.com/users/awaisumar1/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/awaisumar1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/awaisumar1/subscriptions",
"type": "User",
"url": "https://api.github.com/users/awaisumar1",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2020-01-20T11:31:13Z
|
2021-09-03T00:10:43Z
|
2020-01-20T13:48:40Z
|
NONE
|
resolved
|
I am using Request module and trying to access a host on local domain, but i am getting above error.
as i am working under corporate network so i have set up the proxy as well.
i am running this code
`proxyDict = { "http" : http_proxy, "https" : https_proxy, }`
`headers={'Content-type':'application/json', 'Accept':'application/json'} `
` r = requests.post(url = 'https://localhost:44366/v1/Detection/upload', data = data,verify=False,headers=headers,proxies=proxyDict)`
and getting this error:
> ProxyError: HTTPSConnectionPool(host='localhost', port=44366): Max retries exceeded with url: /v1/Detection/upload (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x000001E4849BA828>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')))
when i run it without providing the proxy in request then i get this error:
Code:
`r = requests.post(url = 'https://localhost:44366/v1/Detection/upload', data = data,verify=False,headers=headers)`
Error:
> ProxyError: HTTPSConnectionPool(host='localhost', port=44366): Max retries exceeded with url: /v1/Detection/upload (Caused by ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)))
i have tried to connect to an external API without any kind of proxy and i am getting response 201:
code:
` data = {"name": "morpheus", "job": "leader"}`
` r = requests.post(url = 'https://reqres.in/api/users', data = data)`
but when i try to run:
`r = requests.get('http://http2bin.org/get')`
`print(r.status_code)`
i get 404
i hope i have provided enough information.
i am using python 3.8.0 ,requests 2.22.0 and everything is in Anaconda environment.
Update:
get request is working on the same link the error comes when i use post method.
`r =requests.get('https://localhost:44366/v1/Version',verify=False)`
`print(r.status_code)`
response is 200
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/28999794?v=4",
"events_url": "https://api.github.com/users/awaisumar1/events{/privacy}",
"followers_url": "https://api.github.com/users/awaisumar1/followers",
"following_url": "https://api.github.com/users/awaisumar1/following{/other_user}",
"gists_url": "https://api.github.com/users/awaisumar1/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/awaisumar1",
"id": 28999794,
"login": "awaisumar1",
"node_id": "MDQ6VXNlcjI4OTk5Nzk0",
"organizations_url": "https://api.github.com/users/awaisumar1/orgs",
"received_events_url": "https://api.github.com/users/awaisumar1/received_events",
"repos_url": "https://api.github.com/users/awaisumar1/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/awaisumar1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/awaisumar1/subscriptions",
"type": "User",
"url": "https://api.github.com/users/awaisumar1",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5320/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5320/timeline
| null |
completed
| null | null | false |
[
"i have solved the issue ,because i was working on a local development server so i didn't need proxy, so simply removing proxies works for me.\r\n"
] |
https://api.github.com/repos/psf/requests/issues/5319
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5319/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5319/comments
|
https://api.github.com/repos/psf/requests/issues/5319/events
|
https://github.com/psf/requests/issues/5319
| 551,792,409 |
MDU6SXNzdWU1NTE3OTI0MDk=
| 5,319 |
Incorrect Content-Length header in response
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4",
"events_url": "https://api.github.com/users/ghost/events{/privacy}",
"followers_url": "https://api.github.com/users/ghost/followers",
"following_url": "https://api.github.com/users/ghost/following{/other_user}",
"gists_url": "https://api.github.com/users/ghost/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ghost",
"id": 10137,
"login": "ghost",
"node_id": "MDQ6VXNlcjEwMTM3",
"organizations_url": "https://api.github.com/users/ghost/orgs",
"received_events_url": "https://api.github.com/users/ghost/received_events",
"repos_url": "https://api.github.com/users/ghost/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ghost/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ghost",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2020-01-18T16:38:30Z
|
2021-09-03T00:10:43Z
|
2020-01-19T06:55:18Z
|
NONE
|
resolved
|
I've been debugging my script that is fetched file size (using `requests.head` and then processing `Content-Length` header) wrong; with HEAD request file size was ~17MB, with GET requests downloaded file has taken expected ~75MB. HEAD and GET requests were sent to `raw.github.com`, which responds with `Content-Length` both on HEAD and GET requests, so it wasn't the cause.
## Expected Result
I expected HEAD request and GET request to have the same `Content-Length` headers.
This is the result I have when I use `curl` or `urllib` to send requests.
## Actual Result
Using `requests`, HEAD and GET requests `Content-Length` headers differ (HEAD = ~17MB, GET = ~75MB).
## Reproduction Steps
```python
import requests
r_head = requests.head("https://raw.githubusercontent.com/zapret-info/z-i/master/dump.csv")
print(r_head.headers["Content-Length"])
```
```bash
$ curl -I https://raw.githubusercontent.com/zapret-info/z-i/master/dump.csv | grep Content-Length
```
Then compare what `requests` yields and what `curl` yields.
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.8.1"
},
"platform": {
"release": "5.4.12-arch1-1",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1010104f"
},
"urllib3": {
"version": "1.25.7"
},
"using_pyopenssl": false
}
```
| null |
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5319/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5319/timeline
| null |
completed
| null | null | false |
[
"https://stackoverflow.com/questions/36194656/http-content-length-and-content-encoding\r\n\r\nRequests sends an `Accept-Encoding: gzip, deflate` request header by default, causing the response body to be compressed; curl doesn't.\r\n\r\nSend `Accept-Encoding: identity` to get the \"correct\" size.",
"@s104346 thanks, that works!"
] |
https://api.github.com/repos/psf/requests/issues/5318
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5318/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5318/comments
|
https://api.github.com/repos/psf/requests/issues/5318/events
|
https://github.com/psf/requests/issues/5318
| 551,363,496 |
MDU6SXNzdWU1NTEzNjM0OTY=
| 5,318 |
Get post request works by using postman but dose not work in requests
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/24357416?v=4",
"events_url": "https://api.github.com/users/nnit-kzhg/events{/privacy}",
"followers_url": "https://api.github.com/users/nnit-kzhg/followers",
"following_url": "https://api.github.com/users/nnit-kzhg/following{/other_user}",
"gists_url": "https://api.github.com/users/nnit-kzhg/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nnit-kzhg",
"id": 24357416,
"login": "nnit-kzhg",
"node_id": "MDQ6VXNlcjI0MzU3NDE2",
"organizations_url": "https://api.github.com/users/nnit-kzhg/orgs",
"received_events_url": "https://api.github.com/users/nnit-kzhg/received_events",
"repos_url": "https://api.github.com/users/nnit-kzhg/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nnit-kzhg/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nnit-kzhg/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nnit-kzhg",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2020-01-17T11:31:13Z
|
2021-09-03T00:10:40Z
|
2020-01-29T18:10:32Z
|
NONE
|
resolved
|
Hello Mates,
i got a problem to post a HTTP request to a internal web server and it works when i using postman and dosent work in python request. the request is pretty simple just like below,
response=requests.post("https\\myserver",auth=('admin','****'),verify=False), i got following error log,
requests.exceptions.ProxyError: HTTPSConnectionPool(host='xx.xx.xx.xx', port=443): Max retries exceeded with url: /myserver (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 504 Gateway Timeout')))
can anyone give me some tips on where i should look into? thanks a lot
|
{
"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/5318/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5318/timeline
| null |
completed
| null | null | false |
[
"Hi @nnit-kzhg,\r\n\r\nThis is an issue with your proxy configuration that we won’t be able to debug on this issue board. I’d encourage opening an question on Stackoverflow to debug further. "
] |
https://api.github.com/repos/psf/requests/issues/5317
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5317/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5317/comments
|
https://api.github.com/repos/psf/requests/issues/5317/events
|
https://github.com/psf/requests/issues/5317
| 551,347,501 |
MDU6SXNzdWU1NTEzNDc1MDE=
| 5,317 |
Certifi Dependency Missing in setup.py
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/23361557?v=4",
"events_url": "https://api.github.com/users/nmakarun/events{/privacy}",
"followers_url": "https://api.github.com/users/nmakarun/followers",
"following_url": "https://api.github.com/users/nmakarun/following{/other_user}",
"gists_url": "https://api.github.com/users/nmakarun/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nmakarun",
"id": 23361557,
"login": "nmakarun",
"node_id": "MDQ6VXNlcjIzMzYxNTU3",
"organizations_url": "https://api.github.com/users/nmakarun/orgs",
"received_events_url": "https://api.github.com/users/nmakarun/received_events",
"repos_url": "https://api.github.com/users/nmakarun/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nmakarun/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nmakarun/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nmakarun",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2020-01-17T10:57:43Z
|
2021-09-03T00:10:43Z
|
2020-01-17T11:02:16Z
|
NONE
|
resolved
|
Summary.
I was trying to install the library manually using the source file and found that certifi>=2017.4.17 was not mentioned in the setup.py
What you expected.
install_requires=[certifi>=2017.4.17]
What happened instead.
Processing dependencies for requests==2.22.0
Searching for certifi>=2017.4.17
Reading https://pypi.org/simple/certifi/
## 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/23361557?v=4",
"events_url": "https://api.github.com/users/nmakarun/events{/privacy}",
"followers_url": "https://api.github.com/users/nmakarun/followers",
"following_url": "https://api.github.com/users/nmakarun/following{/other_user}",
"gists_url": "https://api.github.com/users/nmakarun/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nmakarun",
"id": 23361557,
"login": "nmakarun",
"node_id": "MDQ6VXNlcjIzMzYxNTU3",
"organizations_url": "https://api.github.com/users/nmakarun/orgs",
"received_events_url": "https://api.github.com/users/nmakarun/received_events",
"repos_url": "https://api.github.com/users/nmakarun/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nmakarun/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nmakarun/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nmakarun",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5317/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5317/timeline
| null |
completed
| null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/5316
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5316/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5316/comments
|
https://api.github.com/repos/psf/requests/issues/5316/events
|
https://github.com/psf/requests/issues/5316
| 550,522,326 |
MDU6SXNzdWU1NTA1MjIzMjY=
| 5,316 |
HTTPAdapter with SSLContext specified does not use SSLContext's ca_certs on Windows
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/8798850?v=4",
"events_url": "https://api.github.com/users/matthchr/events{/privacy}",
"followers_url": "https://api.github.com/users/matthchr/followers",
"following_url": "https://api.github.com/users/matthchr/following{/other_user}",
"gists_url": "https://api.github.com/users/matthchr/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/matthchr",
"id": 8798850,
"login": "matthchr",
"node_id": "MDQ6VXNlcjg3OTg4NTA=",
"organizations_url": "https://api.github.com/users/matthchr/orgs",
"received_events_url": "https://api.github.com/users/matthchr/received_events",
"repos_url": "https://api.github.com/users/matthchr/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/matthchr/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/matthchr/subscriptions",
"type": "User",
"url": "https://api.github.com/users/matthchr",
"user_view_type": "public"
}
|
[] |
open
| false | null |
[] | null | 6 |
2020-01-16T01:34:19Z
|
2024-10-28T23:08:28Z
| null |
NONE
| null |
My objective was to get `requests` to use the Windows certificate store rather than the `certifi` bundle. **Maybe this just isn't supported.**
I know there is some complexity and has been some debate about how supplying an `SSLContext` was supposed to work in `requests` (see #2118). But according to that issue, TransportAdapters (i.e. `HTTPAdapter`) is the recommended way to provide an `SSLContext`.
## Expected Result
The SSL Context provided would pass its `ca_certs` along to requests and authentication with a remote endpoint would work.
## Actual Result
It didn't work, instead there is a failure looking up the certificate bundle (which I've neglected to deploy alongside my application, so it's not there).
The callstack ends up here:
```
File "venv\lib\site-packages\requests\adapters.py", line 228, in cert_verify
"invalid path: {}".format(cert_loc))
```
## Reproduction Steps
```python
import requests
import requests.adapters
# adapted from https://stackoverflow.com/questions/42981429/ssl-failure-on-windows-using-python-requests/50215614
class SSLContextAdapter(requests.adapters.HTTPAdapter):
def init_poolmanager(self, *args, **kwargs):
context = ssl.create_default_context()
kwargs['ssl_context'] = context
return super(SSLContextAdapter, self).init_poolmanager(*args, **kwargs)
s = requests.Session()
s.mount('https://www.google.com', SSLContextAdapter())
result = s.get('https://www.google.com')
```
Additionally (as a hack to emulate my enviornment), go rename `venv\Lib\site-packages\certifi\cacert.pem`
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.7.4"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1010103f"
},
"urllib3": {
"version": "1.25.7"
},
"using_pyopenssl": false
}
```
| null |
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5316/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5316/timeline
| null | null | null | null | false |
[
"I agree that this should be much more straightforward than it is. There should be a simple way to tell it to use Windows cert store on Windows, or to hook this behaviour in via an adapter.\r\n\r\nI spent quite a while figuring out how to do this, and eventually came up with a solution/workaround.\r\n\r\n```\r\nclass WindowsCertStoreAdapter(requests.adapters.HTTPAdapter):\r\n def cert_verify(self, conn, url, verify, cert):\r\n super(WindowsCertStoreAdapter, self).cert_verify(conn, url, verify, cert)\r\n # By default Python requests uses the ca_certs from the certifi module\r\n # But we want to use the certificate store instead.\r\n # By clearing the ca_certs variable we force it to fall back on that behaviour \r\n conn.ca_certs = None\r\n```\r\n\r\nhooked in in the same way as the description above.\r\n\r\nThe problem with your code is that it happily loads all the certs from the cert store, but as long as ca_certs is set to point at the certificate bundle, it will load everything from that afterwards, overwriting them. By making sure it's None you keep the windows cert store ones until they're needed. Hope that helps, anyway.",
"[pip-system-certs](https://pypi.org/project/pip-system-certs/) might be of interest for you.",
"@gjb1002, I think the problem with the above code is much simpler.\r\n@matthchr just does not load the certificates from the store after creating the context as mentioned on StackOverflow:\r\n```\r\ncontext.load_default_certs() # this loads the OS defaults on Windows\r\n```\r\n",
"@fedorbirjukov - `create_default_context` does that automatically, see: https://github.com/python/cpython/blob/477b1b25768945621d466a8b3f0739297a842439/Lib/ssl.py\r\n\r\nMoreover the issue is less with the `ssl_context` and more with the fact that if the `certifi` bundle is not found `requests` raises. \r\n\r\nI think that @gjb1002's answer will solve this problem, although in my case I just gave in and rewrote our http stack using `aiohttp` (which does the right thing here and supports cleaner async/await to boot).",
"Now I see. If using this hack, then you should also clear `conn.ca_cert_dir = None`.",
"I have successfully used the solution above before. But it is not available if you use another package that internally uses `requests` for its HTTP requests. These often have no documented way to access the internal session instance."
] |
https://api.github.com/repos/psf/requests/issues/5315
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5315/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5315/comments
|
https://api.github.com/repos/psf/requests/issues/5315/events
|
https://github.com/psf/requests/issues/5315
| 550,463,014 |
MDU6SXNzdWU1NTA0NjMwMTQ=
| 5,315 |
Improve documentation
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/24916060?v=4",
"events_url": "https://api.github.com/users/kaliomar/events{/privacy}",
"followers_url": "https://api.github.com/users/kaliomar/followers",
"following_url": "https://api.github.com/users/kaliomar/following{/other_user}",
"gists_url": "https://api.github.com/users/kaliomar/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kaliomar",
"id": 24916060,
"login": "kaliomar",
"node_id": "MDQ6VXNlcjI0OTE2MDYw",
"organizations_url": "https://api.github.com/users/kaliomar/orgs",
"received_events_url": "https://api.github.com/users/kaliomar/received_events",
"repos_url": "https://api.github.com/users/kaliomar/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kaliomar/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kaliomar/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kaliomar",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2020-01-15T22:21:54Z
|
2021-09-03T00:10:38Z
|
2020-02-01T01:10:09Z
|
NONE
|
resolved
|
When i import requests and run help(requests), Output is this:
> ESCRIPTION
Requests HTTP Library
~~~~~~~~~~~~~~~~~~~~~
Requests is an HTTP library, written in Python, for human beings. Basic GET
usage:
>>> import requests
>>> r = requests.get('https://www.python.org')
>>> r.status_code
200
>>> 'Python is a programming language' in r.content
True
But when i try this 'Python is a programming language' in r.content, Output doesn't be True, It says
> TypeError: a bytes-like object is required, not 'str'
|
{
"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/5315/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5315/timeline
| null |
completed
| null | null | false |
[
"This should be already fixed in master https://github.com/psf/requests/blob/d2590ee46c0641958b6d4792a206bd5171cb247d/requests/__init__.py#L19\r\n",
"`'Python is a programming language' in r.text` is also an alternative (which maybe works in both 2.7 and 3.x?).",
"The version in master also works both in 2.7 and 3.x",
"@kaliomar, Recursing is correct. This was fixed in #4987 in August. The error you're hitting is the example is trying to compare content (a byte string) with a unicode string in Python 3 which won't work. This example worked in Python2 since both strings were byte-strings.\r\n\r\nIt looks like this wasn't merged until after the last release of Requests, but will be corrected in the next. Thanks for bringing it to our attention."
] |
https://api.github.com/repos/psf/requests/issues/5314
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5314/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5314/comments
|
https://api.github.com/repos/psf/requests/issues/5314/events
|
https://github.com/psf/requests/issues/5314
| 549,492,998 |
MDU6SXNzdWU1NDk0OTI5OTg=
| 5,314 |
Failed to connect the web server with using a surviving socks5h proxy server.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/18731965?v=4",
"events_url": "https://api.github.com/users/Panjks/events{/privacy}",
"followers_url": "https://api.github.com/users/Panjks/followers",
"following_url": "https://api.github.com/users/Panjks/following{/other_user}",
"gists_url": "https://api.github.com/users/Panjks/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Panjks",
"id": 18731965,
"login": "Panjks",
"node_id": "MDQ6VXNlcjE4NzMxOTY1",
"organizations_url": "https://api.github.com/users/Panjks/orgs",
"received_events_url": "https://api.github.com/users/Panjks/received_events",
"repos_url": "https://api.github.com/users/Panjks/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Panjks/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Panjks/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Panjks",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2020-01-14T11:05:07Z
|
2022-02-26T06:00:22Z
|
2021-11-28T05:54:07Z
|
NONE
|
resolved
|
I used a socks5 proxy server to connect twitter and another web server.
It is ok when using curl to send the requests and receive the responses. But when I used requests, there is some wrong happened.
My curl command is :
`curl -x socks5h://127.0.0.1:1234 www.twitter.com -v -L`
There is no problem with return the html from twitter.
But with requests, my code is:
```
import requests
proxies = {'https': 'socks5h://127.0.0.1:1234',
'http': 'socks5h://127.0.0.1:1234'}
response = requests.get("https://www.twitter.com", proxies=proxies)
print(response)
```
There has some exception happenned about SSL:
```
Traceback (most recent call last):
File "/root/anaconda3/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py", line 456, in wrap_socket
cnx.do_handshake()
File "/root/anaconda3/lib/python3.7/site-packages/OpenSSL/SSL.py", line 1915, in do_handshake
self._raise_ssl_error(self._ssl, result)
File "/root/anaconda3/lib/python3.7/site-packages/OpenSSL/SSL.py", line 1639, in _raise_ssl_error
raise SysCallError(errno, errorcode.get(errno))
OpenSSL.SSL.SysCallError: (104, 'ECONNRESET')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/root/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 343, in _make_request
self._validate_conn(conn)
File "/root/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 839, in _validate_conn
conn.connect()
File "/root/anaconda3/lib/python3.7/site-packages/urllib3/connection.py", line 344, in connect
ssl_context=context)
File "/root/anaconda3/lib/python3.7/site-packages/urllib3/util/ssl_.py", line 347, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/root/anaconda3/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py", line 462, in wrap_socket
raise ssl.SSLError('bad handshake: %r' % e)
ssl.SSLError: ("bad handshake: SysCallError(104, 'ECONNRESET')",)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/anaconda3/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/root/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File "/root/anaconda3/lib/python3.7/site-packages/urllib3/util/retry.py", line 399, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: SOCKSHTTPSConnectionPool(host='www.twitter.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError("bad handshake: SysCallError(104, 'ECONNRESET')")))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/root/anaconda3/lib/python3.7/site-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/root/anaconda3/lib/python3.7/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/root/anaconda3/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/root/anaconda3/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/root/anaconda3/lib/python3.7/site-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: SOCKSHTTPSConnectionPool(host='www.twitter.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError("bad handshake: SysCallError(104, 'ECONNRESET')")))
```
I tried my best and failed to solve this problem.
Does anyone know how this can be resolved?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4",
"events_url": "https://api.github.com/users/sethmlarson/events{/privacy}",
"followers_url": "https://api.github.com/users/sethmlarson/followers",
"following_url": "https://api.github.com/users/sethmlarson/following{/other_user}",
"gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sethmlarson",
"id": 18519037,
"login": "sethmlarson",
"node_id": "MDQ6VXNlcjE4NTE5MDM3",
"organizations_url": "https://api.github.com/users/sethmlarson/orgs",
"received_events_url": "https://api.github.com/users/sethmlarson/received_events",
"repos_url": "https://api.github.com/users/sethmlarson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sethmlarson",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5314/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5314/timeline
| null |
completed
| null | null | false |
[
"Looks similar to #4892 and https://github.com/psf/requests/issues/2543#issuecomment-119032613\r\n\r\nYou may want to ensure that you're running the latest versions of requests and urllib3: `pip install -U requests urllib3`. ",
"Going to close this issue as it doesn't look like anything we can do without additional information."
] |
https://api.github.com/repos/psf/requests/issues/5313
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5313/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5313/comments
|
https://api.github.com/repos/psf/requests/issues/5313/events
|
https://github.com/psf/requests/issues/5313
| 548,704,957 |
MDU6SXNzdWU1NDg3MDQ5NTc=
| 5,313 |
Unable to install settings module
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/54717468?v=4",
"events_url": "https://api.github.com/users/JoshuaDKT/events{/privacy}",
"followers_url": "https://api.github.com/users/JoshuaDKT/followers",
"following_url": "https://api.github.com/users/JoshuaDKT/following{/other_user}",
"gists_url": "https://api.github.com/users/JoshuaDKT/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JoshuaDKT",
"id": 54717468,
"login": "JoshuaDKT",
"node_id": "MDQ6VXNlcjU0NzE3NDY4",
"organizations_url": "https://api.github.com/users/JoshuaDKT/orgs",
"received_events_url": "https://api.github.com/users/JoshuaDKT/received_events",
"repos_url": "https://api.github.com/users/JoshuaDKT/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JoshuaDKT/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JoshuaDKT/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JoshuaDKT",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2020-01-13T04:59:18Z
|
2021-09-03T00:10:40Z
|
2020-01-29T18:24:16Z
|
NONE
|
resolved
|
For my code, there is an import at the top:
```
from settings import Settings
```
I need to install the settings module but whenever I try to install it, I get this error message:
```
ERROR: Could not find a version that satisfies the requirement settings (from versions: none)
ERROR: No matching distribution found for settings
```
Does anyone know how this can be 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/5313/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5313/timeline
| null |
completed
| null | null | false |
[
"@DuckTooth,\r\n\r\nThis isn’t a module supplied by Requests and isn’t the right forum to debug issues like this. I’d suggest reviewing the docs or reaching out to pypa through their recommended process."
] |
https://api.github.com/repos/psf/requests/issues/5312
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5312/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5312/comments
|
https://api.github.com/repos/psf/requests/issues/5312/events
|
https://github.com/psf/requests/issues/5312
| 548,564,026 |
MDU6SXNzdWU1NDg1NjQwMjY=
| 5,312 |
HEAD request never gets timeout
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/59794833?v=4",
"events_url": "https://api.github.com/users/lingsan43/events{/privacy}",
"followers_url": "https://api.github.com/users/lingsan43/followers",
"following_url": "https://api.github.com/users/lingsan43/following{/other_user}",
"gists_url": "https://api.github.com/users/lingsan43/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lingsan43",
"id": 59794833,
"login": "lingsan43",
"node_id": "MDQ6VXNlcjU5Nzk0ODMz",
"organizations_url": "https://api.github.com/users/lingsan43/orgs",
"received_events_url": "https://api.github.com/users/lingsan43/received_events",
"repos_url": "https://api.github.com/users/lingsan43/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lingsan43/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lingsan43/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lingsan43",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2020-01-12T12:31:09Z
|
2021-09-02T00:07:28Z
|
2020-02-10T05:35:00Z
|
NONE
|
resolved
|
I am doing a HEAD request with a timeout=4.
Tried to ask on stackoverflow, incase this is something known, but it seems not to be the case. (https://stackoverflow.com/questions/59703532/requests-does-not-timeout)
## Expected Result
Timeout after 4 seconds.
## Actual Result
Timeout never happens.
## Reproduction Steps
```python
import requests
requests.head('https://50.79.153.56',verify=False,timeout=(4,4))
```
## System Information
$ python -m requests.help
```
python -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "2.7.16"
},
"platform": {
"release": "5.0.0-13-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1010102f"
},
"urllib3": {
"version": "1.25.7"
},
"using_pyopenssl": false
}
python3 -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.3"
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.7.3"
},
"platform": {
"release": "5.0.0-13-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010100f",
"version": "19.0.0"
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1010102f"
},
"urllib3": {
"version": "1.24.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/5312/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5312/timeline
| null |
completed
| null | null | false |
[
"This is an issue with the underlying urllib3 library. See their documentation on timeouts: https://github.com/urllib3/urllib3/blob/d369183f60749d735f0676efb22ecd64fc694768/src/urllib3/util/timeout.py#L78-L89\r\n\r\n> if a server streams one byte every fifteen seconds, a timeout\r\n of 20 seconds will not trigger, even though the request will take\r\n several minutes to complete",
"@s104346 is correct here. Requests can only support connection and read timeouts as we state in our [docs](https://requests.readthedocs.io/en/master/user/quickstart/#timeouts). We cannot support total connection timeouts today in a case like this."
] |
https://api.github.com/repos/psf/requests/issues/5311
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5311/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5311/comments
|
https://api.github.com/repos/psf/requests/issues/5311/events
|
https://github.com/psf/requests/issues/5311
| 548,450,393 |
MDU6SXNzdWU1NDg0NTAzOTM=
| 5,311 |
Response 412 from this website
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/7510469?v=4",
"events_url": "https://api.github.com/users/terenceltl/events{/privacy}",
"followers_url": "https://api.github.com/users/terenceltl/followers",
"following_url": "https://api.github.com/users/terenceltl/following{/other_user}",
"gists_url": "https://api.github.com/users/terenceltl/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/terenceltl",
"id": 7510469,
"login": "terenceltl",
"node_id": "MDQ6VXNlcjc1MTA0Njk=",
"organizations_url": "https://api.github.com/users/terenceltl/orgs",
"received_events_url": "https://api.github.com/users/terenceltl/received_events",
"repos_url": "https://api.github.com/users/terenceltl/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/terenceltl/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/terenceltl/subscriptions",
"type": "User",
"url": "https://api.github.com/users/terenceltl",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2020-01-11T16:30:46Z
|
2021-09-03T00:10:39Z
|
2020-01-31T19:21:08Z
|
NONE
|
resolved
|
I keep getting response 412 and a blank webpage with only 4 blank lines from this webpage:
http://wjw.hubei.gov.cn/
## Expected Result
Both Chrome and Firefox can open the page fine. But I notice when the browser loads the page, it is a blank page at first and the browser reloads / loads more and the complete page is loaded eventually.
## Actual Result
On both Windows 10 (Python 3.7.4) and Raspberry Pi (Python 3.5.3), requests cannot return the page like Chrome / Firefox did.
## Reproduction Steps
```python
import requests
url = 'http://wjw.hubei.gov.cn/'
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36'}
res = requests.get(url,headers=headers)
print(res)
```
<Response [412]>
If you use print(res.content) you will also notice that the server return a bunch of HTML but just that not of the webpage returned by Chrome / Firefox.
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "1.7.1"
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "2.7.13"
},
"platform": {
"release": "4.9.59-v7+",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "101000af",
"version": "16.2.0"
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "101000cf"
},
"urllib3": {
"version": "1.25.3"
},
"using_pyopenssl": true
}
```
I also ask this over in stackoverflow but so far no luck:
https://stackoverflow.com/questions/59657613/response-412-when-using-the-requests-python-package-to-access-this-webpage-ho#59661448
A helpful fellow suggested that a valid cookie has to be sent along with the request, but so far this cannot solve the issue on my platforms.
Is there a way to read this particular webpage?
Supplement:
On the Raspberry Pi, even lynx cannot open the webpage.
|
{
"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/5311/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5311/timeline
| null |
completed
| null | null | false |
[
"This does not sound like an issue with Requests, but the server's configuration interacting with the request you send. If you could provide (e.g.) a cURL request like the below that *does* work or give unexpectedly different results than Requests could provide, that may be an issue.\r\n\r\n```\r\ncurl --verbose http://wjw.hubei.gov.cn/ \\\r\n -H\"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36\"\r\n...\r\n< HTTP/1.1 412 Precondition Failed \r\n...\r\n```\r\n\r\nI might recommend doing a request with Chrome with the Network dev tools open, the [copy the request as cURL](https://www.google.com/search?q=chrome+copy+request+as+curl). Verify that also works in the command line. You can convert that to requests then with [this tool](https://curl.trillworks.com/). Note that you'll generally end up with many many more headers."
] |
https://api.github.com/repos/psf/requests/issues/5310
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5310/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5310/comments
|
https://api.github.com/repos/psf/requests/issues/5310/events
|
https://github.com/psf/requests/issues/5310
| 547,636,862 |
MDU6SXNzdWU1NDc2MzY4NjI=
| 5,310 |
Getting ConnectionResetError(10054) while using Requests
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/28849779?v=4",
"events_url": "https://api.github.com/users/jnkumar58/events{/privacy}",
"followers_url": "https://api.github.com/users/jnkumar58/followers",
"following_url": "https://api.github.com/users/jnkumar58/following{/other_user}",
"gists_url": "https://api.github.com/users/jnkumar58/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jnkumar58",
"id": 28849779,
"login": "jnkumar58",
"node_id": "MDQ6VXNlcjI4ODQ5Nzc5",
"organizations_url": "https://api.github.com/users/jnkumar58/orgs",
"received_events_url": "https://api.github.com/users/jnkumar58/received_events",
"repos_url": "https://api.github.com/users/jnkumar58/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jnkumar58/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jnkumar58/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jnkumar58",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2020-01-09T18:08:25Z
|
2020-12-08T17:24:33Z
|
2020-01-09T19:03:59Z
|
NONE
|
resolved
|
Summary.
I am getting ConnectionResetError(10054) while running a POST against a webservice. I am getting successful output every time when I am using POSTMAN to do it.
## Expected Result
Should get HTTP Code:200 and successful output
## Actual Result
What happened instead.
urllib3.exceptions.ProtocolError: ("Connection broken: ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)", ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/Admin/Services/Webservices/Testing/new_test.py", line 77, in <module>
response = requests.request("POST", url, headers=headers, data = payload,verify=False)
File "C:\Python37\lib\site-packages\requests\api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Python37\lib\site-packages\requests\sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "C:\Python37\lib\site-packages\requests\sessions.py", line 686, in send
r.content
File "C:\Python37\lib\site-packages\requests\models.py", line 828, in content
self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
File "C:\Python37\lib\site-packages\requests\models.py", line 753, in generate
raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ("Connection broken: ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)", ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))
## Reproduction Steps
```python
import requests
response = requests.request("POST", url, headers=headers, data = payload,verify=False)
print(response.text.encode('utf8'))
```
## System Information
$ python -m requests.help
```
λ python -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.7.4"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1010103f"
},
"urllib3": {
"version": "1.25.6"
},
"using_pyopenssl": false
}
```
[error.txt](https://github.com/psf/requests/files/4041827/error.txt)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/28849779?v=4",
"events_url": "https://api.github.com/users/jnkumar58/events{/privacy}",
"followers_url": "https://api.github.com/users/jnkumar58/followers",
"following_url": "https://api.github.com/users/jnkumar58/following{/other_user}",
"gists_url": "https://api.github.com/users/jnkumar58/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jnkumar58",
"id": 28849779,
"login": "jnkumar58",
"node_id": "MDQ6VXNlcjI4ODQ5Nzc5",
"organizations_url": "https://api.github.com/users/jnkumar58/orgs",
"received_events_url": "https://api.github.com/users/jnkumar58/received_events",
"repos_url": "https://api.github.com/users/jnkumar58/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jnkumar58/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jnkumar58/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jnkumar58",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5310/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5310/timeline
| null |
completed
| null | null | false |
[
"Did you get out of this problem? i get this issue too and don't know what happened, can you share how to resolve this problem?"
] |
https://api.github.com/repos/psf/requests/issues/5309
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5309/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5309/comments
|
https://api.github.com/repos/psf/requests/issues/5309/events
|
https://github.com/psf/requests/pull/5309
| 547,132,798 |
MDExOlB1bGxSZXF1ZXN0MzYwNjc4ODgz
| 5,309 |
Update models.py
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1873994?v=4",
"events_url": "https://api.github.com/users/alanyee/events{/privacy}",
"followers_url": "https://api.github.com/users/alanyee/followers",
"following_url": "https://api.github.com/users/alanyee/following{/other_user}",
"gists_url": "https://api.github.com/users/alanyee/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alanyee",
"id": 1873994,
"login": "alanyee",
"node_id": "MDQ6VXNlcjE4NzM5OTQ=",
"organizations_url": "https://api.github.com/users/alanyee/orgs",
"received_events_url": "https://api.github.com/users/alanyee/received_events",
"repos_url": "https://api.github.com/users/alanyee/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alanyee/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alanyee/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alanyee",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2020-01-08T22:12:57Z
|
2021-11-26T05:00:35Z
|
2021-08-28T04:27:45Z
|
CONTRIBUTOR
|
resolved
|
Remove needless list()
|
{
"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/5309/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5309/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5309.diff",
"html_url": "https://github.com/psf/requests/pull/5309",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5309.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5309"
}
| true |
[
"Thanks for the PR, @alanyee! We typically don't take stylistic update PRs as it sets a precedent producing a lot of additional maintenance churn. We do appreciate it though."
] |
https://api.github.com/repos/psf/requests/issues/5308
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5308/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5308/comments
|
https://api.github.com/repos/psf/requests/issues/5308/events
|
https://github.com/psf/requests/issues/5308
| 546,572,378 |
MDU6SXNzdWU1NDY1NzIzNzg=
| 5,308 |
ModuleNotFoundError: No module named 'requests'
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/18223385?v=4",
"events_url": "https://api.github.com/users/hktalent/events{/privacy}",
"followers_url": "https://api.github.com/users/hktalent/followers",
"following_url": "https://api.github.com/users/hktalent/following{/other_user}",
"gists_url": "https://api.github.com/users/hktalent/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hktalent",
"id": 18223385,
"login": "hktalent",
"node_id": "MDQ6VXNlcjE4MjIzMzg1",
"organizations_url": "https://api.github.com/users/hktalent/orgs",
"received_events_url": "https://api.github.com/users/hktalent/received_events",
"repos_url": "https://api.github.com/users/hktalent/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hktalent/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hktalent/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hktalent",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2020-01-08T00:05:33Z
|
2021-09-03T00:10:44Z
|
2020-01-08T00:24:42Z
|
NONE
|
resolved
|
Mac os,Python 3.7.3
```
$ pip3 install requests
Requirement already satisfied: requests in /usr/local/lib/python3.7/site-packages (2.22.0)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.7/site-packages (from requests) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/site-packages (from requests) (2019.6.16)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/site-packages (from requests) (1.25.3)
Requirement already satisfied: idna<2.9,>=2.5 in /usr/local/lib/python3.7/site-packages (from requests) (2.8)
```
```
$ ls /usr/local/lib/python3.7/site-packages|grep requests
requests
requests-2.22.0.dist-info
requests_file-1.4.3.dist-info
requests_file.py
requests_toolbelt
requests_toolbelt-0.9.1.dist-info
```
```
$ python3 upJsp.py -h
Traceback (most recent call last):
File "upJsp.py", line 4, in <module>
import requests as requestsSs
ModuleNotFoundError: No module named 'requests'
```
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/18223385?v=4",
"events_url": "https://api.github.com/users/hktalent/events{/privacy}",
"followers_url": "https://api.github.com/users/hktalent/followers",
"following_url": "https://api.github.com/users/hktalent/following{/other_user}",
"gists_url": "https://api.github.com/users/hktalent/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hktalent",
"id": 18223385,
"login": "hktalent",
"node_id": "MDQ6VXNlcjE4MjIzMzg1",
"organizations_url": "https://api.github.com/users/hktalent/orgs",
"received_events_url": "https://api.github.com/users/hktalent/received_events",
"repos_url": "https://api.github.com/users/hktalent/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hktalent/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hktalent/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hktalent",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5308/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5308/timeline
| null |
completed
| null | null | false |
[
"fix:\r\nsys.path add /usr/local/lib/python3.7/site-packages"
] |
https://api.github.com/repos/psf/requests/issues/5307
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5307/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5307/comments
|
https://api.github.com/repos/psf/requests/issues/5307/events
|
https://github.com/psf/requests/pull/5307
| 546,309,658 |
MDExOlB1bGxSZXF1ZXN0MzYwMDExMTYz
| 5,307 |
Enable copr builds and add packit config
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/31201372?v=4",
"events_url": "https://api.github.com/users/dhodovsk/events{/privacy}",
"followers_url": "https://api.github.com/users/dhodovsk/followers",
"following_url": "https://api.github.com/users/dhodovsk/following{/other_user}",
"gists_url": "https://api.github.com/users/dhodovsk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dhodovsk",
"id": 31201372,
"login": "dhodovsk",
"node_id": "MDQ6VXNlcjMxMjAxMzcy",
"organizations_url": "https://api.github.com/users/dhodovsk/orgs",
"received_events_url": "https://api.github.com/users/dhodovsk/received_events",
"repos_url": "https://api.github.com/users/dhodovsk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dhodovsk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dhodovsk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dhodovsk",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2020-01-07T14:19:44Z
|
2021-08-29T00:07:07Z
|
2020-02-18T06:13:41Z
|
NONE
|
resolved
|
Let us introduce [packit service](https://packit.dev) to you - the automation to integrate upstream open source projects into Fedora operating system.
After merging this PR, you are just a few steps away from RPM builds being automatically triggered on your PR's.
It means, that you'll be able to try and play with your change, packaged as an RPM.
But there is more. By using packit, you can for example enable adding new releases into Fedora Rawhide.
What are the next steps?
* Install [Packit-as-a-Service github application](https://github.com/marketplace/packit-as-a-service) in your repo
* In case you are first user, wait for account approval
* Enjoy the built RPMs!
For more info, please:
* check out the documentation: https://packit.dev/docs/
* contact [@packit-service/the-packit-team](https://github.com/orgs/packit-service/teams/the-packit-team)
|
{
"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/5307/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5307/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5307.diff",
"html_url": "https://github.com/psf/requests/pull/5307",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5307.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5307"
}
| true |
[
"Thanks for the PR, @dhodovsk! I don't think we're going to do any distro specific build integration at this time. Looks like a pretty cool idea though!"
] |
https://api.github.com/repos/psf/requests/issues/5306
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5306/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5306/comments
|
https://api.github.com/repos/psf/requests/issues/5306/events
|
https://github.com/psf/requests/pull/5306
| 545,628,028 |
MDExOlB1bGxSZXF1ZXN0MzU5NDYyMjg0
| 5,306 |
Update supported Python versions
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1324225?v=4",
"events_url": "https://api.github.com/users/hugovk/events{/privacy}",
"followers_url": "https://api.github.com/users/hugovk/followers",
"following_url": "https://api.github.com/users/hugovk/following{/other_user}",
"gists_url": "https://api.github.com/users/hugovk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hugovk",
"id": 1324225,
"login": "hugovk",
"node_id": "MDQ6VXNlcjEzMjQyMjU=",
"organizations_url": "https://api.github.com/users/hugovk/orgs",
"received_events_url": "https://api.github.com/users/hugovk/received_events",
"repos_url": "https://api.github.com/users/hugovk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hugovk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hugovk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hugovk",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2020-01-06T09:29:48Z
|
2021-08-30T00:06:30Z
|
2020-01-09T17:06:48Z
|
CONTRIBUTOR
|
resolved
|
Supported versions are 2.7 and 3.5+ (currently to 3.8):
https://github.com/psf/requests/blob/eedd67462819f8dbf8c1c32e77f9070606605231/setup.py#L82-L100
3.4 was dropped in https://github.com/psf/requests/pull/5092.
Writing "3.5+" means the docs don't need updating when 3.9 is released, only when 3.5 is dropped.
|
{
"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/5306/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5306/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5306.diff",
"html_url": "https://github.com/psf/requests/pull/5306",
"merged_at": "2020-01-09T17:06:48Z",
"patch_url": "https://github.com/psf/requests/pull/5306.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5306"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/5305
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5305/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5305/comments
|
https://api.github.com/repos/psf/requests/issues/5305/events
|
https://github.com/psf/requests/pull/5305
| 544,635,468 |
MDExOlB1bGxSZXF1ZXN0MzU4NzA0ODE0
| 5,305 |
Fix test_conflicting_post_params to work on pytest 5
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2401856?v=4",
"events_url": "https://api.github.com/users/hroncok/events{/privacy}",
"followers_url": "https://api.github.com/users/hroncok/followers",
"following_url": "https://api.github.com/users/hroncok/following{/other_user}",
"gists_url": "https://api.github.com/users/hroncok/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hroncok",
"id": 2401856,
"login": "hroncok",
"node_id": "MDQ6VXNlcjI0MDE4NTY=",
"organizations_url": "https://api.github.com/users/hroncok/orgs",
"received_events_url": "https://api.github.com/users/hroncok/received_events",
"repos_url": "https://api.github.com/users/hroncok/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hroncok/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hroncok/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hroncok",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2020-01-02T15:55:08Z
|
2021-08-29T00:06:53Z
|
2020-05-09T04:58:05Z
|
CONTRIBUTOR
|
resolved
|
The non-contextmanager form of pytest.raises was removed in pytest 5.
http://doc.pytest.org/en/latest/deprecations.html#raises-warns-with-a-string-as-the-second-argument
It was used here to support Python < 2.7, but that is no longer needed.
https://github.com/psf/requests/pull/1503#issuecomment-22333666
Fixes https://github.com/psf/requests/issues/5304
|
{
"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/5305/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5305/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5305.diff",
"html_url": "https://github.com/psf/requests/pull/5305",
"merged_at": "2020-05-09T04:58:04Z",
"patch_url": "https://github.com/psf/requests/pull/5305.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5305"
}
| true |
[
"What can I do to help getting this merged? I consider the change fairly trivial, self contained and easy to grasp. But the more this remains open, the chances of diverging are getting higher.\r\n\r\nIf there is anything else required from my side, please do let me know.\r\n",
"Thanks @hroncok!",
"Thanks for merging @nateprewitt."
] |
https://api.github.com/repos/psf/requests/issues/5304
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5304/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5304/comments
|
https://api.github.com/repos/psf/requests/issues/5304/events
|
https://github.com/psf/requests/issues/5304
| 544,631,924 |
MDU6SXNzdWU1NDQ2MzE5MjQ=
| 5,304 |
pytest.raises with a string as the second argument removed in pytest 5
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2401856?v=4",
"events_url": "https://api.github.com/users/hroncok/events{/privacy}",
"followers_url": "https://api.github.com/users/hroncok/followers",
"following_url": "https://api.github.com/users/hroncok/following{/other_user}",
"gists_url": "https://api.github.com/users/hroncok/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hroncok",
"id": 2401856,
"login": "hroncok",
"node_id": "MDQ6VXNlcjI0MDE4NTY=",
"organizations_url": "https://api.github.com/users/hroncok/orgs",
"received_events_url": "https://api.github.com/users/hroncok/received_events",
"repos_url": "https://api.github.com/users/hroncok/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hroncok/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hroncok/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hroncok",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2020-01-02T15:46:56Z
|
2021-09-01T00:11:20Z
|
2020-05-09T04:58:04Z
|
CONTRIBUTOR
|
resolved
|
See http://doc.pytest.org/en/latest/deprecations.html#raises-warns-with-a-string-as-the-second-argument
The non-comntextmanager form of `pytest.raises` was removed in pytest 5. It is used in:
https://github.com/psf/requests/blob/eedd67462819f8dbf8c1c32e77f9070606605231/tests/test_requests.py#L774-L778
The error is:
```
self = <tests.test_requests.TestRequests object at 0x7f68030882b0>
httpbin = <function prepare_url.<locals>.inner at 0x7f68034c8f70>
def test_conflicting_post_params(self, httpbin):
url = httpbin('post')
with open('Pipfile') as f:
> pytest.raises(ValueError, "requests.post(url, data='[{\"some\": \"data\"}]', files={'some': f})")
E TypeError: 'requests.post(url, data=\'[{"some": "data"}]\', files={\'some\': f})' object (type: <class 'str'>) must be callable
tests/test_requests.py:777: TypeError
```
The code was added in https://github.com/psf/requests/pull/1503 [to support Python < 2.7](https://github.com/psf/requests/pull/1503#issuecomment-22333666):
> You can't use the context manager form of assertRaises() on Pythons earlier than 2.7. You'll need to use one of these two forms...
Since 2.6 is not supported anymore, this could be converted to:
```python
with open('Pipfile') as f:
with pytest.raises(ValueError):
requests.post(url, data='[{"some": "data"}]', files={'some': f})
with pytest.raises(ValueError):
requests.post(url, data=u('[{"some": "data"}]'), files={'some': f})
```
## Expected Result
Test pass with pytest 5.
## Actual Result
Test `TestRequests.test_conflicting_post_params` fails with pytest 5.
## Reproduction Steps
```console
$ rm .tox -rf
$ tox -e py38
```
(I've actually needed to install pygments into the environment, otherwise test collection has failed.)
## System Information
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.8.1"
},
"platform": {
"release": "5.3.16-300.fc31.x86_64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1010104f"
},
"urllib3": {
"version": "1.25.7"
},
"using_pyopenssl": false
}
```
pytest 5.3.2
## The Travis CI
As a side note, the Travis CI job runs on ancient pytest version (3.x), because it is preinstalled, and not updated.
|
{
"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/5304/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5304/timeline
| null |
completed
| null | null | false |
[
"https://github.com/psf/requests/pull/5305"
] |
https://api.github.com/repos/psf/requests/issues/5303
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5303/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5303/comments
|
https://api.github.com/repos/psf/requests/issues/5303/events
|
https://github.com/psf/requests/pull/5303
| 544,401,035 |
MDExOlB1bGxSZXF1ZXN0MzU4NTE5NDUw
| 5,303 |
Add Python 2 support entry in FAQ
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/842790?v=4",
"events_url": "https://api.github.com/users/brainwane/events{/privacy}",
"followers_url": "https://api.github.com/users/brainwane/followers",
"following_url": "https://api.github.com/users/brainwane/following{/other_user}",
"gists_url": "https://api.github.com/users/brainwane/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/brainwane",
"id": 842790,
"login": "brainwane",
"node_id": "MDQ6VXNlcjg0Mjc5MA==",
"organizations_url": "https://api.github.com/users/brainwane/orgs",
"received_events_url": "https://api.github.com/users/brainwane/received_events",
"repos_url": "https://api.github.com/users/brainwane/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/brainwane/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/brainwane/subscriptions",
"type": "User",
"url": "https://api.github.com/users/brainwane",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2020-01-01T21:33:08Z
|
2021-08-30T00:06:29Z
|
2020-01-09T17:55:21Z
|
CONTRIBUTOR
|
resolved
|
Fixes: #5211
Signed-off-by: Sumana Harihareswara <[email protected]>
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5303/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5303/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5303.diff",
"html_url": "https://github.com/psf/requests/pull/5303",
"merged_at": "2020-01-09T17:55:20Z",
"patch_url": "https://github.com/psf/requests/pull/5303.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5303"
}
| true |
[
"@nateprewitt and @hugovk could you take a look? I'm happy to have my PR edited or superseded in the interests of phrasing the FAQ item accurately, and you're the experts, not me!",
"(And Happy New Year of course!)",
"I'm not a member of the Requests project, but looks about right to me. Happy new year! "
] |
https://api.github.com/repos/psf/requests/issues/5302
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5302/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5302/comments
|
https://api.github.com/repos/psf/requests/issues/5302/events
|
https://github.com/psf/requests/pull/5302
| 544,225,111 |
MDExOlB1bGxSZXF1ZXN0MzU4Mzg2NzQz
| 5,302 |
Change <Response [XXX]> to self.text
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/45501389?v=4",
"events_url": "https://api.github.com/users/JonPizza/events{/privacy}",
"followers_url": "https://api.github.com/users/JonPizza/followers",
"following_url": "https://api.github.com/users/JonPizza/following{/other_user}",
"gists_url": "https://api.github.com/users/JonPizza/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JonPizza",
"id": 45501389,
"login": "JonPizza",
"node_id": "MDQ6VXNlcjQ1NTAxMzg5",
"organizations_url": "https://api.github.com/users/JonPizza/orgs",
"received_events_url": "https://api.github.com/users/JonPizza/received_events",
"repos_url": "https://api.github.com/users/JonPizza/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JonPizza/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JonPizza/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JonPizza",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2019-12-31T16:29:48Z
|
2021-08-30T00:06:31Z
|
2019-12-31T21:04:36Z
|
NONE
|
resolved
|
From talking to people and personal experiences, I always feel this is more intuitive. Only downside is inside a REPL, but I think there is a way to detect that?
|
{
"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/5302/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5302/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5302.diff",
"html_url": "https://github.com/psf/requests/pull/5302",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5302.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5302"
}
| true |
[
"This would spam up a console if it were a long response body and also be a breaking change. It's unlikely that this will be merged.",
"Hi @JonPizza,\r\n\r\nSeth is right here. This would add a minor short cut to `text` but risks printing very long bodies into the console unexpectedly.\r\n\r\nI think we’ll pass on this for now, thanks for the suggestion!"
] |
https://api.github.com/repos/psf/requests/issues/5301
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5301/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5301/comments
|
https://api.github.com/repos/psf/requests/issues/5301/events
|
https://github.com/psf/requests/issues/5301
| 544,040,366 |
MDU6SXNzdWU1NDQwNDAzNjY=
| 5,301 |
Can't install dependencies from master.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/8901363?v=4",
"events_url": "https://api.github.com/users/TZubiri/events{/privacy}",
"followers_url": "https://api.github.com/users/TZubiri/followers",
"following_url": "https://api.github.com/users/TZubiri/following{/other_user}",
"gists_url": "https://api.github.com/users/TZubiri/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/TZubiri",
"id": 8901363,
"login": "TZubiri",
"node_id": "MDQ6VXNlcjg5MDEzNjM=",
"organizations_url": "https://api.github.com/users/TZubiri/orgs",
"received_events_url": "https://api.github.com/users/TZubiri/received_events",
"repos_url": "https://api.github.com/users/TZubiri/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/TZubiri/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/TZubiri/subscriptions",
"type": "User",
"url": "https://api.github.com/users/TZubiri",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-12-30T23:22:39Z
|
2021-09-03T00:10:45Z
|
2019-12-31T00:52:07Z
|
NONE
|
resolved
|
Summary.
## Expected Result
Running 'Pipenv install', pipenv install Pipfile or pipenv install Pipfile.lock should not return an error.
## Actual Result
The following error is returned:
Step 6/7 : RUN pipenv install
---> Running in a8d473741a35
Pipfile.lock (5c8d24) out of date, updating to (726701)…
Locking [dev-packages] dependencies…
⠸ Locking..✔ Success!
Locking [packages] dependencies…
⠙ Locking..✘ Locking Failed!
[pipenv.exceptions.ResolutionFailure]: File "/usr/local/lib/python3.8/site-packages/pipenv/resolver.py", line 61, in resolve
[pipenv.exceptions.ResolutionFailure]: return resolve_deps(
[pipenv.exceptions.ResolutionFailure]: File "/usr/local/lib/python3.8/site-packages/pipenv/utils.py", line 718, in resolve_deps
[pipenv.exceptions.ResolutionFailure]: resolved_tree, hashes, markers_lookup, resolver = actually_resolve_deps(
[pipenv.exceptions.ResolutionFailure]: File "/usr/local/lib/python3.8/site-packages/pipenv/utils.py", line 480, in actually_resolve_deps
[pipenv.exceptions.ResolutionFailure]: resolved_tree = resolver.resolve()
[pipenv.exceptions.ResolutionFailure]: File "/usr/local/lib/python3.8/site-packages/pipenv/utils.py", line 395, in resolve
[pipenv.exceptions.ResolutionFailure]: raise ResolutionFailure(message=str(e))
[pipenv.exceptions.ResolutionFailure]: pipenv.exceptions.ResolutionFailure: ERROR: ERROR: Could not find a version that matches pipfile-lock
[pipenv.exceptions.ResolutionFailure]: No versions found
[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again.
Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: ERROR: Could not find a version that matches pipfile-lock
No versions found
Was https://pypi.org/simple/ reachable?
[pipenv.exceptions.ResolutionFailure]: return resolve_deps(
[pipenv.exceptions.ResolutionFailure]: File "/usr/local/lib/python3.8/site-packages/pipenv/utils.py", line 718, in resolve_deps
[pipenv.exceptions.ResolutionFailure]: resolved_tree, hashes, markers_lookup, resolver = actually_resolve_deps(
[pipenv.exceptions.ResolutionFailure]: File "/usr/local/lib/python3.8/site-packages/pipenv/utils.py", line 480, in actually_resolve_deps
[pipenv.exceptions.ResolutionFailure]: resolved_tree = resolver.resolve()
[pipenv.exceptions.ResolutionFailure]: File "/usr/local/lib/python3.8/site-packages/pipenv/utils.py", line 395, in resolve
[pipenv.exceptions.ResolutionFailure]: raise ResolutionFailure(message=str(e))
[pipenv.exceptions.ResolutionFailure]: pipenv.exceptions.ResolutionFailure: ERROR: ERROR: Could not find a version that matches pipfile-lock
[pipenv.exceptions.ResolutionFailure]: No versions found
[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again.
Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: ERROR: Could not find a version that matches pipfile-lock
No versions found
Was https://pypi.org/simple/ reachable?
## Reproduction Steps
run the command 'sudo docker build .' with the following Dockerfile in the repo's root directory
from python:3.8-buster
ADD . /src
WORKDIR /src
RUN pip3.8 install pipenv
RUN pipenv --python 3.8
RUN pipenv install
RUN pytest
## System Information
Bug occured under python 3.6, 3.7 and 3.8. Tested in a local install (ubuntu) and within a docker container (python:3.8-buster ).
Pipenv versions is 2018.11.26
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/8901363?v=4",
"events_url": "https://api.github.com/users/TZubiri/events{/privacy}",
"followers_url": "https://api.github.com/users/TZubiri/followers",
"following_url": "https://api.github.com/users/TZubiri/following{/other_user}",
"gists_url": "https://api.github.com/users/TZubiri/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/TZubiri",
"id": 8901363,
"login": "TZubiri",
"node_id": "MDQ6VXNlcjg5MDEzNjM=",
"organizations_url": "https://api.github.com/users/TZubiri/orgs",
"received_events_url": "https://api.github.com/users/TZubiri/received_events",
"repos_url": "https://api.github.com/users/TZubiri/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/TZubiri/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/TZubiri/subscriptions",
"type": "User",
"url": "https://api.github.com/users/TZubiri",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5301/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5301/timeline
| null |
completed
| null | null | false |
[
"I had run pipenv install Pipfile and Pipfile.lock previously which had modified the Pipfile."
] |
https://api.github.com/repos/psf/requests/issues/5300
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5300/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5300/comments
|
https://api.github.com/repos/psf/requests/issues/5300/events
|
https://github.com/psf/requests/issues/5300
| 543,360,217 |
MDU6SXNzdWU1NDMzNjAyMTc=
| 5,300 |
reading multipart/x-mixed-replace binary stream
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/34147363?v=4",
"events_url": "https://api.github.com/users/fangyong125/events{/privacy}",
"followers_url": "https://api.github.com/users/fangyong125/followers",
"following_url": "https://api.github.com/users/fangyong125/following{/other_user}",
"gists_url": "https://api.github.com/users/fangyong125/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/fangyong125",
"id": 34147363,
"login": "fangyong125",
"node_id": "MDQ6VXNlcjM0MTQ3MzYz",
"organizations_url": "https://api.github.com/users/fangyong125/orgs",
"received_events_url": "https://api.github.com/users/fangyong125/received_events",
"repos_url": "https://api.github.com/users/fangyong125/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/fangyong125/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fangyong125/subscriptions",
"type": "User",
"url": "https://api.github.com/users/fangyong125",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-12-29T11:14:52Z
|
2021-09-03T00:10:37Z
|
2020-02-01T01:18:28Z
|
NONE
|
resolved
|
I need to read a http stream (with head multipart/x-mixed-replace), the content-type is image/jpeg,how could i do?
r = requests.get('http://192.168.1.100:4747/mjpegfeed?1920x1080', stream=True)
c0 = r.content
code [c0 = r.content] will wait until response finish, but this response is not going to finish.
so what can I do?
|
{
"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/5300/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5300/timeline
| null |
completed
| null | null | false |
[
"Hi @fangyong125,\r\n\r\nAs per the message in the issue you opened, we don't support these kinds of requests for help on this issue tracker. Please open a question on Stackoverflow. Thanks!"
] |
https://api.github.com/repos/psf/requests/issues/5299
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5299/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5299/comments
|
https://api.github.com/repos/psf/requests/issues/5299/events
|
https://github.com/psf/requests/issues/5299
| 543,288,263 |
MDU6SXNzdWU1NDMyODgyNjM=
| 5,299 |
Document `requests.utils`
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5687998?v=4",
"events_url": "https://api.github.com/users/verhovsky/events{/privacy}",
"followers_url": "https://api.github.com/users/verhovsky/followers",
"following_url": "https://api.github.com/users/verhovsky/following{/other_user}",
"gists_url": "https://api.github.com/users/verhovsky/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/verhovsky",
"id": 5687998,
"login": "verhovsky",
"node_id": "MDQ6VXNlcjU2ODc5OTg=",
"organizations_url": "https://api.github.com/users/verhovsky/orgs",
"received_events_url": "https://api.github.com/users/verhovsky/received_events",
"repos_url": "https://api.github.com/users/verhovsky/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/verhovsky/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/verhovsky/subscriptions",
"type": "User",
"url": "https://api.github.com/users/verhovsky",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-12-28T22:33:41Z
|
2021-09-03T00:10:45Z
|
2020-01-02T03:49:52Z
|
CONTRIBUTOR
|
resolved
|
Are the methods imported by `requests.utils` supposed to be public?
https://github.com/psf/requests/blob/eedd67462819f8dbf8c1c32e77f9070606605231/requests/utils.py
https://github.com/psf/requests/blob/eedd67462819f8dbf8c1c32e77f9070606605231/requests/compat.py
Is it okay to do
```python
import requests.utils
requests.utils.urlparse(whatever)
```
in my code? If yes, shouldn't they be documented as if they were part of requests? Or at least the docs for them should be copy/pasted from the Python docs. I [don't see them mentioned anywhere](https://www.google.com/search?q=site%3Ahttps%3A%2F%2Frequests.readthedocs.io%2F+urlparse), just the three encoding-related methods https://requests.readthedocs.io/en/master/api/#requests.utils.get_encodings_from_content
Or should I always import these methods directly `from urllib.parse import urlparse`, etc.?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5687998?v=4",
"events_url": "https://api.github.com/users/verhovsky/events{/privacy}",
"followers_url": "https://api.github.com/users/verhovsky/followers",
"following_url": "https://api.github.com/users/verhovsky/following{/other_user}",
"gists_url": "https://api.github.com/users/verhovsky/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/verhovsky",
"id": 5687998,
"login": "verhovsky",
"node_id": "MDQ6VXNlcjU2ODc5OTg=",
"organizations_url": "https://api.github.com/users/verhovsky/orgs",
"received_events_url": "https://api.github.com/users/verhovsky/received_events",
"repos_url": "https://api.github.com/users/verhovsky/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/verhovsky/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/verhovsky/subscriptions",
"type": "User",
"url": "https://api.github.com/users/verhovsky",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5299/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5299/timeline
| null |
completed
| null | null | false |
[
"I've been asked to comment on this. The answer in short is \"No.\" those were never intended to be public parts of the API but people still do use them at their own risk. We've broken them unintentionally before and I'm sure whoever ends up maintaining this will do so again as they well should."
] |
https://api.github.com/repos/psf/requests/issues/5298
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5298/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5298/comments
|
https://api.github.com/repos/psf/requests/issues/5298/events
|
https://github.com/psf/requests/issues/5298
| 542,816,001 |
MDU6SXNzdWU1NDI4MTYwMDE=
| 5,298 |
session lose cookies
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/38283965?v=4",
"events_url": "https://api.github.com/users/monody1/events{/privacy}",
"followers_url": "https://api.github.com/users/monody1/followers",
"following_url": "https://api.github.com/users/monody1/following{/other_user}",
"gists_url": "https://api.github.com/users/monody1/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/monody1",
"id": 38283965,
"login": "monody1",
"node_id": "MDQ6VXNlcjM4MjgzOTY1",
"organizations_url": "https://api.github.com/users/monody1/orgs",
"received_events_url": "https://api.github.com/users/monody1/received_events",
"repos_url": "https://api.github.com/users/monody1/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/monody1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/monody1/subscriptions",
"type": "User",
"url": "https://api.github.com/users/monody1",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2019-12-27T09:45:37Z
|
2021-09-03T00:10:46Z
|
2019-12-27T13:29:43Z
|
NONE
|
resolved
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/38283965?v=4",
"events_url": "https://api.github.com/users/monody1/events{/privacy}",
"followers_url": "https://api.github.com/users/monody1/followers",
"following_url": "https://api.github.com/users/monody1/following{/other_user}",
"gists_url": "https://api.github.com/users/monody1/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/monody1",
"id": 38283965,
"login": "monody1",
"node_id": "MDQ6VXNlcjM4MjgzOTY1",
"organizations_url": "https://api.github.com/users/monody1/orgs",
"received_events_url": "https://api.github.com/users/monody1/received_events",
"repos_url": "https://api.github.com/users/monody1/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/monody1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/monody1/subscriptions",
"type": "User",
"url": "https://api.github.com/users/monody1",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5298/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5298/timeline
| null |
completed
| null | null | false |
[] |
|
https://api.github.com/repos/psf/requests/issues/5297
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5297/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5297/comments
|
https://api.github.com/repos/psf/requests/issues/5297/events
|
https://github.com/psf/requests/issues/5297
| 541,767,228 |
MDU6SXNzdWU1NDE3NjcyMjg=
| 5,297 |
Python 3.7.6: urllib3.exceptions.ProxySchemeUnknown
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/867469?v=4",
"events_url": "https://api.github.com/users/rafaduran/events{/privacy}",
"followers_url": "https://api.github.com/users/rafaduran/followers",
"following_url": "https://api.github.com/users/rafaduran/following{/other_user}",
"gists_url": "https://api.github.com/users/rafaduran/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rafaduran",
"id": 867469,
"login": "rafaduran",
"node_id": "MDQ6VXNlcjg2NzQ2OQ==",
"organizations_url": "https://api.github.com/users/rafaduran/orgs",
"received_events_url": "https://api.github.com/users/rafaduran/received_events",
"repos_url": "https://api.github.com/users/rafaduran/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rafaduran/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rafaduran/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rafaduran",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 18 |
2019-12-23T14:00:01Z
|
2022-01-03T10:00:41Z
|
2020-02-01T01:19:31Z
|
NONE
|
resolved
|
Proxy setup without scheme is not working on Python 3.7.6
While it works on Python 3.7.5:
```python
Python 3.7.5 (default, Nov 23 2019, 05:59:34)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> requests.get("http://httpbin.org/get", proxies={"http": "103.250.166.4:6666"})
<Response [200]>
```
Is not under Python 3.7.6
```python
Python 3.7.6 (default, Dec 21 2019, 08:28:11)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> requests.get("http://httpbin.org/get", proxies={"http": "103.250.166.4:6666"})
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 412, in send
conn = self.get_connection(request.url, proxies)
File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 309, in get_connection
proxy_manager = self.proxy_manager_for(proxy)
File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 199, in proxy_manager_for
**proxy_kwargs)
File "/usr/local/lib/python3.7/site-packages/urllib3/poolmanager.py", line 470, in proxy_from_url
return ProxyManager(proxy_url=url, **kw)
File "/usr/local/lib/python3.7/site-packages/urllib3/poolmanager.py", line 420, in __init__
raise ProxySchemeUnknown(proxy.scheme)
urllib3.exceptions.ProxySchemeUnknown: Not supported proxy scheme None
```
It seems that some changes on Python `urllib.parse.urlparse` brake `requests.utils.prepend_scheme_if_needed`
```python
>>> utils.prepend_scheme_if_needed('103.250.166.4:6666', 'http')
'103.250.166.4://6666'
```
So it looks like this utils has to update to match Python changes (I think the change that produces this is https://github.com/python/cpython/commit/5a88d50ff013a64fbdb25b877c87644a9034c969). In both cases I'm using requests 2.22.0.
Reporting here since `urllib.parse.urlparse` behaviour is wrong in both Python versions and I think the problem is `requests.utils.prepend_scheme_if_needed` problem:
Python 3.7.5
```python
>>> from urllib import parse
>>> parse.urlparse("103.250.166.4:6666")
ParseResult(scheme='', netloc='', path='103.250.166.4:6666', params='', query='', fragment='')
```
Python 3.7.6
```python
>>> from urllib import parse
>>> parse.urlparse("103.250.166.4:6666")
ParseResult(scheme='103.250.166.4', netloc='', path='6666', params='', query='', fragment='')
```
|
{
"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/5297/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5297/timeline
| null |
completed
| null | null | false |
[
"Thanks for reporting this issue and doing investigation!\r\n\r\nYou can fix this by using `http://<ip>:<port>` instead of just an IP.",
"you can solve the problem??\r\ni have the same issue with python 3.8\r\n\r\n> Proxy setup without scheme is not working on Python 3.7.6\r\n> \r\n> While it works on Python 3.7.5:\r\n> \r\n> ```python\r\n> Python 3.7.5 (default, Nov 23 2019, 05:59:34) \r\n> [GCC 8.3.0] on linux\r\n> Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n> >>> import requests\r\n> >>> requests.get(\"http://httpbin.org/get\", proxies={\"http\": \"103.250.166.4:6666\"})\r\n> <Response [200]>\r\n> ```\r\n> \r\n> Is not under Python 3.7.6\r\n> \r\n> ```python\r\n> Python 3.7.6 (default, Dec 21 2019, 08:28:11) \r\n> [GCC 8.3.0] on linux\r\n> Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n> >>> import requests\r\n> >>> requests.get(\"http://httpbin.org/get\", proxies={\"http\": \"103.250.166.4:6666\"})\r\n> Traceback (most recent call last):\r\n> File \"<stdin>\", line 1, in <module>\r\n> File \"/usr/local/lib/python3.7/site-packages/requests/api.py\", line 75, in get\r\n> return request('get', url, params=params, **kwargs)\r\n> File \"/usr/local/lib/python3.7/site-packages/requests/api.py\", line 60, in request\r\n> return session.request(method=method, url=url, **kwargs)\r\n> File \"/usr/local/lib/python3.7/site-packages/requests/sessions.py\", line 533, in request\r\n> resp = self.send(prep, **send_kwargs)\r\n> File \"/usr/local/lib/python3.7/site-packages/requests/sessions.py\", line 646, in send\r\n> r = adapter.send(request, **kwargs)\r\n> File \"/usr/local/lib/python3.7/site-packages/requests/adapters.py\", line 412, in send\r\n> conn = self.get_connection(request.url, proxies)\r\n> File \"/usr/local/lib/python3.7/site-packages/requests/adapters.py\", line 309, in get_connection\r\n> proxy_manager = self.proxy_manager_for(proxy)\r\n> File \"/usr/local/lib/python3.7/site-packages/requests/adapters.py\", line 199, in proxy_manager_for\r\n> **proxy_kwargs)\r\n> File \"/usr/local/lib/python3.7/site-packages/urllib3/poolmanager.py\", line 470, in proxy_from_url\r\n> return ProxyManager(proxy_url=url, **kw)\r\n> File \"/usr/local/lib/python3.7/site-packages/urllib3/poolmanager.py\", line 420, in __init__\r\n> raise ProxySchemeUnknown(proxy.scheme)\r\n> urllib3.exceptions.ProxySchemeUnknown: Not supported proxy scheme None\r\n> ```\r\n> \r\n> It seems that some changes on Python `urllib.parse.urlparse` brake `requests.utils.prepend_scheme_if_needed`\r\n> \r\n> ```python\r\n> >>> utils.prepend_scheme_if_needed('103.250.166.4:6666', 'http')\r\n> '103.250.166.4://6666'\r\n> ```\r\n> \r\n> So it looks like this utils has to update to match Python changes (I think the change that produces this is [python/cpython@5a88d50](https://github.com/python/cpython/commit/5a88d50ff013a64fbdb25b877c87644a9034c969)). In both cases I'm using requests 2.22.0.\r\n> \r\n> Reporting here since `urllib.parse.urlparse` behaviour is wrong in both Python versions and I think the problem is `requests.utils.prepend_scheme_if_needed` problem:\r\n> \r\n> Python 3.7.5\r\n> \r\n> ```python\r\n> >>> from urllib import parse\r\n> >>> parse.urlparse(\"103.250.166.4:6666\")\r\n> ParseResult(scheme='', netloc='', path='103.250.166.4:6666', params='', query='', fragment='')\r\n> ```\r\n> \r\n> Python 3.7.6\r\n> \r\n> ```python\r\n> >>> from urllib import parse\r\n> >>> parse.urlparse(\"103.250.166.4:6666\")\r\n> ParseResult(scheme='103.250.166.4', netloc='', path='6666', params='', query='', fragment='')\r\n> ```\r\n\r\nyou can solve the problem??\r\ni have same issue with python 3.8",
"@Crackde:\r\n\r\n> You can fix this by using `http://<ip>:<port>` instead of just an IP.",
"yes, this fixes the issue for 3.7.6 or 3.8.x\r\neither by `--proxy http://<ip>:<port>`\r\nor in (Windows') %APPDATA%\\pip\\pip.ini, `[global]` section:\r\n`http://<ip>:<port>`\r\n",
"I observed the same error. As already mentioned above, i also can solve the problem by adding a leading `http://` to the `--proxy` command line argument or in `%APPDATA%\\pip\\pip.ini` configuration file.\r\n\r\n```\r\nSystem information:\r\nOS: Windows 10 Enterprise (Build 17134)\r\nPython: 3.8.1 (x86)\r\npip: 19.3.1\r\n```",
"It looks like Seth has answered this and it's working as expected now. Going to resolve, thanks everyone.",
"The fix is not applicable if one is using another library and has no direct control over the proxy urls.\r\n\r\nI think the solution should be to fix the way `utils.prepend_scheme_if_needed `method calls the urllib3 helpers. as it currently is not working as intended (it should at least not produce invalid urls): \r\n> utils.prepend_scheme_if_needed('103.250.166.4:6666', 'http')\r\n> '103.250.166.4://6666'\r\n\r\nThe issues seems that urlsplit searches for the first \":\" and assumes everything to the right to be the scheme - unless it contains an illegal character(a non-alphanumeric character except +-.).\r\n This also overrides the default scheme that the prepend_scheme_if_needed passes to urlparse, which passes it to urlsplit.\r\n\r\n`103.250.166.4:6666 `--> scheme = 103.250.166.4, path=6666\r\n\r\nprefixing it with \"//\" - as is expected by urlparse - works:\r\n\r\n`//103.250.166.4:6666` --> scheme = None (default is used) , netloc=103.250.166.4:6666\r\n\r\nMaybe prepend_scheme can first check for the presence of a scheme and then call urlparse with the prepended \"//\"?\r\n Or is this an issue with urllib?\r\n",
"When I try to update by conda, I had received this following report\r\n\r\n\r\n\r\nTraceback (most recent call last):\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\exceptions.py\", line 1079, in __call__\r\n return func(*args, **kwargs)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\cli\\main.py\", line 84, in _main\r\n exit_code = do_call(args, p)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\cli\\conda_argparse.py\", line 82, in do_call\r\n return getattr(module, func_name)(args, parser)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\cli\\main_update.py\", line 20, in execute\r\n install(args, parser, 'update')\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\cli\\install.py\", line 265, in install\r\n should_retry_solve=(_should_retry_unfrozen or repodata_fn != repodata_fns[-1]),\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\core\\solve.py\", line 117, in solve_for_transaction\r\n should_retry_solve)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\core\\solve.py\", line 158, in solve_for_diff\r\n force_remove, should_retry_solve)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\core\\solve.py\", line 262, in solve_final_state\r\n ssc = self._collect_all_metadata(ssc)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\common\\io.py\", line 88, in decorated\r\n return f(*args, **kwds)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\core\\solve.py\", line 415, in _collect_all_metadata\r\n index, r = self._prepare(prepared_specs)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\core\\solve.py\", line 1011, in _prepare\r\n self.subdirs, prepared_specs, self._repodata_fn)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\core\\index.py\", line 228, in get_reduced_index\r\n repodata_fn=repodata_fn)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\core\\subdir_data.py\", line 105, in query_all\r\n result = tuple(concat(executor.map(subdir_query, channel_urls)))\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\concurrent\\futures\\_base.py\", line 598, in result_iterator\r\n yield fs.pop().result()\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\concurrent\\futures\\_base.py\", line 435, in result\r\n return self.__get_result()\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\concurrent\\futures\\_base.py\", line 384, in __get_result\r\n raise self._exception\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\concurrent\\futures\\thread.py\", line 57, in run\r\n result = self.fn(*self.args, **self.kwargs)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\core\\subdir_data.py\", line 98, in <lambda>\r\n package_ref_or_match_spec))\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\core\\subdir_data.py\", line 110, in query\r\n self.load()\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\core\\subdir_data.py\", line 174, in load\r\n _internal_state = self._load()\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\core\\subdir_data.py\", line 248, in _load\r\n repodata_fn=self.repodata_fn)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\core\\subdir_data.py\", line 485, in fetch_repodata_remote_request\r\n timeout=timeout)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\requests\\sessions.py\", line 546, in get\r\n return self.request('GET', url, **kwargs)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\requests\\sessions.py\", line 533, in request\r\n resp = self.send(prep, **send_kwargs)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\requests\\sessions.py\", line 646, in send\r\n r = adapter.send(request, **kwargs)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\requests\\adapters.py\", line 412, in send\r\n conn = self.get_connection(request.url, proxies)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\requests\\adapters.py\", line 309, in get_connection\r\n proxy_manager = self.proxy_manager_for(proxy)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\requests\\adapters.py\", line 199, in proxy_manager_for\r\n **proxy_kwargs)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\urllib3\\poolmanager.py\", line 470, in proxy_from_url\r\n return ProxyManager(proxy_url=url, **kw)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\urllib3\\poolmanager.py\", line 420, in __init__\r\n raise ProxySchemeUnknown(proxy.scheme)\r\nurllib3.exceptions.ProxySchemeUnknown: Not supported proxy scheme None\r\n\r\nLast one mean it is similar problem.\r\nHowever, I could not understand how to change setting proxy.",
"I try to change it, however, the manner may be bad\r\n\r\n(base) C:\\Users\\Shungo>conda update conda\r\nCollecting package metadata (current_repodata.json): failed\r\n\r\n# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<\r\n\r\n Traceback (most recent call last):\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\requests\\adapters.py\", line 412, in send\r\n conn = self.get_connection(request.url, proxies)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\requests\\adapters.py\", line 305, in get_connection\r\n proxy_url = parse_url(proxy)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\urllib3\\util\\url.py\", line 392, in parse_url\r\n return six.raise_from(LocationParseError(source_url), None)\r\n File \"<string>\", line 3, in raise_from\r\n urllib3.exceptions.LocationParseError: Failed to parse: https://<ip>:<port>\r\n\r\n During handling of the above exception, another exception occurred:\r\n\r\n Traceback (most recent call last):\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\exceptions.py\", line 1079, in __call__\r\n return func(*args, **kwargs)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\cli\\main.py\", line 84, in _main\r\n exit_code = do_call(args, p)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\cli\\conda_argparse.py\", line 82, in do_call\r\n return getattr(module, func_name)(args, parser)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\cli\\main_update.py\", line 20, in execute\r\n install(args, parser, 'update')\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\cli\\install.py\", line 265, in install\r\n should_retry_solve=(_should_retry_unfrozen or repodata_fn != repodata_fns[-1]),\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\core\\solve.py\", line 117, in solve_for_transaction\r\n should_retry_solve)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\core\\solve.py\", line 158, in solve_for_diff\r\n force_remove, should_retry_solve)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\core\\solve.py\", line 262, in solve_final_state\r\n ssc = self._collect_all_metadata(ssc)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\common\\io.py\", line 88, in decorated\r\n return f(*args, **kwds)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\core\\solve.py\", line 415, in _collect_all_metadata\r\n index, r = self._prepare(prepared_specs)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\core\\solve.py\", line 1011, in _prepare\r\n self.subdirs, prepared_specs, self._repodata_fn)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\core\\index.py\", line 228, in get_reduced_index\r\n repodata_fn=repodata_fn)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\core\\subdir_data.py\", line 105, in query_all\r\n result = tuple(concat(executor.map(subdir_query, channel_urls)))\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\concurrent\\futures\\_base.py\", line 598, in result_iterator\r\n yield fs.pop().result()\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\concurrent\\futures\\_base.py\", line 435, in result\r\n return self.__get_result()\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\concurrent\\futures\\_base.py\", line 384, in __get_result\r\n raise self._exception\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\concurrent\\futures\\thread.py\", line 57, in run\r\n result = self.fn(*self.args, **self.kwargs)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\core\\subdir_data.py\", line 98, in <lambda>\r\n package_ref_or_match_spec))\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\core\\subdir_data.py\", line 110, in query\r\n self.load()\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\core\\subdir_data.py\", line 174, in load\r\n _internal_state = self._load()\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\core\\subdir_data.py\", line 248, in _load\r\n repodata_fn=self.repodata_fn)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\conda\\core\\subdir_data.py\", line 485, in fetch_repodata_remote_request\r\n timeout=timeout)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\requests\\sessions.py\", line 546, in get\r\n return self.request('GET', url, **kwargs)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\requests\\sessions.py\", line 533, in request\r\n resp = self.send(prep, **send_kwargs)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\requests\\sessions.py\", line 646, in send\r\n r = adapter.send(request, **kwargs)\r\n File \"C:\\Users\\Shungo\\anaconda3\\lib\\site-packages\\requests\\adapters.py\", line 414, in send\r\n raise InvalidURL(e, request=request)\r\n requests.exceptions.InvalidURL: Failed to parse: https://<ip>:<port>",
"I sove this by modify pip\\_vendor\\requests\\adapters.py\r\n def get_connection(self, url, proxies=None):\r\n \"\"\"Returns a urllib3 connection for the given URL. This should not be\r\n called from user code, and is only exposed for use when subclassing the\r\n :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.\r\n\r\n :param url: The URL to connect to.\r\n :param proxies: (optional) A Requests-style dictionary of proxies used on this request.\r\n :rtype: urllib3.ConnectionPool\r\n \"\"\"\r\n proxy = select_proxy(url, proxies)\r\n print(proxy)\r\n\r\n proxy = None #<<<<<< ADD THIS LINE\r\n if proxy:\r\n proxy = prepend_scheme_if_needed(proxy, 'http')\r\n proxy_url = parse_url(proxy)\r\n if not proxy_url.host:\r\n raise InvalidProxyURL(\"Please check proxy URL. It is malformed\"\r\n \" and could be missing the host.\")\r\n proxy_manager = self.proxy_manager_for(proxy)\r\n conn = proxy_manager.connection_from_url(url)\r\n else:\r\n # Only scheme should be lower case\r\n parsed = urlparse(url)\r\n url = parsed.geturl()\r\n conn = self.poolmanager.connection_from_url(url)\r\n\r\n return conn\r\n",
"@sethmlarson \r\n> You can fix this by using `http://<ip>:<port>` instead of just an IP.\r\n\r\nSorry I still don't get what I should alter here:\r\n```python\r\nproxy={'http': '91.98.102.84:1080', 'https': '91.98.102.84:1080'}\r\nimport requests\r\nurl='https://httpbin.org/ip'\r\nr=requests.get(url,proxies=proxy,timeout=7)\r\n```\r\n\r\n ProxySchemeUnknown: Not supported proxy scheme None\r\n\r\n",
"`proxy={'http': 'http://91.98.102.84:1080', 'https': 'http://91.98.102.84:1080'}`",
"> `proxy={'http': 'http://91.98.102.84:1080', 'https': 'http://91.98.102.84:1080'}`\r\n\r\nThis solution doesn't work with python 3.9.1 version, by running the below code, I get Errors:\r\n\r\n```\r\nimport requests\r\nproxies = {'https': 'http://207.144.111.230:8080', 'http':'http://207.144.111.230:8080'}\r\nurl = 'https://httpbin.org/ip'\r\nr = requests.get(url, proxies=proxies)\r\n```\r\nBy running the code I get:\r\n```\r\nTraceback (most recent call last):\r\n File \"C:\\Users\\texas\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\urllib3\\connection.py\", line 169, in _new_conn\r\n conn = connection.create_connection(\r\n File \"C:\\Users\\texas\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\urllib3\\util\\connection.py\", line 96, in create_connection\r\n raise err\r\n File \"C:\\Users\\texas\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\urllib3\\util\\connection.py\", line 86, in create_connection\r\n sock.connect(sa)\r\nTimeoutError: [WinError 10060] Impossibile stabilire la connessione. Risposta non corretta della parte connessa dopo l'intervallo di tempo oppure mancata risposta dall'host collegato\r\nDuring handling of the above exception, another exception occurred:\r\nTraceback (most recent call last):\r\n File \"C:\\Users\\texas\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\urllib3\\connectionpool.py\", line 696, in urlopen\r\n self._prepare_proxy(conn)\r\n File \"C:\\Users\\texas\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\urllib3\\connectionpool.py\", line 964, in _prepare_proxy\r\n conn.connect()\r\n File \"C:\\Users\\texas\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\urllib3\\connection.py\", line 353, in connect\r\n conn = self._new_conn()\r\n File \"C:\\Users\\texas\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\urllib3\\connection.py\", line 181, in _new_conn\r\n raise NewConnectionError(\r\nurllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x0000026AD7D9F490>: Failed to establish a new connection: [WinError 10060] Impossibile stabilire la connessione. Risposta non corretta della parte connessa dopo l'intervallo di tempo oppure mancata risposta dall'host collegato\r\nDuring handling of the above exception, another exception occurred:\r\nTraceback (most recent call last):\r\n File \"C:\\Users\\texas\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\requests\\adapters.py\", line 439, in send\r\n resp = conn.urlopen(\r\n File \"C:\\Users\\texas\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\urllib3\\connectionpool.py\", line 755, in urlopen\r\n retries = retries.increment(\r\n File \"C:\\Users\\texas\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\urllib3\\util\\retry.py\", line 574, in increment\r\n raise MaxRetryError(_pool, url, error or ResponseError(cause))\r\nurllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='httpbin.org', port=443): Max retries exceeded with url: /ip (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError(\"<urllib3.connection.HTTPSConnection object at 0x0000026AD7D9F490>: Failed to establish a new connection: [WinError 10060] Impossibile stabilire la connessione. Risposta non corretta della parte connessa dopo l'intervallo di tempo oppure mancata risposta dall'host collegato\")))\r\nDuring handling of the above exception, another exception occurred:\r\nTraceback (most recent call last):\r\n File \"<input>\", line 1, in <module>\r\n File \"C:\\Users\\texas\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\requests\\api.py\", line 76, in get\r\n return request('get', url, params=params, **kwargs)\r\n File \"C:\\Users\\texas\\AppData\\Local\\Programs\\Python\\Python39\\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\\texas\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\requests\\sessions.py\", line 542, in request\r\n resp = self.send(prep, **send_kwargs)\r\n File \"C:\\Users\\texas\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\requests\\sessions.py\", line 655, in send\r\n r = adapter.send(request, **kwargs)\r\n File \"C:\\Users\\texas\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\requests\\adapters.py\", line 510, in send\r\n raise ProxyError(e, request=request)\r\nrequests.exceptions.ProxyError: HTTPSConnectionPool(host='httpbin.org', port=443): Max retries exceeded with url: /ip (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError(\"<urllib3.connection.HTTPSConnection object at 0x0000026AD7D9F490>: Failed to establish a new connection: [WinError 10060] Impossibile stabilire la connessione. Risposta non corretta della parte connessa dopo l'intervallo di tempo oppure mancata risposta dall'host collegato\")))\r\n\r\n```\r\nTranslation of the error's last line:\r\nUnable to establish connection. Incorrect response from the connected party after the time interval or no response from the connected host \r\nThe requests lib version is 2.25.1",
"Try like this it will be working , \r\n\r\n\r\nimport requests\r\nurl = \"http://httpbin.org/ip\"\r\nproxy_host = \"proxy.crawlera.com\"\r\nproxy_port = \"8010\"\r\nproxy_auth = \":\"\r\nproxies = {\r\n \"https\": \"https://{}@{}:{}/\".format(proxy_auth, proxy_host, proxy_port),\r\n \"http\": \"http://{}@{}:{}/\".format(proxy_auth, proxy_host, proxy_port)\r\n}\r\nr = requests.get(url, proxies=proxies, verify=False)",
"I had to re-edit my answer.\r\n\r\nurllib3 and requests proxy implementations are distinctly different.\r\n\r\nFrom [requests](https://docs.python-requests.org/en/master/index.html#requests-http-for-humans):\r\nBased on the requests Proxies section; https://docs.python-requests.org/en/master/user/advanced/#proxies\r\n\r\nNotice there is no \"s\" in https property value. \r\n``` python\r\n\r\nimport requests\r\n\r\nproxies = {\r\n 'http': 'http://10.10.1.10:3128',\r\n 'https': 'http://10.10.1.10:1080',\r\n ^\r\n}\r\n\r\nrequests.get('http://example.org', proxies=proxies)\r\n```\r\n\r\nFrom [urllib3](https://urllib3.readthedocs.io/en/stable/index.html#urllib3):\r\nBased on the the urllib3 Proxies section; https://urllib3.readthedocs.io/en/stable/advanced-usage.html?highlight=proxy#proxies\r\n\r\n```python\r\n>>> import urllib3\r\n>>> proxy = urllib3.ProxyManager('http://localhost:3128/')\r\n>>> proxy.request('GET', 'http://google.com/')\r\n```\r\n\r\n\r\n\r\n\r\n\r\n",
"> Make sure you have a trailing forward slash at the very end of the url string.\r\n> \r\n> ```python\r\n> \"https://190.7.141.66:8080/\"\r\n> ^\r\n> ```\r\n> \r\n> I spend hours trying to understand why it wasn't working.\r\n> \r\n> I hope it helps the next dev.\r\n\r\nnot working for me :(\r\n",
"@Zeyrox-Zy I just updated my answer.",
"proxy = {'http':'http://127.0.0.1:8000/', 'https':'http://127.0.0.1:8000/'}\r\nurl ='http://httpbin.org/ip'\r\nr = requests.get(url, proxies=proxy)\r\n\r\nthis is not working as well."
] |
https://api.github.com/repos/psf/requests/issues/5296
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5296/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5296/comments
|
https://api.github.com/repos/psf/requests/issues/5296/events
|
https://github.com/psf/requests/issues/5296
| 541,636,773 |
MDU6SXNzdWU1NDE2MzY3NzM=
| 5,296 |
requests raise broken pipe, but postman return 500 status
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/32815055?v=4",
"events_url": "https://api.github.com/users/EmptyRabbit/events{/privacy}",
"followers_url": "https://api.github.com/users/EmptyRabbit/followers",
"following_url": "https://api.github.com/users/EmptyRabbit/following{/other_user}",
"gists_url": "https://api.github.com/users/EmptyRabbit/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/EmptyRabbit",
"id": 32815055,
"login": "EmptyRabbit",
"node_id": "MDQ6VXNlcjMyODE1MDU1",
"organizations_url": "https://api.github.com/users/EmptyRabbit/orgs",
"received_events_url": "https://api.github.com/users/EmptyRabbit/received_events",
"repos_url": "https://api.github.com/users/EmptyRabbit/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/EmptyRabbit/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/EmptyRabbit/subscriptions",
"type": "User",
"url": "https://api.github.com/users/EmptyRabbit",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-12-23T08:13:15Z
|
2021-09-03T00:10:44Z
|
2020-01-09T17:03:14Z
|
NONE
|
resolved
|
when upload big file(bigger than server limit). I expect return response with 500 status
1、I tried postman to post api, it return 500 error,that what I need
2、I tried requests to post api
here is requests code:
```
with open('invalid_big_license', 'rb') as f:
test = s.post(
url,
headers=headers,
data=None,
files={'file': ('invalid_big_license', f)},
timeout=1200
)
```
requests raise
`requests.exceptions.ConnectionError: ('Connection aborted.', OSError(41, 'Protocol wrong type for socket'))`
what I need is response return with 500 status
if upload file is under server limit(like 1m),requests is success
|
{
"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/5296/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5296/timeline
| null |
completed
| null | null | false |
[
"Hi @EmptyRabbit, this is bad data being returned by the server. The first thing I'd check is if this is specific to the Requests User-Agent. You may need to use something like Wireshark to see what exactly is coming across the wire. From the information provided so far, it doesn't look like this is a defect in Requests though.\r\n\r\nI'm going to close this for now since we don't have a reproducible example. Feel free to reopen if you have more information or have found this is reproducible outside of this specific server."
] |
https://api.github.com/repos/psf/requests/issues/5295
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5295/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5295/comments
|
https://api.github.com/repos/psf/requests/issues/5295/events
|
https://github.com/psf/requests/issues/5295
| 540,779,666 |
MDU6SXNzdWU1NDA3Nzk2NjY=
| 5,295 |
`Session().get` not usuable with `with`
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/392047?v=4",
"events_url": "https://api.github.com/users/ouroborus/events{/privacy}",
"followers_url": "https://api.github.com/users/ouroborus/followers",
"following_url": "https://api.github.com/users/ouroborus/following{/other_user}",
"gists_url": "https://api.github.com/users/ouroborus/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ouroborus",
"id": 392047,
"login": "ouroborus",
"node_id": "MDQ6VXNlcjM5MjA0Nw==",
"organizations_url": "https://api.github.com/users/ouroborus/orgs",
"received_events_url": "https://api.github.com/users/ouroborus/received_events",
"repos_url": "https://api.github.com/users/ouroborus/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ouroborus/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ouroborus/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ouroborus",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 5 |
2019-12-20T05:51:50Z
|
2021-09-03T00:10:44Z
|
2020-01-09T17:50:30Z
|
NONE
|
resolved
|
Summary.
## Expected Result
Able to use `with session.get() as response`, same as `with requests.get() as response`.
## Actual Result
Throws exception:
```
AttributeError: __exit__
```
## Reproduction Steps
```python
import requests
session = requests.Session()
with session.get('http://some.domain') as response:
print(response.headers)
```
## System Information
```
Linux Mint
Python 3.5.2
python-requests_2.9.1-3ubuntu0.1_all.deb
```
|
{
"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/5295/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5295/timeline
| null |
completed
| null | null | false |
[
"upgrade requests version to >=2.18",
"@songguoxiong 2.9.1 is the latest available via `apt-get`",
"try to install via `pip`?\r\n```bash\r\npython3 -m pip install \"requests>=2.18\"\r\n```",
"Okay, that works.\r\n\r\nAny chance of submitting something recent to get the `apt` repositories updated? I see now that 2.9.1 is 4 years old.",
"Requests contributors aren't in control of `apt` repositories. Please open an issue on the Linux Mint tracker."
] |
https://api.github.com/repos/psf/requests/issues/5294
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5294/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5294/comments
|
https://api.github.com/repos/psf/requests/issues/5294/events
|
https://github.com/psf/requests/issues/5294
| 540,695,138 |
MDU6SXNzdWU1NDA2OTUxMzg=
| 5,294 |
requests.get of this URL causes timeout and network failure (router reboots)
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/3823334?v=4",
"events_url": "https://api.github.com/users/filipmu/events{/privacy}",
"followers_url": "https://api.github.com/users/filipmu/followers",
"following_url": "https://api.github.com/users/filipmu/following{/other_user}",
"gists_url": "https://api.github.com/users/filipmu/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/filipmu",
"id": 3823334,
"login": "filipmu",
"node_id": "MDQ6VXNlcjM4MjMzMzQ=",
"organizations_url": "https://api.github.com/users/filipmu/orgs",
"received_events_url": "https://api.github.com/users/filipmu/received_events",
"repos_url": "https://api.github.com/users/filipmu/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/filipmu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/filipmu/subscriptions",
"type": "User",
"url": "https://api.github.com/users/filipmu",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-12-20T01:57:15Z
|
2021-09-02T00:07:29Z
|
2020-02-10T05:33:13Z
|
NONE
|
resolved
|
Summary.
when I use requests.get for a particular url it causes a network crash (lose connection and my router reboots). The only return message is a timeout error. Here are two example URLs that cause the issue:
https://images.harrods.com/product/gucci/large-gg-tweed-rajah-tote-bag_000000006389623001.jpg
https://images.harrods.com/product/gucci/small-leather-soho-disco-bag_000000000005256593.jpg
I now understand how to avoid the issue, but without any error message it took a long time to debug, and crashed the network a number of times. I ended up running the get in urllib3 and I got the SSL error message. Doing the request.get with a custom header for 'User-Agent', the network does not crash.
## Expected Result
Timeout error with network error result
In order to debug I did the same get with urllib3 - I got this error when I used urllib3 for the same URL:
MaxRetryError: HTTPSConnectionPool(host='images.harrods.com', port=443): Max retries exceeded with url: /product/gucci/large-gg-tweed-rajah-tote-bag_000000006389623001.jpg (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))
## Actual Result
Time out error with network router rebooting and wifi card disconnecting. Exception has no mention of any network error except timeout.
## Reproduction Steps
```python
import requests
url = 'https://images.harrods.com/product/gucci/large-gg-tweed-rajah-tote-bag_000000006389623001.jpg'
r = requests.get(url, timeout=4)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.8"
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.7.5"
},
"platform": {
"release": "4.15.0-72-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010104f",
"version": "19.1.0"
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1010104f"
},
"urllib3": {
"version": "1.25.7"
},
"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/5294/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5294/timeline
| null |
completed
| null | null | false |
[
"Hi @filipmu,\r\n\r\nThe issue with your network card and router aren't related to Requests. Attempting a repro from what you provided correctly returns a read timeout error. It appears Harrods may be modifying server behaviour in some cases to stop web scraping. All non-trivial requests from Requests should be provided a timeout to catch cases like this.\r\n\r\nThe urllib3 exception you've provided doesn't seem to be related to this case."
] |
https://api.github.com/repos/psf/requests/issues/5293
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5293/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5293/comments
|
https://api.github.com/repos/psf/requests/issues/5293/events
|
https://github.com/psf/requests/pull/5293
| 539,550,769 |
MDExOlB1bGxSZXF1ZXN0MzU0NTA1OTky
| 5,293 |
fix raise_for_status docstring
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/413772?v=4",
"events_url": "https://api.github.com/users/graingert/events{/privacy}",
"followers_url": "https://api.github.com/users/graingert/followers",
"following_url": "https://api.github.com/users/graingert/following{/other_user}",
"gists_url": "https://api.github.com/users/graingert/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/graingert",
"id": 413772,
"login": "graingert",
"node_id": "MDQ6VXNlcjQxMzc3Mg==",
"organizations_url": "https://api.github.com/users/graingert/orgs",
"received_events_url": "https://api.github.com/users/graingert/received_events",
"repos_url": "https://api.github.com/users/graingert/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/graingert/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/graingert/subscriptions",
"type": "User",
"url": "https://api.github.com/users/graingert",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-12-18T09:13:37Z
|
2023-04-21T15:10:46Z
|
2020-05-09T05:08:51Z
|
CONTRIBUTOR
|
resolved
|
the exception isn't stored it's created new each call
|
{
"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/5293/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5293/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5293.diff",
"html_url": "https://github.com/psf/requests/pull/5293",
"merged_at": "2020-05-09T05:08:51Z",
"patch_url": "https://github.com/psf/requests/pull/5293.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5293"
}
| true |
[
"Hey @graingert, would you mind rebasing onto master. Then I think we should be set."
] |
https://api.github.com/repos/psf/requests/issues/5292
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5292/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5292/comments
|
https://api.github.com/repos/psf/requests/issues/5292/events
|
https://github.com/psf/requests/pull/5292
| 539,359,284 |
MDExOlB1bGxSZXF1ZXN0MzU0MzUwOTA4
| 5,292 |
Update example code in README.md
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/67745?v=4",
"events_url": "https://api.github.com/users/jkooker/events{/privacy}",
"followers_url": "https://api.github.com/users/jkooker/followers",
"following_url": "https://api.github.com/users/jkooker/following{/other_user}",
"gists_url": "https://api.github.com/users/jkooker/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jkooker",
"id": 67745,
"login": "jkooker",
"node_id": "MDQ6VXNlcjY3NzQ1",
"organizations_url": "https://api.github.com/users/jkooker/orgs",
"received_events_url": "https://api.github.com/users/jkooker/received_events",
"repos_url": "https://api.github.com/users/jkooker/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jkooker/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jkooker/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jkooker",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2019-12-17T23:07:39Z
|
2021-08-30T00:06:30Z
|
2020-01-09T17:26:43Z
|
CONTRIBUTOR
|
resolved
|
Show the current project description.
|
{
"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/5292/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5292/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5292.diff",
"html_url": "https://github.com/psf/requests/pull/5292",
"merged_at": "2020-01-09T17:26:43Z",
"patch_url": "https://github.com/psf/requests/pull/5292.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5292"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/5291
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5291/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5291/comments
|
https://api.github.com/repos/psf/requests/issues/5291/events
|
https://github.com/psf/requests/issues/5291
| 538,286,965 |
MDU6SXNzdWU1MzgyODY5NjU=
| 5,291 |
Bad error handling in requests in python 3 [During handling of the above exception, another exception occurred]
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/10574113?v=4",
"events_url": "https://api.github.com/users/Gonzalliz/events{/privacy}",
"followers_url": "https://api.github.com/users/Gonzalliz/followers",
"following_url": "https://api.github.com/users/Gonzalliz/following{/other_user}",
"gists_url": "https://api.github.com/users/Gonzalliz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Gonzalliz",
"id": 10574113,
"login": "Gonzalliz",
"node_id": "MDQ6VXNlcjEwNTc0MTEz",
"organizations_url": "https://api.github.com/users/Gonzalliz/orgs",
"received_events_url": "https://api.github.com/users/Gonzalliz/received_events",
"repos_url": "https://api.github.com/users/Gonzalliz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Gonzalliz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Gonzalliz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Gonzalliz",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 6 |
2019-12-16T09:26:09Z
|
2022-02-26T06:00:23Z
|
2021-11-28T05:34:41Z
|
NONE
|
resolved
|
request library with Python3 handles exceptions in a pretty bad way. In python2 this works fine. I tried to request GitHub using `requests.get('https://api.github.com')` using both python2 installed requests library and python3 installed requests library. They perform differently when the requests are made during network is down. (any exception is handled differently). Try installing requests in both python2 and python3 and you can recreate the issue by removing internet connection when making the requests. Code I used
`import requests`
`requests.get('https://api.github.com')`
I have installed `requests==2.5.3` in my system and I tried upgrading the version to `requests==2.22.0` but still problem persists.
## Expected Result
In python2 it gives a cleaner exception like the following
`
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 65, in get
return request('get', url, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 49, in request
response = session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 461, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 573, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 415, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', gaierror(-2, 'Name or service not known'))
`
## Actual Result
`
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 157, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "/usr/local/lib/python3.6/site-packages/urllib3/util/connection.py", line 61, 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):
socket.gaierror: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 672, in urlopen
chunked=chunked,
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 994, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 334, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 169, in _new_conn
self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f2ab2562d68>: Failed to establish a new connection: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 720, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/usr/local/lib/python3.6/site-packages/urllib3/util/retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.github.com', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f2ab2562d68>: Failed to establish a new connection: [Errno -2] Name or service not known',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.github.com', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f2ab2562d68>: Failed to establish a new connection: [Errno -2] Name or service not known',))
`
## Reproduction Steps
```python
import requests
```
## System Information
$ python -m requests.help
```
Python 2.7.15+ (Python2 version)
requests==2.5.3 (Requests version in python2)
=============================
Python 3.6.9 (Python3 version)
requests==2.5.3(Requests version in python3)
=============================
OS: Ubuntu 18.04.3 LTS
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4",
"events_url": "https://api.github.com/users/sethmlarson/events{/privacy}",
"followers_url": "https://api.github.com/users/sethmlarson/followers",
"following_url": "https://api.github.com/users/sethmlarson/following{/other_user}",
"gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sethmlarson",
"id": 18519037,
"login": "sethmlarson",
"node_id": "MDQ6VXNlcjE4NTE5MDM3",
"organizations_url": "https://api.github.com/users/sethmlarson/orgs",
"received_events_url": "https://api.github.com/users/sethmlarson/received_events",
"repos_url": "https://api.github.com/users/sethmlarson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sethmlarson",
"user_view_type": "public"
}
|
{
"+1": 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/5291/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5291/timeline
| null |
completed
| null | null | false |
[
"I ran into this problem too, but I found a work-around for prettier output. Notice the \"from None\" in the script here:\r\n\r\n```py\r\nimport requests\r\nurl = 'http://10.0.0.12/example/'\r\ntry:\r\n requests.get(url, timeout=2)\r\nexcept requests.exceptions.RequestException:\r\n raise Exception('Failed to connect to %s' % url) from None\r\n```\r\n\r\nIf you run the above script the output is much cleaner:\r\n```sh\r\n$ python example.py\r\nTraceback (most recent call last):\r\n File \"example.py\", line 6, in <module>\r\n raise Exception('Failed to connect to %s' % url) from None\r\nException: Failed to connect to http://10.0.0.12/example/\r\n```\r\n\r\nYou can only do the `from None` in Python3, and I think it comes from this PEP: https://www.python.org/dev/peps/pep-0409/",
"> I ran into this problem too, but I found a work-around for prettier output. Notice the \"from None\" in the script here:\r\n> \r\n> ```python\r\n> import requests\r\n> url = 'http://10.0.0.12/example/'\r\n> try:\r\n> requests.get(url, timeout=2)\r\n> except requests.exceptions.RequestException:\r\n> raise Exception('Failed to connect to %s' % url) from None\r\n> ```\r\n> \r\n> If you run the above script the output is much cleaner:\r\n> \r\n> ```shell\r\n> $ python example.py\r\n> Traceback (most recent call last):\r\n> File \"example.py\", line 6, in <module>\r\n> raise Exception('Failed to connect to %s' % url) from None\r\n> Exception: Failed to connect to http://10.0.0.12/example/\r\n> ```\r\n> \r\n> You can only do the `from None` in Python3, and I think it comes from this PEP: https://www.python.org/dev/peps/pep-0409/\r\n\r\n",
"I just stumbled upon the same issue, is there any way with this workaround to continue after the error?\r\nMy program should not exit after the raised exception but I didn't find any way to do that.",
"For anyone who has this issue please check your VPN!!!\r\nI have same problems with request.get in every website utill I trun off my VPN",
"While VPN handling is a OS dependant respoinsability, I would better suggest the use of local proxy triggered by the IPSEC P2 connected status....so that way, your code ensures the correct L3 routing tables.\r\n\r\nNew Linux kernel, has a new behaivor that drops from memory the routing table when a new route is added, making the last well know working stack unusable...so is you thread your proxy based on your OS routing table status....it will work crystal",
"I believe this is a side-effect of retries in urllib3, hence Requests can't do anything about this. Closing this for now."
] |
https://api.github.com/repos/psf/requests/issues/5290
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5290/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5290/comments
|
https://api.github.com/repos/psf/requests/issues/5290/events
|
https://github.com/psf/requests/issues/5290
| 538,282,805 |
MDU6SXNzdWU1MzgyODI4MDU=
| 5,290 |
response data not equal to curl
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/29194147?v=4",
"events_url": "https://api.github.com/users/k870611/events{/privacy}",
"followers_url": "https://api.github.com/users/k870611/followers",
"following_url": "https://api.github.com/users/k870611/following{/other_user}",
"gists_url": "https://api.github.com/users/k870611/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/k870611",
"id": 29194147,
"login": "k870611",
"node_id": "MDQ6VXNlcjI5MTk0MTQ3",
"organizations_url": "https://api.github.com/users/k870611/orgs",
"received_events_url": "https://api.github.com/users/k870611/received_events",
"repos_url": "https://api.github.com/users/k870611/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/k870611/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/k870611/subscriptions",
"type": "User",
"url": "https://api.github.com/users/k870611",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2019-12-16T09:18:09Z
|
2021-09-03T00:10:46Z
|
2019-12-25T01:12:57Z
|
NONE
|
resolved
|
Summary.
I was to get info from same url, curl return
{ "state_1": "Active", "state_2": "stand-by", "current_active_image": "Image-1", "id": 1}
but requests return
'0121\r\n{ "state_1": "Active", "state_2": "stand-by", "current_active_image": "Image-1", "id": 1}\r\n0\r\n\r\n'
How's the 0121\r\n & \r\n0\r\n\r\n come from ?
## Expected Result
{ "state_1": "Active", "state_2": "stand-by", "current_active_image": "Image-1", "id": 1}
What you expected.
{ "state_1": "Active", "state_2": "stand-by", "current_active_image": "Image-1", "id": 1}
## Actual Result
'0121\r\n{ "state_1": "Active", "state_2": "stand-by", "current_active_image": "Image-1", "id": 1}\r\n0\r\n\r\n'
What happened instead.
Have error message in rsp.text
## Reproduction Steps
by curl:
RES=`curl -L -s -k --request GET \
--url "https://$1/api/maintenance/maintenance/dual_image_config" \
--header 'Cache-Control: no-cache' \
--header 'Accept-Encoding: gzip, deflate, sdch' \
--header 'Content-Type: application/json' \
--header 'Connection: keep-alive'`
echo $RES
by requests:
import requests
DEFAULT_HEADER = {"Accept-Encoding": "gzip, deflate, br",
"Cache-Control": "no-cache",
"Connection": "keep-alive",
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest"}
url = "https://{0}/api/maintenance/maintenance/dual_image_config".format(sys.argv[1])
response = requests.get(url="", data=None, headers=DEFAULT_HEADER , verify=False)
print(repr(response.text))
## System Information
$ python -m requests.help
```
[root@localhost ~]# python35 -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.5.2"
},
"platform": {
"release": "3.10.0-327.el7.x86_64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.21.0"
},
"system_ssl": {
"version": "1000105f"
},
"urllib3": {
"version": "1.24.1"
},
"using_pyopenssl": false
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/29194147?v=4",
"events_url": "https://api.github.com/users/k870611/events{/privacy}",
"followers_url": "https://api.github.com/users/k870611/followers",
"following_url": "https://api.github.com/users/k870611/following{/other_user}",
"gists_url": "https://api.github.com/users/k870611/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/k870611",
"id": 29194147,
"login": "k870611",
"node_id": "MDQ6VXNlcjI5MTk0MTQ3",
"organizations_url": "https://api.github.com/users/k870611/orgs",
"received_events_url": "https://api.github.com/users/k870611/received_events",
"repos_url": "https://api.github.com/users/k870611/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/k870611/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/k870611/subscriptions",
"type": "User",
"url": "https://api.github.com/users/k870611",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5290/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5290/timeline
| null |
completed
| null | null | false |
[
"The `\\r` and `\\n` are special characters representing a carriage return and a new line respectively. \r\n\r\nA few things with your attached python code:\r\n* In your get request change `url=\"\"` to `url` so it looks like this `requests.get(url, data=None, headers=DEFAULT_HEADER , verify=False)`\r\n* There is no need to use `repr` to print `response.text`. The `text` attribute is stored as a unicode string. The encoding of this text is stored in the `response.encoding` which requests determines from the http headers. If `response.text` contains all ascii characters just use `str(response.text)` to convert to a regular python string.\r\n\r\n\r\n",
"Sorry, I was use requests.get(url=url, data=None, headers=DEFAULT_HEADER , verify=False), it is my mistake on post issue.\r\n\r\nWhen I use str(response.text) it return: '0121\\r\\n{ \"state_1\": \"Active\", \"state_2\": \"stand-by\", \"current_active_image\": \"Image-1\", \"id\": 1}\\r\\n0\\r\\n\\r\\n'\r\n\r\nusually when we see response.text is not should be '{ \"state_1\": \"Active\", \"state_2\": \"stand-by\", \"current_active_image\": \"Image-1\", \"id\": 1}', then it will parse by json correctly ? I don't why it will have \\r\\n in start & the end.\r\n\r\nuse repr is because I want to see the real output on console.\r\n\r\nThanks and best regard.",
"Maybe try pass the encoding in `response.encoding` into the `str` function as the encoding (click [here](https://docs.python.org/3/library/functions.html#func-str) for details) or if you already now the encoding just pass that in.\r\n\r\nI've noticed that you're receiving a json object in the response. You can access this data as a python dictionary using `response.json()` if it better suits your needs.\r\n\r\nThis doesn't look like an issue with requests it's just how the response has been encoded. This has been talked about previously [here](https://github.com/psf/requests/issues/1604) as well.",
"if use response.json() it will raise error: *** json.decoder.JSONDecodeError: Extra data: line 1 column 2 (char 1)\r\n\r\nAnd I have change encoding but response still same. "
] |
https://api.github.com/repos/psf/requests/issues/5289
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5289/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5289/comments
|
https://api.github.com/repos/psf/requests/issues/5289/events
|
https://github.com/psf/requests/issues/5289
| 535,863,015 |
MDU6SXNzdWU1MzU4NjMwMTU=
| 5,289 |
Ignore normalization URL
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5586195?v=4",
"events_url": "https://api.github.com/users/everping/events{/privacy}",
"followers_url": "https://api.github.com/users/everping/followers",
"following_url": "https://api.github.com/users/everping/following{/other_user}",
"gists_url": "https://api.github.com/users/everping/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/everping",
"id": 5586195,
"login": "everping",
"node_id": "MDQ6VXNlcjU1ODYxOTU=",
"organizations_url": "https://api.github.com/users/everping/orgs",
"received_events_url": "https://api.github.com/users/everping/received_events",
"repos_url": "https://api.github.com/users/everping/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/everping/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/everping/subscriptions",
"type": "User",
"url": "https://api.github.com/users/everping",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2019-12-10T17:01:23Z
|
2021-09-02T00:07:22Z
|
2020-02-10T05:37:29Z
|
NONE
|
resolved
|
In cases I would like to test Path Traversal vulnerabilities in web applications, the target URL is usually `https://example.com/../../path`. Using the GET method in requests, that URL will be normalized as below. Consequently, this will lead to unintended results in the test.
```
r = requests.get('https://example.com/../../path')
print(r.url)
# https://example.com/path
```
With `curl`, we have an option to ignore the normalization : `--path-as-is`. So, do we have an equivalent option for `requests`?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 4,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 4,
"url": "https://api.github.com/repos/psf/requests/issues/5289/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5289/timeline
| null |
completed
| null | null | false |
[
"@EDjur Thank you for your information. Do you know a workaround to resolve this?",
"Try using prepared request\r\n\r\n```\r\nurl = \"http://example.com/../something.txt\"\r\ns = requests.Session()\r\nreq = requests.Request(method='POST' ,url=url, headers=headers, data=data)\r\nprep = req.prepare()\r\nprep.url = url\r\nr = s.send(prep, verify=False)\r\n```",
"@akmalhisyam Thank you very much. It works well.",
"@akmalhisyam is correct here. Using the PreparedRequests workflow will typically solve issues like this if you MUST explicitly set something. "
] |
https://api.github.com/repos/psf/requests/issues/5288
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5288/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5288/comments
|
https://api.github.com/repos/psf/requests/issues/5288/events
|
https://github.com/psf/requests/issues/5288
| 534,165,316 |
MDU6SXNzdWU1MzQxNjUzMTY=
| 5,288 |
2.python-requests.org can't be reached
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/29210237?v=4",
"events_url": "https://api.github.com/users/goodspark/events{/privacy}",
"followers_url": "https://api.github.com/users/goodspark/followers",
"following_url": "https://api.github.com/users/goodspark/following{/other_user}",
"gists_url": "https://api.github.com/users/goodspark/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/goodspark",
"id": 29210237,
"login": "goodspark",
"node_id": "MDQ6VXNlcjI5MjEwMjM3",
"organizations_url": "https://api.github.com/users/goodspark/orgs",
"received_events_url": "https://api.github.com/users/goodspark/received_events",
"repos_url": "https://api.github.com/users/goodspark/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/goodspark/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/goodspark/subscriptions",
"type": "User",
"url": "https://api.github.com/users/goodspark",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-12-06T17:30:57Z
|
2021-09-03T00:10:48Z
|
2019-12-06T17:39:41Z
|
NONE
|
resolved
|
https://2.python-requests.org/ isn't loading on my browser, via curl, or Down Detector (https://www.isitdownrightnow.com/2.python-requests.org.html).
## Expected Result
Site to load
## Actual Result
```
This site can’t be reached2.python-requests.org’s server IP address could not be found.
```
What happened instead.
## Reproduction Steps
Try to load homepage in browser.
## System Information
Ubuntu 18.04, Firefox
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/29210237?v=4",
"events_url": "https://api.github.com/users/goodspark/events{/privacy}",
"followers_url": "https://api.github.com/users/goodspark/followers",
"following_url": "https://api.github.com/users/goodspark/following{/other_user}",
"gists_url": "https://api.github.com/users/goodspark/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/goodspark",
"id": 29210237,
"login": "goodspark",
"node_id": "MDQ6VXNlcjI5MjEwMjM3",
"organizations_url": "https://api.github.com/users/goodspark/orgs",
"received_events_url": "https://api.github.com/users/goodspark/received_events",
"repos_url": "https://api.github.com/users/goodspark/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/goodspark/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/goodspark/subscriptions",
"type": "User",
"url": "https://api.github.com/users/goodspark",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5288/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5288/timeline
| null |
completed
| null | null | false |
[
"It's back now for me."
] |
https://api.github.com/repos/psf/requests/issues/5287
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5287/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5287/comments
|
https://api.github.com/repos/psf/requests/issues/5287/events
|
https://github.com/psf/requests/pull/5287
| 533,920,687 |
MDExOlB1bGxSZXF1ZXN0MzQ5OTA4NDk3
| 5,287 |
respect no_proxy settings
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/12958815?v=4",
"events_url": "https://api.github.com/users/milahu/events{/privacy}",
"followers_url": "https://api.github.com/users/milahu/followers",
"following_url": "https://api.github.com/users/milahu/following{/other_user}",
"gists_url": "https://api.github.com/users/milahu/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/milahu",
"id": 12958815,
"login": "milahu",
"node_id": "MDQ6VXNlcjEyOTU4ODE1",
"organizations_url": "https://api.github.com/users/milahu/orgs",
"received_events_url": "https://api.github.com/users/milahu/received_events",
"repos_url": "https://api.github.com/users/milahu/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/milahu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/milahu/subscriptions",
"type": "User",
"url": "https://api.github.com/users/milahu",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2019-12-06T11:54:56Z
|
2021-08-30T00:06:32Z
|
2019-12-06T12:05:16Z
|
NONE
|
resolved
|
fix issue #4871
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/12958815?v=4",
"events_url": "https://api.github.com/users/milahu/events{/privacy}",
"followers_url": "https://api.github.com/users/milahu/followers",
"following_url": "https://api.github.com/users/milahu/following{/other_user}",
"gists_url": "https://api.github.com/users/milahu/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/milahu",
"id": 12958815,
"login": "milahu",
"node_id": "MDQ6VXNlcjEyOTU4ODE1",
"organizations_url": "https://api.github.com/users/milahu/orgs",
"received_events_url": "https://api.github.com/users/milahu/received_events",
"repos_url": "https://api.github.com/users/milahu/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/milahu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/milahu/subscriptions",
"type": "User",
"url": "https://api.github.com/users/milahu",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5287/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5287/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5287.diff",
"html_url": "https://github.com/psf/requests/pull/5287",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5287.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5287"
}
| true |
[
"test fails\r\n```\r\n def test_bypass(self, url):\r\n> assert get_environ_proxies(url, no_proxy=None) == {}\r\nE AssertionError: assert {'__bypass_proxies': True} == {}\r\nE Left contains more items:\r\nE {'__bypass_proxies': True}\r\nE Use -v to get the full diff\r\ntests/test_utils.py:170: AssertionError\r\n_____ TestGetEnvironProxies.test_bypass[no_proxy-http://192.168.0.1:5000/] _____\r\n```\r\n"
] |
https://api.github.com/repos/psf/requests/issues/5286
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5286/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5286/comments
|
https://api.github.com/repos/psf/requests/issues/5286/events
|
https://github.com/psf/requests/pull/5286
| 533,813,185 |
MDExOlB1bGxSZXF1ZXN0MzQ5ODE5Nzg2
| 5,286 |
If they do't have same length, there is no need to create two dict to compare.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/39522695?v=4",
"events_url": "https://api.github.com/users/sunsongpy/events{/privacy}",
"followers_url": "https://api.github.com/users/sunsongpy/followers",
"following_url": "https://api.github.com/users/sunsongpy/following{/other_user}",
"gists_url": "https://api.github.com/users/sunsongpy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sunsongpy",
"id": 39522695,
"login": "sunsongpy",
"node_id": "MDQ6VXNlcjM5NTIyNjk1",
"organizations_url": "https://api.github.com/users/sunsongpy/orgs",
"received_events_url": "https://api.github.com/users/sunsongpy/received_events",
"repos_url": "https://api.github.com/users/sunsongpy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sunsongpy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sunsongpy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sunsongpy",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2019-12-06T08:16:31Z
|
2021-08-30T00:06:31Z
|
2019-12-09T07:23:50Z
|
NONE
|
resolved
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5286/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5286/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5286.diff",
"html_url": "https://github.com/psf/requests/pull/5286",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5286.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5286"
}
| true |
[
"Hi @sunsongpy, checks like [this](https://github.com/python/cpython/blob/109fc2792a490ee5cd8a423e17d415fbdedec5c8/Objects/dictobject.c#L2751) are baked into the base objects, so there’s no need for us to reimplement it here. Thanks for the suggestion! ",
"Apologies, I glanced over the PR too quickly. If you can provide benchmarks for this change showing a significant improvement, I think we can look at it. Otherwise, I think we’ll pass for now.",
"> Yes this can improve performance .\r\n\r\nthanks",
"> \r\n> \r\n> > Apologies, I glanced over the PR too quickly. If you can provide benchmarks for this change showing a significant improvement, I think we can look at it. Otherwise, I think we’ll pass for now.\r\n> \r\n> Sorry, I know this change won't bring much of a significant improvement, but it certainly makes the code more rigorous. If the length is different, it's definitely False (two dict comparison of Cpython source code is the first step is to compare the length, why we don't do like that first).\r\n\r\nAfter seeing the @nateprewit link . I agree with him. Adding extra lines of code just to do what is already being done, is not justified. "
] |
|
https://api.github.com/repos/psf/requests/issues/5285
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5285/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5285/comments
|
https://api.github.com/repos/psf/requests/issues/5285/events
|
https://github.com/psf/requests/pull/5285
| 533,783,975 |
MDExOlB1bGxSZXF1ZXN0MzQ5Nzk1OTcy
| 5,285 |
Using 'quote' instead 'quote_plus'
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/5653512?v=4",
"events_url": "https://api.github.com/users/shivareddyiirs/events{/privacy}",
"followers_url": "https://api.github.com/users/shivareddyiirs/followers",
"following_url": "https://api.github.com/users/shivareddyiirs/following{/other_user}",
"gists_url": "https://api.github.com/users/shivareddyiirs/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shivareddyiirs",
"id": 5653512,
"login": "shivareddyiirs",
"node_id": "MDQ6VXNlcjU2NTM1MTI=",
"organizations_url": "https://api.github.com/users/shivareddyiirs/orgs",
"received_events_url": "https://api.github.com/users/shivareddyiirs/received_events",
"repos_url": "https://api.github.com/users/shivareddyiirs/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shivareddyiirs/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shivareddyiirs/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shivareddyiirs",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 11 |
2019-12-06T06:58:12Z
|
2021-08-29T00:07:06Z
|
2020-02-18T06:18:23Z
|
NONE
|
resolved
|
Modified call to urlencode to change its default behavior.
In place of using 'quote_plus' it uses 'quote' now.
fixes #5170
edit: for python 2 no 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/5285/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5285/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/5285.diff",
"html_url": "https://github.com/psf/requests/pull/5285",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5285.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5285"
}
| true |
[
"Works fine in python 3 but not in python 2. \r\n",
"For python 2 its behavior is intact. ",
"@nateprewitt ,\r\nHi can you review it , It has very minimal changes. ",
"> Thanks for the patch :)\r\n> Do you think you could you add a simple test for that part of the code?\r\n\r\nI have never written test earlier.\r\nBut surely can try to learn. Can you help me?\r\n",
"Perhaps could you try something like that (not tested, you will need to adapt):\r\n```python\r\ndef test_params_quote_via():\r\n # Verifiy parameters are parsed using quote() (spaces are seen as \"%20\", not \"+\", for instance)\r\n params = {'sql': \"project = 'foo' and name = 'bar'\"}\r\n p = PreparedRequest()\r\n p.prepare(\r\n method='GET',\r\n url='https://www.example.com/',\r\n params=params\r\n )\r\n expected = 'https://www.example.com/?sql=project%20%3D%20%27foo%27%20and%20name%20%3D%20%27bar%27'\r\n assert p.url == expected\r\n```\r\nYou could put it after that test: https://github.com/psf/requests/blob/7b565d886c852609a849e79e4ad8f3f8fa8d8c23/tests/test_requests.py#L2255",
"Thank you very much.\nI would commit the test by tomorrow evening (IST)\nThanks & Regards\nShiva Reddy K.\nScientist/Engineer 'SD'\nIndian Institute of Remote Sensing,\nIndian Space Research Organisation\nDepartment of Space\n4-Kalidas Road\nDehradun\nmobile: 0135-2524126\n\n\nOn Tue, 28 Jan 2020 at 15:13, Mickaël Schoentgen <[email protected]>\nwrote:\n\n> Perhaps could you try something like that (not tested, you will need to\n> adapt):\n>\n> def test_params_quote_via():\n> # Verifiy parameters are parsed using quote() (spaces are seen as \"%20\", not \"+\", for instance)\n> params = {'sql': \"project = 'foo' and name = 'bar'\"}\n> p = PreparedRequest()\n> p.prepare(\n> method='GET',\n> url='https://www.example.com/',\n> params=params\n> )\n> expected = 'https://www.example.com/?sql=project%20%3D%20%27foo%27%20and%20name%20%3D%20%27bar%27'\n> assert p.url == expected\n>\n> You could put it after that test:\n> https://github.com/psf/requests/blob/7b565d886c852609a849e79e4ad8f3f8fa8d8c23/tests/test_requests.py#L2255\n>\n> —\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/psf/requests/pull/5285?email_source=notifications&email_token=ABLEICBOGFSFK7FYLFEICU3Q7743ZA5CNFSM4JWN2DG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKCUZJI#issuecomment-579161253>,\n> or unsubscribe\n> <https://github.com/notifications/unsubscribe-auth/ABLEICCVMPK6EWP2YZCDRFLQ7743ZANCNFSM4JWN2DGQ>\n> .\n>\n",
"Yes it seems confusing at first instance.\r\nIn python 2 requests was not behaving as per normal expectation of user.\r\nBut in python 3 it is possible , with least efforts. (due to change in python 3 API).",
"Hi @shivareddyiirs,\r\n\r\nThanks for the work you've put in here. If we were to change this behaviour in Requests it would need to be uniform across all versions of Python, otherwise users will inevitably stumble on it. This would also be a breaking change which means it couldn't be merged into master until we were ready for a Requests 3.0 release.\r\n\r\nThat said, the behaviour you're seeing with params is intended and documented in the [`Request` docstring](https://github.com/psf/requests/blob/master/requests/models.py#L211-L213). The params passed as dictionaries or lists of tuples will be [form-encoded](https://en.wikipedia.org/wiki/Percent-encoding#The_application/x-www-form-urlencoded_type) which uses + instead of %20. If you want to fiddle with the query string, you're still able to pass a string into the `params` argument.\r\n\r\nI don't think we have intention to change this presently since it's easy to work around and has been operating under the same semantics since Requests' inception. Moving away from the idea of form-encoding by default would be a larger discussion for the project.",
"> \r\n> \r\n> Hi @shivareddyiirs,\r\n> \r\n> Thanks for the work you've put in here. If we were to change this behaviour in Requests it would need to be uniform across all versions of Python, otherwise users will inevitably stumble on it. This would also be a breaking change which means it couldn't be merged into master until we were ready for a Requests 3.0 release.\r\n> \r\n> That said, the behaviour you're seeing with params is intended and documented in the [`Request` docstring](https://github.com/psf/requests/blob/master/requests/models.py#L211-L213). The params passed as dictionaries or lists of tuples will be [form-encoded](https://en.wikipedia.org/wiki/Percent-encoding#The_application/x-www-form-urlencoded_type) which uses + instead of %20. If you want to fiddle with the query string, you're still able to pass a string into the `params` argument.\r\n> \r\n> I don't think we have intention to change this presently since it's easy to work around and has been operating under the same semantics since Requests' inception. Moving away from the idea of form-encoding by default would be a larger discussion for the project.\r\n\r\nThanks, I have made further changes , now it can work without braking the API.",
"Hey @shivareddyiirs,\r\n\r\nIt looks like the latest revision doesn't work for Python 2 and still has varied behaviour in the tests. I think we're going to maintain the existing behaviour and maintain the current advice to pass a string if you need non-form-encoded parameters. Thanks again for your work!",
"Sure."
] |
https://api.github.com/repos/psf/requests/issues/5284
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/5284/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/5284/comments
|
https://api.github.com/repos/psf/requests/issues/5284/events
|
https://github.com/psf/requests/issues/5284
| 533,552,145 |
MDU6SXNzdWU1MzM1NTIxNDU=
| 5,284 |
POST with redirection becomes GET
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2096474?v=4",
"events_url": "https://api.github.com/users/danilobellini/events{/privacy}",
"followers_url": "https://api.github.com/users/danilobellini/followers",
"following_url": "https://api.github.com/users/danilobellini/following{/other_user}",
"gists_url": "https://api.github.com/users/danilobellini/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/danilobellini",
"id": 2096474,
"login": "danilobellini",
"node_id": "MDQ6VXNlcjIwOTY0NzQ=",
"organizations_url": "https://api.github.com/users/danilobellini/orgs",
"received_events_url": "https://api.github.com/users/danilobellini/received_events",
"repos_url": "https://api.github.com/users/danilobellini/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/danilobellini/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/danilobellini/subscriptions",
"type": "User",
"url": "https://api.github.com/users/danilobellini",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 8 |
2019-12-05T19:35:30Z
|
2021-09-02T00:07:28Z
|
2020-02-10T05:41:40Z
|
NONE
|
resolved
|
## Expected Result
HTTP 301 redirection of a POST request should either send a POST to the new target URL, or return the HTTP 301 without redirecting at all.
## Actual Result
It's redirecting to the new `Location`, but replacing the method by GET.
## Reproduction Steps
```python
import requests
resp = requests.post("http://amp.labs.scielo.org/w2v1/xml")
resp.request.method # It's a GET
resps = requests.post("https://amp.labs.scielo.org/w2v1/xml")
resps.request.method # It's a POST
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.8"
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.8.0"
},
"platform": {
"release": "5.4.1-arch1-1",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010104f",
"version": "19.1.0"
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1010104f"
},
"urllib3": {
"version": "1.25.7"
},
"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": 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/5284/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/5284/timeline
| null |
completed
| null | null | false |
[
"This is expected behavior. Blame browser implementations of 301 redirects: https://tools.ietf.org/html/rfc7231#section-6.4.2\r\n\r\nThe status code to perform a permanent redirect without changing POST to GET is 308.",
"RFC7231 tells that the client *MAY* change the method, I think that's not a strict requirement (so a generic client should be able to keep the method as well), and the server should also handle the redirected request keeping the original method (i.e., even with the RFC and the history of browser implementations, I see no reason to replace the method by a GET). When the redirection results in an HTTP 405, it's clear that the server doesn't expect a redirection to a GET, but I don't know if most servers are aware of that (my guess is that they're not, but that's just a guess anyway).\r\n\r\nI don't think that using a GET on a 301 redirection should be the default behavior, but shouldn't `requests` at least have a keyword argument to control that (something like `use_get_on_301`)?",
"Well this client does change the method so is compliant. If you're looking for an override you can subclass a `Session` and provide your own [`prepare_method()`](https://github.com/psf/requests/blob/67a7b2e8336951d527e223429672354989384197/requests/sessions.py#L313) function which simply returns the old `request.method`.",
"Shouldn't it be the other way around? I mean, shouldn't keeping the original request method be \"simpler\" than replacing it by a GET on redirections? Anyway, creating a class and using inheritance just to behave like another RFC7231-compliant client might mean that something is missing.\r\n\r\nI'm asking that because I'm not aware of any use case where that replacement is desirable.",
"Since RFC specs is ambiguous (_MAY_) regarding 301 redirection and POST requests, IMO this behavious could be guided with a boolean flag provided to `Session` constructor.",
"Hello, I want to contribute to requests. But I have not contributed in this repo before and I am having trouble in understanding code of requests library. I just want to ask How much knowledge of computer networks is required in understanding codebase ? and what libraries should I learn before understanding to requests are there any other prerequisites? Thanks in advance",
"@sevdog, @danilobellini , @sethmlarson , @nakajima can you please help regarding the above?",
"Seth's suggestion is right here. If you need to handle redirect explicitly, you can either subclass the redirect mixin, or use the `allow_redirects` flag to disable auto redirects. At that point, you can handle the workflow in whatever way you'd like.\r\n\r\nRedirecting a POST->GET on 301,302,303 redirects is common in most http implementations. You'll find your browser does it as well as other tools that support automatic redirects. This behavior is intentional to prevent sending payloads or other sensitive info to unexpected servers. Once you've been redirected, you can then choose to resend your post to the new endpoint if it's still the desired destination."
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.