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/4261 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4261/labels{/name} | https://api.github.com/repos/psf/requests/issues/4261/comments | https://api.github.com/repos/psf/requests/issues/4261/events | https://github.com/psf/requests/pull/4261 | 253,147,990 | MDExOlB1bGxSZXF1ZXN0MTM3ODI1MDEz | 4,261 | Pin to httpbin 0.5.0. | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2017-08-27T07:55:16Z | 2021-09-04T00:06:51Z | 2017-08-27T13:00:38Z | MEMBER | resolved | The release of httpbin 0.6.0 seems to have broken pytest-httpbin in a surprising way. We want to pin that version out, and probably also alert @kevin1024 about the problem.
Resolves #4259. | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4261/reactions"
} | https://api.github.com/repos/psf/requests/issues/4261/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4261.diff",
"html_url": "https://github.com/psf/requests/pull/4261",
"merged_at": "2017-08-27T13:00:38Z",
"patch_url": "https://github.com/psf/requests/pull/4261.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4261"
} | true | [
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4261?src=pr&el=h1) Report\n> Merging [#4261](https://codecov.io/gh/requests/requests/pull/4261?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/5dcbdb50fc9652cbeffeec22a21d1196e938bfca?src=pr&el=desc) will **not change** coverage.... |
https://api.github.com/repos/psf/requests/issues/4260 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4260/labels{/name} | https://api.github.com/repos/psf/requests/issues/4260/comments | https://api.github.com/repos/psf/requests/issues/4260/events | https://github.com/psf/requests/issues/4260 | 253,127,089 | MDU6SXNzdWUyNTMxMjcwODk= | 4,260 | Incorrect Response Headers Leave Session in an Inconsistent State | {
"avatar_url": "https://avatars.githubusercontent.com/u/2375201?v=4",
"events_url": "https://api.github.com/users/hiranya911/events{/privacy}",
"followers_url": "https://api.github.com/users/hiranya911/followers",
"following_url": "https://api.github.com/users/hiranya911/following{/other_user}",
"gists_url": "https://api.github.com/users/hiranya911/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hiranya911",
"id": 2375201,
"login": "hiranya911",
"node_id": "MDQ6VXNlcjIzNzUyMDE=",
"organizations_url": "https://api.github.com/users/hiranya911/orgs",
"received_events_url": "https://api.github.com/users/hiranya911/received_events",
"repos_url": "https://api.github.com/users/hiranya911/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hiranya911/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hiranya911/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hiranya911",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2017-08-26T22:29:19Z | 2021-09-08T04:00:37Z | 2018-02-24T14:53:28Z | NONE | resolved | I have a server that is misbehaving slightly when sending 304 responses. It sends a `304 Not Modified` response with an empty response body, but with `Content-Length: 4` and `Content-Type: application/json; charset=utf-8` in the header header. This seems to break the requests session:
```
session = requests.Session()
print 'Send req 1'
resp = session.request('get', url, headers={'if-none-match': etag, 'Authorization' : 'Bearer ' + token})
print resp.status_code, resp.headers
print 'Send req 2'
resp = session.request('get', url, headers={'if-none-match': etag, 'Authorization' : 'Bearer ' + token})
print resp.status_code, resp.headers
```
The call to second request simply hangs, and never returns.
## Expected Result
Either both requests should complete normally, or an exception should be raised.
## Actual Result
The first request leaves the session in some broken state, so any subsequent call will simply appear to be stuck.
## Reproduction Steps
See above.
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "2.7.10"
},
"platform": {
"release": "16.7.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "9081df"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4260/reactions"
} | https://api.github.com/repos/psf/requests/issues/4260/timeline | null | completed | null | null | false | [
"If this is happening that server isn't misbehaving, Requests/urllib3 is. 304's with Content-Length that corresponds to the cached entity body are entirely allowed, so this should work just fine. I'll see if I can reproduce.",
"I think in this case the server might be genuinely misbehaving. Here's a wire-level tr... |
https://api.github.com/repos/psf/requests/issues/4259 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4259/labels{/name} | https://api.github.com/repos/psf/requests/issues/4259/comments | https://api.github.com/repos/psf/requests/issues/4259/events | https://github.com/psf/requests/issues/4259 | 253,125,188 | MDU6SXNzdWUyNTMxMjUxODg= | 4,259 | tests are broken | {
"avatar_url": "https://avatars.githubusercontent.com/u/9677399?v=4",
"events_url": "https://api.github.com/users/ofek/events{/privacy}",
"followers_url": "https://api.github.com/users/ofek/followers",
"following_url": "https://api.github.com/users/ofek/following{/other_user}",
"gists_url": "https://api.github.com/users/ofek/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ofek",
"id": 9677399,
"login": "ofek",
"node_id": "MDQ6VXNlcjk2NzczOTk=",
"organizations_url": "https://api.github.com/users/ofek/orgs",
"received_events_url": "https://api.github.com/users/ofek/received_events",
"repos_url": "https://api.github.com/users/ofek/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ofek/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ofek/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ofek",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2017-08-26T21:51:49Z | 2021-09-08T07:00:29Z | 2017-08-27T13:00:38Z | CONTRIBUTOR | resolved | Specifically, this hangs https://github.com/requests/requests/blob/5dcbdb50fc9652cbeffeec22a21d1196e938bfca/tests/test_requests.py#L151
It can be seen in #4258 https://travis-ci.org/requests/requests/jobs/268764155
This occurs locally for me as well. | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4259/reactions"
} | https://api.github.com/repos/psf/requests/issues/4259/timeline | null | completed | null | null | false | [
"I'm loving these new GitHub line previews. ",
"So fancy!",
"See #4261."
] |
https://api.github.com/repos/psf/requests/issues/4258 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4258/labels{/name} | https://api.github.com/repos/psf/requests/issues/4258/comments | https://api.github.com/repos/psf/requests/issues/4258/events | https://github.com/psf/requests/pull/4258 | 253,123,560 | MDExOlB1bGxSZXF1ZXN0MTM3ODEyNDUy | 4,258 | info for #4259 DO NOT MERGE | {
"avatar_url": "https://avatars.githubusercontent.com/u/9677399?v=4",
"events_url": "https://api.github.com/users/ofek/events{/privacy}",
"followers_url": "https://api.github.com/users/ofek/followers",
"following_url": "https://api.github.com/users/ofek/following{/other_user}",
"gists_url": "https://api.github.com/users/ofek/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ofek",
"id": 9677399,
"login": "ofek",
"node_id": "MDQ6VXNlcjk2NzczOTk=",
"organizations_url": "https://api.github.com/users/ofek/orgs",
"received_events_url": "https://api.github.com/users/ofek/received_events",
"repos_url": "https://api.github.com/users/ofek/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ofek/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ofek/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ofek",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 11 | 2017-08-26T21:20:51Z | 2021-08-31T00:07:20Z | 2017-08-27T07:53:04Z | CONTRIBUTOR | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4258/reactions"
} | https://api.github.com/repos/psf/requests/issues/4258/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4258.diff",
"html_url": "https://github.com/psf/requests/pull/4258",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4258.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4258"
} | true | [
"@kennethreitz Hey there! Could you please re-open this? There is a hanging test I want to verify in CI.",
"sorry!",
"@kennethreitz No problem! I submitted #4259 ",
"Ok, so the first note is that I don't reproduce this failure locally. That suggests that the failure is environmental: either OS-based (I'm on m... | |
https://api.github.com/repos/psf/requests/issues/4257 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4257/labels{/name} | https://api.github.com/repos/psf/requests/issues/4257/comments | https://api.github.com/repos/psf/requests/issues/4257/events | https://github.com/psf/requests/issues/4257 | 252,943,846 | MDU6SXNzdWUyNTI5NDM4NDY= | 4,257 | Requesting the ability to globally override the CA bundle path | {
"avatar_url": "https://avatars.githubusercontent.com/u/517114?v=4",
"events_url": "https://api.github.com/users/wise0wl/events{/privacy}",
"followers_url": "https://api.github.com/users/wise0wl/followers",
"following_url": "https://api.github.com/users/wise0wl/following{/other_user}",
"gists_url": "https://api.github.com/users/wise0wl/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/wise0wl",
"id": 517114,
"login": "wise0wl",
"node_id": "MDQ6VXNlcjUxNzExNA==",
"organizations_url": "https://api.github.com/users/wise0wl/orgs",
"received_events_url": "https://api.github.com/users/wise0wl/received_events",
"repos_url": "https://api.github.com/users/wise0wl/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/wise0wl/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/wise0wl/subscriptions",
"type": "User",
"url": "https://api.github.com/users/wise0wl",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2017-08-25T15:52:09Z | 2021-09-08T07:00:29Z | 2017-08-25T16:10:25Z | NONE | resolved | Currently, requests.certs.where() provides the path to the CA bundle by means of the certifi library. While this is fine it presents issues for developers who are using third party libraries requiring the requests library in situations where they need to use a internal or self signed CA.
A method prescribing a global override for this CA bundle path as a first pass would be extremely helpful. This method could be as easy as setting an environment variable, ie. CA_PATH=/path/to/ca/bundle.crt | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4257/reactions"
} | https://api.github.com/repos/psf/requests/issues/4257/timeline | null | completed | null | null | false | [
"Such an environment variable already exists: `REQUESTS_CA_BUNDLE`. I hope that helps!"
] |
https://api.github.com/repos/psf/requests/issues/4256 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4256/labels{/name} | https://api.github.com/repos/psf/requests/issues/4256/comments | https://api.github.com/repos/psf/requests/issues/4256/events | https://github.com/psf/requests/issues/4256 | 252,937,917 | MDU6SXNzdWUyNTI5Mzc5MTc= | 4,256 | SSL verification error when using requests sessions | {
"avatar_url": "https://avatars.githubusercontent.com/u/24897834?v=4",
"events_url": "https://api.github.com/users/PascalVA/events{/privacy}",
"followers_url": "https://api.github.com/users/PascalVA/followers",
"following_url": "https://api.github.com/users/PascalVA/following{/other_user}",
"gists_url": "https://api.github.com/users/PascalVA/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/PascalVA",
"id": 24897834,
"login": "PascalVA",
"node_id": "MDQ6VXNlcjI0ODk3ODM0",
"organizations_url": "https://api.github.com/users/PascalVA/orgs",
"received_events_url": "https://api.github.com/users/PascalVA/received_events",
"repos_url": "https://api.github.com/users/PascalVA/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/PascalVA/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/PascalVA/subscriptions",
"type": "User",
"url": "https://api.github.com/users/PascalVA",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 11 | 2017-08-25T15:31:48Z | 2018-10-05T16:31:38Z | 2017-08-28T08:00:19Z | CONTRIBUTOR | resolved | ## The problem
When using requests sessions to connect to a https website with a self signed certificate, requests throws a SSLError. It is working pefectly fine when using requests without sessions.
## What I am using:
* python2.7
* requests (2.18.4)
* exported REQUESTS_CA_BUNDLE environment variable
* Imported certificate to ca-certificates on underlying Debian os
Note: The certificate validates more than one hostname (e.g. kubernetes, kubernetes.default, kubernets.default.svc, kubernetes.default.svc.cluster.local, ...)
## Steps to reproduce
```python
# Normal request
import requests
requests.get('https://kubernetes.default.svc')
<Response [401]>
# Session request
s = requests.Session()
request = requests.Request('GET', 'https://kubernetes.default.svc')
prepared_request = s.prepare_request(request)
response = s.send(prepared_request)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 612, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python2.7/site-packages/requests/adapters.py", line 504, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='kubernetes.default.svc', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)'),))
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4256/reactions"
} | https://api.github.com/repos/psf/requests/issues/4256/timeline | null | completed | null | null | false | [
"You should prepare the request using the `Session`:\r\n\r\n```python\r\nrequest = requests.Request('GET', 'https://kubernetes.default.svc')\r\nprepared_request = s.prepare_request(request)\r\nresponse = s.send(prepared_request)\r\n```",
"Thanks for the quick response Lukasa, I did make a mistake copy/pasting on ... |
https://api.github.com/repos/psf/requests/issues/4255 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4255/labels{/name} | https://api.github.com/repos/psf/requests/issues/4255/comments | https://api.github.com/repos/psf/requests/issues/4255/events | https://github.com/psf/requests/issues/4255 | 252,841,334 | MDU6SXNzdWUyNTI4NDEzMzQ= | 4,255 | requests does not remove the default port from response url | {
"avatar_url": "https://avatars.githubusercontent.com/u/2804645?v=4",
"events_url": "https://api.github.com/users/hydrargyrum/events{/privacy}",
"followers_url": "https://api.github.com/users/hydrargyrum/followers",
"following_url": "https://api.github.com/users/hydrargyrum/following{/other_user}",
"gists_url": "https://api.github.com/users/hydrargyrum/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hydrargyrum",
"id": 2804645,
"login": "hydrargyrum",
"node_id": "MDQ6VXNlcjI4MDQ2NDU=",
"organizations_url": "https://api.github.com/users/hydrargyrum/orgs",
"received_events_url": "https://api.github.com/users/hydrargyrum/received_events",
"repos_url": "https://api.github.com/users/hydrargyrum/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hydrargyrum/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hydrargyrum/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hydrargyrum",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 12 | 2017-08-25T09:10:24Z | 2021-09-08T06:00:45Z | 2017-09-14T15:19:27Z | NONE | resolved | When requests is asked to open an url like `https://httpbin.org:443`, be it with a direct `requests.get` call or by a site redirection, the port part should be removed since it's the default one.
## Expected Result
`response.url` should not contain a port if it's the default one
## Actual Result
`response.url` contains the default port if the request url contained it
## Reproduction Steps
```python
import requests
print(requests.get('https://httpbin.org:443/get').url)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "1.8.1"
},
"idna": {
"version": ""
},
"implementation": {
"name": "CPython",
"version": "2.7.13"
},
"platform": {
"release": "4.12.0-1-amd64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "100020bf",
"version": "16.2.0"
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "1010006f"
},
"urllib3": {
"version": "1.21.1"
},
"using_pyopenssl": true
}
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4255/reactions"
} | https://api.github.com/repos/psf/requests/issues/4255/timeline | null | completed | null | null | false | [
"Why should we strip this from the URL? The URL is for the user only, it's not sent to the server, so what's the reason for stripping it?",
"- For end-users, real browsers already do strip it as soon as the user enters it in the URL bar.\r\n- Developers don't need to handle 2 different format for the same thing (... |
https://api.github.com/repos/psf/requests/issues/4254 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4254/labels{/name} | https://api.github.com/repos/psf/requests/issues/4254/comments | https://api.github.com/repos/psf/requests/issues/4254/events | https://github.com/psf/requests/issues/4254 | 252,820,667 | MDU6SXNzdWUyNTI4MjA2Njc= | 4,254 | Git Clone Fails | {
"avatar_url": "https://avatars.githubusercontent.com/u/5565407?v=4",
"events_url": "https://api.github.com/users/evans/events{/privacy}",
"followers_url": "https://api.github.com/users/evans/followers",
"following_url": "https://api.github.com/users/evans/following{/other_user}",
"gists_url": "https://api.github.com/users/evans/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/evans",
"id": 5565407,
"login": "evans",
"node_id": "MDQ6VXNlcjU1NjU0MDc=",
"organizations_url": "https://api.github.com/users/evans/orgs",
"received_events_url": "https://api.github.com/users/evans/received_events",
"repos_url": "https://api.github.com/users/evans/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/evans/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/evans/subscriptions",
"type": "User",
"url": "https://api.github.com/users/evans",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2017-08-25T07:35:03Z | 2021-09-08T07:00:30Z | 2017-08-25T07:36:48Z | NONE | resolved | The repository does not clone, due to a bad commit. Let me know if I can do anything more to help!
## Expected Result
The repository should be cloned successfully with the command:
```
git clone git@github.com:requests/requests.git
```
## Actual Result
I get this message:
```
Cloning into 'requests'...
remote: Counting objects: 20967, done.
remote: Compressing objects: 100% (25/25), done.
error: object 5e6ecdad9f69b1ff789a17733b8edc6fd7091bd8: badTimezone: invalid author/committer line - bad time zone
fatal: Error in object
fatal: index-pack failed
```
## Reproduction Steps
run:
```
git clone git@github.com:requests/requests.git
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4254/reactions"
} | https://api.github.com/repos/psf/requests/issues/4254/timeline | null | completed | null | null | false | [
"Thanks for the report. This is a known problem: see #3088, #3008, and #2690 for previous discussions. The problem can be easily resolved on your end either by performing a shallow clone (if you don't need the history) or turning off the fsck timestamp check. This cannot be fixed without rewriting our history and c... |
https://api.github.com/repos/psf/requests/issues/4253 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4253/labels{/name} | https://api.github.com/repos/psf/requests/issues/4253/comments | https://api.github.com/repos/psf/requests/issues/4253/events | https://github.com/psf/requests/issues/4253 | 252,458,254 | MDU6SXNzdWUyNTI0NTgyNTQ= | 4,253 | If there is a value in the body, setting the content-length in the header does not transfer it. | {
"avatar_url": "https://avatars.githubusercontent.com/u/9694022?v=4",
"events_url": "https://api.github.com/users/kssim/events{/privacy}",
"followers_url": "https://api.github.com/users/kssim/followers",
"following_url": "https://api.github.com/users/kssim/following{/other_user}",
"gists_url": "https://api.github.com/users/kssim/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kssim",
"id": 9694022,
"login": "kssim",
"node_id": "MDQ6VXNlcjk2OTQwMjI=",
"organizations_url": "https://api.github.com/users/kssim/orgs",
"received_events_url": "https://api.github.com/users/kssim/received_events",
"repos_url": "https://api.github.com/users/kssim/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kssim/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kssim/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kssim",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2017-08-24T01:04:10Z | 2021-09-08T07:00:30Z | 2017-08-24T01:10:23Z | NONE | resolved | If there is a value in the body, setting the content-length in the header does not transfer it.
I wonder if you are willing to give me the option to ignore the body value and pass in the value set by content-length
If you are thinking about providing options, I am willing to send a pull-request
## Expected Result
I set the header to a content-length of 100, and the size of the body is 10.
I expected the content-length to be 100, but actually it was 10.
## Actual Result
Looking at the code, there was logic to update the content-length by calculating the value of the body if it had a value for the body.
(requests/models.py - line 515, in prepare_content_legnth method)
## Reproduction Steps
This happens when you set the content-length and enter a different size than the value set in the body.
## System Information
It is not system dependent. | {
"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/4253/reactions"
} | https://api.github.com/repos/psf/requests/issues/4253/timeline | null | completed | null | null | false | [
"Hey @kssim, you should be able to accomplish what you're looking for by creating a PreparedRequest and then modifying the value of the header before sending.\r\n\r\nYou really shouldn't be sending incorrect content lengths though as this can cause issues for some servers and will often leave sockets hanging open w... |
https://api.github.com/repos/psf/requests/issues/4252 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4252/labels{/name} | https://api.github.com/repos/psf/requests/issues/4252/comments | https://api.github.com/repos/psf/requests/issues/4252/events | https://github.com/psf/requests/issues/4252 | 252,222,328 | MDU6SXNzdWUyNTIyMjIzMjg= | 4,252 | get an error OpenSSL.SSL.SysCallError: (-1, 'Unexpected EOF'), | {
"avatar_url": "https://avatars.githubusercontent.com/u/19412136?v=4",
"events_url": "https://api.github.com/users/liying1993/events{/privacy}",
"followers_url": "https://api.github.com/users/liying1993/followers",
"following_url": "https://api.github.com/users/liying1993/following{/other_user}",
"gists_url": "https://api.github.com/users/liying1993/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/liying1993",
"id": 19412136,
"login": "liying1993",
"node_id": "MDQ6VXNlcjE5NDEyMTM2",
"organizations_url": "https://api.github.com/users/liying1993/orgs",
"received_events_url": "https://api.github.com/users/liying1993/received_events",
"repos_url": "https://api.github.com/users/liying1993/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/liying1993/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/liying1993/subscriptions",
"type": "User",
"url": "https://api.github.com/users/liying1993",
"user_view_type": "public"
} | [
{
"color": "fef2c0",
"default": false,
"description": null,
"id": 298537994,
"name": "Needs More Information",
"node_id": "MDU6TGFiZWwyOTg1Mzc5OTQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Needs%20More%20Information"
}
] | closed | true | null | [] | null | 3 | 2017-08-23T09:45:35Z | 2021-09-08T07:00:30Z | 2017-08-25T07:35:07Z | NONE | resolved | get an error OpenSSL.SSL.SysCallError: (-1, 'Unexpected EOF'),
## Expected Result
I just make a simple request, and i just want to see what is the response
## Actual Result
OpenSSL.SSL.SysCallError: (-1, 'Unexpected EOF')
## Reproduction Steps
here is my code
```python
import requests
r = requests.post("https://gateway.gopay.com.cn/Trans/WebClientAction.do", data=param_dict)
```
## 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/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4252/reactions"
} | https://api.github.com/repos/psf/requests/issues/4252/timeline | null | completed | null | null | false | [
"Hi @liying1993,\r\n\r\nPlease provide more information about your system. Without that we cannot provide much help.",
"In the absence of more detail I'm assuming this is a dupe of #4244.",
"@Lukasa sorry,I have not check my email boxes in time,\r\nI have asked our cooperative corporation which is the server I ... |
https://api.github.com/repos/psf/requests/issues/4251 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4251/labels{/name} | https://api.github.com/repos/psf/requests/issues/4251/comments | https://api.github.com/repos/psf/requests/issues/4251/events | https://github.com/psf/requests/issues/4251 | 252,182,030 | MDU6SXNzdWUyNTIxODIwMzA= | 4,251 | Configuration to follow redirect method after http redirect | {
"avatar_url": "https://avatars.githubusercontent.com/u/8131738?v=4",
"events_url": "https://api.github.com/users/raja-gola/events{/privacy}",
"followers_url": "https://api.github.com/users/raja-gola/followers",
"following_url": "https://api.github.com/users/raja-gola/following{/other_user}",
"gists_url": "https://api.github.com/users/raja-gola/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/raja-gola",
"id": 8131738,
"login": "raja-gola",
"node_id": "MDQ6VXNlcjgxMzE3Mzg=",
"organizations_url": "https://api.github.com/users/raja-gola/orgs",
"received_events_url": "https://api.github.com/users/raja-gola/received_events",
"repos_url": "https://api.github.com/users/raja-gola/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/raja-gola/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/raja-gola/subscriptions",
"type": "User",
"url": "https://api.github.com/users/raja-gola",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2017-08-23T07:09:33Z | 2021-09-08T07:00:31Z | 2017-08-23T07:46:00Z | NONE | resolved | Summary.
Basically HTTP 301 redirection replaces POST method with a GET.
More Info: https://softwareengineering.stackexchange.com/questions/99894/why-doesnt-http-have-post-redirect
Need an config option in python requests to override this behavior and follow redirect method after http redirection.
Thanks
Raja
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4251/reactions"
} | https://api.github.com/repos/psf/requests/issues/4251/timeline | null | completed | null | null | false | [
"For overriding our redirect logic we have a coarse grained switch: `allow_redirecte`, which can be set to `False`. Failing that, more modern versions of Requests have a `Session.rebuild_method` method that can be overridden to change the behaviour to get what you're looking for. \r\n\r\nThere is no plan to add an ... |
https://api.github.com/repos/psf/requests/issues/4250 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4250/labels{/name} | https://api.github.com/repos/psf/requests/issues/4250/comments | https://api.github.com/repos/psf/requests/issues/4250/events | https://github.com/psf/requests/issues/4250 | 252,161,567 | MDU6SXNzdWUyNTIxNjE1Njc= | 4,250 | Error with relative url | {
"avatar_url": "https://avatars.githubusercontent.com/u/322101?v=4",
"events_url": "https://api.github.com/users/marcoshipe/events{/privacy}",
"followers_url": "https://api.github.com/users/marcoshipe/followers",
"following_url": "https://api.github.com/users/marcoshipe/following{/other_user}",
"gists_url": "https://api.github.com/users/marcoshipe/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/marcoshipe",
"id": 322101,
"login": "marcoshipe",
"node_id": "MDQ6VXNlcjMyMjEwMQ==",
"organizations_url": "https://api.github.com/users/marcoshipe/orgs",
"received_events_url": "https://api.github.com/users/marcoshipe/received_events",
"repos_url": "https://api.github.com/users/marcoshipe/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/marcoshipe/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/marcoshipe/subscriptions",
"type": "User",
"url": "https://api.github.com/users/marcoshipe",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2017-08-23T05:14:25Z | 2021-09-08T07:00:31Z | 2017-08-23T06:02:33Z | NONE | resolved | I have a problem with a specific relative URL, but I suppose it's not the only one.
When i do:
`print(requests.get('http://www.resultados.gob.ar/escrutinio/dat99/../../javascript/mun.js')`
## Expected Result
The content of the js
## Actual Result
> b'File not found."'
## Reproduction Steps
```python
import requests
print(requests.get('http://www.resultados.gob.ar/escrutinio/dat99/../../javascript/mun.js').content)
```
## Other info
With other links in the same web, it not happened, for example:
`print(requests.get('http://www.resultados.gob.ar/escrutinio/dat99/../dat01/DDN01001A.htm').content)`
If i do it with no relative path:
`print(requests.get('http://www.resultados.gob.ar/javascript/mun.js').content`
is ok either
And in firefox or chrome the same relative url is ok too
So i think it can be the '.js' at the end in combination with relative urls?
## System Information
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.6.2"
},
"platform": {
"release": "4.10.0-32-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "1000207f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4250/reactions"
} | https://api.github.com/repos/psf/requests/issues/4250/timeline | null | completed | null | null | false | [
"Yeah, it's currently the case that Requests does not clean up relative URLs. This is not planned to change in the short term: eventually we'll want to add a dependency on a proper URL handling module in urllib3, but until that work gets done we can't resolve this. \r\n\r\nIf you're interested in doing that work pl... |
https://api.github.com/repos/psf/requests/issues/4249 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4249/labels{/name} | https://api.github.com/repos/psf/requests/issues/4249/comments | https://api.github.com/repos/psf/requests/issues/4249/events | https://github.com/psf/requests/issues/4249 | 252,070,388 | MDU6SXNzdWUyNTIwNzAzODg= | 4,249 | requests-http-signature | {
"avatar_url": "https://avatars.githubusercontent.com/u/862013?v=4",
"events_url": "https://api.github.com/users/kislyuk/events{/privacy}",
"followers_url": "https://api.github.com/users/kislyuk/followers",
"following_url": "https://api.github.com/users/kislyuk/following{/other_user}",
"gists_url": "https://api.github.com/users/kislyuk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kislyuk",
"id": 862013,
"login": "kislyuk",
"node_id": "MDQ6VXNlcjg2MjAxMw==",
"organizations_url": "https://api.github.com/users/kislyuk/orgs",
"received_events_url": "https://api.github.com/users/kislyuk/received_events",
"repos_url": "https://api.github.com/users/kislyuk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kislyuk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kislyuk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kislyuk",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2017-08-22T19:54:03Z | 2021-09-08T07:00:28Z | 2017-08-22T19:58:14Z | NONE | resolved | I have published a new PyPI module, https://github.com/kislyuk/requests-http-signature, to implement the IETF draft for HTTP signatures (https://tools.ietf.org/html/draft-cavage-http-signatures-07). This draft RFC formalizes the use of symmetric (HMAC-SHA1, HMAC-SHA256) and asymmetric (RSA-SHA256, ECDSA-SHA256) message signing in HTTP.
Is there interest in bringing this module under the requests organization? | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4249/reactions"
} | https://api.github.com/repos/psf/requests/issues/4249/timeline | null | completed | null | null | false | [
"Very nice work! For the moment I think it would be best to keep it separate; this ensures we don't bottleneck on the limited resources of the Requests team. However, if there is significant uptake and you no longer have the resources to do solo maintainership please let us know and we'll re-evaluate. ",
"For ref... |
https://api.github.com/repos/psf/requests/issues/4248 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4248/labels{/name} | https://api.github.com/repos/psf/requests/issues/4248/comments | https://api.github.com/repos/psf/requests/issues/4248/events | https://github.com/psf/requests/issues/4248 | 251,389,826 | MDU6SXNzdWUyNTEzODk4MjY= | 4,248 | Error decoding chunked response in _update_chunk_length: ValueError: invalid literal for int() with base 16: b'HTTP/1.1 200 OK\r\n' | {
"avatar_url": "https://avatars.githubusercontent.com/u/398575?v=4",
"events_url": "https://api.github.com/users/danc86/events{/privacy}",
"followers_url": "https://api.github.com/users/danc86/followers",
"following_url": "https://api.github.com/users/danc86/following{/other_user}",
"gists_url": "https://api.github.com/users/danc86/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/danc86",
"id": 398575,
"login": "danc86",
"node_id": "MDQ6VXNlcjM5ODU3NQ==",
"organizations_url": "https://api.github.com/users/danc86/orgs",
"received_events_url": "https://api.github.com/users/danc86/received_events",
"repos_url": "https://api.github.com/users/danc86/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/danc86/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/danc86/subscriptions",
"type": "User",
"url": "https://api.github.com/users/danc86",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 25 | 2017-08-19T01:04:30Z | 2021-08-31T00:06:58Z | 2019-02-04T11:51:47Z | NONE | resolved | Decoding a response with chunked encoding fails because it seems to be reading from the HTTP status line instead of the start of the body.
## Expected Result
Successfully return a 200 response object.
## Actual Result
```
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/response.py", line 535, in _update_chunk_length
self.chunk_left = int(line, 16)
ValueError: invalid literal for int() with base 16: b'HTTP/1.1 200 OK\r\n'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/response.py", line 298, in _error_catcher
yield
File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/response.py", line 590, in read_chunked
self._update_chunk_length()
File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/response.py", line 539, in _update_chunk_length
raise httplib.IncompleteRead(line)
http.client.IncompleteRead: IncompleteRead(17 bytes read)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/requests/models.py", line 719, in generate
for chunk in self.raw.stream(chunk_size, decode_content=True):
File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/response.py", line 428, in stream
for line in self.read_chunked(amt, decode_content=decode_content):
File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/response.py", line 618, in read_chunked
self._original_response.close()
File "/usr/lib64/python3.6/contextlib.py", line 99, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/response.py", line 316, in _error_catcher
raise ProtocolError('Connection broken: %r' % e, e)
requests.packages.urllib3.exceptions.ProtocolError: ('Connection broken: IncompleteRead(17 bytes read)', IncompleteRead(17 bytes read))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.6/site-packages/requests/api.py", line 70, in get
return request('get', url, params=params, **kwargs)
File "/usr/lib/python3.6/site-packages/requests/api.py", line 56, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 488, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 641, in send
r.content
File "/usr/lib/python3.6/site-packages/requests/models.py", line 797, in content
self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes()
File "/usr/lib/python3.6/site-packages/requests/models.py", line 722, in generate
raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ('Connection broken: IncompleteRead(17 bytes read)', IncompleteRead(17 bytes read))
```
## Reproduction Steps
```python
import requests
requests.get('https://my.virginmoney.com.au/AUVMA/JSO/signon/DisplayUsernameSignon.do')
```
## System Information
requests 2.13.0
urllib3 1.20
Python 3.6.2
Fedora 26 | {
"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": 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/4248/reactions"
} | https://api.github.com/repos/psf/requests/issues/4248/timeline | null | completed | null | null | false | [
"This works fine with requests 2.10.0 so something regressed between then and 2.13.0. Also tested with 2.18.4 and the bug exists as above.",
"I can't spot anything defective or invalid in the response from that server when I look at it manually.\r\n\r\nOne thing I do notice is that it is using both `Content-Encod... |
https://api.github.com/repos/psf/requests/issues/4247 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4247/labels{/name} | https://api.github.com/repos/psf/requests/issues/4247/comments | https://api.github.com/repos/psf/requests/issues/4247/events | https://github.com/psf/requests/issues/4247 | 251,320,530 | MDU6SXNzdWUyNTEzMjA1MzA= | 4,247 | Having trouble with SSL verification | {
"avatar_url": "https://avatars.githubusercontent.com/u/19782075?v=4",
"events_url": "https://api.github.com/users/TJOak/events{/privacy}",
"followers_url": "https://api.github.com/users/TJOak/followers",
"following_url": "https://api.github.com/users/TJOak/following{/other_user}",
"gists_url": "https://api.github.com/users/TJOak/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/TJOak",
"id": 19782075,
"login": "TJOak",
"node_id": "MDQ6VXNlcjE5NzgyMDc1",
"organizations_url": "https://api.github.com/users/TJOak/orgs",
"received_events_url": "https://api.github.com/users/TJOak/received_events",
"repos_url": "https://api.github.com/users/TJOak/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/TJOak/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/TJOak/subscriptions",
"type": "User",
"url": "https://api.github.com/users/TJOak",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2017-08-18T18:14:19Z | 2021-09-08T07:00:31Z | 2017-08-18T20:20:22Z | NONE | resolved | Preface: I have a feeling that this isn't an issue with requests itself, but it did up come while I was using it, so I was hoping that you could offer some insight. This issue might even be the same one that hellt had in https://github.com/requests/requests/issues/3212 , but there are a few differences that made me uncertain whether that is actually the case. My apologies if it's a duplicate.
The error in question:
```
Traceback (most recent call last):
File "ALT_post_api.py", line 177, in <module>
main()
File "ALT_post_api.py", line 96, in main
response = requests.get(url, headers=headers, verify="/path/to/ssl/DigiCertCA.crt")
File "/export/software/lib/python2.7/site-packages/requests/api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "/export/software/lib/python2.7/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/export/software/lib/python2.7/site-packages/requests/sessions.py", line 502, in request
resp = self.send(prep, **send_kwargs)
File "/export/software/lib/python2.7/site-packages/requests/sessions.py", line 612, in send
r = adapter.send(request, **kwargs)
File "/export/software/lib/python2.7/site-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: ("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",)
```
Looking at the Apache config, an SSLCertificateFile, an SSLCertificateKeyFile, and an SSLCertificateChainFile are specified. The above uses the SSLCertificateChainFile (DigiCertCA.crt) in the verify parameter, though both True and the SSLCertificateFile throw the same exact error. I tried appending those two files to a copy of the file given by `certifi.where()` (named cacert.pem) as seems to be suggested in the linked issue, but it also throws the same error.
Versions:
```
Python 2.7.12
>>> requests.__version__
'2.18.1'
>>> certifi.__version__
'2017.04.17'
>>> ssl.OPENSSL_VERSION
'OpenSSL 1.0.1e-fips 11 Feb 2013'
```
This is the result of running `openssl s_client -connect my_host:443 -showcerts -servername my_host`, HOWEVER, I later ran openssl version and got OpenSSL 0.9.8za 5 Jun 2014; this isn't the version Python is using:
```
CONNECTED(00000003)
depth=0 /C=US/ST=[redacted; local area + host]
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 /C=US/ST=[redacted; local area + host]
verify error:num=27:certificate not trusted
verify return:1
depth=0 /C=US/ST=[redacted; local area + host]
verify error:num=21:unable to verify the first certificate
verify return:1
---
Certificate chain
0 s:/C=US/ST=[redacted; local area + host]
i:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 High Assurance Server CA
-----BEGIN CERTIFICATE-----
MIIFmzC[redacted]
-----END CERTIFICATE-----
1 s:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance CA-3
i:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance EV Root CA
-----BEGIN CERTIFICATE-----
MIIGWDC[redacted]
-----END CERTIFICATE-----
---
Server certificate
subject=/C=US/ST=[redacted; local area + host]
issuer=/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 High Assurance Server CA
---
No client certificate CA names sent
---
SSL handshake has read 3980 bytes and written 329 bytes
---
New, TLSv1/SSLv3, Cipher is DHE-RSA-AES128-SHA
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol : TLSv1
Cipher : DHE-RSA-AES128-SHA
Session-ID: 400E[etc]
Session-ID-ctx:
Master-Key: E536[etc.]
Key-Arg : None
TLS session ticket:
0000 - 48 39 0b 54 3d 88 e3 bf-69 71 ac ea 7e aa fe 9a H9.T=...iq..~...
[etc.]
00d0 - b7 23 f5 ed a7 6c 9a 56-09 c2 ac 32 11 6e 5c c6 .#...l.V...2.n\.
Start Time: 1503002301
Timeout : 300 (sec)
Verify return code: 21 (unable to verify the first certificate)
---
```
But specifying -CAfile with the SSLCertificateFile, DigiCertCA.crt, or cacert.pem returns '0 (ok)':
```
depth=2 /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance EV Root CA
verify return:1
depth=1 /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 High Assurance Server CA
verify return:1
depth=0 /C=US/ST=[redacted; local area + host]
verify return:1
---
Certificate chain
0 s:/C=US/ST=[redacted; local area + host]
i:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 High Assurance Server CA
-----BEGIN CERTIFICATE-----
MIIFmzC[redacted]
-----END CERTIFICATE-----
1 s:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance CA-3
i:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance EV Root CA
-----BEGIN CERTIFICATE-----
MIIGWDC[redacted]
-----END CERTIFICATE-----
---
Server certificate
subject=/C=US/ST=[redacted; local area + host]
issuer=/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 High Assurance Server CA
---
No client certificate CA names sent
---
SSL handshake has read 3980 bytes and written 329 bytes
---
New, TLSv1/SSLv3, Cipher is DHE-RSA-AES128-SHA
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol : TLSv1
Cipher : DHE-RSA-AES128-SHA
Session-ID: 0EFE[etc.]
Session-ID-ctx:
Master-Key: 856A[etc.]
Key-Arg : None
TLS session ticket:
0000 - 48 39 0b 54 3d 88 e3 bf-69 71 ac ea 7e aa fe 9a H9.T=...iq..~...
[etc.]
00d0 - 1e 0c ac a4 32 6d 57 6b-64 19 32 69 6b 62 a4 f3 ....2mWkd.2ikb..
Start Time: 1503002938
Timeout : 300 (sec)
Verify return code: 0 (ok)
---
```
Now for the output of the OpenSSL version that Python is actually using:
```
CONNECTED(00000003)
depth=0 C = US, ST = [redacted; local area + host]
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 C = US, ST = [redacted; local area + host]
verify error:num=27:certificate not trusted
verify return:1
depth=0 C = US, ST = [redacted; local area + host]
verify error:num=21:unable to verify the first certificate
verify return:1
---
Certificate chain
0 s:/C=US/ST=[redacted; local area + host]
i:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 High Assurance Server CA
-----BEGIN CERTIFICATE-----
MIIFmzC[redacted]
-----END CERTIFICATE-----
1 s:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance CA-3
i:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance EV Root CA
-----BEGIN CERTIFICATE-----
MIIGWDC[redacted]
-----END CERTIFICATE-----
---
Server certificate
subject=/C=US/ST=[redacted; local area + host]
issuer=/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 High Assurance Server CA
---
No client certificate CA names sent
Server Temp Key: DH, 1024 bits
---
SSL handshake has read 3980 bytes and written 492 bytes
---
New, TLSv1/SSLv3, Cipher is DHE-RSA-AES128-SHA
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol : TLSv1
Cipher : DHE-RSA-AES128-SHA
Session-ID: D4AD[redacted]
Session-ID-ctx:
Master-Key: 7732[redacted]
Key-Arg : None
Krb5 Principal: None
PSK identity: None
PSK identity hint: None
TLS session ticket:
0000 - 48 39 0b 54 3d 88 e3 bf-69 71 ac ea 7e aa fe 9a H9.T=...iq..~...
[etc.]
00d0 - 3f ff 52 7a 03 a7 ee f3-7f d0 f0 ae f2 b3 46 a0 ?.Rz..........F.
Start Time: 1503072674
Timeout : 300 (sec)
Verify return code: 21 (unable to verify the first certificate)
```
(One difference I noticed was "Server Temp Key: DH, 1024 bits")
The reason I included the outputs of both versions of `openssl` is because the version Python is using always seems to return 21, even when `-CAfile` is specified.
I tried compiling Python with the other version of OpenSSL, but ran into issues, so I figured I should ask if that has a good chance of fixing my problem before continuing.
## Expected Result
A GET request should be made and retrieve some data. This does work with `verify=False`.
## Actual Result
Request seems to fail verifying the certificate.
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.0.3"
},
"implementation": {
"name": "CPython",
"version": "2.7.12"
},
"platform": {
"release": "2.6.32-642.11.1.el6.x86_64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010006f",
"version": "17.2.0"
},
"requests": {
"version": "2.18.1"
},
"system_ssl": {
"version": "1000105f"
},
"urllib3": {
"version": "1.21.1"
},
"using_pyopenssl": true
}
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/19782075?v=4",
"events_url": "https://api.github.com/users/TJOak/events{/privacy}",
"followers_url": "https://api.github.com/users/TJOak/followers",
"following_url": "https://api.github.com/users/TJOak/following{/other_user}",
"gists_url": "https://api.github.com/users/TJOak/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/TJOak",
"id": 19782075,
"login": "TJOak",
"node_id": "MDQ6VXNlcjE5NzgyMDc1",
"organizations_url": "https://api.github.com/users/TJOak/orgs",
"received_events_url": "https://api.github.com/users/TJOak/received_events",
"repos_url": "https://api.github.com/users/TJOak/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/TJOak/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/TJOak/subscriptions",
"type": "User",
"url": "https://api.github.com/users/TJOak",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4247/reactions"
} | https://api.github.com/repos/psf/requests/issues/4247/timeline | null | completed | null | null | false | [
"So there are a number of issues here, but the core problem is that your server is not sending a TLS cert chain that makes any sense at all. From your OpenSSL output, the server is sending two certs:\r\n\r\n1. [redacted; local area + host], issued by DigiCert SHA2 High Assurance Server CA\r\n2. DigiCert High Assura... |
https://api.github.com/repos/psf/requests/issues/4246 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4246/labels{/name} | https://api.github.com/repos/psf/requests/issues/4246/comments | https://api.github.com/repos/psf/requests/issues/4246/events | https://github.com/psf/requests/issues/4246 | 251,072,141 | MDU6SXNzdWUyNTEwNzIxNDE= | 4,246 | SSLError HTTPSConnectionPool Max retries exceeded with url: /oauth/token Caused by SSLError('bad handshake: SysCallError(0, None)) | {
"avatar_url": "https://avatars.githubusercontent.com/u/16965638?v=4",
"events_url": "https://api.github.com/users/albayraktaroglu/events{/privacy}",
"followers_url": "https://api.github.com/users/albayraktaroglu/followers",
"following_url": "https://api.github.com/users/albayraktaroglu/following{/other_user}",
"gists_url": "https://api.github.com/users/albayraktaroglu/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/albayraktaroglu",
"id": 16965638,
"login": "albayraktaroglu",
"node_id": "MDQ6VXNlcjE2OTY1NjM4",
"organizations_url": "https://api.github.com/users/albayraktaroglu/orgs",
"received_events_url": "https://api.github.com/users/albayraktaroglu/received_events",
"repos_url": "https://api.github.com/users/albayraktaroglu/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/albayraktaroglu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/albayraktaroglu/subscriptions",
"type": "User",
"url": "https://api.github.com/users/albayraktaroglu",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 12 | 2017-08-17T21:05:08Z | 2021-08-29T00:06:52Z | 2017-08-18T16:59:26Z | NONE | resolved | ## Summary
The problem that I am having is showing up after user enters their credentials at the Auth0's lock screen. When I looked at Auth0 Dashboard's log section I can see users can login successfully ( I see both Success Exchange, Success Login ). Then call back function is triggering the callback call. At that point production and test(localhost) environments differs from each other.
In localhost I can see the status code 302 Found status code on the localhost but not in the production server. In production server I am seeing the status code 500 INTERNAL SERVER ERROR.
When I checked the server side I saw it was failing at the token line of the callback function
```
@app.route('/callback')
def callback_handling():
code = request.args.get('CODE_KEY')
get_token = GetToken('AUTH0_DOMAIN')
auth0_users = Users('AUTH0_DOMAIN')
token = get_token.authorization_code('AUTH0_CLIENT_ID'], ['AUTH0_CLIENT_SECRET', code, 'AUTH0_CALLBACK_URL') # FAILING HERE #
user_info = auth0_users.userinfo(token['access_token'])
.....
...
..
return redirect('/some_path')
```
When I checked the credentials they all look what they are supposed to be. So in the server logs I am seeing this keywords in the servers.
```
ERROR in app: Exception on /callback
raise SSLError(e, request=request)
SSLError: HTTPSConnectionPool(host='my_domain.auth0.com', port=443): Max retries exceeded with url: /oauth/token (Caused by SSLError(SSLError('bad handshake: SysCallError(0, None)',),))
```
I am thinking server might be rejecting the certificate or something and after seeing [this link](https://github.com/rackspace/pyrax/issues/601) thought opening issue might be helpful.
Ubuntu 16.04, Python 2.7.12, certifi 2017.7.27.1
## Expected Result
In the callback function returns token
` token = get_token.authorization_code('AUTH0_CLIENT_ID', 'AUTH0_CLIENT_SECRET', code, 'AUTH0_CALLBACK_URL') `
## Actual Result
`SSLError: HTTPSConnectionPool(host='my_domain.auth0.com', port=443): Max retries exceeded with url: /oauth/token (Caused by SSLError(SSLError('bad handshake: SysCallError(0, None)',`
## Reproduction Steps
```python
import requests
```
## System Information
$ python -m requests.help
```
python -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "1.2.3"
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "2.7.12"
},
"platform": {
"release": "3.13.0-43-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1000207f",
"version": "0.15.1"
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "1000207f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": true
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4246/reactions"
} | https://api.github.com/repos/psf/requests/issues/4246/timeline | null | completed | null | null | false | [
"Thanks for this report! I think we need to see a bit more of the actual Requests code. It seems like the server is rejecting the handshake but it's hard to know more without seeing your requests call.",
"Hi Lukasa, \r\n\r\n\r\nThe code below is being called by ` token = get_token.authorization_code('AUTH0_CLIENT... |
https://api.github.com/repos/psf/requests/issues/4245 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4245/labels{/name} | https://api.github.com/repos/psf/requests/issues/4245/comments | https://api.github.com/repos/psf/requests/issues/4245/events | https://github.com/psf/requests/pull/4245 | 250,810,681 | MDExOlB1bGxSZXF1ZXN0MTM2MTU5ODY5 | 4,245 | Fix parse_header_links on empty header | {
"avatar_url": "https://avatars.githubusercontent.com/u/426784?v=4",
"events_url": "https://api.github.com/users/remram44/events{/privacy}",
"followers_url": "https://api.github.com/users/remram44/followers",
"following_url": "https://api.github.com/users/remram44/following{/other_user}",
"gists_url": "https://api.github.com/users/remram44/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/remram44",
"id": 426784,
"login": "remram44",
"node_id": "MDQ6VXNlcjQyNjc4NA==",
"organizations_url": "https://api.github.com/users/remram44/orgs",
"received_events_url": "https://api.github.com/users/remram44/received_events",
"repos_url": "https://api.github.com/users/remram44/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/remram44/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/remram44/subscriptions",
"type": "User",
"url": "https://api.github.com/users/remram44",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2017-08-17T02:14:02Z | 2021-09-04T00:06:52Z | 2017-08-17T19:34:07Z | CONTRIBUTOR | resolved | When receiving an empty `Link:` header, one bogus entry was returned anyway. This breaks some applications.
I agree that web servers shouldn't be sending those but they do so here we are. Also fixes docstring with proper return type.
Fixes https://github.com/halcy/Mastodon.py/issues/74 | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4245/reactions"
} | https://api.github.com/repos/psf/requests/issues/4245/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4245.diff",
"html_url": "https://github.com/psf/requests/pull/4245",
"merged_at": "2017-08-17T19:34:07Z",
"patch_url": "https://github.com/psf/requests/pull/4245.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4245"
} | true | [
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4245?src=pr&el=h1) Report\n> Merging [#4245](https://codecov.io/gh/requests/requests/pull/4245?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/af9dd61fcba5a1d0b3f75abf5499f6e1f845349c?src=pr&el=desc) will **increase** coverage by... |
https://api.github.com/repos/psf/requests/issues/4244 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4244/labels{/name} | https://api.github.com/repos/psf/requests/issues/4244/comments | https://api.github.com/repos/psf/requests/issues/4244/events | https://github.com/psf/requests/issues/4244 | 250,439,971 | MDU6SXNzdWUyNTA0Mzk5NzE= | 4,244 | ("bad handshake: SysCallError(-1, 'Unexpected EOF')",) despite using verify=False | {
"avatar_url": "https://avatars.githubusercontent.com/u/15695586?v=4",
"events_url": "https://api.github.com/users/adamwilbert/events{/privacy}",
"followers_url": "https://api.github.com/users/adamwilbert/followers",
"following_url": "https://api.github.com/users/adamwilbert/following{/other_user}",
"gists_url": "https://api.github.com/users/adamwilbert/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/adamwilbert",
"id": 15695586,
"login": "adamwilbert",
"node_id": "MDQ6VXNlcjE1Njk1NTg2",
"organizations_url": "https://api.github.com/users/adamwilbert/orgs",
"received_events_url": "https://api.github.com/users/adamwilbert/received_events",
"repos_url": "https://api.github.com/users/adamwilbert/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/adamwilbert/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/adamwilbert/subscriptions",
"type": "User",
"url": "https://api.github.com/users/adamwilbert",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 32 | 2017-08-15T21:09:26Z | 2018-09-28T12:56:07Z | 2017-11-25T14:29:02Z | NONE | resolved | Summary.
I am trying to make a request to a private api with a private api with an expired certificate that I do not control.
I am attempting to use verify=False in the request, but continue to get a
("bad handshake: SysCallError(-1, 'Unexpected EOF')",) error.
I have tried using the old 2.11 cipher string, but I still cannot complete the request. I have tried creating a custom adapter as detailed here: https://lukasa.co.uk/2017/02/Configuring_TLS_With_Requests/
I am able to recreate the request locally and inside the container that holds my application, but I am not able to make the request within my application without the bad handshake.
## Expected Result
Get the same response as I am able to get with cURL/postman/etc.
## Actual Result
("bad handshake: SysCallError(-1, 'Unexpected EOF')",)
## Reproduction Steps
```python
import requests
requests.post(url, data=data, headers=headers, verify=False)
```
Have also tried making get requests here without data just to test, they also fail
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.0.3"
},
"idna": {
"version": ""
},
"implementation": {
"name": "CPython",
"version": "3.5.2"
},
"platform": {
"release": "4.9.31-moby",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010006f",
"version": "16.2.0"
},
"requests": {
"version": "2.18.3"
},
"system_ssl": {
"version": "1000207f"
},
"urllib3": {
"version": "1.21.1"
},
"using_pyopenssl": true
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). | {
"avatar_url": "https://avatars.githubusercontent.com/u/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/4244/reactions"
} | https://api.github.com/repos/psf/requests/issues/4244/timeline | null | completed | null | null | false | [
"`verify=False` only prevents us from validating the certificate. Based on this error we aren't getting that far: the server is shutting down the connection. Is the server in question publicly reachable?",
"Oh, wait, I see that curl works. Can you use `curl -v` and print the debug output here?",
"Note: Unnecess... |
https://api.github.com/repos/psf/requests/issues/4243 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4243/labels{/name} | https://api.github.com/repos/psf/requests/issues/4243/comments | https://api.github.com/repos/psf/requests/issues/4243/events | https://github.com/psf/requests/issues/4243 | 249,901,271 | MDU6SXNzdWUyNDk5MDEyNzE= | 4,243 | Slow charset detection on Json file with no explicit encoding | {
"avatar_url": "https://avatars.githubusercontent.com/u/6244078?v=4",
"events_url": "https://api.github.com/users/gil9red/events{/privacy}",
"followers_url": "https://api.github.com/users/gil9red/followers",
"following_url": "https://api.github.com/users/gil9red/following{/other_user}",
"gists_url": "https://api.github.com/users/gil9red/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gil9red",
"id": 6244078,
"login": "gil9red",
"node_id": "MDQ6VXNlcjYyNDQwNzg=",
"organizations_url": "https://api.github.com/users/gil9red/orgs",
"received_events_url": "https://api.github.com/users/gil9red/received_events",
"repos_url": "https://api.github.com/users/gil9red/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gil9red/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gil9red/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gil9red",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2017-08-13T21:49:21Z | 2021-09-08T07:00:32Z | 2017-08-14T05:40:17Z | NONE | resolved | Hello!
In Reproduction Steps a large JSON file is downloaded - about 180MB
When I called rs.text (step 6), I did not wait for the result - I waited about 25 minutes
Console:
```
None
[1] total time: 4.0396250532594795 sec
[2] total time: 3.9574704779202534 sec
[3] total time: 0.271754903759728 sec
[4] total time: 4.078747523628547 sec
[5] total time: 0.27294884912872064 sec
[6] total time: 1515.3671759879826 sec
```
## Reproduction Steps
```python
class TimeThis(object):
def __init__(self, title="TimeThis"):
self.title = title
self.start_time = None
def __enter__(self):
import time
self.start_time = time.clock()
return self
def __exit__(self, exc_type, exc_value, exc_traceback):
import time
print('[{}] total time: {} sec'.format(self.title, time.clock() - self.start_time))
url = 'http://opendata.mkrf.ru/opendata/7705851331-register_movies/data-16-structure-3.json'
import requests
rs = requests.get(url)
print(rs.encoding)
with TimeThis("1"):
rs.json()
with TimeThis("2"):
import json
json.loads(rs.content, encoding='utf-8')
with TimeThis("3"):
rs.content.decode('utf-8')
with TimeThis("4"):
import json
json_data = rs.content.decode('utf-8')
json.loads(json_data)
with TimeThis("5"):
rs.encoding = 'utf-8'
rs.text
rs.encoding = None
with TimeThis("6"):
rs.text
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": ""
},
"implementation": {
"name": "CPython",
"version": "3.6.1"
},
"platform": {
"release": "7",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.3"
},
"system_ssl": {
"version": "100020bf"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}
```
Windows7, Python 3.6.1 | Anaconda 4.4.0 (64-bit) | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4243/reactions"
} | https://api.github.com/repos/psf/requests/issues/4243/timeline | null | completed | null | null | false | [
"Thanks for this! This is a dupe of #4235: closing to centralise. "
] |
https://api.github.com/repos/psf/requests/issues/4242 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4242/labels{/name} | https://api.github.com/repos/psf/requests/issues/4242/comments | https://api.github.com/repos/psf/requests/issues/4242/events | https://github.com/psf/requests/issues/4242 | 249,814,935 | MDU6SXNzdWUyNDk4MTQ5MzU= | 4,242 | .get params is ignored if there is a double slash in the url | {
"avatar_url": "https://avatars.githubusercontent.com/u/800543?v=4",
"events_url": "https://api.github.com/users/robertlayton/events{/privacy}",
"followers_url": "https://api.github.com/users/robertlayton/followers",
"following_url": "https://api.github.com/users/robertlayton/following{/other_user}",
"gists_url": "https://api.github.com/users/robertlayton/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/robertlayton",
"id": 800543,
"login": "robertlayton",
"node_id": "MDQ6VXNlcjgwMDU0Mw==",
"organizations_url": "https://api.github.com/users/robertlayton/orgs",
"received_events_url": "https://api.github.com/users/robertlayton/received_events",
"repos_url": "https://api.github.com/users/robertlayton/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/robertlayton/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/robertlayton/subscriptions",
"type": "User",
"url": "https://api.github.com/users/robertlayton",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2017-08-12T14:23:00Z | 2021-09-08T05:00:38Z | 2017-09-14T15:39:10Z | NONE | resolved | Summary.
The behaviour doesn't seem to be consistent everywhere, but when I run the following with Python 3 / requests 2.14-2, params is ignored in the double-slash case:
```python
import requests
response = requests.get("https://erikberg.com/nba/results/atlanta-hawks.json", params={"season": "2014"}, verify=False)
print("No double slashes", response.url)
response2 = requests.get("https://erikberg.com//nba/results/atlanta-hawks.json", params={"season": "2014"}, verify=False)
print("With double slashes", response2.url)
```
## Expected Result
`response2.url` should be the same as `response.url`:
No double slashes https://erikberg.com/nba/results/atlanta-hawks.json?season=2014
With double slashes https://erikberg.com/nba/results/atlanta-hawks.json?season=2014
## Actual Result
`response2.url` was the raw url, with no params attached to it:
No double slashes https://erikberg.com/nba/results/atlanta-hawks.json?season=2014
With double slashes https://erikberg.com/nba/results/atlanta-hawks.json
## Reproduction Steps
```python
import requests
response = requests.get("https://erikberg.com/nba/results/atlanta-hawks.json", params={"season": "2014"}, verify=False)
print("No double slashes", response.url)
response2 = requests.get("https://erikberg.com//nba/results/atlanta-hawks.json", params={"season": "2014"}, verify=False)
print("With double slashes", response2.url)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "1.8.1"
},
"idna": {
"version": ""
},
"implementation": {
"name": "CPython",
"version": "3.6.1"
},
"platform": {
"release": "3.18.0-14875-g438cb8ab27c6",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "100020bf",
"version": "17.0.0"
},
"requests": {
"version": "2.18.3"
},
"system_ssl": {
"version": "100020cf"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": true
}
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4242/reactions"
} | https://api.github.com/repos/psf/requests/issues/4242/timeline | null | completed | null | null | false | [
"Did you say this happens with Requests 2.14? Why does your help output identify the Requests version as 2.18.3?",
"The case above seems to be very specific, testing with any other url that has a double slash in it seems to work. \r\n\r\n >>> response = requests.get(\"https://www.sinax.be/blog\", params={\"sea... |
https://api.github.com/repos/psf/requests/issues/4241 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4241/labels{/name} | https://api.github.com/repos/psf/requests/issues/4241/comments | https://api.github.com/repos/psf/requests/issues/4241/events | https://github.com/psf/requests/pull/4241 | 249,734,863 | MDExOlB1bGxSZXF1ZXN0MTM1NDA5NDE1 | 4,241 | attempted fix of travis | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2017-08-11T20:06:33Z | 2021-08-28T00:06:24Z | 2018-02-24T14:53:50Z | CONTRIBUTOR | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4241/reactions"
} | https://api.github.com/repos/psf/requests/issues/4241/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4241.diff",
"html_url": "https://github.com/psf/requests/pull/4241",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4241.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4241"
} | true | [
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4241?src=pr&el=h1) Report\n> Merging [#4241](https://codecov.io/gh/requests/requests/pull/4241?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/1c2022cf868cb503815f34901ad8e85cf524d01a?src=pr&el=desc) will **increase** coverage by... | |
https://api.github.com/repos/psf/requests/issues/4240 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4240/labels{/name} | https://api.github.com/repos/psf/requests/issues/4240/comments | https://api.github.com/repos/psf/requests/issues/4240/events | https://github.com/psf/requests/pull/4240 | 249,731,154 | MDExOlB1bGxSZXF1ZXN0MTM1NDA2NTU5 | 4,240 | Adding header name to exception | {
"avatar_url": "https://avatars.githubusercontent.com/u/25228167?v=4",
"events_url": "https://api.github.com/users/mgasvoda/events{/privacy}",
"followers_url": "https://api.github.com/users/mgasvoda/followers",
"following_url": "https://api.github.com/users/mgasvoda/following{/other_user}",
"gists_url": "https://api.github.com/users/mgasvoda/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mgasvoda",
"id": 25228167,
"login": "mgasvoda",
"node_id": "MDQ6VXNlcjI1MjI4MTY3",
"organizations_url": "https://api.github.com/users/mgasvoda/orgs",
"received_events_url": "https://api.github.com/users/mgasvoda/received_events",
"repos_url": "https://api.github.com/users/mgasvoda/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mgasvoda/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mgasvoda/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mgasvoda",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 6 | 2017-08-11T19:49:57Z | 2021-09-04T00:06:53Z | 2017-08-12T14:41:28Z | CONTRIBUTOR | resolved | Adds the name of the header to the invalid header exception raised on TypeError.
Fixes #4239 | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4240/reactions"
} | https://api.github.com/repos/psf/requests/issues/4240/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4240.diff",
"html_url": "https://github.com/psf/requests/pull/4240",
"merged_at": "2017-08-12T14:41:27Z",
"patch_url": "https://github.com/psf/requests/pull/4240.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4240"
} | true | [
"I like this. ",
"# [Codecov](https://codecov.io/gh/requests/requests/pull/4240?src=pr&el=h1) Report\n> Merging [#4240](https://codecov.io/gh/requests/requests/pull/4240?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/1c2022cf868cb503815f34901ad8e85cf524d01a?src=pr&el=desc) will **not... |
https://api.github.com/repos/psf/requests/issues/4239 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4239/labels{/name} | https://api.github.com/repos/psf/requests/issues/4239/comments | https://api.github.com/repos/psf/requests/issues/4239/events | https://github.com/psf/requests/issues/4239 | 249,683,433 | MDU6SXNzdWUyNDk2ODM0MzM= | 4,239 | Add header name to InvalidHeader exception message | {
"avatar_url": "https://avatars.githubusercontent.com/u/3511141?v=4",
"events_url": "https://api.github.com/users/lsmithso/events{/privacy}",
"followers_url": "https://api.github.com/users/lsmithso/followers",
"following_url": "https://api.github.com/users/lsmithso/following{/other_user}",
"gists_url": "https://api.github.com/users/lsmithso/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lsmithso",
"id": 3511141,
"login": "lsmithso",
"node_id": "MDQ6VXNlcjM1MTExNDE=",
"organizations_url": "https://api.github.com/users/lsmithso/orgs",
"received_events_url": "https://api.github.com/users/lsmithso/received_events",
"repos_url": "https://api.github.com/users/lsmithso/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lsmithso/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lsmithso/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lsmithso",
"user_view_type": "public"
} | [
{
"color": "02e10c",
"default": false,
"description": null,
"id": 76800,
"name": "Feature Request",
"node_id": "MDU6TGFiZWw3NjgwMA==",
"url": "https://api.github.com/repos/psf/requests/labels/Feature%20Request"
},
{
"color": "0b02e1",
"default": false,
"description": null... | closed | true | null | [] | null | 3 | 2017-08-11T16:19:45Z | 2021-09-08T07:00:32Z | 2017-08-12T14:41:28Z | NONE | resolved | requests.get('http://example.com', headers={'foo': 1})
requests.exceptions.InvalidHeader: Header value 1 must be of type str or bytes, not <class 'int'>
It would be good to add the name of the bad header to make it easier
to track this down in large bodies of code. Something like:
requests.exceptions.InvalidHeader: Header foo value 1 must be of type str or bytes, not <class 'int'>
Thanks.
Summary.
## 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).e | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4239/reactions"
} | https://api.github.com/repos/psf/requests/issues/4239/timeline | null | completed | null | null | false | [
"Agreed, this seems like a useful enhancement. ",
"I'd like to help on this one if that's alright, I can have a pull request in shortly.",
"\nHi: Please be my guest.\n\nmgasvoda writes:\n > I'd like to help on this one if that's alright, I can have a pull request in shortly.\n > \n > -- \n > You are receiving t... |
https://api.github.com/repos/psf/requests/issues/4238 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4238/labels{/name} | https://api.github.com/repos/psf/requests/issues/4238/comments | https://api.github.com/repos/psf/requests/issues/4238/events | https://github.com/psf/requests/issues/4238 | 249,497,185 | MDU6SXNzdWUyNDk0OTcxODU= | 4,238 | 418 I'm a Teapot | {
"avatar_url": "https://avatars.githubusercontent.com/u/74384?v=4",
"events_url": "https://api.github.com/users/mnot/events{/privacy}",
"followers_url": "https://api.github.com/users/mnot/followers",
"following_url": "https://api.github.com/users/mnot/following{/other_user}",
"gists_url": "https://api.github.com/users/mnot/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mnot",
"id": 74384,
"login": "mnot",
"node_id": "MDQ6VXNlcjc0Mzg0",
"organizations_url": "https://api.github.com/users/mnot/orgs",
"received_events_url": "https://api.github.com/users/mnot/received_events",
"repos_url": "https://api.github.com/users/mnot/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mnot/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mnot/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mnot",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 22 | 2017-08-10T22:43:46Z | 2017-08-11T11:29:43Z | 2017-08-11T00:12:12Z | NONE | null | Requests implements the 418 I'm a Teapot status code in `status_codes.py`.
Its source is RFC2324, Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0). Note the title - HTCPCP/1.0 is not HTTP/1.x.
HTCPCP was an April 1 joke by Larry to illustrate how people were abusing HTTP in various ways. Ironically, it's not being used to abuse HTTP itself -- people are implementing parts of HTCPCP in their HTTP stacks.
In particular, Node's support for the HTCPCP 418 I'm a Teapot status code has been used as an argument in the HTTP Working Group to preclude use of 418 in HTTP for real-world purposes.
While we have a number of spare 4xx HTTP status codes that are unregistered now, the semantics of HTTP are something that (hopefully) are going to last for a long time, so one day we may need this code point.
Please consider removing support for 418 from Requests, since it's not a HTTP status code (even by its own definition). I know it's amusing, I know that a few people have knocked up implementations for fun, but it shouldn't pollute the core protocol; folks can extend Node easily enough if they want to play with non-standard semantics.
Thanks,
/cc @Lukasa | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 3,
"-1": 93,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 96,
"url": "https://api.github.com/repos/psf/requests/issues/4238/reactions"
} | https://api.github.com/repos/psf/requests/issues/4238/timeline | null | completed | null | null | false | [
"BTW, I'm aware this is a breaking change; deprecating and delaying to the next major release is fine.",
"Line of code in question: https://github.com/requests/requests/blob/master/requests/status_codes.py#L55",
"Please note the alternative versions for 200 OK: https://github.com/requests/requests/blob/master/r... |
https://api.github.com/repos/psf/requests/issues/4237 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4237/labels{/name} | https://api.github.com/repos/psf/requests/issues/4237/comments | https://api.github.com/repos/psf/requests/issues/4237/events | https://github.com/psf/requests/pull/4237 | 249,420,106 | MDExOlB1bGxSZXF1ZXN0MTM1MTc5ODU0 | 4,237 | Adds import statement to front page of docs for clarity and quicker start up | {
"avatar_url": "https://avatars.githubusercontent.com/u/3673341?v=4",
"events_url": "https://api.github.com/users/robinske/events{/privacy}",
"followers_url": "https://api.github.com/users/robinske/followers",
"following_url": "https://api.github.com/users/robinske/following{/other_user}",
"gists_url": "https://api.github.com/users/robinske/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/robinske",
"id": 3673341,
"login": "robinske",
"node_id": "MDQ6VXNlcjM2NzMzNDE=",
"organizations_url": "https://api.github.com/users/robinske/orgs",
"received_events_url": "https://api.github.com/users/robinske/received_events",
"repos_url": "https://api.github.com/users/robinske/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/robinske/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/robinske/subscriptions",
"type": "User",
"url": "https://api.github.com/users/robinske",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2017-08-10T17:27:45Z | 2021-09-04T00:06:54Z | 2017-08-10T18:02:57Z | CONTRIBUTOR | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4237/reactions"
} | https://api.github.com/repos/psf/requests/issues/4237/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4237.diff",
"html_url": "https://github.com/psf/requests/pull/4237",
"merged_at": "2017-08-10T18:02:57Z",
"patch_url": "https://github.com/psf/requests/pull/4237.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4237"
} | true | [
"I'm down to try this — but I may remove it later. ",
"Current example is very intentional. "
] | |
https://api.github.com/repos/psf/requests/issues/4236 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4236/labels{/name} | https://api.github.com/repos/psf/requests/issues/4236/comments | https://api.github.com/repos/psf/requests/issues/4236/events | https://github.com/psf/requests/issues/4236 | 249,416,345 | MDU6SXNzdWUyNDk0MTYzNDU= | 4,236 | Redirection 301 different behavior between versions | {
"avatar_url": "https://avatars.githubusercontent.com/u/2580646?v=4",
"events_url": "https://api.github.com/users/estevopaz/events{/privacy}",
"followers_url": "https://api.github.com/users/estevopaz/followers",
"following_url": "https://api.github.com/users/estevopaz/following{/other_user}",
"gists_url": "https://api.github.com/users/estevopaz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/estevopaz",
"id": 2580646,
"login": "estevopaz",
"node_id": "MDQ6VXNlcjI1ODA2NDY=",
"organizations_url": "https://api.github.com/users/estevopaz/orgs",
"received_events_url": "https://api.github.com/users/estevopaz/received_events",
"repos_url": "https://api.github.com/users/estevopaz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/estevopaz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/estevopaz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/estevopaz",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 6 | 2017-08-10T17:13:21Z | 2021-09-08T07:00:33Z | 2017-08-11T05:50:06Z | NONE | resolved | Hi, I have different redirection behavior between version 2.12.4 and 2.18.3:
Version 2.18.3 redirects POST method to GET after 301.
Version 2.12.4 get POST data directly without redirection ???
URL: http://www.eddyseverything.com/
POST data:
{'_post_id': '5',
'_referer': '/used-vehicles/',
'action': 'im_ajax_call',
'make[]': 'Acura',
'model[]': 'MDX',
'page': '1',
'perform': 'get_results',
'show_all_filters': 'false'}
```
import requests
session = requests.Session()
'"num_rows"' in session.post('http://www.eddyseverything.com/', {'_post_id': '5', '_referer': '/used-vehicles/', 'action': 'im_ajax_call', 'make[]': 'Acura', 'model[]': 'MDX', 'page': '1', 'perform': 'get_results', 'show_all_filters': 'false'}).text
'"num_rows"' in session.post('http://www.eddyseverything.com/', {'_post_id': '5', '_referer': '/used-vehicles/', 'action': 'im_ajax_call', 'make[]': 'Acura', 'model[]': 'MDX', 'page': '1', 'perform': 'get_results', 'show_all_filters': 'false'}).text
```
First POST request is false for both versions, but it must store some kind of data into session, and second request has a different behavior:
2.12.4 is True
2.18.1 and 2.18.3 is False | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4236/reactions"
} | https://api.github.com/repos/psf/requests/issues/4236/timeline | null | completed | null | null | false | [
"Version 2.12.4:\r\n```\r\nIn [1]: import requests\r\n ...: session = requests.Session()\r\n ...: session.get('http://www.eddyseverything.com/')\r\n ...: '\"num_rows\"' in session.post('http://www.eddyseverything.com/', {'_post_id': '5', '_referer': '/used-vehicles/', 'action': 'im_ajax_call', 'make[]': 'Acur... |
https://api.github.com/repos/psf/requests/issues/4235 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4235/labels{/name} | https://api.github.com/repos/psf/requests/issues/4235/comments | https://api.github.com/repos/psf/requests/issues/4235/events | https://github.com/psf/requests/issues/4235 | 249,398,342 | MDU6SXNzdWUyNDkzOTgzNDI= | 4,235 | Slow charset detection on JavaScript file with no explicit encoding | {
"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 | 6 | 2017-08-10T16:06:19Z | 2021-11-24T07:00:24Z | 2021-08-26T06:45:08Z | NONE | resolved | When I request https://play.wimpmusic.com/v1.1.3-p-40/app.js and then try to use `r.text` without setting `r.encoding`, my script hangs indefinitely instead of returning the text or raising an exception. `r.content` works fine, and as soon as I set `r.encoding = 'utf-8'` or anything, `r.text` also works. The `Content-Type` header the site is returning is `application/x-javascript` (no encoding specificed).
## Reproduction Steps
```py3
import requests
r = requests.get('https://play.wimpmusic.com/v1.1.3-p-40/app.js')
print(r.text)
```
## System Information
```sh
$ python -m requests.help
```
```json
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": ""
},
"implementation": {
"name": "CPython",
"version": "3.6.1"
},
"platform": {
"release": "4.4.0-43-Microsoft",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.3"
},
"system_ssl": {
"version": "1000207f"
},
"urllib3": {
"version": "1.22"
},
"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/4235/reactions"
} | https://api.github.com/repos/psf/requests/issues/4235/timeline | null | completed | null | null | false | [
"How big is the file? If you ctrl+c the code while running indefinitely, what traceback do you see?",
"It's about 1.31 MiB. This is the traceback I get when interrupting it after about 10 seconds:\r\n\r\n```pytb\r\nTraceback (most recent call last):\r\n File \"<stdin>\", line 1, in <module>\r\n File \"/home/nyu... |
https://api.github.com/repos/psf/requests/issues/4234 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4234/labels{/name} | https://api.github.com/repos/psf/requests/issues/4234/comments | https://api.github.com/repos/psf/requests/issues/4234/events | https://github.com/psf/requests/pull/4234 | 249,290,792 | MDExOlB1bGxSZXF1ZXN0MTM1MDgyODkw | 4,234 | Feature Suggestion: Include response body in raise_for_status method | {
"avatar_url": "https://avatars.githubusercontent.com/u/5054356?v=4",
"events_url": "https://api.github.com/users/westover/events{/privacy}",
"followers_url": "https://api.github.com/users/westover/followers",
"following_url": "https://api.github.com/users/westover/following{/other_user}",
"gists_url": "https://api.github.com/users/westover/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/westover",
"id": 5054356,
"login": "westover",
"node_id": "MDQ6VXNlcjUwNTQzNTY=",
"organizations_url": "https://api.github.com/users/westover/orgs",
"received_events_url": "https://api.github.com/users/westover/received_events",
"repos_url": "https://api.github.com/users/westover/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/westover/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/westover/subscriptions",
"type": "User",
"url": "https://api.github.com/users/westover",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 7 | 2017-08-10T09:46:28Z | 2018-09-15T18:34:54Z | 2017-08-10T15:11:11Z | NONE | resolved | #4233
Potential implementation of my feature suggestion | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4234/reactions"
} | https://api.github.com/repos/psf/requests/issues/4234/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4234.diff",
"html_url": "https://github.com/psf/requests/pull/4234",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4234.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4234"
} | true | [
"> The response object is already attached to the exception, which means it's fairly trivial for user code to access this data in a way that is going to be safe for their application. What benefit do we obtain by placing the body into the exception message, and does it outweigh the risks?\r\n\r\nThis is exactly my ... |
https://api.github.com/repos/psf/requests/issues/4233 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4233/labels{/name} | https://api.github.com/repos/psf/requests/issues/4233/comments | https://api.github.com/repos/psf/requests/issues/4233/events | https://github.com/psf/requests/issues/4233 | 249,287,873 | MDU6SXNzdWUyNDkyODc4NzM= | 4,233 | Suggestion: Improve the raise for status to include response body if there is one | {
"avatar_url": "https://avatars.githubusercontent.com/u/5054356?v=4",
"events_url": "https://api.github.com/users/westover/events{/privacy}",
"followers_url": "https://api.github.com/users/westover/followers",
"following_url": "https://api.github.com/users/westover/following{/other_user}",
"gists_url": "https://api.github.com/users/westover/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/westover",
"id": 5054356,
"login": "westover",
"node_id": "MDQ6VXNlcjUwNTQzNTY=",
"organizations_url": "https://api.github.com/users/westover/orgs",
"received_events_url": "https://api.github.com/users/westover/received_events",
"repos_url": "https://api.github.com/users/westover/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/westover/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/westover/subscriptions",
"type": "User",
"url": "https://api.github.com/users/westover",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2017-08-10T09:35:42Z | 2021-09-08T07:00:33Z | 2017-08-10T10:18:11Z | NONE | resolved | Looking for more details on the HTTPError exception. The API I am working with sends back a 400 but also has a text/json body in it. It would be nice if the raise_for_status() function included the response text if there was any.
## Expected Result
That the body would be included
## Actual Result
No response body
## Reproduction Steps
N/A Feature Request! Current workaround:
```python
import requests
from requests.exceptions import HTTPError
def expanded_raise_for_status(res):
"""
Take a "requests" response object and expand the raise_for_status method to return more helpful errors
@param res:
@return: None
"""
try:
res.raise_for_status()
except HTTPError as e:
if res.text:
raise HTTPError('{} Error Message: {}'.format(str(e.message), res.text))
else:
raise e
return
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.0.3"
},
"idna": {
"version": ""
},
"implementation": {
"name": "CPython",
"version": "2.7.13"
},
"platform": {
"release": "16.7.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "1010006f",
"version": "16.2.0"
},
"requests": {
"version": "2.18.3"
},
"system_ssl": {
"version": "100020cf"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": true
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"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/4233/reactions"
} | https://api.github.com/repos/psf/requests/issues/4233/timeline | null | completed | null | null | false | [
"Added a pull with an implementation",
"Let's close this to focus on the pull itself: it's always nicer to discuss an idea with actual code, rather than in the abstract. :smile: Closing to focus on #4234."
] |
https://api.github.com/repos/psf/requests/issues/4232 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4232/labels{/name} | https://api.github.com/repos/psf/requests/issues/4232/comments | https://api.github.com/repos/psf/requests/issues/4232/events | https://github.com/psf/requests/issues/4232 | 249,268,091 | MDU6SXNzdWUyNDkyNjgwOTE= | 4,232 | Posting Multiselect Forms | {
"avatar_url": "https://avatars.githubusercontent.com/u/5037305?v=4",
"events_url": "https://api.github.com/users/kianhean/events{/privacy}",
"followers_url": "https://api.github.com/users/kianhean/followers",
"following_url": "https://api.github.com/users/kianhean/following{/other_user}",
"gists_url": "https://api.github.com/users/kianhean/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kianhean",
"id": 5037305,
"login": "kianhean",
"node_id": "MDQ6VXNlcjUwMzczMDU=",
"organizations_url": "https://api.github.com/users/kianhean/orgs",
"received_events_url": "https://api.github.com/users/kianhean/received_events",
"repos_url": "https://api.github.com/users/kianhean/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kianhean/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kianhean/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kianhean",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2017-08-10T08:19:16Z | 2021-09-08T07:00:33Z | 2017-08-10T08:22:14Z | NONE | resolved | Please help me. I am trying to automate a post from a form. The multiselect portion is throwing me off. the below doesnt work. quite sure the way i am posting the mutliselect portion ('session_id') is wrong
## Expected Result
Expected this to work

payload2 = {'from_date': '2017-08-17', 'fac_id': '10',
'par_fac_id': '1', 'book_purpose': '0', 'session_id': ['50']}
p2 = s.post(new_url, data=payload2)
session_id comes from a multiselect form.
## Actual Result
The request command was not accepted by the server
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4232/reactions"
} | https://api.github.com/repos/psf/requests/issues/4232/timeline | null | completed | null | null | false | [
"i found the answer!\r\n\r\nSorry about that please close.\r\n\r\npayload2 = {'from_date': '2017-08-17', 'fac_id': '10', \r\n 'par_fac_id': '1', 'book_purpose': '0', 'session_id[]': ['50']}",
"Well done finding the answer!",
"The [toolbelt](/requests/toolbelt) also provides a function to do this for ... |
https://api.github.com/repos/psf/requests/issues/4231 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4231/labels{/name} | https://api.github.com/repos/psf/requests/issues/4231/comments | https://api.github.com/repos/psf/requests/issues/4231/events | https://github.com/psf/requests/pull/4231 | 249,113,345 | MDExOlB1bGxSZXF1ZXN0MTM0OTU0MjQ4 | 4,231 | Drop Python 3.3 support. | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2017-08-09T18:02:49Z | 2021-09-04T00:06:53Z | 2017-08-10T18:03:37Z | MEMBER | resolved | At this point, urllib3 is dropping 3.3 support. I think we should do so as well: 3.3 is long past support and never had the usage that 2.6 did, so we should probably abandon it. As a bonus reason, our CI is breaking on 3.3, so we should probably take the easy route out of that problem. | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4231/reactions"
} | https://api.github.com/repos/psf/requests/issues/4231/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4231.diff",
"html_url": "https://github.com/psf/requests/pull/4231",
"merged_at": "2017-08-10T18:03:37Z",
"patch_url": "https://github.com/psf/requests/pull/4231.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4231"
} | true | [
"Nice :)\r\n\r\nDon't forget to update the docs!",
"Good call, updated.",
"This is also currently blocking other builds from succeeding #4234 because of dependency issues in 3.3 specifically!"
] |
https://api.github.com/repos/psf/requests/issues/4230 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4230/labels{/name} | https://api.github.com/repos/psf/requests/issues/4230/comments | https://api.github.com/repos/psf/requests/issues/4230/events | https://github.com/psf/requests/issues/4230 | 249,035,848 | MDU6SXNzdWUyNDkwMzU4NDg= | 4,230 | Please bump certifi to 2017.7.27.1 | {
"avatar_url": "https://avatars.githubusercontent.com/u/27829577?v=4",
"events_url": "https://api.github.com/users/mtdeguzis/events{/privacy}",
"followers_url": "https://api.github.com/users/mtdeguzis/followers",
"following_url": "https://api.github.com/users/mtdeguzis/following{/other_user}",
"gists_url": "https://api.github.com/users/mtdeguzis/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mtdeguzis",
"id": 27829577,
"login": "mtdeguzis",
"node_id": "MDQ6VXNlcjI3ODI5NTc3",
"organizations_url": "https://api.github.com/users/mtdeguzis/orgs",
"received_events_url": "https://api.github.com/users/mtdeguzis/received_events",
"repos_url": "https://api.github.com/users/mtdeguzis/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mtdeguzis/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mtdeguzis/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mtdeguzis",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2017-08-09T13:45:36Z | 2021-09-08T07:00:34Z | 2017-08-09T14:37:50Z | NONE | resolved | Cannot build requests via pip/buildout/easy_install due to old specified certifi
## Expected Result
Buildout succeeds
## Actual Result
```
Got pykerberos 1.1.14.
Picked: pykerberos = 1.1.14
Getting required 'certifi>=2017.4.17'
required by requests 2.18.3.
We have no distributions for certifi that satisfies 'certifi>=2017.4.17'.
```
## Reproduction Steps
Build requests via pip/pypi fetches
See: https://pypi.python.org/pypi/certifi | {
"avatar_url": "https://avatars.githubusercontent.com/u/27829577?v=4",
"events_url": "https://api.github.com/users/mtdeguzis/events{/privacy}",
"followers_url": "https://api.github.com/users/mtdeguzis/followers",
"following_url": "https://api.github.com/users/mtdeguzis/following{/other_user}",
"gists_url": "https://api.github.com/users/mtdeguzis/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mtdeguzis",
"id": 27829577,
"login": "mtdeguzis",
"node_id": "MDQ6VXNlcjI3ODI5NTc3",
"organizations_url": "https://api.github.com/users/mtdeguzis/orgs",
"received_events_url": "https://api.github.com/users/mtdeguzis/received_events",
"repos_url": "https://api.github.com/users/mtdeguzis/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mtdeguzis/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mtdeguzis/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mtdeguzis",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4230/reactions"
} | https://api.github.com/repos/psf/requests/issues/4230/timeline | null | completed | null | null | false | [
"This bug report makes no sense. Our certifi requirement specifies only a *minimum* version. You should be able to install alongside any newer certifi without difficulty. "
] |
https://api.github.com/repos/psf/requests/issues/4229 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4229/labels{/name} | https://api.github.com/repos/psf/requests/issues/4229/comments | https://api.github.com/repos/psf/requests/issues/4229/events | https://github.com/psf/requests/pull/4229 | 249,017,781 | MDExOlB1bGxSZXF1ZXN0MTM0ODgzMjE2 | 4,229 | Fixes issue #3863 | {
"avatar_url": "https://avatars.githubusercontent.com/u/10330520?v=4",
"events_url": "https://api.github.com/users/NikosVlagoidis/events{/privacy}",
"followers_url": "https://api.github.com/users/NikosVlagoidis/followers",
"following_url": "https://api.github.com/users/NikosVlagoidis/following{/other_user}",
"gists_url": "https://api.github.com/users/NikosVlagoidis/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/NikosVlagoidis",
"id": 10330520,
"login": "NikosVlagoidis",
"node_id": "MDQ6VXNlcjEwMzMwNTIw",
"organizations_url": "https://api.github.com/users/NikosVlagoidis/orgs",
"received_events_url": "https://api.github.com/users/NikosVlagoidis/received_events",
"repos_url": "https://api.github.com/users/NikosVlagoidis/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/NikosVlagoidis/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/NikosVlagoidis/subscriptions",
"type": "User",
"url": "https://api.github.com/users/NikosVlagoidis",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2017-08-09T12:42:35Z | 2021-09-04T00:06:55Z | 2017-08-09T17:56:40Z | CONTRIBUTOR | resolved | Update the docs for issue #3863 . | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4229/reactions"
} | https://api.github.com/repos/psf/requests/issues/4229/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4229.diff",
"html_url": "https://github.com/psf/requests/pull/4229",
"merged_at": "2017-08-09T17:56:40Z",
"patch_url": "https://github.com/psf/requests/pull/4229.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4229"
} | true | [
"How tests are failing for Python 3.3. I have only changed one .rst on the docs",
"I update the docs accordingly."
] |
https://api.github.com/repos/psf/requests/issues/4228 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4228/labels{/name} | https://api.github.com/repos/psf/requests/issues/4228/comments | https://api.github.com/repos/psf/requests/issues/4228/events | https://github.com/psf/requests/issues/4228 | 248,960,728 | MDU6SXNzdWUyNDg5NjA3Mjg= | 4,228 | Please support idna 2.6 | {
"avatar_url": "https://avatars.githubusercontent.com/u/24315939?v=4",
"events_url": "https://api.github.com/users/stephanema/events{/privacy}",
"followers_url": "https://api.github.com/users/stephanema/followers",
"following_url": "https://api.github.com/users/stephanema/following{/other_user}",
"gists_url": "https://api.github.com/users/stephanema/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/stephanema",
"id": 24315939,
"login": "stephanema",
"node_id": "MDQ6VXNlcjI0MzE1OTM5",
"organizations_url": "https://api.github.com/users/stephanema/orgs",
"received_events_url": "https://api.github.com/users/stephanema/received_events",
"repos_url": "https://api.github.com/users/stephanema/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/stephanema/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/stephanema/subscriptions",
"type": "User",
"url": "https://api.github.com/users/stephanema",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2017-08-09T08:51:55Z | 2021-09-08T07:00:34Z | 2017-08-09T09:18:17Z | NONE | resolved | Today I updated idna to 2.6 then I tried to install requests 2.18.3 and got an
error that dna must be <2.6.
Would be nice it you support the actual idna package,
thanks.
System: python 3.6.2 64 bit on windows7 64 bit | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"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/4228/reactions"
} | https://api.github.com/repos/psf/requests/issues/4228/timeline | null | completed | null | null | false | [
"*Please* check recent issues. You'll find that two have been opened before you, both saying that we have updated the pin in the current master and will be releasing an update next week.",
"Oops sorry, I didn't realize it (I use seldomly the github issues pages)"
] |
https://api.github.com/repos/psf/requests/issues/4227 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4227/labels{/name} | https://api.github.com/repos/psf/requests/issues/4227/comments | https://api.github.com/repos/psf/requests/issues/4227/events | https://github.com/psf/requests/issues/4227 | 248,953,399 | MDU6SXNzdWUyNDg5NTMzOTk= | 4,227 | requests.get(stream=True) will get incomplete data | {
"avatar_url": "https://avatars.githubusercontent.com/u/3338245?v=4",
"events_url": "https://api.github.com/users/MrKang/events{/privacy}",
"followers_url": "https://api.github.com/users/MrKang/followers",
"following_url": "https://api.github.com/users/MrKang/following{/other_user}",
"gists_url": "https://api.github.com/users/MrKang/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/MrKang",
"id": 3338245,
"login": "MrKang",
"node_id": "MDQ6VXNlcjMzMzgyNDU=",
"organizations_url": "https://api.github.com/users/MrKang/orgs",
"received_events_url": "https://api.github.com/users/MrKang/received_events",
"repos_url": "https://api.github.com/users/MrKang/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/MrKang/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/MrKang/subscriptions",
"type": "User",
"url": "https://api.github.com/users/MrKang",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 19 | 2017-08-09T08:22:36Z | 2021-08-30T00:06:08Z | 2018-02-24T14:52:20Z | NONE | resolved | when I use stream=True, I get these:
```python
#print response.headers['Content-Length']
1332224
#print response.raw.tell()
1332224
#print len(response.content)
1331968
```
the content I get is incomplete.But when I use stream=False,I can get complete data.
when I set `stream=True` and `response.iter_content(chunk_size=1024*32)` I also get incomplete data.
## Reproduction Steps
```python
import requests
r = request.get(url='http://down.ziyuanku.com/201708091545/b5e3765e0be509c91617da128ecf169f/Resources/ChuZhong/2017-07-12/cccee17addb349cf8966161180c3e3ea.doc', stream=True)
with open(file, 'wb') as f:
for chunk in r.iter_content(chunk_size=1024*36):
if chunk:
f.write(chunk)
f.flush()
r.close()
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"implementation": {
"name": "CPython",
"version": "2.7.10"
},
"platform": {
"release": "16.7.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.1"
},
"system_ssl": {
"version": "9081df"
},
"urllib3": {
"version": "1.21.1"
},
"using_pyopenssl": false
}
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4227/reactions"
} | https://api.github.com/repos/psf/requests/issues/4227/timeline | null | completed | null | null | false | [
"The only change in behaviour from `stream=True` to `stream=False` is changing where in the code-path we consume the body. It causes no externally visible effects, nor does it affect the way we load the code. Do you know for a fact that the body is corrupted in this case?",
"```python\r\n#this is the property of ... |
https://api.github.com/repos/psf/requests/issues/4226 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4226/labels{/name} | https://api.github.com/repos/psf/requests/issues/4226/comments | https://api.github.com/repos/psf/requests/issues/4226/events | https://github.com/psf/requests/pull/4226 | 248,873,679 | MDExOlB1bGxSZXF1ZXN0MTM0Nzc5Mjk0 | 4,226 | TEST OF CI | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2017-08-08T23:17:03Z | 2021-09-04T00:06:54Z | 2017-08-09T17:57:03Z | CONTRIBUTOR | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4226/reactions"
} | https://api.github.com/repos/psf/requests/issues/4226/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4226.diff",
"html_url": "https://github.com/psf/requests/pull/4226",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4226.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4226"
} | true | [] | |
https://api.github.com/repos/psf/requests/issues/4225 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4225/labels{/name} | https://api.github.com/repos/psf/requests/issues/4225/comments | https://api.github.com/repos/psf/requests/issues/4225/events | https://github.com/psf/requests/pull/4225 | 248,871,357 | MDExOlB1bGxSZXF1ZXN0MTM0Nzc3NTU2 | 4,225 | TEST FOR CI | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2017-08-08T23:03:14Z | 2021-09-05T00:07:06Z | 2017-08-08T23:03:26Z | CONTRIBUTOR | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4225/reactions"
} | https://api.github.com/repos/psf/requests/issues/4225/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4225.diff",
"html_url": "https://github.com/psf/requests/pull/4225",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4225.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4225"
} | true | [] | |
https://api.github.com/repos/psf/requests/issues/4224 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4224/labels{/name} | https://api.github.com/repos/psf/requests/issues/4224/comments | https://api.github.com/repos/psf/requests/issues/4224/events | https://github.com/psf/requests/issues/4224 | 248,763,772 | MDU6SXNzdWUyNDg3NjM3NzI= | 4,224 | idna dependency | {
"avatar_url": "https://avatars.githubusercontent.com/u/244702?v=4",
"events_url": "https://api.github.com/users/papachoco/events{/privacy}",
"followers_url": "https://api.github.com/users/papachoco/followers",
"following_url": "https://api.github.com/users/papachoco/following{/other_user}",
"gists_url": "https://api.github.com/users/papachoco/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/papachoco",
"id": 244702,
"login": "papachoco",
"node_id": "MDQ6VXNlcjI0NDcwMg==",
"organizations_url": "https://api.github.com/users/papachoco/orgs",
"received_events_url": "https://api.github.com/users/papachoco/received_events",
"repos_url": "https://api.github.com/users/papachoco/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/papachoco/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/papachoco/subscriptions",
"type": "User",
"url": "https://api.github.com/users/papachoco",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2017-08-08T15:56:13Z | 2021-09-08T07:00:35Z | 2017-08-08T16:19:36Z | NONE | resolved | Hi,
Could we get a new release of requests w/ an updated idna dependency.
Thanks a lot,
Carlos | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 3,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 3,
"url": "https://api.github.com/repos/psf/requests/issues/4224/reactions"
} | https://api.github.com/repos/psf/requests/issues/4224/timeline | null | completed | null | null | false | [
"This is already updated in master. A new release will be shipped next week. ",
"It seems that we get into an invalid state when something that has an unbounded-upper requirement of `idna` is listed first to `pip install`. Example:\r\n```\r\n$ pip install cryptography requests\r\nCollecting cryptography\r\n Usi... |
https://api.github.com/repos/psf/requests/issues/4223 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4223/labels{/name} | https://api.github.com/repos/psf/requests/issues/4223/comments | https://api.github.com/repos/psf/requests/issues/4223/events | https://github.com/psf/requests/pull/4223 | 248,699,778 | MDExOlB1bGxSZXF1ZXN0MTM0NjQ4ODMy | 4,223 | Allow IDNA 2.6 | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2017-08-08T12:33:55Z | 2021-09-05T00:07:06Z | 2017-08-08T14:42:55Z | MEMBER | resolved | Resolves #4222. | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 1,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 1,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 2,
"url": "https://api.github.com/repos/psf/requests/issues/4223/reactions"
} | https://api.github.com/repos/psf/requests/issues/4223/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4223.diff",
"html_url": "https://github.com/psf/requests/pull/4223",
"merged_at": "2017-08-08T14:42:55Z",
"patch_url": "https://github.com/psf/requests/pull/4223.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4223"
} | true | [
"Looks like the CI is busted again. 😞 ",
"tests passed"
] |
https://api.github.com/repos/psf/requests/issues/4222 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4222/labels{/name} | https://api.github.com/repos/psf/requests/issues/4222/comments | https://api.github.com/repos/psf/requests/issues/4222/events | https://github.com/psf/requests/issues/4222 | 248,661,329 | MDU6SXNzdWUyNDg2NjEzMjk= | 4,222 | support idna 2.6 | {
"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 | 9 | 2017-08-08T09:54:36Z | 2021-08-27T00:08:26Z | 2017-08-08T14:42:55Z | CONTRIBUTOR | resolved | idna 2.6 has been released, so the constraint in setup.py is now blowing up:
```
pkg_resources.ContextualVersionConflict: (idna 2.6 (.../ve/lib/python2.7/site-packages), Requirement.parse('idna<2.6,>=2.5'), set(['requests']))
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4222/reactions"
} | https://api.github.com/repos/psf/requests/issues/4222/timeline | null | completed | null | null | false | [
"Hang on, why is that constraint exploding? 2.5 should satisfy the requirement.",
"My guess something is installing it earlier in the build chain, and pip isn't clever enough to downgrade to 2.5 once 2.6 is installed.\r\n\r\nIs there a problem with 2.6 that makes it backwards incompatible?",
"We don't know at t... |
https://api.github.com/repos/psf/requests/issues/4221 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4221/labels{/name} | https://api.github.com/repos/psf/requests/issues/4221/comments | https://api.github.com/repos/psf/requests/issues/4221/events | https://github.com/psf/requests/issues/4221 | 248,415,832 | MDU6SXNzdWUyNDg0MTU4MzI= | 4,221 | HTTPS proxy fails with requests. | {
"avatar_url": "https://avatars.githubusercontent.com/u/4874269?v=4",
"events_url": "https://api.github.com/users/sebastienvercammen/events{/privacy}",
"followers_url": "https://api.github.com/users/sebastienvercammen/followers",
"following_url": "https://api.github.com/users/sebastienvercammen/following{/other_user}",
"gists_url": "https://api.github.com/users/sebastienvercammen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sebastienvercammen",
"id": 4874269,
"login": "sebastienvercammen",
"node_id": "MDQ6VXNlcjQ4NzQyNjk=",
"organizations_url": "https://api.github.com/users/sebastienvercammen/orgs",
"received_events_url": "https://api.github.com/users/sebastienvercammen/received_events",
"repos_url": "https://api.github.com/users/sebastienvercammen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sebastienvercammen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sebastienvercammen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sebastienvercammen",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 10 | 2017-08-07T13:42:49Z | 2021-09-08T07:00:35Z | 2017-08-07T23:11:02Z | NONE | resolved | Using `requests` with an HTTPS proxy (Node.js with `https` to receive incoming requests and `http-proxy` to tunnel) always results in:
```
requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))
```
The Node.js proxy server intentionally returns 401 on all requests for testing purposes. If 401 won't work, there's no reason to add the rest of the functionality.
Using httplib (correct response):
```
>>> import httplib
>>> conn = httplib.HTTPSConnection('censored-proxy-domain.com', 8081)
>>> conn.request('HEAD', 'https://www.google.com')
>>> res = conn.getresponse()
>>> res.status
401
```
Using urllib.urlopen (correct response):
```
>>> urllib.urlopen('https://www.google.com', proxies=proxies)
...
IOError: ('http error', 401, 'Unauthorized', <httplib.HTTPMessage instance at 0x032A7AA8>)
```
But using requests:
```
r = requests.get('https://www.google.com', proxies=proxies)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\requests\api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "C:\Python27\lib\site-packages\requests\api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Python27\lib\site-packages\requests\sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "C:\Python27\lib\site-packages\requests\sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "C:\Python27\lib\site-packages\requests\adapters.py", line 490, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))
```
The `requests` request also never gets received or handled/logged in the proxy server. Any other library or 3rd party tool has worked (test in browser, Proxifier, ProxyCap).
## Expected Result
I expect `requests` to return a similar result to any other library.
## Actual Result
Logs above.
## Reproduction Steps
```python
import requests
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": ""
},
"implementation": {
"name": "CPython",
"version": "2.7.12"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.3"
},
"system_ssl": {
"version": "1000208f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). | {
"avatar_url": "https://avatars.githubusercontent.com/u/4874269?v=4",
"events_url": "https://api.github.com/users/sebastienvercammen/events{/privacy}",
"followers_url": "https://api.github.com/users/sebastienvercammen/followers",
"following_url": "https://api.github.com/users/sebastienvercammen/following{/other_user}",
"gists_url": "https://api.github.com/users/sebastienvercammen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sebastienvercammen",
"id": 4874269,
"login": "sebastienvercammen",
"node_id": "MDQ6VXNlcjQ4NzQyNjk=",
"organizations_url": "https://api.github.com/users/sebastienvercammen/orgs",
"received_events_url": "https://api.github.com/users/sebastienvercammen/received_events",
"repos_url": "https://api.github.com/users/sebastienvercammen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sebastienvercammen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sebastienvercammen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sebastienvercammen",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4221/reactions"
} | https://api.github.com/repos/psf/requests/issues/4221/timeline | null | completed | null | null | false | [
"Can you show me the contents of the `proxies` dict please?",
"@Lukasa Tested with these:\r\n```\r\nproxies = {'http': 'http://censored-proxy-domain.com:8080', 'https': 'https://censored-proxy-domain.com:8081'}\r\nproxies = {'http': 'https://censored-proxy-domain.com:8081', 'https': 'https://censored-proxy-domain... |
https://api.github.com/repos/psf/requests/issues/4220 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4220/labels{/name} | https://api.github.com/repos/psf/requests/issues/4220/comments | https://api.github.com/repos/psf/requests/issues/4220/events | https://github.com/psf/requests/issues/4220 | 248,237,895 | MDU6SXNzdWUyNDgyMzc4OTU= | 4,220 | Traceback format_exc failing with ConnectionError | {
"avatar_url": "https://avatars.githubusercontent.com/u/3856586?v=4",
"events_url": "https://api.github.com/users/Phyks/events{/privacy}",
"followers_url": "https://api.github.com/users/Phyks/followers",
"following_url": "https://api.github.com/users/Phyks/following{/other_user}",
"gists_url": "https://api.github.com/users/Phyks/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Phyks",
"id": 3856586,
"login": "Phyks",
"node_id": "MDQ6VXNlcjM4NTY1ODY=",
"organizations_url": "https://api.github.com/users/Phyks/orgs",
"received_events_url": "https://api.github.com/users/Phyks/received_events",
"repos_url": "https://api.github.com/users/Phyks/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Phyks/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Phyks/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Phyks",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2017-08-06T10:07:05Z | 2021-09-08T07:00:36Z | 2017-08-06T10:42:36Z | NONE | resolved | Hi,
I tried to use a script using requests (v2.18.1) on a remote website without having any internet connectivity. Of course, this resulted in a long stack traces due to the absence of internet connectivity, as expected, which ended up with
```
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='updates.weboob.org', port=443): Max retries exceeded with url: /1.3/main/modules.list (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fe5f7474be0>: Failed to establish a new connection: [Errno -2] Name or service not known',))
```
Problem is that I catch any such exception and pass them to `traceback.format_exc` in order to have a nice error formatting in my logs.
## Expected Result
Using something like
```
try:
my_code_calling_requests()
except Exception as e:
log.error(("Unknown exception raised: %s" % traceback.format_exc(e)))
```
I would have expected a nicely formatted exception in my logs.
## Actual Result
Actually, it raised another exception, which I am not 100% sure to understand :/ Full traceback is:
```
Traceback (most recent call last):
File "MY_CODE", line 363, in <module>
traceback.format_exc(e)),
File "/usr/lib/python3.6/traceback.py", line 163, in format_exc
return "".join(format_exception(*sys.exc_info(), limit=limit, chain=chain))
File "/usr/lib/python3.6/traceback.py", line 117, in format_exception
type(value), value, tb, limit=limit).format(chain=chain))
File "/usr/lib/python3.6/traceback.py", line 486, in __init__
_seen=_seen)
File "/usr/lib/python3.6/traceback.py", line 486, in __init__
_seen=_seen)
File "/usr/lib/python3.6/traceback.py", line 486, in __init__
_seen=_seen)
File "/usr/lib/python3.6/traceback.py", line 497, in __init__
capture_locals=capture_locals)
File "/usr/lib/python3.6/traceback.py", line 332, in extract
if limit >= 0:
TypeError: '>=' not supported between instances of 'ConnectionError' and 'int'
```
## System Information
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "1.9"
},
"implementation": {
"name": "CPython",
"version": "3.6.1"
},
"platform": {
"release": "4.11.7-1-ARCH",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010006f",
"version": "17.0.0"
},
"requests": {
"version": "2.18.1"
},
"system_ssl": {
"version": "1010006f"
},
"urllib3": {
"version": "1.21.1"
},
"using_pyopenssl": true
}
```
Thanks! | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4220/reactions"
} | https://api.github.com/repos/psf/requests/issues/4220/timeline | null | completed | null | null | false | [
"The first argument of `format_exc` is not the exception to print, it's a limit on how many lines of trace back to print. You may want to reread the documentation for the function on python.org. The correct call is just `format_exc`.",
"Oops, truly sorry about this :/ I took it from a snippet and should have chec... |
https://api.github.com/repos/psf/requests/issues/4219 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4219/labels{/name} | https://api.github.com/repos/psf/requests/issues/4219/comments | https://api.github.com/repos/psf/requests/issues/4219/events | https://github.com/psf/requests/issues/4219 | 248,164,643 | MDU6SXNzdWUyNDgxNjQ2NDM= | 4,219 | _validate_timeout raise an exception about typage | {
"avatar_url": "https://avatars.githubusercontent.com/u/3684625?v=4",
"events_url": "https://api.github.com/users/tomapp/events{/privacy}",
"followers_url": "https://api.github.com/users/tomapp/followers",
"following_url": "https://api.github.com/users/tomapp/following{/other_user}",
"gists_url": "https://api.github.com/users/tomapp/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tomapp",
"id": 3684625,
"login": "tomapp",
"node_id": "MDQ6VXNlcjM2ODQ2MjU=",
"organizations_url": "https://api.github.com/users/tomapp/orgs",
"received_events_url": "https://api.github.com/users/tomapp/received_events",
"repos_url": "https://api.github.com/users/tomapp/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tomapp/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tomapp/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tomapp",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2017-08-05T06:10:12Z | 2021-09-08T07:00:36Z | 2017-08-05T07:59:01Z | NONE | resolved | Hello!
When i use docker-compose, i have an error with this lib.
## Expected Result
utils/_validate_timeout should not raise any errors.
## Actual Result
utils _validate_timeout should raise an exception :
```
Timeout(connect=None, read=None, total=None)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/util/timeout.py", line 126, in _validate_timeout
float(value)
TypeError: float() argument must be a string or a number, not 'Timeout'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/docker-compose", line 11, in <module>
load_entry_point('docker-compose==1.15.0', 'console_scripts', 'docker-compose')()
File "/usr/lib/python3.6/site-packages/compose/cli/main.py", line 68, in main
command()
File "/usr/lib/python3.6/site-packages/compose/cli/main.py", line 118, in perform_command
handler(command, command_options)
File "/usr/lib/python3.6/site-packages/compose/cli/main.py", line 239, in build
build_args=build_args)
File "/usr/lib/python3.6/site-packages/compose/project.py", line 340, in build
service.build(no_cache, pull, force_rm, build_args)
File "/usr/lib/python3.6/site-packages/compose/service.py", line 910, in build
network_mode=build_opts.get('network', None),
File "/usr/lib/python3.6/site-packages/docker/api/build.py", line 235, in build
timeout=timeout,
File "/usr/lib/python3.6/site-packages/docker/utils/decorators.py", line 46, in inner
return f(self, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/docker/api/client.py", line 185, in _post
return self.post(url, **self._set_request_timeout(kwargs))
File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 555, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 440, in send
timeout=timeout
File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 582, in urlopen
timeout_obj = self._get_timeout(timeout)
File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 309, in _get_timeout
return Timeout.from_float(timeout)
File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/util/timeout.py", line 156, in from_float
return Timeout(read=timeout, connect=timeout)
File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/util/timeout.py", line 97, in __init__
self._connect = self._validate_timeout(connect, 'connect')
File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/util/timeout.py", line 129, in _validate_timeout
"int or float." % (name, value))
ValueError: Timeout value connect was Timeout(connect=None, read=None, total=None), but it must be an int or float.
```
## Reproduction Steps
```python
@classmethod
def _validate_timeout(cls, value, name):
""" Check that a timeout attribute is valid.
:param value: The timeout value to validate
:param name: The name of the timeout attribute to validate. This is
used to specify in error messages.
:return: The validated and casted version of the given value.
:raises ValueError: If the type is not an integer or a float, or if it
is a numeric value less than zero.
"""
if value is _Default:
return cls.DEFAULT_TIMEOUT
if value is None or value is cls.DEFAULT_TIMEOUT:
return value
""" Value = 60 in this case
"""
try:
float(value)
except (TypeError, ValueError):
raise ValueError("Timeout value %s was %s, but it must be an "
"int or float." % (name, value))
try:
if value < 0:
raise ValueError("Attempted to set %s timeout to %s, but the "
"timeout cannot be set to a value less "
"than 0." % (name, value))
except TypeError: # Python 3
raise ValueError("Timeout value %s was %s, but it must be an "
"int or float." % (name, value))
return value
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": ""
},
"implementation": {
"name": "CPython",
"version": "3.6.2"
},
"platform": {
"release": "4.12.4-1-ARCH",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.3"
},
"system_ssl": {
"version": "1010006f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": false
}
```
I'm on Antergos Archlinux. | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4219/reactions"
} | https://api.github.com/repos/psf/requests/issues/4219/timeline | null | completed | null | null | false | [
"Where did you get your Requests from? It looks like you have multiple copies of Requests on your system, because you're apparently using 2.18.3, but are looking at a vendored copy of urllib3 (which we got rid of in 2.17).\r\n\r\nI recommend creating a clean installation and try again. "
] |
https://api.github.com/repos/psf/requests/issues/4218 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4218/labels{/name} | https://api.github.com/repos/psf/requests/issues/4218/comments | https://api.github.com/repos/psf/requests/issues/4218/events | https://github.com/psf/requests/issues/4218 | 248,155,180 | MDU6SXNzdWUyNDgxNTUxODA= | 4,218 | File name encoding cannot be set when uploading files | {
"avatar_url": "https://avatars.githubusercontent.com/u/11145391?v=4",
"events_url": "https://api.github.com/users/fym0121/events{/privacy}",
"followers_url": "https://api.github.com/users/fym0121/followers",
"following_url": "https://api.github.com/users/fym0121/following{/other_user}",
"gists_url": "https://api.github.com/users/fym0121/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/fym0121",
"id": 11145391,
"login": "fym0121",
"node_id": "MDQ6VXNlcjExMTQ1Mzkx",
"organizations_url": "https://api.github.com/users/fym0121/orgs",
"received_events_url": "https://api.github.com/users/fym0121/received_events",
"repos_url": "https://api.github.com/users/fym0121/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/fym0121/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fym0121/subscriptions",
"type": "User",
"url": "https://api.github.com/users/fym0121",
"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"
} | 6 | 2017-08-05T03:39:00Z | 2024-05-20T14:36:52Z | 2024-05-20T14:36:51Z | NONE | null | Summary.
The server code is windows-1251, and the program file code is UTF-8. When I upload the file, the file name obtained by the server is garbled. File name cannot be encoded as windows-1251, otherwise an exception will be thrown.
## Expected Result
the file name obtained by the server is normal
## Actual Result
the file name obtained by the server is garbled.
## Reproduction Steps
```python
# Server can receive fym_Пуск
data["RETURN"] = 'fym_Пуск'.encode('windows-1251')
# Server can not receive fym_Пуск.pdf.
f = {'FILE_LNK': ('fym_Пуск.pdf', #'fym_Пуск.pdf'.encode('windows-1251') will raise exception
open('fym_Пуск.pdf', 'rb'),
'application/pdf')
}
r = self.session.post(url, files=f, data=data)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"implementation": {
"name": "CPython",
"version": "3.6.1"
},
"platform": {
"release": "7",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.1"
},
"system_ssl": {
"version": "100020bf"
},
"urllib3": {
"version": "1.21.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/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/4218/reactions"
} | https://api.github.com/repos/psf/requests/issues/4218/timeline | null | completed | null | null | false | [
"Can you please provide me with the full traceback that occurs when you encode with cp1251?",
"```\r\nTraceback (most recent call last):\r\n File \"C:\\Users\\Administrator\\vso_python\\vso.py\", line 453, in <module>\r\n v.upload_pdf('169519', u'fym_Пуск.pdf')\r\n File \"C:\\Users\\Administrator\\vso_python... |
https://api.github.com/repos/psf/requests/issues/4217 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4217/labels{/name} | https://api.github.com/repos/psf/requests/issues/4217/comments | https://api.github.com/repos/psf/requests/issues/4217/events | https://github.com/psf/requests/pull/4217 | 247,407,971 | MDExOlB1bGxSZXF1ZXN0MTMzNzIyNzE5 | 4,217 | fix typo in changelog | {
"avatar_url": "https://avatars.githubusercontent.com/u/59292?v=4",
"events_url": "https://api.github.com/users/nikolas/events{/privacy}",
"followers_url": "https://api.github.com/users/nikolas/followers",
"following_url": "https://api.github.com/users/nikolas/following{/other_user}",
"gists_url": "https://api.github.com/users/nikolas/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nikolas",
"id": 59292,
"login": "nikolas",
"node_id": "MDQ6VXNlcjU5Mjky",
"organizations_url": "https://api.github.com/users/nikolas/orgs",
"received_events_url": "https://api.github.com/users/nikolas/received_events",
"repos_url": "https://api.github.com/users/nikolas/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nikolas/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nikolas/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nikolas",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2017-08-02T14:26:47Z | 2021-09-05T00:07:06Z | 2017-08-02T14:38:47Z | CONTRIBUTOR | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4217/reactions"
} | https://api.github.com/repos/psf/requests/issues/4217/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4217.diff",
"html_url": "https://github.com/psf/requests/pull/4217",
"merged_at": "2017-08-02T14:38:47Z",
"patch_url": "https://github.com/psf/requests/pull/4217.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4217"
} | true | [
"yay cake for everyone!"
] | |
https://api.github.com/repos/psf/requests/issues/4216 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4216/labels{/name} | https://api.github.com/repos/psf/requests/issues/4216/comments | https://api.github.com/repos/psf/requests/issues/4216/events | https://github.com/psf/requests/issues/4216 | 247,351,498 | MDU6SXNzdWUyNDczNTE0OTg= | 4,216 | multiline header should be supported! | {
"avatar_url": "https://avatars.githubusercontent.com/u/524216?v=4",
"events_url": "https://api.github.com/users/dotpot/events{/privacy}",
"followers_url": "https://api.github.com/users/dotpot/followers",
"following_url": "https://api.github.com/users/dotpot/following{/other_user}",
"gists_url": "https://api.github.com/users/dotpot/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dotpot",
"id": 524216,
"login": "dotpot",
"node_id": "MDQ6VXNlcjUyNDIxNg==",
"organizations_url": "https://api.github.com/users/dotpot/orgs",
"received_events_url": "https://api.github.com/users/dotpot/received_events",
"repos_url": "https://api.github.com/users/dotpot/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dotpot/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dotpot/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dotpot",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2017-08-02T11:01:09Z | 2021-09-08T07:00:38Z | 2017-08-02T11:13:13Z | NONE | resolved | Summary.
2.11 version introduced this change:
- Reject header values that contain leading whitespace or newline characters to
reduce risk of header smuggling.
BUT, as per standard https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 It whould be possible to have multiline headers.
f.ex. I need to attach a certificate via request header (currently I just mock the header validation method).
## Expected Result
support multiline header.
## Actual Result
requests.exceptions.InvalidHeader: Invalid return character or leading space in header: X-CERTIFICATE
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/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4216/reactions"
} | https://api.github.com/repos/psf/requests/issues/4216/timeline | null | completed | null | null | false | [
"Multiline headers *should not* be supported. RFC 2616 is not the HTTP specification anymore: the relevant one is RFC 7230. \r\n\r\n[Here](https://tools.ietf.org/html/rfc7230#section-3.2.4) is the relevant part:\r\n\r\n> Historically, HTTP header field values could be extended over multiple lines by preceding each ... |
https://api.github.com/repos/psf/requests/issues/4215 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4215/labels{/name} | https://api.github.com/repos/psf/requests/issues/4215/comments | https://api.github.com/repos/psf/requests/issues/4215/events | https://github.com/psf/requests/issues/4215 | 247,214,166 | MDU6SXNzdWUyNDcyMTQxNjY= | 4,215 | Sending an empty body from a file, with Content-Length: 0 header times out | {
"avatar_url": "https://avatars.githubusercontent.com/u/327833?v=4",
"events_url": "https://api.github.com/users/dobesv/events{/privacy}",
"followers_url": "https://api.github.com/users/dobesv/followers",
"following_url": "https://api.github.com/users/dobesv/following{/other_user}",
"gists_url": "https://api.github.com/users/dobesv/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dobesv",
"id": 327833,
"login": "dobesv",
"node_id": "MDQ6VXNlcjMyNzgzMw==",
"organizations_url": "https://api.github.com/users/dobesv/orgs",
"received_events_url": "https://api.github.com/users/dobesv/received_events",
"repos_url": "https://api.github.com/users/dobesv/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dobesv/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dobesv/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dobesv",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2017-08-01T21:57:02Z | 2021-09-08T07:00:38Z | 2017-08-01T23:03:33Z | NONE | resolved | Sending a POST request with an empty body read from an empty file and a `Content-Length: 0` header times out after a long time instead of doing normal processing.
## Expected Result
Sending an empty body from a file with `Content-Length: 0` should send the request and return a result in a similar amount of time as a non-empty request, or a request without `Content-Length: 0`, or an empty body provided as a string.
For example:
```
$ cat repro2.py
import requests, tempfile
with tempfile.NamedTemporaryFile() as tf:
print requests.Session().send(requests.Request('POST', 'https://www.google.com', data=open(tf.name)).prepare())
$ python repro2.py
<Response [405]>
```
Or using a string body:
```
$ cat repro3.py
import requests, tempfile
print requests.Session().send(requests.Request('POST', 'https://www.google.com', headers={'Content-Length': u'0'}, data='').prepare())
$ python repro3.py
<Response [405]>
```
Or a non-empty file:
```
$ cat repro5.py
import requests, tempfile
with tempfile.NamedTemporaryFile() as tf:
tf.write('x')
tf.flush()
print requests.post('https://www.google.com', headers={'Content-Length': u'0'}, data=open(tf.name))
$ python repro5.py
<Response [405]>
```
## Actual Result
However, with the specific combination of a `Content-Length: 0` header and an empty open file descriptor, the request times out after 4 minutes with an error.
```
$ pip freeze | grep requests
requests==2.18.2
$ cat repro1.py
import requests, tempfile
with tempfile.NamedTemporaryFile() as tf:
requests.Session().send(requests.Request('POST', 'https://www.google.com', headers={'Content-Length': u'0'}, data=open(tf.name)).prepare())
$ time python repro1.py
Traceback (most recent call last):
File "repro1.py", line 4, in <module>
requests.Session().send(requests.Request('POST', 'https://www.google.com', headers={'Content-Length': u'0'}, data=open(tf.name)).prepare())
File "/home/ubuntu/env/lib/python2.7/site-packages/requests/sessions.py", line 612, in send
r = adapter.send(request, **kwargs)
File "/home/ubuntu/env/lib/python2.7/site-packages/requests/adapters.py", line 490, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))
real 4m0.480s
user 0m0.296s
sys 0m0.040s
$ cat repro4.py
import requests, tempfile
with tempfile.NamedTemporaryFile() as tf:
print requests.post('https://www.google.com', headers={'Content-Length': u'0'}, data=open(tf.name))
$ time python repro4.py
Traceback (most recent call last):
File "repro4.py", line 4, in <module>
print requests.post('https://www.google.com', headers={'Content-Length': u'0'}, data=open(tf.name))
File "/home/ubuntu/env/lib/python2.7/site-packages/requests/api.py", line 112, in post
return request('post', url, data=data, json=json, **kwargs)
File "/home/ubuntu/env/lib/python2.7/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/home/ubuntu/env/lib/python2.7/site-packages/requests/sessions.py", line 502, in request
resp = self.send(prep, **send_kwargs)
File "/home/ubuntu/env/lib/python2.7/site-packages/requests/sessions.py", line 612, in send
r = adapter.send(request, **kwargs)
File "/home/ubuntu/env/lib/python2.7/site-packages/requests/adapters.py", line 490, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))
real 4m5.474s
user 0m0.288s
sys 0m0.036s
```
## Reproduction Steps
```python
import requests, tempfile
with tempfile.NamedTemporaryFile() as tf:
print requests.post('https://www.google.com', headers={'Content-Length': u'0'}, data=open(tf.name))
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "1.5.2"
},
"implementation": {
"name": "CPython",
"version": "2.7.13"
},
"platform": {
"release": "4.4.0-78-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1000207f",
"version": "16.1.0"
},
"requests": {
"version": "2.18.2"
},
"system_ssl": {
"version": "1000207f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": true
}
```
## Workaround
Check if the file is empty before sending and, if it is, substitute the file descriptor for an empty string.
| {
"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/4215/reactions"
} | https://api.github.com/repos/psf/requests/issues/4215/timeline | null | completed | null | null | false | [
"Hey @dobesv, this is a known bug in the 2.x versions of requests and was originally recorded in #3066. We have a patch submitted (#3897) and merged into the 3.0.0 branch which will address this.\r\n\r\nFor the time being, Requests should be capable of determining the required headers in it's current state. If you ... |
https://api.github.com/repos/psf/requests/issues/4214 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4214/labels{/name} | https://api.github.com/repos/psf/requests/issues/4214/comments | https://api.github.com/repos/psf/requests/issues/4214/events | https://github.com/psf/requests/issues/4214 | 247,004,428 | MDU6SXNzdWUyNDcwMDQ0Mjg= | 4,214 | Returning cookies from Adapters | {
"avatar_url": "https://avatars.githubusercontent.com/u/6284?v=4",
"events_url": "https://api.github.com/users/Singletoned/events{/privacy}",
"followers_url": "https://api.github.com/users/Singletoned/followers",
"following_url": "https://api.github.com/users/Singletoned/following{/other_user}",
"gists_url": "https://api.github.com/users/Singletoned/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Singletoned",
"id": 6284,
"login": "Singletoned",
"node_id": "MDQ6VXNlcjYyODQ=",
"organizations_url": "https://api.github.com/users/Singletoned/orgs",
"received_events_url": "https://api.github.com/users/Singletoned/received_events",
"repos_url": "https://api.github.com/users/Singletoned/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Singletoned/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Singletoned/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Singletoned",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 7 | 2017-08-01T09:12:47Z | 2017-09-05T13:52:49Z | null | NONE | null | I've been trying to create a subclass of `BaseAdapter` for Requests that supports WSGI applications, (preferably based on the requests-wsgi-adapter package, or from scratch if need be).
The sticking point has been cookies and session handling. From reading the Requests code, my understanding is that cookies are automatically extracted from the reponse object returned from the adapter's `send` method. In order for the cookies to be automatically extracted the response needs to have a `r.raw._original_response.msg` chain of attributes and this should return an object with an `info` method that should return an `email.message.Message` instance (largely because of `cookies.py:extract_cookies_to_jar`, but also because of how `http.cookiejar` behaves).
This seems like a needlessly complicated series of steps to go through, particularly as I'm not currently clear on how to correctly convert my response body to an `email.message.Message` (and a quick scan of the Python documentation makes this look non-trivial).
Have I misunderstood? Are there any helper functions for performing these steps?
Would you consider a patch to `extract_cookies_to_jar` that also looks, for example, for a `_cookies_dict` property on the response, at the point that it currently silently returns if there is no `_original_response` attribute?
Alternatively, would you consider supporting something like https://pypi.python.org/pypi/cookies/ with a friendlier interface (kind of "Requests for cookies")? I haven't dug into it a lot, but it looks relatively easy to add optional support for it (which I'd be happy to contribute).
| 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/4214/reactions"
} | https://api.github.com/repos/psf/requests/issues/4214/timeline | null | null | null | null | false | [
"> Have I misunderstood? Are there any helper functions for performing these steps?\r\n\r\nYou have not: there are no helper functions for performing these steps.\r\n\r\n> Alternatively, would you consider supporting something like https://pypi.python.org/pypi/cookies/ with a friendlier interface (kind of \"Request... |
https://api.github.com/repos/psf/requests/issues/4213 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4213/labels{/name} | https://api.github.com/repos/psf/requests/issues/4213/comments | https://api.github.com/repos/psf/requests/issues/4213/events | https://github.com/psf/requests/issues/4213 | 246,877,626 | MDU6SXNzdWUyNDY4Nzc2MjY= | 4,213 | Incorrect default value of Session attributes in documentation | {
"avatar_url": "https://avatars.githubusercontent.com/u/1050156?v=4",
"events_url": "https://api.github.com/users/lmazuel/events{/privacy}",
"followers_url": "https://api.github.com/users/lmazuel/followers",
"following_url": "https://api.github.com/users/lmazuel/following{/other_user}",
"gists_url": "https://api.github.com/users/lmazuel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lmazuel",
"id": 1050156,
"login": "lmazuel",
"node_id": "MDQ6VXNlcjEwNTAxNTY=",
"organizations_url": "https://api.github.com/users/lmazuel/orgs",
"received_events_url": "https://api.github.com/users/lmazuel/received_events",
"repos_url": "https://api.github.com/users/lmazuel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lmazuel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lmazuel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lmazuel",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2017-07-31T20:41:42Z | 2022-02-26T04:00:38Z | 2021-11-28T03:06:36Z | NONE | resolved | See for instance `trust_env`, that is `True` by default, but `None` in the documentation:
http://docs.python-requests.org/en/latest/api/#requests.Session.trust_env
In that case, True/None are opposite, and I understood my own issue only after looking at the code :/
Same for all attributes actually, that are all `None` in doc.
I totally get that it's complicated for sphinx to generate instance attribute (since the value is assigned from inside `__init__`), but at least would be nice to have like `max_redirects` the default value in the docstring:

I could probably try to PR some of these strings if it helps and if you confirm the "This defaults to XXXX" pattern in the docstring.
Thanks! :-) | {
"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/4213/reactions"
} | https://api.github.com/repos/psf/requests/issues/4213/timeline | null | completed | null | null | false | [
"Hrm, Sphinx autodoc should be getting those rights they're very simple. Rather than change the text, which will end up out of sync with the code, it may be worth digging in to why Sphinx is failing to detect this. ",
"Defaults are no longer displayed in the documentation, closing this issue."
] |
https://api.github.com/repos/psf/requests/issues/4212 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4212/labels{/name} | https://api.github.com/repos/psf/requests/issues/4212/comments | https://api.github.com/repos/psf/requests/issues/4212/events | https://github.com/psf/requests/issues/4212 | 246,643,771 | MDU6SXNzdWUyNDY2NDM3NzE= | 4,212 | ECONNRESET error after upgrading packages | {
"avatar_url": "https://avatars.githubusercontent.com/u/19325732?v=4",
"events_url": "https://api.github.com/users/sugiantolauw/events{/privacy}",
"followers_url": "https://api.github.com/users/sugiantolauw/followers",
"following_url": "https://api.github.com/users/sugiantolauw/following{/other_user}",
"gists_url": "https://api.github.com/users/sugiantolauw/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sugiantolauw",
"id": 19325732,
"login": "sugiantolauw",
"node_id": "MDQ6VXNlcjE5MzI1NzMy",
"organizations_url": "https://api.github.com/users/sugiantolauw/orgs",
"received_events_url": "https://api.github.com/users/sugiantolauw/received_events",
"repos_url": "https://api.github.com/users/sugiantolauw/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sugiantolauw/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sugiantolauw/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sugiantolauw",
"user_view_type": "public"
} | [
{
"color": "fef2c0",
"default": false,
"description": null,
"id": 298537994,
"name": "Needs More Information",
"node_id": "MDU6TGFiZWwyOTg1Mzc5OTQ=",
"url": "https://api.github.com/repos/psf/requests/labels/Needs%20More%20Information"
}
] | closed | true | null | [] | null | 8 | 2017-07-31T04:48:51Z | 2021-09-08T01:21:06Z | 2018-08-04T12:30:57Z | NONE | resolved | Summary:
Hi Team,
Hope you are well.
I am having an issue with OpenSSL which I didnt experience before.
I am running a Python script that extracts data from a DMP's API (https://www.lotame.com/). The script has been working for a month now and I was able to extract data properly for over a month now.
## Expected Result
`affinities_table begun, current row length = 39
id 158260 added, current row length = 69
id 153226 added, current row length = 194
id 153237 added, current row length = 446
id 153235 added, current row length = 879
id 159852 added, current row length = 1696
id 153232 added, current row length = 1969
id 153225 added, current row length = 2483
id 153230 added, current row length = 2722
id 151975 added, current row length = 3015
id 153701 added, current row length = 3415
id 153697 added, current row length = 3781
id 151977 added, current row length = 4134
id 153700 added, current row length = 4418
id 153698 added, current row length = 5068
id 153699 added, current row length = 5467
id 153705 added, current row length = 7487
id 161726 added, current row length = 7508
id 172973 added, current row length = 8004
id 153993 added, current row length = 8029
id 153994 added, current row length = 8084
id 153996 added, current row length = 8215
id 153995 added, current row length = 8337
id 168763 added, current row length = 8628
id 168762 added, current row length = 8919
id 153236 added, current row length = 9044
id 151980 added, current row length = 9279
id 153228 added, current row length = 9562
id 153229 added, current row length = 9745
id 179586 added, current row length = 9804
id 196979 added, current row length = 9829
id 175403 added, current row length = 10481
id 190349 added, current row length = 11116
id 192283 added, current row length = 12044
id 192282 added, current row length = 12395
id 197643 added, current row length = 13304
id 197645 added, current row length = 14860
id 197646 added, current row length = 14861
id 197647 added, current row length = 16526
id 197649 added, current row length = 18267
id 197651 added, current row length = 20337
id 197653 added, current row length = 22180
id 197655 added, current row length = 24275
`
## Actual Result
But when I upgrade requests, pyopenssl, and other packagesI received below error:
```
affinities_table begun, current row length = 39
Traceback (most recent call last):
tbl = audience_affinities(config_filepath, date_today)
File "/home/slauw/Lotame_test/lotame_api_optimized.py", line 457, in audience_affinities
aud_affinities = single_audience_affinities(config_filepath, i, date_today)
File "/home/slauw/Lotame_test/lotame_api_optimized.py", line 389, in single_audience_affinities
raise SSLError(e, request=request)
requests.exceptions.SSLError: ("bad handshake: SysCallError(104, 'ECONNRESET')",)
Traceback (most recent call last):
KeyError: 'location'
affinities_table begun, current row length = 39
Running audaffinities job
affinities_table begun, current row length = 39
Traceback (most recent call last):
tbl = audience_affinities(config_filepath, date_today)
File "/home/slauw/Lotame_test/lotame_api_optimized.py", line 460, in audience_affinities
aud_affinities = single_audience_affinities(config_filepath, i, date_today)
File "/home/slauw/Lotame_test/lotame_api_optimized.py", line 392, in single_audience_affinities
raise SSLError(e, request=request)
requests.exceptions.SSLError: ("bad handshake: SysCallError(-1, 'Unexpected EOF')",)
affinities_table begun, current row length = 39
```
Now, I also ran the command to update all of my python packages.
## Reproduction Steps
```python
import requests
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.0"
},
"implementation": {
"name": "CPython",
"version": "2.7.13"
},
"platform": {
"release": "2.6.32-431.29.2.el6.x86_64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010006f",
"version": "17.2.0"
},
"requests": {
"version": "2.14.2"
},
"system_ssl": {
"version": "100020cf"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": true
}
```
Also, more information:
- Python version 2.7.13
- Operating system: CentOS release 6.5 (final)
Let me know if you need more information.
Cheers,
Sugi | {
"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/4212/reactions"
} | https://api.github.com/repos/psf/requests/issues/4212/timeline | null | completed | null | null | false | [
"Thanks for this issue! Did you also upgrade `cryptography`? Can you try downgrading `cryptography` to version 1.9 and see if the problem reproduces?",
"hahahha, happy to be of help.\r\n\r\nYes, I did as I also upgrade all of my Python packages.\r\n\r\nWill try to run this with downgraded cryptography version 1.9... |
https://api.github.com/repos/psf/requests/issues/4211 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4211/labels{/name} | https://api.github.com/repos/psf/requests/issues/4211/comments | https://api.github.com/repos/psf/requests/issues/4211/events | https://github.com/psf/requests/issues/4211 | 246,581,160 | MDU6SXNzdWUyNDY1ODExNjA= | 4,211 | SSLError has been changed to ConnectionError in requests 2.18.2? | {
"avatar_url": "https://avatars.githubusercontent.com/u/1055747?v=4",
"events_url": "https://api.github.com/users/5j9/events{/privacy}",
"followers_url": "https://api.github.com/users/5j9/followers",
"following_url": "https://api.github.com/users/5j9/following{/other_user}",
"gists_url": "https://api.github.com/users/5j9/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/5j9",
"id": 1055747,
"login": "5j9",
"node_id": "MDQ6VXNlcjEwNTU3NDc=",
"organizations_url": "https://api.github.com/users/5j9/orgs",
"received_events_url": "https://api.github.com/users/5j9/received_events",
"repos_url": "https://api.github.com/users/5j9/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/5j9/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/5j9/subscriptions",
"type": "User",
"url": "https://api.github.com/users/5j9",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2017-07-30T12:33:00Z | 2021-09-08T07:00:40Z | 2017-07-30T12:45:54Z | NONE | resolved | In requests-2.18.1 and earlier:
`requests.get('https://testssl-expire-r2i2.disig.sk/index.en.html')`
Used to raise `SSLError: ("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",)`
But as of requests-2.18.2 (the latest version), the same URL is returning `ConnectionError: HTTPSConnectionPool(host='testssl-expire-r2i2.disig.sk', port=443): Max retries exceeded with url: /index.en.html (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))`
I just need a confirmation that this change is intentional and if it is going to remain so (or not).
Thanks. | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4211/reactions"
} | https://api.github.com/repos/psf/requests/issues/4211/timeline | null | completed | null | null | false | [
"Thanks for this! This is a duplicate of #4902, so I'll refer you to that issue. ",
"Sorry, I meant #4209."
] |
https://api.github.com/repos/psf/requests/issues/4210 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4210/labels{/name} | https://api.github.com/repos/psf/requests/issues/4210/comments | https://api.github.com/repos/psf/requests/issues/4210/events | https://github.com/psf/requests/pull/4210 | 246,515,706 | MDExOlB1bGxSZXF1ZXN0MTMzMDg5NTE2 | 4,210 | Make sure we raise SSLError. | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2017-07-29T11:15:18Z | 2021-09-05T00:07:07Z | 2017-07-29T11:27:18Z | MEMBER | resolved | Resolves #4209. | {
"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/4210/reactions"
} | https://api.github.com/repos/psf/requests/issues/4210/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4210.diff",
"html_url": "https://github.com/psf/requests/pull/4210",
"merged_at": "2017-07-29T11:27:18Z",
"patch_url": "https://github.com/psf/requests/pull/4210.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4210"
} | true | [
"✨ 🎉 ✨ "
] |
https://api.github.com/repos/psf/requests/issues/4209 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4209/labels{/name} | https://api.github.com/repos/psf/requests/issues/4209/comments | https://api.github.com/repos/psf/requests/issues/4209/events | https://github.com/psf/requests/issues/4209 | 246,493,653 | MDU6SXNzdWUyNDY0OTM2NTM= | 4,209 | SSLError -> ConnectionError in 2.18.2: intended? | {
"avatar_url": "https://avatars.githubusercontent.com/u/950506?v=4",
"events_url": "https://api.github.com/users/simon-weber/events{/privacy}",
"followers_url": "https://api.github.com/users/simon-weber/followers",
"following_url": "https://api.github.com/users/simon-weber/following{/other_user}",
"gists_url": "https://api.github.com/users/simon-weber/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/simon-weber",
"id": 950506,
"login": "simon-weber",
"node_id": "MDQ6VXNlcjk1MDUwNg==",
"organizations_url": "https://api.github.com/users/simon-weber/orgs",
"received_events_url": "https://api.github.com/users/simon-weber/received_events",
"repos_url": "https://api.github.com/users/simon-weber/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/simon-weber/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/simon-weber/subscriptions",
"type": "User",
"url": "https://api.github.com/users/simon-weber",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2017-07-29T02:31:43Z | 2021-09-08T08:00:32Z | 2017-07-29T11:27:18Z | NONE | resolved | My dev builds started failing after 2.18.2 was released (they purposefully run on the latest releases to flush out problems). They work on 2.18.1.
It looks like the cause is a minor breaking change: in at least my particular situation, an SSLError has changed to ConnectionError.
I can update my tests to look for ConnectionError instead, but I figured I'd check first to see if this behavior is intended.
## Expected Result
Getting `https://wrong.host.badssl.com` raises SSLError.
## Actual Result
Getting `https://wrong.host.badssl.com` raises ConnectionError, mentioning SSLError as the cause.
## Reproduction Steps
```
# starting with 2.18.1...
$ python -c 'import requests; requests.get("https://wrong.host.badssl.com")'
Traceback (most recent call last):
...
requests.exceptions.SSLError: hostname 'wrong.host.badssl.com' doesn't match either of '*.badssl.com', 'badssl.com'
$ pip install --upgrade requests
Collecting requests
...
Successfully installed requests-2.18.2 urllib3-1.22
$ python -c 'import requests; requests.get("https://wrong.host.badssl.com")'
Traceback (most recent call last):
...
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='wrong.host.badssl.com', port=443): Max retries exceeded with url: / (Caused by SSLError(CertificateError("hostname 'wrong.host.badssl.com' doesn't match either of '*.badssl.com', 'badssl.com'",),))
```
In case it's helpful, here's an example build: https://travis-ci.org/simon-weber/gmusicapi/jobs/248191438.
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "1.4"
},
"implementation": {
"name": "CPython",
"version": "2.7.11"
},
"platform": {
"release": "4.4.2ph+",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1000204f",
"version": "16.0.0"
},
"requests": {
"version": "2.18.2"
},
"system_ssl": {
"version": "1000207f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": true
}
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4209/reactions"
} | https://api.github.com/repos/psf/requests/issues/4209/timeline | null | completed | null | null | false | [
"Hrm, this breaking change happened because we made urllib3 retry on `SSLError`. In this case I think we need to add some custom code to Requests to make this work a bit better, namely by throwing SSLError again. Good catch!",
"Thanks!"
] |
https://api.github.com/repos/psf/requests/issues/4208 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4208/labels{/name} | https://api.github.com/repos/psf/requests/issues/4208/comments | https://api.github.com/repos/psf/requests/issues/4208/events | https://github.com/psf/requests/issues/4208 | 246,291,184 | MDU6SXNzdWUyNDYyOTExODQ= | 4,208 | `requests.exceptions.*` do not inherit from Python's own specific exceptions. | {
"avatar_url": "https://avatars.githubusercontent.com/u/167327?v=4",
"events_url": "https://api.github.com/users/StyXman/events{/privacy}",
"followers_url": "https://api.github.com/users/StyXman/followers",
"following_url": "https://api.github.com/users/StyXman/following{/other_user}",
"gists_url": "https://api.github.com/users/StyXman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/StyXman",
"id": 167327,
"login": "StyXman",
"node_id": "MDQ6VXNlcjE2NzMyNw==",
"organizations_url": "https://api.github.com/users/StyXman/orgs",
"received_events_url": "https://api.github.com/users/StyXman/received_events",
"repos_url": "https://api.github.com/users/StyXman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/StyXman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/StyXman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/StyXman",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2017-07-28T09:13:26Z | 2021-09-08T08:00:32Z | 2017-07-28T09:19:03Z | CONTRIBUTOR | resolved | Several `Exceptions` in https://github.com/requests/requests/blob/master/requests/exceptions.py inherit (indirectly) from `IOError`, but not from other Python exception. Two I can easily see are `ConnectionError` (see https://docs.python.org/3/library/exceptions.html#ConnectionError) and `TimeoutError`.
It might make sense to inherit from those too. If you think it doesn't, just close the Issue. | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4208/reactions"
} | https://api.github.com/repos/psf/requests/issues/4208/timeline | null | completed | null | null | false | [
"I don't think it does at this time; while we're keeping compatibility across Python 2 and 3 it is probably not worth attempting to build complex exception hierarchies on different versions. For now, I think it's fine as-is. \r\n\r\nThanks for the suggestion!"
] |
https://api.github.com/repos/psf/requests/issues/4207 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4207/labels{/name} | https://api.github.com/repos/psf/requests/issues/4207/comments | https://api.github.com/repos/psf/requests/issues/4207/events | https://github.com/psf/requests/pull/4207 | 245,892,191 | MDExOlB1bGxSZXF1ZXN0MTMyNjQyNDU1 | 4,207 | remove legacy super() call | {
"avatar_url": "https://avatars.githubusercontent.com/u/611033?v=4",
"events_url": "https://api.github.com/users/markjszy/events{/privacy}",
"followers_url": "https://api.github.com/users/markjszy/followers",
"following_url": "https://api.github.com/users/markjszy/following{/other_user}",
"gists_url": "https://api.github.com/users/markjszy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/markjszy",
"id": 611033,
"login": "markjszy",
"node_id": "MDQ6VXNlcjYxMTAzMw==",
"organizations_url": "https://api.github.com/users/markjszy/orgs",
"received_events_url": "https://api.github.com/users/markjszy/received_events",
"repos_url": "https://api.github.com/users/markjszy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/markjszy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/markjszy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/markjszy",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2017-07-27T00:24:53Z | 2021-09-05T00:07:08Z | 2017-07-27T04:40:04Z | CONTRIBUTOR | resolved | This does not seem to be necessary anymore since there is no longer a `BaseResponse` object from which `Response` inherits. | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4207/reactions"
} | https://api.github.com/repos/psf/requests/issues/4207/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4207.diff",
"html_url": "https://github.com/psf/requests/pull/4207",
"merged_at": "2017-07-27T04:40:04Z",
"patch_url": "https://github.com/psf/requests/pull/4207.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4207"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/4206 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4206/labels{/name} | https://api.github.com/repos/psf/requests/issues/4206/comments | https://api.github.com/repos/psf/requests/issues/4206/events | https://github.com/psf/requests/pull/4206 | 245,830,929 | MDExOlB1bGxSZXF1ZXN0MTMyNTk2NDk1 | 4,206 | some docs on request redirect detection | {
"avatar_url": "https://avatars.githubusercontent.com/u/204779?v=4",
"events_url": "https://api.github.com/users/jvanasco/events{/privacy}",
"followers_url": "https://api.github.com/users/jvanasco/followers",
"following_url": "https://api.github.com/users/jvanasco/following{/other_user}",
"gists_url": "https://api.github.com/users/jvanasco/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jvanasco",
"id": 204779,
"login": "jvanasco",
"node_id": "MDQ6VXNlcjIwNDc3OQ==",
"organizations_url": "https://api.github.com/users/jvanasco/orgs",
"received_events_url": "https://api.github.com/users/jvanasco/received_events",
"repos_url": "https://api.github.com/users/jvanasco/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jvanasco/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jvanasco/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jvanasco",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2017-07-26T19:36:38Z | 2021-09-05T00:07:08Z | 2017-07-26T19:57:22Z | CONTRIBUTOR | resolved | This is just a small docstring that I wanted to suggest for inclusion. I should have offered it in my earlier commit.
The purpose of the docstring: we had some unit tests to ensure that `get_redirect_target` was being called the appropriate number of times. They broke because I calculated the number incorrectly. It took a while to re-familiarize myself with the code and figure out what was going on. | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4206/reactions"
} | https://api.github.com/repos/psf/requests/issues/4206/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4206.diff",
"html_url": "https://github.com/psf/requests/pull/4206",
"merged_at": "2017-07-26T19:57:22Z",
"patch_url": "https://github.com/psf/requests/pull/4206.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4206"
} | true | [
"this looks solid to me!"
] |
https://api.github.com/repos/psf/requests/issues/4205 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4205/labels{/name} | https://api.github.com/repos/psf/requests/issues/4205/comments | https://api.github.com/repos/psf/requests/issues/4205/events | https://github.com/psf/requests/issues/4205 | 245,777,319 | MDU6SXNzdWUyNDU3NzczMTk= | 4,205 | Requests not working with Mac osx 10.11 Python-3 | {
"avatar_url": "https://avatars.githubusercontent.com/u/30474062?v=4",
"events_url": "https://api.github.com/users/paul93065/events{/privacy}",
"followers_url": "https://api.github.com/users/paul93065/followers",
"following_url": "https://api.github.com/users/paul93065/following{/other_user}",
"gists_url": "https://api.github.com/users/paul93065/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/paul93065",
"id": 30474062,
"login": "paul93065",
"node_id": "MDQ6VXNlcjMwNDc0MDYy",
"organizations_url": "https://api.github.com/users/paul93065/orgs",
"received_events_url": "https://api.github.com/users/paul93065/received_events",
"repos_url": "https://api.github.com/users/paul93065/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/paul93065/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/paul93065/subscriptions",
"type": "User",
"url": "https://api.github.com/users/paul93065",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2017-07-26T16:17:29Z | 2021-09-08T08:00:33Z | 2017-07-26T18:23:53Z | NONE | resolved | Environment is Max OS-X 10.11, fully updated.
Python 3.6.2
Requests:
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
urllib3<1.23,>=1.21.1 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
chardet<3.1.0,>=3.0.2 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
idna<2.6,>=2.5 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
certifi>=2017.4.17 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
Any get requests called from Python3 fails:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
More detail in attached file.
[Python3Requests.txt](https://github.com/requests/requests/files/1177297/Python3Requests.txt)
| {
"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/4205/reactions"
} | https://api.github.com/repos/psf/requests/issues/4205/timeline | null | completed | null | null | false | [
"This seems to be a problem with your Python installation. It appears that this would happen with any TLS connection. How did you get your Python 3?",
"Hello Lukasa,\r\nInstalled a package from Python.org\r\nhttps://www.python.org/downloads/release/python-362/\r\nThe problem seems particular to OSX 10-11. Works O... |
https://api.github.com/repos/psf/requests/issues/4204 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4204/labels{/name} | https://api.github.com/repos/psf/requests/issues/4204/comments | https://api.github.com/repos/psf/requests/issues/4204/events | https://github.com/psf/requests/pull/4204 | 245,659,608 | MDExOlB1bGxSZXF1ZXN0MTMyNDY4NzEz | 4,204 | Correct urllib3 compatibility comment | {
"avatar_url": "https://avatars.githubusercontent.com/u/861044?v=4",
"events_url": "https://api.github.com/users/browniebroke/events{/privacy}",
"followers_url": "https://api.github.com/users/browniebroke/followers",
"following_url": "https://api.github.com/users/browniebroke/following{/other_user}",
"gists_url": "https://api.github.com/users/browniebroke/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/browniebroke",
"id": 861044,
"login": "browniebroke",
"node_id": "MDQ6VXNlcjg2MTA0NA==",
"organizations_url": "https://api.github.com/users/browniebroke/orgs",
"received_events_url": "https://api.github.com/users/browniebroke/received_events",
"repos_url": "https://api.github.com/users/browniebroke/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/browniebroke/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/browniebroke/subscriptions",
"type": "User",
"url": "https://api.github.com/users/browniebroke",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2017-07-26T09:25:09Z | 2023-01-06T16:49:52Z | 2017-07-26T10:03:58Z | CONTRIBUTOR | resolved | So that it's in line with the code.
I saw the warning raised recently and had to dive into the code for exact compatibility, but I stopped after reading the comment rather than the code.
Maybe a better solution would be to surface the supported versions in the warning? However, I see it was changed recently in https://github.com/requests/requests/pull/4144/, any specific reason for removing that? | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4204/reactions"
} | https://api.github.com/repos/psf/requests/issues/4204/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4204.diff",
"html_url": "https://github.com/psf/requests/pull/4204",
"merged_at": "2017-07-26T10:03:58Z",
"patch_url": "https://github.com/psf/requests/pull/4204.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4204"
} | true | [
"The primary reason is just trying to reduce the maintenance area of this code: it's painful to need to update in lots of places. Ideally we'd have a nice refactor that will work here to minimise the number of places we need to write our version constraints: if someone wants to do that, it might be a worthwhile pro... |
https://api.github.com/repos/psf/requests/issues/4203 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4203/labels{/name} | https://api.github.com/repos/psf/requests/issues/4203/comments | https://api.github.com/repos/psf/requests/issues/4203/events | https://github.com/psf/requests/issues/4203 | 245,187,624 | MDU6SXNzdWUyNDUxODc2MjQ= | 4,203 | requests is asking for urllib3 1.21.1, when 1.22 is on pypi | {
"avatar_url": "https://avatars.githubusercontent.com/u/27829577?v=4",
"events_url": "https://api.github.com/users/mtdeguzis/events{/privacy}",
"followers_url": "https://api.github.com/users/mtdeguzis/followers",
"following_url": "https://api.github.com/users/mtdeguzis/following{/other_user}",
"gists_url": "https://api.github.com/users/mtdeguzis/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mtdeguzis",
"id": 27829577,
"login": "mtdeguzis",
"node_id": "MDQ6VXNlcjI3ODI5NTc3",
"organizations_url": "https://api.github.com/users/mtdeguzis/orgs",
"received_events_url": "https://api.github.com/users/mtdeguzis/received_events",
"repos_url": "https://api.github.com/users/mtdeguzis/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mtdeguzis/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mtdeguzis/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mtdeguzis",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2017-07-24T19:42:35Z | 2021-09-08T08:00:34Z | 2017-07-24T19:49:01Z | NONE | resolved | Summary.
## Expected Result
requests is asking for urllib3 1.21.1, when 1.22 is on pypi. If pip/setuptools pulls the latest version of urllib3, you will not be able to run setup.py here.
## Actual Result
```'
Error: Couldn't find a distribution for 'urllib3<1.22,>=1.21.1'
```
## Reproduction Steps
* install latest urllib3
* run setup.py
## System Information
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4203/reactions"
} | https://api.github.com/repos/psf/requests/issues/4203/timeline | null | completed | null | null | false | [
"A new release is coming tomorrow to resolve this. "
] |
https://api.github.com/repos/psf/requests/issues/4202 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4202/labels{/name} | https://api.github.com/repos/psf/requests/issues/4202/comments | https://api.github.com/repos/psf/requests/issues/4202/events | https://github.com/psf/requests/issues/4202 | 245,095,372 | MDU6SXNzdWUyNDUwOTUzNzI= | 4,202 | request not return in time | {
"avatar_url": "https://avatars.githubusercontent.com/u/3711655?v=4",
"events_url": "https://api.github.com/users/zjbzju/events{/privacy}",
"followers_url": "https://api.github.com/users/zjbzju/followers",
"following_url": "https://api.github.com/users/zjbzju/following{/other_user}",
"gists_url": "https://api.github.com/users/zjbzju/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/zjbzju",
"id": 3711655,
"login": "zjbzju",
"node_id": "MDQ6VXNlcjM3MTE2NTU=",
"organizations_url": "https://api.github.com/users/zjbzju/orgs",
"received_events_url": "https://api.github.com/users/zjbzju/received_events",
"repos_url": "https://api.github.com/users/zjbzju/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/zjbzju/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zjbzju/subscriptions",
"type": "User",
"url": "https://api.github.com/users/zjbzju",
"user_view_type": "public"
} | [
{
"color": "f7c6c7",
"default": false,
"description": null,
"id": 167537670,
"name": "Propose Close",
"node_id": "MDU6TGFiZWwxNjc1Mzc2NzA=",
"url": "https://api.github.com/repos/psf/requests/labels/Propose%20Close"
},
{
"color": "fef2c0",
"default": false,
"description": ... | closed | true | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | [
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}... | null | 2 | 2017-07-24T14:18:06Z | 2021-09-08T07:00:36Z | 2017-08-06T11:39:31Z | NONE | resolved | I'm using request('POST', url, data=data) to access a 4 layer SLB. I found that some of requests delayed for about 2s.
The tcp packets (dumped using tcpdump) shows that the packets are really received from SLB, but request doesn't returned to the caller. Does anyone have any idea about it?
BTW: my requests lib version is 2.12.4
| {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4202/reactions"
} | https://api.github.com/repos/psf/requests/issues/4202/timeline | null | completed | null | null | false | [
"@zjbzju could you provide more information, including the operating system, whether or not TLS is involved, what versions of openssl you have installed and are using, what you mean by `4 layer SLB`, and perhaps even the `tcpdump` itself.",
"Closing since no new information has been supplied to provide additional... |
https://api.github.com/repos/psf/requests/issues/4201 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4201/labels{/name} | https://api.github.com/repos/psf/requests/issues/4201/comments | https://api.github.com/repos/psf/requests/issues/4201/events | https://github.com/psf/requests/issues/4201 | 244,915,908 | MDU6SXNzdWUyNDQ5MTU5MDg= | 4,201 | Feature request: timeout on full request completion | {
"avatar_url": "https://avatars.githubusercontent.com/u/581718?v=4",
"events_url": "https://api.github.com/users/dgillis/events{/privacy}",
"followers_url": "https://api.github.com/users/dgillis/followers",
"following_url": "https://api.github.com/users/dgillis/following{/other_user}",
"gists_url": "https://api.github.com/users/dgillis/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dgillis",
"id": 581718,
"login": "dgillis",
"node_id": "MDQ6VXNlcjU4MTcxOA==",
"organizations_url": "https://api.github.com/users/dgillis/orgs",
"received_events_url": "https://api.github.com/users/dgillis/received_events",
"repos_url": "https://api.github.com/users/dgillis/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dgillis/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dgillis/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dgillis",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2017-07-23T15:07:00Z | 2021-09-08T08:00:34Z | 2017-07-23T15:34:45Z | NONE | resolved | A simple way to place a timeout on the entire request duration would be very useful. I see this was discussed previously but workarounds involved using additional libraries, signals, etc.
Can this not be fixed by simply modifying `Response.iter_content()` and checking the time after each chunk is read, raising an exception after some "complete_timeout" is surpassed?
I've used a function like this to do something similar by hijacking the `stream` parameter but it would be nice if this could be built right into `Session` and/or `Response`.
```python
from time import time
import requests
class CompleteTimeout(requests.exceptions.Timeout):
pass
def request_with_complete_timeout(method, url, complete_timeout, **kwargs):
"""
Call requests.request() but raise an Exception if the total time exceeds
complete_timeout seconds.
"""
kwargs['timeout'] = complete_timeout
kwargs['stream'] = True
timeout_time = time() + complete_timeout
response = requests.request(method, url, **kwargs)
content_barr = bytearray()
for chnk in response.iter_content():
if time() > timeout_time:
raise CompleteTimeout(
"Request exceeded complete timeout of {} seconds: {}"
.format(complete_timeout, url))
content_barr.extend(chnk)
response._content = bytes(content_barr)
return response
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4201/reactions"
} | https://api.github.com/repos/psf/requests/issues/4201/timeline | null | completed | null | null | false | [
"> Can this not be fixed by simply modifying Response.iter_content() and checking the time after each chunk is read, raising an exception after some \"complete_timeout\" is surpassed?\r\n\r\nNot really. This won't prevent `iter_content` potentially blocking well past any such timeout, because the socket reads may t... |
https://api.github.com/repos/psf/requests/issues/4200 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4200/labels{/name} | https://api.github.com/repos/psf/requests/issues/4200/comments | https://api.github.com/repos/psf/requests/issues/4200/events | https://github.com/psf/requests/issues/4200 | 244,909,766 | MDU6SXNzdWUyNDQ5MDk3NjY= | 4,200 | Cookies lost after redirect | {
"avatar_url": "https://avatars.githubusercontent.com/u/26007903?v=4",
"events_url": "https://api.github.com/users/HynekBlaha/events{/privacy}",
"followers_url": "https://api.github.com/users/HynekBlaha/followers",
"following_url": "https://api.github.com/users/HynekBlaha/following{/other_user}",
"gists_url": "https://api.github.com/users/HynekBlaha/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/HynekBlaha",
"id": 26007903,
"login": "HynekBlaha",
"node_id": "MDQ6VXNlcjI2MDA3OTAz",
"organizations_url": "https://api.github.com/users/HynekBlaha/orgs",
"received_events_url": "https://api.github.com/users/HynekBlaha/received_events",
"repos_url": "https://api.github.com/users/HynekBlaha/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/HynekBlaha/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/HynekBlaha/subscriptions",
"type": "User",
"url": "https://api.github.com/users/HynekBlaha",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2017-07-23T13:19:39Z | 2021-09-08T08:00:35Z | 2017-07-23T13:38:30Z | NONE | resolved | After redirect, the JSESSIONID cookie is lost.
## Expected Result
Status code: 200
Cookies:
**JSESSIONID=91D71FBD2086F8FD1968001E6EECC9E5 for jizdenky.regiojet.cz,**
currency=CZK for jizdenky.regiojet.cz
locale=cs for jizdenky.regiojet.cz
Status code: 302
Cookies:
**JSESSIONID=91D71FBD2086F8FD1968001E6EECC9E5 for jizdenky.regiojet.cz,**
currency=CZK for jizdenky.regiojet.cz
locale=cs for jizdenky.regiojet.cz
## Actual Result
Status code: 200
Cookies:
currency=CZK for jizdenky.regiojet.cz
locale=cs for jizdenky.regiojet.cz
Status code: 302
Cookies:
**JSESSIONID=91D71FBD2086F8FD1968001E6EECC9E5 for jizdenky.regiojet.cz,**
currency=CZK for jizdenky.regiojet.cz
locale=cs for jizdenky.regiojet.cz
## Reproduction Steps
```python
import requests
# Without redirect I get session id cookie
with requests.Session() as s:
s = s.get("https://jizdenky.regiojet.cz/Login", allow_redirects=False)
print("Status code: {0}".format(s.status_code))
print("Cookies: {0}".format(s.cookies))
# With redirect I don't get session id cookie
with requests.Session() as s:
s = s.get("https://jizdenky.regiojet.cz/Login")
print("Status code: {0}".format(s.status_code))
print("Cookies: {0}".format(s.cookies))
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "1.8.1"
},
"implementation": {
"name": "CPython",
"version": "3.6.1"
},
"platform": {
"release": "16.6.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "100020bf",
"version": "17.0.0"
},
"requests": {
"version": "2.18.1"
},
"system_ssl": {
"version": "100020cf"
},
"urllib3": {
"version": "1.21.1"
},
"using_pyopenssl": true
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). | {
"avatar_url": "https://avatars.githubusercontent.com/u/26007903?v=4",
"events_url": "https://api.github.com/users/HynekBlaha/events{/privacy}",
"followers_url": "https://api.github.com/users/HynekBlaha/followers",
"following_url": "https://api.github.com/users/HynekBlaha/following{/other_user}",
"gists_url": "https://api.github.com/users/HynekBlaha/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/HynekBlaha",
"id": 26007903,
"login": "HynekBlaha",
"node_id": "MDQ6VXNlcjI2MDA3OTAz",
"organizations_url": "https://api.github.com/users/HynekBlaha/orgs",
"received_events_url": "https://api.github.com/users/HynekBlaha/received_events",
"repos_url": "https://api.github.com/users/HynekBlaha/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/HynekBlaha/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/HynekBlaha/subscriptions",
"type": "User",
"url": "https://api.github.com/users/HynekBlaha",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4200/reactions"
} | https://api.github.com/repos/psf/requests/issues/4200/timeline | null | completed | null | null | false | [
"@HynekBlaha why did you close this?",
"My mistake. Didn't read doc enough. \r\nrequests.cookies return cookies of the last response. \r\nCookie was already used in the second request header. Everything is ok. "
] |
https://api.github.com/repos/psf/requests/issues/4199 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4199/labels{/name} | https://api.github.com/repos/psf/requests/issues/4199/comments | https://api.github.com/repos/psf/requests/issues/4199/events | https://github.com/psf/requests/issues/4199 | 244,594,451 | MDU6SXNzdWUyNDQ1OTQ0NTE= | 4,199 | HEAD response with chunked Transfer-Encoding does not release the connection | {
"avatar_url": "https://avatars.githubusercontent.com/u/703870?v=4",
"events_url": "https://api.github.com/users/timuralp/events{/privacy}",
"followers_url": "https://api.github.com/users/timuralp/followers",
"following_url": "https://api.github.com/users/timuralp/following{/other_user}",
"gists_url": "https://api.github.com/users/timuralp/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/timuralp",
"id": 703870,
"login": "timuralp",
"node_id": "MDQ6VXNlcjcwMzg3MA==",
"organizations_url": "https://api.github.com/users/timuralp/orgs",
"received_events_url": "https://api.github.com/users/timuralp/received_events",
"repos_url": "https://api.github.com/users/timuralp/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/timuralp/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/timuralp/subscriptions",
"type": "User",
"url": "https://api.github.com/users/timuralp",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2017-07-21T08:07:55Z | 2021-09-08T08:00:35Z | 2017-07-21T14:20:24Z | NONE | resolved | Filing this to track the issue in urllib3 -- https://github.com/shazow/urllib3/issues/1234. Whenever urllib3 merges a fix, requests should update its requirements to avoid leaking connections.
The issue is that some servers -- in my case, Amazon S3 -- will set "Transfer-Encoding: chunked" even in response to a HEAD request. This results in urllib3 not returning the connection to the connection pool after requests calls `stream()` to get the content.
Here is a small script I wrote to confirm the problem (with a hacky reach into the pool).
```python
s = requests.Session()
req = requests.Request(method='HEAD', url='https://s3.amazonaws.com/other-bucket')
p = s.prepare_request(req)
resp = s.send(p, allow_redirects=False)
pool = s.adapters['https://'].poolmanager.pools._container.values()[0].pool
print pool.qsize()
s = requests.Session()
req = requests.Request(method='HEAD', url='https://google.com/other-bucket')
p = s.prepare_request(req)
resp = s.send(p, allow_redirects=False)
pool = s.adapters['https://'].poolmanager.pools._container.values()[0].pool
print pool.qsize()
```
In the case of google.com, the pool size is 10 upon completing the request, as the connection is put back. In the case of contacting Amazon, the pool size is 9. The default pool size is 10 and that's what we expect to get back.
Here's the debug information from the interaction, along with the requests version used:
```
2.18.1
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): s3.amazonaws.com
send: 'HEAD /other-bucket HTTP/1.1\r\nHost: s3.amazonaws.com\r\nConnection: keep-alive\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nUser-Agent: python-requests/2.18.1\r\n\r\n'
reply: 'HTTP/1.1 301 Moved Permanently\r\n'
header: x-amz-bucket-region: ap-northeast-1
header: x-amz-request-id: A63B39B85D7E91DF
header: x-amz-id-2: BcZpRKNNvxorP7jG7SZE6RgcwFulAkuQDMBqw/q0C3DI6meKksIeZBYaeUD7pF3Xi3Mp5QjdObo=
header: Content-Type: application/xml
header: Transfer-Encoding: chunked
header: Date: Fri, 21 Jul 2017 08:01:49 GMT
header: Server: AmazonS3
DEBUG:urllib3.connectionpool:https://s3.amazonaws.com:443 "HEAD /other-bucket HTTP/1.1" 301 0
9
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): google.com
send: 'HEAD /other-bucket HTTP/1.1\r\nHost: google.com\r\nConnection: keep-alive\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nUser-Agent: python-requests/2.18.1\r\n\r\n'
reply: 'HTTP/1.1 404 Not Found\r\n'
header: Content-Type: text/html; charset=UTF-8
header: Referrer-Policy: no-referrer
header: Content-Length: 1573
header: Date: Fri, 21 Jul 2017 08:01:50 GMT
header: Alt-Svc: quic=":443"; ma=2592000; v="39,38,37,36,35"
DEBUG:urllib3.connectionpool:https://google.com:443 "HEAD /other-bucket HTTP/1.1" 404 0
10
```
As far as I can tell, this bug has been present ever since the `read_chunked()` method was introduced in urllib3.Response in 1.10.3. | {
"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/4199/reactions"
} | https://api.github.com/repos/psf/requests/issues/4199/timeline | null | completed | null | null | false | [
"As we don't vendor in urllib3 anymore, we don't need to open bug reports to track upstream issues. Thanks anyway!",
"Pursuant to @Lukasa 's comment, I'm closing this (as I suspect that was what he intended to do)"
] |
https://api.github.com/repos/psf/requests/issues/4198 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4198/labels{/name} | https://api.github.com/repos/psf/requests/issues/4198/comments | https://api.github.com/repos/psf/requests/issues/4198/events | https://github.com/psf/requests/pull/4198 | 244,557,159 | MDExOlB1bGxSZXF1ZXN0MTMxNjkzMzEx | 4,198 | redundant comma | {
"avatar_url": "https://avatars.githubusercontent.com/u/9360340?v=4",
"events_url": "https://api.github.com/users/andportnoy/events{/privacy}",
"followers_url": "https://api.github.com/users/andportnoy/followers",
"following_url": "https://api.github.com/users/andportnoy/following{/other_user}",
"gists_url": "https://api.github.com/users/andportnoy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/andportnoy",
"id": 9360340,
"login": "andportnoy",
"node_id": "MDQ6VXNlcjkzNjAzNDA=",
"organizations_url": "https://api.github.com/users/andportnoy/orgs",
"received_events_url": "https://api.github.com/users/andportnoy/received_events",
"repos_url": "https://api.github.com/users/andportnoy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/andportnoy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/andportnoy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/andportnoy",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2017-07-21T03:49:32Z | 2021-09-05T00:07:09Z | 2017-07-21T06:05:11Z | NONE | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4198/reactions"
} | https://api.github.com/repos/psf/requests/issues/4198/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4198.diff",
"html_url": "https://github.com/psf/requests/pull/4198",
"merged_at": "2017-07-21T06:05:11Z",
"patch_url": "https://github.com/psf/requests/pull/4198.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4198"
} | true | [] | |
https://api.github.com/repos/psf/requests/issues/4197 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4197/labels{/name} | https://api.github.com/repos/psf/requests/issues/4197/comments | https://api.github.com/repos/psf/requests/issues/4197/events | https://github.com/psf/requests/issues/4197 | 244,367,209 | MDU6SXNzdWUyNDQzNjcyMDk= | 4,197 | new relase of requests since urllib3 dep was bumped to 1.22 | {
"avatar_url": "https://avatars.githubusercontent.com/u/244702?v=4",
"events_url": "https://api.github.com/users/papachoco/events{/privacy}",
"followers_url": "https://api.github.com/users/papachoco/followers",
"following_url": "https://api.github.com/users/papachoco/following{/other_user}",
"gists_url": "https://api.github.com/users/papachoco/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/papachoco",
"id": 244702,
"login": "papachoco",
"node_id": "MDQ6VXNlcjI0NDcwMg==",
"organizations_url": "https://api.github.com/users/papachoco/orgs",
"received_events_url": "https://api.github.com/users/papachoco/received_events",
"repos_url": "https://api.github.com/users/papachoco/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/papachoco/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/papachoco/subscriptions",
"type": "User",
"url": "https://api.github.com/users/papachoco",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2017-07-20T13:43:15Z | 2021-09-08T08:00:35Z | 2017-07-20T13:43:58Z | NONE | resolved | Could we get a new release of requests that uses urllib3 >=1.22 as dependency. Latest released version of requests has urllib3<1.22,>=1.21.1
Thanks
Carlos | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4197/reactions"
} | https://api.github.com/repos/psf/requests/issues/4197/timeline | null | completed | null | null | false | [
"See #4196. A new release is planned.",
"@Lukasa Is there a time frame on that release? Just looking for a ballpark, if possible.",
"@dmtucker Yeah, there is: early next week, realistically. We try to release on Tuesdays or Wednesdays to allow ops teams time to roll out releases (for boring compliance reasons s... |
https://api.github.com/repos/psf/requests/issues/4196 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4196/labels{/name} | https://api.github.com/repos/psf/requests/issues/4196/comments | https://api.github.com/repos/psf/requests/issues/4196/events | https://github.com/psf/requests/pull/4196 | 244,293,905 | MDExOlB1bGxSZXF1ZXN0MTMxNTA0MjIz | 4,196 | Allow urllib3 1.22 | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2017-07-20T09:09:54Z | 2021-09-05T00:07:09Z | 2017-07-20T11:52:12Z | MEMBER | resolved | Based on the changelog this should be safe for us to use. | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 2,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 2,
"url": "https://api.github.com/repos/psf/requests/issues/4196/reactions"
} | https://api.github.com/repos/psf/requests/issues/4196/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4196.diff",
"html_url": "https://github.com/psf/requests/pull/4196",
"merged_at": "2017-07-20T11:52:12Z",
"patch_url": "https://github.com/psf/requests/pull/4196.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4196"
} | true | [
"👍 ✨ "
] |
https://api.github.com/repos/psf/requests/issues/4195 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4195/labels{/name} | https://api.github.com/repos/psf/requests/issues/4195/comments | https://api.github.com/repos/psf/requests/issues/4195/events | https://github.com/psf/requests/pull/4195 | 244,278,858 | MDExOlB1bGxSZXF1ZXN0MTMxNDkzMjc3 | 4,195 | Use 'prefix' instead of 'key' in session docstring | {
"avatar_url": "https://avatars.githubusercontent.com/u/121219?v=4",
"events_url": "https://api.github.com/users/alexmuller/events{/privacy}",
"followers_url": "https://api.github.com/users/alexmuller/followers",
"following_url": "https://api.github.com/users/alexmuller/following{/other_user}",
"gists_url": "https://api.github.com/users/alexmuller/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alexmuller",
"id": 121219,
"login": "alexmuller",
"node_id": "MDQ6VXNlcjEyMTIxOQ==",
"organizations_url": "https://api.github.com/users/alexmuller/orgs",
"received_events_url": "https://api.github.com/users/alexmuller/received_events",
"repos_url": "https://api.github.com/users/alexmuller/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alexmuller/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alexmuller/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alexmuller",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2017-07-20T08:11:06Z | 2021-09-05T00:07:10Z | 2017-07-20T08:13:07Z | CONTRIBUTOR | resolved | This commit makes [the API docs](http://docs.python-requests.org/en/master/api/#requests.Session.mount) more clear. The 'key' is an implementation detail. | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4195/reactions"
} | https://api.github.com/repos/psf/requests/issues/4195/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4195.diff",
"html_url": "https://github.com/psf/requests/pull/4195",
"merged_at": "2017-07-20T08:13:06Z",
"patch_url": "https://github.com/psf/requests/pull/4195.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4195"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/4194 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4194/labels{/name} | https://api.github.com/repos/psf/requests/issues/4194/comments | https://api.github.com/repos/psf/requests/issues/4194/events | https://github.com/psf/requests/pull/4194 | 244,039,630 | MDExOlB1bGxSZXF1ZXN0MTMxMzIwNTk4 | 4,194 | compat.py uses try/except to prevent linter errors | {
"avatar_url": "https://avatars.githubusercontent.com/u/3709715?v=4",
"events_url": "https://api.github.com/users/cclauss/events{/privacy}",
"followers_url": "https://api.github.com/users/cclauss/followers",
"following_url": "https://api.github.com/users/cclauss/following{/other_user}",
"gists_url": "https://api.github.com/users/cclauss/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cclauss",
"id": 3709715,
"login": "cclauss",
"node_id": "MDQ6VXNlcjM3MDk3MTU=",
"organizations_url": "https://api.github.com/users/cclauss/orgs",
"received_events_url": "https://api.github.com/users/cclauss/received_events",
"repos_url": "https://api.github.com/users/cclauss/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cclauss/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cclauss/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cclauss",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2017-07-19T13:25:34Z | 2021-09-05T00:07:10Z | 2017-07-19T13:28:22Z | CONTRIBUTOR | resolved | flake8 testing of https://github.com/requests/requests on Python 3.6.2
$ __time flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics__
```
./requests/compat.py:53:11: F821 undefined name 'unicode'
str = unicode
^
./requests/compat.py:54:18: F821 undefined name 'basestring'
basestring = basestring
^
./requests/compat.py:55:27: F821 undefined name 'long'
numeric_types = (int, long, float)
^
./requests/compat.py:56:27: F821 undefined name 'long'
integer_types = (int, long)
^
./requests/models.py:357:19: F821 undefined name 'unicode'
url = unicode(url) if is_py2 else str(url)
^
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"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/4194/reactions"
} | https://api.github.com/repos/psf/requests/issues/4194/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4194.diff",
"html_url": "https://github.com/psf/requests/pull/4194",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4194.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4194"
} | true | [
"Thanks for this! However, I'm not concerned about the linter errors here because any moderately intelligent static analysis tool could tell you that they're not a concern. So I don't think this patch provides any particular value to the project. Sorry!",
"Understood. Is there a better linter that you would reco... |
https://api.github.com/repos/psf/requests/issues/4193 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4193/labels{/name} | https://api.github.com/repos/psf/requests/issues/4193/comments | https://api.github.com/repos/psf/requests/issues/4193/events | https://github.com/psf/requests/issues/4193 | 244,009,553 | MDU6SXNzdWUyNDQwMDk1NTM= | 4,193 | requests 2.18.1 with proxies throw SSLError: ("bad handshake: SysCallError(-1, 'Unexpected EOF')",) | {
"avatar_url": "https://avatars.githubusercontent.com/u/9978183?v=4",
"events_url": "https://api.github.com/users/chen2aaron/events{/privacy}",
"followers_url": "https://api.github.com/users/chen2aaron/followers",
"following_url": "https://api.github.com/users/chen2aaron/following{/other_user}",
"gists_url": "https://api.github.com/users/chen2aaron/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/chen2aaron",
"id": 9978183,
"login": "chen2aaron",
"node_id": "MDQ6VXNlcjk5NzgxODM=",
"organizations_url": "https://api.github.com/users/chen2aaron/orgs",
"received_events_url": "https://api.github.com/users/chen2aaron/received_events",
"repos_url": "https://api.github.com/users/chen2aaron/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/chen2aaron/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/chen2aaron/subscriptions",
"type": "User",
"url": "https://api.github.com/users/chen2aaron",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2017-07-19T11:31:22Z | 2021-09-08T08:00:36Z | 2017-07-19T11:51:08Z | NONE | resolved | Hi,
When I use requests 2.18.1 with proxies, it throw SSLError: ("bad handshake: SysCallError(-1, 'Unexpected EOF')",)
## Scenario 1
Debian GNU/Linux 8
Python 3.6.1
OpenSSL 1.0.1t
pip list:
certifi (2017.4.17)
cryptography (2.0)
ndg-httpsclient (0.4.2)
pip (9.0.1)
pyasn1 (0.2.3)
pycparser (2.18)
pyldap (2.4.35.1)
pyOpenSSL (17.1.0)
PySocks (1.6.7)
requests (2.18.1)
requests-toolbelt (0.8.0)
setuptools (36.0.1)
six (1.10.0)
urllib3 (1.21.1)
My code:
```
import requests
proxies={'http':'socks5://127.0.0.1:8388', 'https': 'socks5://127.0.0.1:8388'}
r=requests.get('https://twitter.com',proxies=proxies)
```
Error message:
```
File "/venv/lib/python3.6/site-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: ("bad handshake: SysCallError(-1, 'Unexpected EOF')",)
```
When I degrade requests=2.11.1
The error gone.
## Scenario 2
MacOS Sierra
Python 3.6.1
OpenSSL 1.0.2l
pip list:
The same as above
It also return the same error message
And also when I degrade requests=2.11.1
The error gone.
I want to know what the reason is, help me~ thanks | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"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/4193/reactions"
} | https://api.github.com/repos/psf/requests/issues/4193/timeline | null | completed | null | null | false | [
"This is almost certainly because we removed 3DES from our default cipher suite list. Try following the steps [in this blog post](https://lukasa.co.uk/2017/02/Configuring_TLS_With_Requests/) to see if that resolves your issue.",
"Thanks, it resolved my problem\r\n"
] |
https://api.github.com/repos/psf/requests/issues/4192 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4192/labels{/name} | https://api.github.com/repos/psf/requests/issues/4192/comments | https://api.github.com/repos/psf/requests/issues/4192/events | https://github.com/psf/requests/pull/4192 | 243,152,877 | MDExOlB1bGxSZXF1ZXN0MTMwNzAzMzk2 | 4,192 | Add requirements.txt to MANIFEST.in | {
"avatar_url": "https://avatars.githubusercontent.com/u/1011612?v=4",
"events_url": "https://api.github.com/users/koobs/events{/privacy}",
"followers_url": "https://api.github.com/users/koobs/followers",
"following_url": "https://api.github.com/users/koobs/following{/other_user}",
"gists_url": "https://api.github.com/users/koobs/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/koobs",
"id": 1011612,
"login": "koobs",
"node_id": "MDQ6VXNlcjEwMTE2MTI=",
"organizations_url": "https://api.github.com/users/koobs/orgs",
"received_events_url": "https://api.github.com/users/koobs/received_events",
"repos_url": "https://api.github.com/users/koobs/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/koobs/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/koobs/subscriptions",
"type": "User",
"url": "https://api.github.com/users/koobs",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2017-07-15T04:45:56Z | 2021-09-05T00:07:10Z | 2017-07-15T06:39:02Z | CONTRIBUTOR | resolved | Three tests [1] rely on `requirements.txt` being available. If the file is not present, the following error is observed in those tests:
```
> with open('requirements.txt') as f:
E IOError: [Errno 2] No such file or directory: 'requirements.txt'
```
The latest (2.18.1) source distribution on PyPI does not include requirements.txt, which precludes successfully passing the tests.
This change adds the required file to the source distribution. An alternative is to use a different file already included in the sdist.
Additionally, skipping tests if a required resource (library, file, etc) is not available would be a user experience improvement.
[1] test_POSTBIN_GET_POST_FILES, test_POSTBIN_GET_POST_FILES_WITH_DATA, test_conflicting_post_params,
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"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/4192/reactions"
} | https://api.github.com/repos/psf/requests/issues/4192/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4192.diff",
"html_url": "https://github.com/psf/requests/pull/4192",
"merged_at": "2017-07-15T06:39:02Z",
"patch_url": "https://github.com/psf/requests/pull/4192.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4192"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/4191 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4191/labels{/name} | https://api.github.com/repos/psf/requests/issues/4191/comments | https://api.github.com/repos/psf/requests/issues/4191/events | https://github.com/psf/requests/issues/4191 | 242,422,950 | MDU6SXNzdWUyNDI0MjI5NTA= | 4,191 | Possible Memory Leak | {
"avatar_url": "https://avatars.githubusercontent.com/u/2804731?v=4",
"events_url": "https://api.github.com/users/le1nux/events{/privacy}",
"followers_url": "https://api.github.com/users/le1nux/followers",
"following_url": "https://api.github.com/users/le1nux/following{/other_user}",
"gists_url": "https://api.github.com/users/le1nux/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/le1nux",
"id": 2804731,
"login": "le1nux",
"node_id": "MDQ6VXNlcjI4MDQ3MzE=",
"organizations_url": "https://api.github.com/users/le1nux/orgs",
"received_events_url": "https://api.github.com/users/le1nux/received_events",
"repos_url": "https://api.github.com/users/le1nux/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/le1nux/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/le1nux/subscriptions",
"type": "User",
"url": "https://api.github.com/users/le1nux",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 23 | 2017-07-12T15:32:40Z | 2021-09-01T00:11:38Z | 2017-07-29T10:59:05Z | NONE | resolved | I'm crawling a lot of different URLs using the requests library and I encountered that the process takes more and more RAM over time.
Basically all I do is calling this iteratively from multiple threads:
```{python}
r = requests.get(url=url, timeout=timeout)
content = r.text
```
when I comment out the second line this issue does not occur ... am I using the library fundamentally wrong or could this actually be a bug? | {
"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/4191/reactions"
} | https://api.github.com/repos/psf/requests/issues/4191/timeline | null | completed | null | null | false | [
"What are you doing with the content? What's the rate of memory growth? Can you try following [this blog post](http://tech.labs.oliverwyman.com/blog/2008/11/14/tracing-python-memory-leaks/) to gather data about *what* objects are being retained, ideally after your memory has grown very substantially (e.g. to more t... |
https://api.github.com/repos/psf/requests/issues/4190 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4190/labels{/name} | https://api.github.com/repos/psf/requests/issues/4190/comments | https://api.github.com/repos/psf/requests/issues/4190/events | https://github.com/psf/requests/issues/4190 | 242,323,252 | MDU6SXNzdWUyNDIzMjMyNTI= | 4,190 | Use requests for python2.7.13 scarping error | {
"avatar_url": "https://avatars.githubusercontent.com/u/6219520?v=4",
"events_url": "https://api.github.com/users/liaoran/events{/privacy}",
"followers_url": "https://api.github.com/users/liaoran/followers",
"following_url": "https://api.github.com/users/liaoran/following{/other_user}",
"gists_url": "https://api.github.com/users/liaoran/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/liaoran",
"id": 6219520,
"login": "liaoran",
"node_id": "MDQ6VXNlcjYyMTk1MjA=",
"organizations_url": "https://api.github.com/users/liaoran/orgs",
"received_events_url": "https://api.github.com/users/liaoran/received_events",
"repos_url": "https://api.github.com/users/liaoran/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/liaoran/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/liaoran/subscriptions",
"type": "User",
"url": "https://api.github.com/users/liaoran",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2017-07-12T09:55:53Z | 2021-09-08T08:00:37Z | 2017-07-12T11:40:28Z | NONE | resolved | # request version
2.14.2
# os information
Linux programmer 4.8.0-58-generic #63~16.04.1-Ubuntu SMP Mon Jun 26 18:08:51 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
# code
```python
def get_html(url):
headers = {'User-Agent':'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36'}
request = requests.get(url=url,headers=headers) #发送get请求
response = request.content #获取网页内容
return response
def get_img_html(html):
soup = BeautifulSoup(html,'lxml') #解析网页
all_a = soup.find_all('a',class_ = 'list-group-item') #找到a标签
for i in all_a:
img_html = get_html(i['href']) #获取超链接的网页内容
print img_html #网页源码
def get_img(html):
soup = etree.HTML(html) #初始化源码
items = soup.xpath('//div[@class="artile_des"]') #找这个盒子下面的内容
for item in items:
imgurl_list = item.xpath('table/tbody/tr/td/a/img/@onerror') #选取属性
start_save_img(imgurl_list)
def save_img(img_url):
img_url = img_url.split('=')[-1][1:-2].replace('jp','jpg') #分割
print u"正在下载" + 'http:' + img_url
img_content = requests.get('http:' + img_url).content
with open('doutu/%s' % img_url.split('/')[-1],'wb') as f:
f.write(img_content)
def start_save_img(imgurl_list):
for i in imgurl_list:
print i
th = threading.Thread(target=save_img,args=(i,))
th.start()
def main():
start_url = 'https://www.doutula.com/article/list/?page='
for i in range(1,10):
start_html = get_html(start_url.format(i))
get_img_html(start_html)
if __name__ == '__main__':
main()
```
# Error
```
/home/kongnian/anaconda2/bin/python /home/kongnian/PycharmProjects/Scraping/DouTuScraping.py
Traceback (most recent call last):
File "/home/kongnian/PycharmProjects/Scraping/DouTuScraping.py", line 52, in <module>
main()
File "/home/kongnian/PycharmProjects/Scraping/DouTuScraping.py", line 48, in main
start_html = get_html(start_url.format(i))
File "/home/kongnian/PycharmProjects/Scraping/DouTuScraping.py", line 10, in get_html
request = requests.get(url=url,headers=headers) #发送get请求
File "/home/kongnian/anaconda2/lib/python2.7/site-packages/requests/api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "/home/kongnian/anaconda2/lib/python2.7/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/home/kongnian/anaconda2/lib/python2.7/site-packages/requests/sessions.py", line 518, in request
resp = self.send(prep, **send_kwargs)
File "/home/kongnian/anaconda2/lib/python2.7/site-packages/requests/sessions.py", line 639, in send
r = adapter.send(request, **kwargs)
File "/home/kongnian/anaconda2/lib/python2.7/site-packages/requests/adapters.py", line 512, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: ("bad handshake: SysCallError(104, 'ECONNRESET')",)
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4190/reactions"
} | https://api.github.com/repos/psf/requests/issues/4190/timeline | null | completed | null | null | false | [
"In this context it seems like the connection is being closed as we send more data. Rude, but not entirely unusual. Does it happen deterministically or only occasionally?",
"Yesterday normal, today an error occurred.",
"If this is intermittent then I think you just have to tolerate this as being \"network weath... |
https://api.github.com/repos/psf/requests/issues/4189 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4189/labels{/name} | https://api.github.com/repos/psf/requests/issues/4189/comments | https://api.github.com/repos/psf/requests/issues/4189/events | https://github.com/psf/requests/issues/4189 | 241,592,257 | MDU6SXNzdWUyNDE1OTIyNTc= | 4,189 | Sometimes it happens, What can I sove this? Thanks a lot. | {
"avatar_url": "https://avatars.githubusercontent.com/u/19851699?v=4",
"events_url": "https://api.github.com/users/liangrengongzuoshi/events{/privacy}",
"followers_url": "https://api.github.com/users/liangrengongzuoshi/followers",
"following_url": "https://api.github.com/users/liangrengongzuoshi/following{/other_user}",
"gists_url": "https://api.github.com/users/liangrengongzuoshi/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/liangrengongzuoshi",
"id": 19851699,
"login": "liangrengongzuoshi",
"node_id": "MDQ6VXNlcjE5ODUxNjk5",
"organizations_url": "https://api.github.com/users/liangrengongzuoshi/orgs",
"received_events_url": "https://api.github.com/users/liangrengongzuoshi/received_events",
"repos_url": "https://api.github.com/users/liangrengongzuoshi/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/liangrengongzuoshi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/liangrengongzuoshi/subscriptions",
"type": "User",
"url": "https://api.github.com/users/liangrengongzuoshi",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2017-07-10T03:47:39Z | 2021-09-08T08:00:37Z | 2017-07-10T07:21:22Z | NONE | resolved | HTTPConnectionPool(host='xxx', port=xxx): Max retries exceeded with url: /Upload/Processing.aspx (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f79f9c9c1d0>: Failed to establish a new connection: [Errno 113] No route to host',))
Traceback (most recent call last):
File "/data/apps/browser_9090/UuwiseUtil.py", line 131, in uploadPic
resp = requests.post("http://" + self.UPLOAD_SERVER + "/Upload/Processing.aspx", data=data , files=files, headers=headers)
File "/home/python27/lib/python2.7/site-packages/requests/api.py", line 112, in post
return request('post', url, data=data, json=json, **kwargs)
File "/home/python27/lib/python2.7/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/home/python27/lib/python2.7/site-packages/requests/sessions.py", line 502, in request
resp = self.send(prep, **send_kwargs)
File "/home/python27/lib/python2.7/site-packages/requests/sessions.py", line 612, in send
r = adapter.send(request, **kwargs)
File "/home/python27/lib/python2.7/site-packages/requests/adapters.py", line 504, in send
raise ConnectionError(e, request=request)
ConnectionError: HTTPConnectionPool(host='xxx', port=xxx): Max retries exceeded with url: /Upload/Processing.aspx (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f79f9c9c1d0>: Failed to establish a new connection: [Errno 113] No route to host',))
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4189/reactions"
} | https://api.github.com/repos/psf/requests/issues/4189/timeline | null | completed | null | null | false | [
"This error is systemic: it means that when we attempted to connect to the IP address returned by DNS, the operating system told us it didn't know how to get there. This is not really a thing we can fix: when you get this error, you should just retry.",
"Thanks for your answer.\r\n\r\nIt just happens sometimes.\r... |
https://api.github.com/repos/psf/requests/issues/4188 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4188/labels{/name} | https://api.github.com/repos/psf/requests/issues/4188/comments | https://api.github.com/repos/psf/requests/issues/4188/events | https://github.com/psf/requests/pull/4188 | 241,472,446 | MDExOlB1bGxSZXF1ZXN0MTI5NTM4NDM2 | 4,188 | Make username:pass@host URLs play nice with NO_PROXY environment variable | {
"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 | false | null | [] | null | 2 | 2017-07-08T18:46:33Z | 2018-04-29T19:08:16Z | 2018-04-29T19:08:16Z | NONE | null | Fixes issue #4158. | {
"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/4188/reactions"
} | https://api.github.com/repos/psf/requests/issues/4188/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4188.diff",
"html_url": "https://github.com/psf/requests/pull/4188",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4188.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4188"
} | true | [
"Is there any progress so far? we also having problem with that bug!",
"It looks like this ended up getting resolved in #4427, so I'm closing this as resolved. Thanks for the effort here @ghost."
] |
https://api.github.com/repos/psf/requests/issues/4187 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4187/labels{/name} | https://api.github.com/repos/psf/requests/issues/4187/comments | https://api.github.com/repos/psf/requests/issues/4187/events | https://github.com/psf/requests/issues/4187 | 241,197,729 | MDU6SXNzdWUyNDExOTc3Mjk= | 4,187 | UTF-8 characters unable to handle in headers. | {
"avatar_url": "https://avatars.githubusercontent.com/u/924698?v=4",
"events_url": "https://api.github.com/users/hrimfaxi/events{/privacy}",
"followers_url": "https://api.github.com/users/hrimfaxi/followers",
"following_url": "https://api.github.com/users/hrimfaxi/following{/other_user}",
"gists_url": "https://api.github.com/users/hrimfaxi/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hrimfaxi",
"id": 924698,
"login": "hrimfaxi",
"node_id": "MDQ6VXNlcjkyNDY5OA==",
"organizations_url": "https://api.github.com/users/hrimfaxi/orgs",
"received_events_url": "https://api.github.com/users/hrimfaxi/received_events",
"repos_url": "https://api.github.com/users/hrimfaxi/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hrimfaxi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hrimfaxi/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hrimfaxi",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 14 | 2017-07-07T08:45:34Z | 2021-09-08T08:00:38Z | 2017-07-07T08:48:42Z | NONE | resolved | requests is unable to handle utf-8 characters in headers.
http://assrt.net/download/217234/%E6%A4%8D%E7%89%A9%E7%8E%8B%E5%9B%BD%E7%AC%AC%E4%BA%8C%E9%9B%86%E8%93%9D%E5%85%89%E7%89%88%E4%B8%AD%E8%8B%B1%E6%96%87%E5%8F%8A%E5%8F%8C%E8%AF%AD%E5%AD%97%E5%B9%95.rar
## Expected Result
Content-Disposition should be subtitle; filename="植物王国第三集蓝光版中英文及双语字幕.rar"
## Actual Result
{'Cache-Control': 'max-age=2678400', 'X-Cache': 'MISS', 'Expires': 'Mon, 07 Aug 2017 08:16:04 GMT', 'Server': 'openresty', 'Content-Disposition': 'subtitle; filename="æ¤\x8dç\x89©ç\x8e\x8bå\x9b½ç¬¬äº\x8cé\x9b\x86è\x93\x9då\x85', 'Connection': 'keep-alive', 'Date': 'Fri, 07 Jul 2017 08:16:04 GMT', 'Content-Length': '62859', 'Servant': 'Berserker', 'ETag': '"56f296fd-f58b"', 'Content-Type': 'application/octet-stream', 'Last-Modified': 'Wed, 23 Mar 2016 13:15:41 GMT'}
Content-Disposition is corrupted with last characters:
>>> a.headers['content-disposition'].encode('iso8859-1').decode('utf-8', errors='ignore')
'subtitle; filename="植物王国第三集蓝'
## Reproduction Steps
## System Information
$ python -m requests.help
```
hrimfaxi@ubuntu-build-server:~/aasrt$ python3 -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"implementation": {
"name": "CPython",
"version": "3.5.2"
},
"platform": {
"release": "4.7.4+",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.1"
},
"system_ssl": {
"version": "1000207f"
},
"urllib3": {
"version": "1.21.1"
},
"using_pyopenssl": false
}
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4187/reactions"
} | https://api.github.com/repos/psf/requests/issues/4187/timeline | null | completed | null | null | false | [
"On Python 3 the header decoding is actually done by the Python standard library. This decodes headers using Latin-1, so you can resolve this issue by doing `headers['content-disposition'].encode('iso-8859-1').decode('utf-8')`.\r\n\r\nSadly, there is no guaranteed header encoding for headers, so this approach (whil... |
https://api.github.com/repos/psf/requests/issues/4186 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4186/labels{/name} | https://api.github.com/repos/psf/requests/issues/4186/comments | https://api.github.com/repos/psf/requests/issues/4186/events | https://github.com/psf/requests/issues/4186 | 240,484,062 | MDU6SXNzdWUyNDA0ODQwNjI= | 4,186 | Request with Empty Content Throws Errors When `.json()` is Called | {
"avatar_url": "https://avatars.githubusercontent.com/u/702729?v=4",
"events_url": "https://api.github.com/users/joshmgrant/events{/privacy}",
"followers_url": "https://api.github.com/users/joshmgrant/followers",
"following_url": "https://api.github.com/users/joshmgrant/following{/other_user}",
"gists_url": "https://api.github.com/users/joshmgrant/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/joshmgrant",
"id": 702729,
"login": "joshmgrant",
"node_id": "MDQ6VXNlcjcwMjcyOQ==",
"organizations_url": "https://api.github.com/users/joshmgrant/orgs",
"received_events_url": "https://api.github.com/users/joshmgrant/received_events",
"repos_url": "https://api.github.com/users/joshmgrant/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/joshmgrant/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/joshmgrant/subscriptions",
"type": "User",
"url": "https://api.github.com/users/joshmgrant",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 9 | 2017-07-04T19:04:32Z | 2021-09-08T08:00:38Z | 2017-07-04T19:33:17Z | NONE | resolved | I'm running into an issue where calling `.json()` on a response with empty content is resulting in JSON errors.
## Expected Result
Calling `response.json()` results in creating some object that can be used appropriately by other functions.
## Actual Result
Calling `response.json()` results in a `KeyError`.
## Reproduction Steps
```python
session = requests.Session()
response = self.session.delete(
"{}{}".format(self.url, "api/delete_entity/123"),
data=json.dumps(valid_data),
headers=self.headers
)
return response.json()
```
The response above looks like this:
```python
response = {Response} <Response [204]>
_content = {bytes} b''
_content_consumed = {bool} True
apparent_encoding = {NoneType} None
connection = {HTTPAdapter} <requests.adapters.HTTPAdapter object at 0x104b71eb8>
content = {bytes} b''
cookies = {RequestsCookieJar} <RequestsCookieJar[<Cookie sessionid=XXX for 10.8.8.8/>]>
elapsed = {timedelta} 0:00:00.080925
encoding = {NoneType} None
headers = {CaseInsensitiveDict} {'Content-Length': '0', 'Vary': 'Accept, Cookie', 'Allow': 'GET, PUT, PATCH, DELETE, HEAD, OPTIONS', 'Server': 'nginx/1.4.6 (Ubuntu)', 'Connection': 'keep-alive', 'Set-Cookie': 'sessionid=XXX; expires=Wed, 05-Jul-2017 02:54:47
history = {list} <class 'list'>: []
is_permanent_redirect = {bool} False
is_redirect = {bool} False
links = {dict} {}
ok = {bool} True
raw = {HTTPResponse} <requests.packages.urllib3.response.HTTPResponse object at 0x104b632b0>
reason = {str} 'No Content'
request = {PreparedRequest} <PreparedRequest [DELETE]>
status_code = {int} 204
text = {str} ''
url = {str} 'http://10.8.8.8:8888/api/delete_entity/123'
```
## System Information
```
OS: MacOS Sierra 10.12.5
Python: 3.4.3 and Python 3.6.1
Requests: 2.18.1
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4186/reactions"
} | https://api.github.com/repos/psf/requests/issues/4186/timeline | null | completed | null | null | false | [
"Requests 2.13 is very old. This problem should be resolved by updating Requests.",
"This also occurrs using requests 2.18.1. I'll update the issue.",
"Can you provide the full traceback please?",
"Here's a traceback from a pytest run. Some values have been replaced with ### for security reasons (but those ##... |
https://api.github.com/repos/psf/requests/issues/4185 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4185/labels{/name} | https://api.github.com/repos/psf/requests/issues/4185/comments | https://api.github.com/repos/psf/requests/issues/4185/events | https://github.com/psf/requests/issues/4185 | 240,481,029 | MDU6SXNzdWUyNDA0ODEwMjk= | 4,185 | Allow feeding certificates via buffer (instead of path) | {
"avatar_url": "https://avatars.githubusercontent.com/u/3209700?v=4",
"events_url": "https://api.github.com/users/mdaize/events{/privacy}",
"followers_url": "https://api.github.com/users/mdaize/followers",
"following_url": "https://api.github.com/users/mdaize/following{/other_user}",
"gists_url": "https://api.github.com/users/mdaize/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mdaize",
"id": 3209700,
"login": "mdaize",
"node_id": "MDQ6VXNlcjMyMDk3MDA=",
"organizations_url": "https://api.github.com/users/mdaize/orgs",
"received_events_url": "https://api.github.com/users/mdaize/received_events",
"repos_url": "https://api.github.com/users/mdaize/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mdaize/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mdaize/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mdaize",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2017-07-04T18:38:01Z | 2021-09-08T08:00:36Z | 2017-07-20T11:17:12Z | NONE | resolved | Summary.
* I am trying to make a certificate-based request to an external URL using requests.get. I am trying to feed it the output of a call from the crypto library but it only allows paths.
What you expected.
* I should be able to feed `cert=(certificate, private_key)` as part of a request with byte strings instead of file paths (of course in addition to)
* This allows one to possibly avoid storing private keys at the path level and instead import a secured container (JKS for example) containing the key
What happened instead.
The request call seems to only take a file path and results in an error unable to find the file:
```OSError: Could not find the TLS certificate file, invalid path: b'-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n```
## Reproduction Steps
```python
import requests
import crypto
# Omitting argparse, file.read() commands for brevity in this example
p12 = crypto.load_pkcs12(keystoreFile, keystorePassphrase)
# These following commands output the contents of the loaded keystore
# In order to work around the error, they need to be redirected to new files (certificate.file, private_key.file
# These new file paths needs to be provided to the `requests.get` call
cert = crypto.dump_certificate(crypto.FILETYPE_PEM, p12.get_certificate())
caPem = crypto.dump_privatekey(crypto.FILETYPE_PEM, p12.get_privatekey())
resp = requests.get(APIURL, cert=(cert, caPem), verify=False)
```
## System Information
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "1.9"
},
"implementation": {
"name": "CPython",
"version": "3.6.1"
},
"platform": {
"release": "16.6.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "1010006f",
"version": "17.1.0"
},
"requests": {
"version": "2.18.1"
},
"system_ssl": {
"version": "100020cf"
},
"urllib3": {
"version": "1.21.1"
},
"using_pyopenssl": true
}
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4185/reactions"
} | https://api.github.com/repos/psf/requests/issues/4185/timeline | null | completed | null | null | false | [
"So this is a sufficiently unusual use-case that we recommend solving this by passing a [`SSLContext` directly](https://lukasa.co.uk/2017/02/Configuring_TLS_With_Requests/). This can be configured with the appropriate client certs loaded from the underlying library as appropriate.\r\n\r\nDoes that sufficiently addr... |
https://api.github.com/repos/psf/requests/issues/4184 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4184/labels{/name} | https://api.github.com/repos/psf/requests/issues/4184/comments | https://api.github.com/repos/psf/requests/issues/4184/events | https://github.com/psf/requests/issues/4184 | 240,394,262 | MDU6SXNzdWUyNDAzOTQyNjI= | 4,184 | Allow hooking (de)compression | {
"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 | 2017-07-04T11:33:24Z | 2021-09-08T08:00:39Z | 2017-07-04T13:28:20Z | NONE | resolved | I have searched the repo for strings "gzip", "zlib" and have not found this packages imported. It seems that (de)compression is done implicitly somewhere. It poses some problems, for example if I want to add support of some compression/decompression algo like brotli.
## Expected Result
There should be a dict mapping compression algo name from http headers to (de)compresssion function.
## Actual Result
I have not found such one. | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4184/reactions"
} | https://api.github.com/repos/psf/requests/issues/4184/timeline | null | completed | null | null | false | [
"I don't think there is any need for this. I think it'll be sufficient to wrap the `read` function in the response object to achieve this goal. "
] |
https://api.github.com/repos/psf/requests/issues/4183 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4183/labels{/name} | https://api.github.com/repos/psf/requests/issues/4183/comments | https://api.github.com/repos/psf/requests/issues/4183/events | https://github.com/psf/requests/pull/4183 | 240,282,436 | MDExOlB1bGxSZXF1ZXN0MTI4NzA2MzA3 | 4,183 | Fix help ssl check | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2017-07-03T23:47:34Z | 2021-09-05T00:07:11Z | 2017-07-04T08:16:03Z | MEMBER | resolved | This will resolve the test failures discovered in #4182. We were retrieving the `OPENSSL_VERSION_NUMBER` from the system `ssl` module in all cases before now. This attribute doesn't exist in Python 2.6 causing new tests for the `info()` method to fail. This patch will return an empty value for Python 2.6 since we don't seem to have a way to reliably check the openssl version.
@Lukasa @sigmavirus24, I've pushed this branch up to the requests repo directly, so feel free to chop this up or do anything you feel is necessary to get #4182 moving. I don't know that the provided test is especially useful, but it does show that the fix here works. | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4183/reactions"
} | https://api.github.com/repos/psf/requests/issues/4183/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4183.diff",
"html_url": "https://github.com/psf/requests/pull/4183",
"merged_at": "2017-07-04T08:16:03Z",
"patch_url": "https://github.com/psf/requests/pull/4183.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4183"
} | true | [
"Also, does this need a changelog entry?",
"@alexwlchan, we historically haven't done changelog entries with PRs in Requests, but I know @Lukasa has chosen to ask for that in other projects. Perhaps it's worth asking if we want to consider moving to that here, or continue to compile them once before a release."
] |
https://api.github.com/repos/psf/requests/issues/4182 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4182/labels{/name} | https://api.github.com/repos/psf/requests/issues/4182/comments | https://api.github.com/repos/psf/requests/issues/4182/events | https://github.com/psf/requests/pull/4182 | 240,275,443 | MDExOlB1bGxSZXF1ZXN0MTI4NzAxNDM4 | 4,182 | Add idna version info to requests.help | {
"avatar_url": "https://avatars.githubusercontent.com/u/301220?v=4",
"events_url": "https://api.github.com/users/alexwlchan/events{/privacy}",
"followers_url": "https://api.github.com/users/alexwlchan/followers",
"following_url": "https://api.github.com/users/alexwlchan/following{/other_user}",
"gists_url": "https://api.github.com/users/alexwlchan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alexwlchan",
"id": 301220,
"login": "alexwlchan",
"node_id": "MDQ6VXNlcjMwMTIyMA==",
"organizations_url": "https://api.github.com/users/alexwlchan/orgs",
"received_events_url": "https://api.github.com/users/alexwlchan/received_events",
"repos_url": "https://api.github.com/users/alexwlchan/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alexwlchan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alexwlchan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alexwlchan",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 11 | 2017-07-03T22:32:02Z | 2021-09-05T00:07:07Z | 2017-07-27T20:54:10Z | CONTRIBUTOR | resolved | Resolves #4180. | {
"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/4182/reactions"
} | https://api.github.com/repos/psf/requests/issues/4182/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4182.diff",
"html_url": "https://github.com/psf/requests/pull/4182",
"merged_at": "2017-07-27T20:54:10Z",
"patch_url": "https://github.com/psf/requests/pull/4182.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4182"
} | true | [
"I’d try to fix the failing tests, but I can’t see the Jenkins instance so I don’t know what’s gone wrong. 😕 \r\n\r\n(My two new tests seem like obvious culprits, but they’re passing locally.)",
"Hey @alexwlchan, the two new tests are failing but I don't believe it's related to your patch. Jenkins is complaining... |
https://api.github.com/repos/psf/requests/issues/4181 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4181/labels{/name} | https://api.github.com/repos/psf/requests/issues/4181/comments | https://api.github.com/repos/psf/requests/issues/4181/events | https://github.com/psf/requests/issues/4181 | 239,822,221 | MDU6SXNzdWUyMzk4MjIyMjE= | 4,181 | RFE: partial_updates | {
"avatar_url": "https://avatars.githubusercontent.com/u/1143630?v=4",
"events_url": "https://api.github.com/users/sergiomb2/events{/privacy}",
"followers_url": "https://api.github.com/users/sergiomb2/followers",
"following_url": "https://api.github.com/users/sergiomb2/following{/other_user}",
"gists_url": "https://api.github.com/users/sergiomb2/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sergiomb2",
"id": 1143630,
"login": "sergiomb2",
"node_id": "MDQ6VXNlcjExNDM2MzA=",
"organizations_url": "https://api.github.com/users/sergiomb2/orgs",
"received_events_url": "https://api.github.com/users/sergiomb2/received_events",
"repos_url": "https://api.github.com/users/sergiomb2/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sergiomb2/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sergiomb2/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sergiomb2",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2017-06-30T16:01:07Z | 2021-09-08T08:00:39Z | 2017-06-30T16:15:40Z | NONE | resolved | http://docs.python-requests.org/en/master/api/ already have it | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4181/reactions"
} | https://api.github.com/repos/psf/requests/issues/4181/timeline | null | completed | null | null | false | [
"Hi @sergiomb2,\r\n\r\nThanks for opening an issue. There's very little detail here about what issues or enhancements you are seeing or would like to see. As such, I'm closing this until that detail presents itself in one way or another.\r\n\r\nCheers,\r\nIan",
"OK , link [1] fooled me because only show (...) HT... |
https://api.github.com/repos/psf/requests/issues/4180 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4180/labels{/name} | https://api.github.com/repos/psf/requests/issues/4180/comments | https://api.github.com/repos/psf/requests/issues/4180/events | https://github.com/psf/requests/issues/4180 | 239,256,371 | MDU6SXNzdWUyMzkyNTYzNzE= | 4,180 | support idna.__version__ | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2017-06-28T18:36:41Z | 2021-09-08T08:00:32Z | 2017-07-27T20:54:10Z | CONTRIBUTOR | resolved | https://github.com/kjd/idna/issues/49#event-1142557883 | {
"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/4180/reactions"
} | https://api.github.com/repos/psf/requests/issues/4180/timeline | null | completed | null | null | false | [] |
https://api.github.com/repos/psf/requests/issues/4179 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4179/labels{/name} | https://api.github.com/repos/psf/requests/issues/4179/comments | https://api.github.com/repos/psf/requests/issues/4179/events | https://github.com/psf/requests/pull/4179 | 238,890,786 | MDExOlB1bGxSZXF1ZXN0MTI3NzIzOTM0 | 4,179 | Fix chunked encoding with SSL via proxy | {
"avatar_url": "https://avatars.githubusercontent.com/u/614635?v=4",
"events_url": "https://api.github.com/users/jamespic/events{/privacy}",
"followers_url": "https://api.github.com/users/jamespic/followers",
"following_url": "https://api.github.com/users/jamespic/following{/other_user}",
"gists_url": "https://api.github.com/users/jamespic/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jamespic",
"id": 614635,
"login": "jamespic",
"node_id": "MDQ6VXNlcjYxNDYzNQ==",
"organizations_url": "https://api.github.com/users/jamespic/orgs",
"received_events_url": "https://api.github.com/users/jamespic/received_events",
"repos_url": "https://api.github.com/users/jamespic/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jamespic/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jamespic/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jamespic",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 14 | 2017-06-27T15:27:33Z | 2021-08-30T00:06:29Z | 2020-01-10T22:57:13Z | CONTRIBUTOR | resolved | This is a patch applying @bpitman's proposed fix for #3844.
Assuming a proxy is running on port 8875 (`docker run --rm --name='tinyproxy' -p 8875:8888 dannydirect/tinyproxy:latest ANY` works for me), the issue can be reproduced with
```
requests.put('https://www.google.com', data=iter('Hello World'), proxies={'https': 'http://localhost:8875'})
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/614635?v=4",
"events_url": "https://api.github.com/users/jamespic/events{/privacy}",
"followers_url": "https://api.github.com/users/jamespic/followers",
"following_url": "https://api.github.com/users/jamespic/following{/other_user}",
"gists_url": "https://api.github.com/users/jamespic/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jamespic",
"id": 614635,
"login": "jamespic",
"node_id": "MDQ6VXNlcjYxNDYzNQ==",
"organizations_url": "https://api.github.com/users/jamespic/orgs",
"received_events_url": "https://api.github.com/users/jamespic/received_events",
"repos_url": "https://api.github.com/users/jamespic/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jamespic/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jamespic/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jamespic",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4179/reactions"
} | https://api.github.com/repos/psf/requests/issues/4179/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4179.diff",
"html_url": "https://github.com/psf/requests/pull/4179",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4179.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4179"
} | true | [
"Why aren't we taking the approach I suggested in #3844?",
"@Lukasa I don't know the codebase that well, so I couldn't figure out exactly how the approach you'd proposed would fit in with the existing code - I tried getting rid of the chunked branch and just adding a `chunked` parameter to the `conn.urlopen`, but... |
https://api.github.com/repos/psf/requests/issues/4178 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4178/labels{/name} | https://api.github.com/repos/psf/requests/issues/4178/comments | https://api.github.com/repos/psf/requests/issues/4178/events | https://github.com/psf/requests/issues/4178 | 238,481,499 | MDU6SXNzdWUyMzg0ODE0OTk= | 4,178 | when connecting to https by IP address, client hello message has a server_name SNI block. | {
"avatar_url": "https://avatars.githubusercontent.com/u/1396183?v=4",
"events_url": "https://api.github.com/users/tocklime/events{/privacy}",
"followers_url": "https://api.github.com/users/tocklime/followers",
"following_url": "https://api.github.com/users/tocklime/following{/other_user}",
"gists_url": "https://api.github.com/users/tocklime/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tocklime",
"id": 1396183,
"login": "tocklime",
"node_id": "MDQ6VXNlcjEzOTYxODM=",
"organizations_url": "https://api.github.com/users/tocklime/orgs",
"received_events_url": "https://api.github.com/users/tocklime/received_events",
"repos_url": "https://api.github.com/users/tocklime/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tocklime/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tocklime/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tocklime",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2017-06-26T09:04:28Z | 2021-09-08T08:00:41Z | 2017-06-26T10:07:20Z | NONE | resolved | When connecting to https by IP address `requests.get("https://8.8.8.8/")`, the client hello message includes a server_name extension
## Expected Result
No server_name extension in the client hello. The server I am talking to immediately closes the connection when it sees a server_name block with a literal ipv4 address. The [SNI Spec](https://tools.ietf.org/html/rfc3546#section-3.1) says that `Literal IPv4 and IPv6 addresses are not permitted in "HostName".`
## Actual Result
There was a server_name extension in the client hello, and the server I am talking to immediately closes the connection.
## Reproduction Steps
1. Set up wireshark monitoring packets.
2. ```python
import requests
requests.get("https://8.8.8.8")
```
3. Observe the client hello message in wireshark:
```
Frame 570: 571 bytes on wire (4568 bits), 571 bytes captured (4568 bits) on interface 0
Ethernet II, Src: BizlinkK_XX:XX:XX (9c:eb:e8:XX:XX:XX), Dst: JuniperN_XX:XX:XX (08:81:f4:XX:XX:XX)
Internet Protocol Version 4, Src: 192.168.89.18, Dst: 8.8.8.8
Transmission Control Protocol, Src Port: 4811, Dst Port: 443, Seq: 1, Ack: 1, Len: 517
Secure Sockets Layer
TLSv1.2 Record Layer: Handshake Protocol: Client Hello
Content Type: Handshake (22)
Version: TLS 1.0 (0x0301)
Length: 512
Handshake Protocol: Client Hello
Handshake Type: Client Hello (1)
Length: 508
Version: TLS 1.2 (0x0303)
Random
Session ID Length: 0
Cipher Suites Length: 110
Cipher Suites (55 suites)
Compression Methods Length: 1
Compression Methods (1 method)
Extensions Length: 357
Extension: server_name
Type: server_name (0x0000)
Length: 12
Server Name Indication extension
Server Name list length: 10
Server Name Type: host_name (0)
Server Name length: 7
Server Name: 8.8.8.8
Extension: ec_point_formats
Extension: elliptic_curves
Extension: SessionTicket TLS
Extension: signature_algorithms
Extension: Heartbeat
Extension: Padding
```
## System Information
Windows 10 creators update, windows subsystem for linux.
```
$ uname -a
Linux ZeroGravitas 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31 14:42:53 PST 2014 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial
$ apt policy python-requests
python-requests:
Installed: 2.9.1-3
Candidate: 2.9.1-3
Version table:
*** 2.9.1-3 500
500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
100 /var/lib/dpkg/status
```
Is is easy enough for me to work around this (refer to the machine by name), but it took me ages to figure out what was going wrong, so here is something hopefully googleable.
The server I was connecting to is Windows Server 2016 Datacenter (azure VM). | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4178/reactions"
} | https://api.github.com/repos/psf/requests/issues/4178/timeline | null | completed | null | null | false | [
"Yeah, this is a known limitation of Requests that boils down to the absence of a reliable tool for distinguishing IP addresses and hostnames. I think a sensible enhancement might be to use the `ipaddress` module if it's present in your environment, but this enhancement would have to be applied in urllib3. Do you m... |
https://api.github.com/repos/psf/requests/issues/4177 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4177/labels{/name} | https://api.github.com/repos/psf/requests/issues/4177/comments | https://api.github.com/repos/psf/requests/issues/4177/events | https://github.com/psf/requests/issues/4177 | 238,477,381 | MDU6SXNzdWUyMzg0NzczODE= | 4,177 | sessions.py merge_setting(...) | {
"avatar_url": "https://avatars.githubusercontent.com/u/25338837?v=4",
"events_url": "https://api.github.com/users/gfplk/events{/privacy}",
"followers_url": "https://api.github.com/users/gfplk/followers",
"following_url": "https://api.github.com/users/gfplk/following{/other_user}",
"gists_url": "https://api.github.com/users/gfplk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gfplk",
"id": 25338837,
"login": "gfplk",
"node_id": "MDQ6VXNlcjI1MzM4ODM3",
"organizations_url": "https://api.github.com/users/gfplk/orgs",
"received_events_url": "https://api.github.com/users/gfplk/received_events",
"repos_url": "https://api.github.com/users/gfplk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gfplk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gfplk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gfplk",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2017-06-26T08:47:19Z | 2021-09-08T08:00:41Z | 2017-06-26T08:48:17Z | NONE | resolved | Hello, my head HTTP request is sent, although is ordered, but this is out of order, the anti spider detection target site to request the head not in the same order will ban off request. After finally put the code here watching, actually can bypass anti crawler mechanism.
你好,我发送http请求时的头部,虽然是有序的,但是这里是顺序被打乱,目标网站的反爬虫检测到请求头的顺序不一样就会ban掉请求. 最后把这里的代码注视之后,居然可以绕过反爬虫机制。
# merged_setting = dict_class(to_key_val_list(session_setting))
# merged_setting.update(to_key_val_list(request_setting))
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4177/reactions"
} | https://api.github.com/repos/psf/requests/issues/4177/timeline | null | completed | null | null | false | [
"Requests does not provide any ability to mandate ordering of HTTP headers. If that's a thing you need to do you'll need to drop down to a lower-level library."
] |
https://api.github.com/repos/psf/requests/issues/4176 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4176/labels{/name} | https://api.github.com/repos/psf/requests/issues/4176/comments | https://api.github.com/repos/psf/requests/issues/4176/events | https://github.com/psf/requests/issues/4176 | 238,465,228 | MDU6SXNzdWUyMzg0NjUyMjg= | 4,176 | The right way to debug requests with https proxy | {
"avatar_url": "https://avatars.githubusercontent.com/u/3056655?v=4",
"events_url": "https://api.github.com/users/tonywangcn/events{/privacy}",
"followers_url": "https://api.github.com/users/tonywangcn/followers",
"following_url": "https://api.github.com/users/tonywangcn/following{/other_user}",
"gists_url": "https://api.github.com/users/tonywangcn/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tonywangcn",
"id": 3056655,
"login": "tonywangcn",
"node_id": "MDQ6VXNlcjMwNTY2NTU=",
"organizations_url": "https://api.github.com/users/tonywangcn/orgs",
"received_events_url": "https://api.github.com/users/tonywangcn/received_events",
"repos_url": "https://api.github.com/users/tonywangcn/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tonywangcn/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tonywangcn/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tonywangcn",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 8 | 2017-06-26T07:51:02Z | 2021-09-08T08:00:40Z | 2017-06-28T09:51:57Z | NONE | resolved | Summary.
I have a proxy service that has been used for months. Everything works well until Twitter. The code here is a proxy test script between google and twitter. Of course Https.
For "https://www.google.com" and "https://mobile.twitter.com", the script both run 180 times. Most of google succeeded, however, all of twitter failed.
google:success times is 171, failed is 9, and total is 180
twitter:success times is 0, failed is 180, and total is 180
Half is "ConnectTimeoutError", and left is "ProxyError"
[Stackoverflow version](https://stackoverflow.com/questions/44750605/the-right-way-to-debug-python-requests-with-https-proxy)
## Expected Result
The success rate should keep the same
## Actual Result
```
HTTPSConnectionPool(host='mobile.twitter.com', port=443): Max retries exceeded with url: / (Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x107446150>, 'Connection to proxyip timed out. (connect timeout=10)'))
HTTPSConnectionPool(host='mobile.twitter.com', port=443): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', error(54, 'Connection reset by peer')))
```
Without "Upgrade-Insecure-Requests", the errors keep the same.
So I'm curious about is there any method to debug these errors?
## Reproduction Steps
```python
from gevent import monkey, spawn, joinall, sleep
monkey.patch_all() # Magic!
import requests
import sys
s = requests.Session()
proxys = "https://username:password@ip:port"
class test_proxy:
success = 0
failed = 0
total = 0
def tweet(self):
#url = "https://www.google.com"
url = "https://mobile.twitter.com"
header = {
"Referer": url,
"Upgrade-Insecure-Requests": 1,
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36",
}
try:
a = s.get(url, proxies={"https": proxys}, timeout=10)
self.success += 1
except Exception as e:
print(e)
self.failed += 1
self.total += 1
print("sucess times is {}, failed is {}, and total is {}".format(
self.success, self.failed, self.total))
test = test_proxy()
while True:
joinall([spawn(test.tweet) for _ in range(50)])
```
## System Information
```
python2.7
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4176/reactions"
} | https://api.github.com/repos/psf/requests/issues/4176/timeline | null | completed | null | null | false | [
"Is the proxy local, or is it provided by a third-party web service? It's quite possible that either the proxy or Twitter are refusing to co-operate.",
"Third-party. For another group of proxy, test results looks a little different , but not such significant. So I don't think it's the problem of proxys, it's the... |
https://api.github.com/repos/psf/requests/issues/4175 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4175/labels{/name} | https://api.github.com/repos/psf/requests/issues/4175/comments | https://api.github.com/repos/psf/requests/issues/4175/events | https://github.com/psf/requests/pull/4175 | 238,452,739 | MDExOlB1bGxSZXF1ZXN0MTI3NDA2Nzk2 | 4,175 | add missing packages when parse document | {
"avatar_url": "https://avatars.githubusercontent.com/u/454006?v=4",
"events_url": "https://api.github.com/users/9nix00/events{/privacy}",
"followers_url": "https://api.github.com/users/9nix00/followers",
"following_url": "https://api.github.com/users/9nix00/following{/other_user}",
"gists_url": "https://api.github.com/users/9nix00/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/9nix00",
"id": 454006,
"login": "9nix00",
"node_id": "MDQ6VXNlcjQ1NDAwNg==",
"organizations_url": "https://api.github.com/users/9nix00/orgs",
"received_events_url": "https://api.github.com/users/9nix00/received_events",
"repos_url": "https://api.github.com/users/9nix00/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/9nix00/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/9nix00/subscriptions",
"type": "User",
"url": "https://api.github.com/users/9nix00",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2017-06-26T06:36:56Z | 2021-09-05T00:07:12Z | 2017-06-26T06:44:56Z | NONE | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4175/reactions"
} | https://api.github.com/repos/psf/requests/issues/4175/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4175.diff",
"html_url": "https://github.com/psf/requests/pull/4175",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4175.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4175"
} | true | [
"Thanks for this! However, there is no need for it: when you install the Requests package by pip or setup.py those packages will be installed for you. ",
"Ah, I see. it looks my requests version is too old. I use `requests==2.13.0`.\r\n\r\nmaybe we should add some note in document to notice user ?\r\n",
"What w... | |
https://api.github.com/repos/psf/requests/issues/4174 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4174/labels{/name} | https://api.github.com/repos/psf/requests/issues/4174/comments | https://api.github.com/repos/psf/requests/issues/4174/events | https://github.com/psf/requests/pull/4174 | 238,391,960 | MDExOlB1bGxSZXF1ZXN0MTI3MzcwMzMy | 4,174 | Removed legacy fallback for python3.2 | {
"avatar_url": "https://avatars.githubusercontent.com/u/772?v=4",
"events_url": "https://api.github.com/users/alex/events{/privacy}",
"followers_url": "https://api.github.com/users/alex/followers",
"following_url": "https://api.github.com/users/alex/following{/other_user}",
"gists_url": "https://api.github.com/users/alex/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alex",
"id": 772,
"login": "alex",
"node_id": "MDQ6VXNlcjc3Mg==",
"organizations_url": "https://api.github.com/users/alex/orgs",
"received_events_url": "https://api.github.com/users/alex/received_events",
"repos_url": "https://api.github.com/users/alex/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alex/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alex/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alex",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2017-06-25T16:51:24Z | 2021-09-05T00:07:07Z | 2017-07-27T15:51:34Z | MEMBER | 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/4174/reactions"
} | https://api.github.com/repos/psf/requests/issues/4174/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4174.diff",
"html_url": "https://github.com/psf/requests/pull/4174",
"merged_at": "2017-07-27T15:51:33Z",
"patch_url": "https://github.com/psf/requests/pull/4174.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4174"
} | true | [
"Windows Jenkins builder appears to be offline, blocking CI.",
"@alex, would you mind rebasing this on the current master branch?",
"@nateprewitt merged master in, looks green still",
"Alright, I'm happy with this. Thanks @alex! ✨ "
] | |
https://api.github.com/repos/psf/requests/issues/4173 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4173/labels{/name} | https://api.github.com/repos/psf/requests/issues/4173/comments | https://api.github.com/repos/psf/requests/issues/4173/events | https://github.com/psf/requests/pull/4173 | 238,348,797 | MDExOlB1bGxSZXF1ZXN0MTI3MzQ2Njgz | 4,173 | Pass pool_kwargs rather than updating connection_pool_kw | {
"avatar_url": "https://avatars.githubusercontent.com/u/1977525?v=4",
"events_url": "https://api.github.com/users/jeremycline/events{/privacy}",
"followers_url": "https://api.github.com/users/jeremycline/followers",
"following_url": "https://api.github.com/users/jeremycline/following{/other_user}",
"gists_url": "https://api.github.com/users/jeremycline/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jeremycline",
"id": 1977525,
"login": "jeremycline",
"node_id": "MDQ6VXNlcjE5Nzc1MjU=",
"organizations_url": "https://api.github.com/users/jeremycline/orgs",
"received_events_url": "https://api.github.com/users/jeremycline/received_events",
"repos_url": "https://api.github.com/users/jeremycline/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jeremycline/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jeremycline/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jeremycline",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 7 | 2017-06-24T23:12:46Z | 2021-09-05T00:07:11Z | 2017-06-27T13:54:40Z | CONTRIBUTOR | resolved | This addresses an issue where making HTTPS through proxies used the
default urllib3 connection pool settings.
fixes #3633 | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4173/reactions"
} | https://api.github.com/repos/psf/requests/issues/4173/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4173.diff",
"html_url": "https://github.com/psf/requests/pull/4173",
"merged_at": "2017-06-27T13:54:40Z",
"patch_url": "https://github.com/psf/requests/pull/4173.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4173"
} | true | [
"This is only a problem in the proposed/3.0.0 branch so even though this breaks the API that's okay, right?",
"Yup, no problem at all.",
"I have made it so.",
"Failing tests. =)",
"Oh yeah, that's Python 2.6 because I used a dictionary comprehension in the tests. I can switch it to not use a comprehension, ... |
https://api.github.com/repos/psf/requests/issues/4172 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4172/labels{/name} | https://api.github.com/repos/psf/requests/issues/4172/comments | https://api.github.com/repos/psf/requests/issues/4172/events | https://github.com/psf/requests/issues/4172 | 237,901,714 | MDU6SXNzdWUyMzc5MDE3MTQ= | 4,172 | Support for http request batching | {
"avatar_url": "https://avatars.githubusercontent.com/u/436360?v=4",
"events_url": "https://api.github.com/users/shiva404/events{/privacy}",
"followers_url": "https://api.github.com/users/shiva404/followers",
"following_url": "https://api.github.com/users/shiva404/following{/other_user}",
"gists_url": "https://api.github.com/users/shiva404/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shiva404",
"id": 436360,
"login": "shiva404",
"node_id": "MDQ6VXNlcjQzNjM2MA==",
"organizations_url": "https://api.github.com/users/shiva404/orgs",
"received_events_url": "https://api.github.com/users/shiva404/received_events",
"repos_url": "https://api.github.com/users/shiva404/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shiva404/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shiva404/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shiva404",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2017-06-22T16:25:33Z | 2021-09-08T08:00:41Z | 2017-06-22T16:28:37Z | NONE | resolved | Support for http request batching | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4172/reactions"
} | https://api.github.com/repos/psf/requests/issues/4172/timeline | null | completed | null | null | false | [
"Sorry, but if you don't elaborate on what you want it's very hard for us to meaningfully decide whether we can support it or not."
] |
https://api.github.com/repos/psf/requests/issues/4171 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4171/labels{/name} | https://api.github.com/repos/psf/requests/issues/4171/comments | https://api.github.com/repos/psf/requests/issues/4171/events | https://github.com/psf/requests/issues/4171 | 237,848,205 | MDU6SXNzdWUyMzc4NDgyMDU= | 4,171 | Problem finding certificate | {
"avatar_url": "https://avatars.githubusercontent.com/u/4905917?v=4",
"events_url": "https://api.github.com/users/Bondifrench/events{/privacy}",
"followers_url": "https://api.github.com/users/Bondifrench/followers",
"following_url": "https://api.github.com/users/Bondifrench/following{/other_user}",
"gists_url": "https://api.github.com/users/Bondifrench/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Bondifrench",
"id": 4905917,
"login": "Bondifrench",
"node_id": "MDQ6VXNlcjQ5MDU5MTc=",
"organizations_url": "https://api.github.com/users/Bondifrench/orgs",
"received_events_url": "https://api.github.com/users/Bondifrench/received_events",
"repos_url": "https://api.github.com/users/Bondifrench/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Bondifrench/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Bondifrench/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Bondifrench",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 19 | 2017-06-22T13:37:02Z | 2021-09-04T00:06:14Z | 2017-06-22T13:39:02Z | NONE | resolved | Sorry, bit of a noob here.`
## Expected Result
Using Python 3.6 from Anaconda, after having installed `fix_yahoo_finance` package
## Actual Result
````
File "C:\Users\London\Anaconda3\lib\site-packages\requests\adapters.py", line 225, in cert_verify
raise IOError("Could not find a suitable TLS CA certificate bundle, "
OSError: Could not find a suitable TLS CA certificate bundle, invalid path: C:\Users\London\Anaconda3\lib\site-packages\requests\cacert.pem
````
I do have a certifi package which contains the file `cacert.pem`, but the path is `C:\Users\London\Anaconda3\Lib\site-packages\certifi`
## Reproduction Steps
Using this request:
```python
from pandas_datareader import data as pdr
import datetime
import fix_yahoo_finance
aapl = pdr.get_data_yahoo('AAPL',
start="2014-01-01",
end="2017-06-20")
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "1.8.1"
},
"implementation": {
"name": "CPython",
"version": "3.6.1"
},
"platform": {
"release": "8.1",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "100020bf",
"version": "17.0.0"
},
"requests": {
"version": "2.18.1"
},
"system_ssl": {
"version": "100020bf"
},
"urllib3": {
"version": "1.21.1"
},
"using_pyopenssl": true
}
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4171/reactions"
} | https://api.github.com/repos/psf/requests/issues/4171/timeline | null | completed | null | null | false | [
"This is an anaconda issue I think: we're looking for the cacert.pem file in the Requests package, and it seems not to be there. You'll need to take it up with the person providing your Requests package.",
"I am pretty new to this whole programming thing but I have the same issue and am working on tracing the rou... |
https://api.github.com/repos/psf/requests/issues/4170 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4170/labels{/name} | https://api.github.com/repos/psf/requests/issues/4170/comments | https://api.github.com/repos/psf/requests/issues/4170/events | https://github.com/psf/requests/issues/4170 | 237,691,409 | MDU6SXNzdWUyMzc2OTE0MDk= | 4,170 | How to respond to Form Submit click? | {
"avatar_url": "https://avatars.githubusercontent.com/u/1273014?v=4",
"events_url": "https://api.github.com/users/scheung38/events{/privacy}",
"followers_url": "https://api.github.com/users/scheung38/followers",
"following_url": "https://api.github.com/users/scheung38/following{/other_user}",
"gists_url": "https://api.github.com/users/scheung38/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/scheung38",
"id": 1273014,
"login": "scheung38",
"node_id": "MDQ6VXNlcjEyNzMwMTQ=",
"organizations_url": "https://api.github.com/users/scheung38/orgs",
"received_events_url": "https://api.github.com/users/scheung38/received_events",
"repos_url": "https://api.github.com/users/scheung38/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/scheung38/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/scheung38/subscriptions",
"type": "User",
"url": "https://api.github.com/users/scheung38",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2017-06-21T23:22:28Z | 2021-09-08T08:00:42Z | 2017-06-22T01:11:45Z | NONE | resolved | How to respond to Form on HTML click and requests.post triggered as a response? Most examples showing it
r = requests.post(...)
but how to bind this to respond to Button on Form in HTML clicked?
<form method="post" class="navbar-form navbar-right" action="/shorten_url">
<div class="form-group">
<input type="text" id="url" name="url" class="form-control input-lg chat-input" placeholder="URL" />
<button type="submit" class="btn btn-lg btn-info">Submit</button>
</div>
</form> | {
"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/4170/reactions"
} | https://api.github.com/repos/psf/requests/issues/4170/timeline | null | completed | null | null | false | [
"Hey @scheung38, thanks for taking the time to submit this question. As a future reference, we usually prefer to have these kinds of questions posted on https://stackoverflow.com rather than the issue tracker for the project.\r\n\r\nCould you briefly clarify what you're looking to do here. Are you trying to submit ... |
https://api.github.com/repos/psf/requests/issues/4169 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4169/labels{/name} | https://api.github.com/repos/psf/requests/issues/4169/comments | https://api.github.com/repos/psf/requests/issues/4169/events | https://github.com/psf/requests/issues/4169 | 236,910,626 | MDU6SXNzdWUyMzY5MTA2MjY= | 4,169 | Make alternate json libraries a hook to replace builtin json. | {
"avatar_url": "https://avatars.githubusercontent.com/u/585003?v=4",
"events_url": "https://api.github.com/users/isaulv/events{/privacy}",
"followers_url": "https://api.github.com/users/isaulv/followers",
"following_url": "https://api.github.com/users/isaulv/following{/other_user}",
"gists_url": "https://api.github.com/users/isaulv/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/isaulv",
"id": 585003,
"login": "isaulv",
"node_id": "MDQ6VXNlcjU4NTAwMw==",
"organizations_url": "https://api.github.com/users/isaulv/orgs",
"received_events_url": "https://api.github.com/users/isaulv/received_events",
"repos_url": "https://api.github.com/users/isaulv/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/isaulv/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/isaulv/subscriptions",
"type": "User",
"url": "https://api.github.com/users/isaulv",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2017-06-19T14:31:22Z | 2021-09-01T00:11:34Z | 2017-06-19T14:37:26Z | NONE | resolved | Currently, in the `_compat.py` module, if you have simplejson installed, it will use that over the standard built-in json.
This works fine in Python 2, since simplejson is typically faster than the built in json package, and it is more 'correct' in handling JSON.
However, in Python 3, simplejson is slower than the built in json package especially for smaller json payloads, which is probably a typical use case with the requests library. Even though simplejson handles various JSON strings better than the built in JSON, those cases are not typical.
I would like to see a hook that allows a user to opt to use a alternate JSON library so that a user can specify if they want to use rapidjson, ujson, simpleson for the `response.json()` decoding.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4169/reactions"
} | https://api.github.com/repos/psf/requests/issues/4169/timeline | null | completed | null | null | false | [
"The 3.0 release of Requests will remove the use of simplejson in favour of the stdlib module. Until that time, however, we cannot safely remove the option to use simplejson, as it would potentially represent a subtle backward-incompatible dependency change.\r\n\r\nI don't really see any reason to allow more genera... |
https://api.github.com/repos/psf/requests/issues/4168 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4168/labels{/name} | https://api.github.com/repos/psf/requests/issues/4168/comments | https://api.github.com/repos/psf/requests/issues/4168/events | https://github.com/psf/requests/issues/4168 | 236,853,286 | MDU6SXNzdWUyMzY4NTMyODY= | 4,168 | unusual url string crashs is py3 | {
"avatar_url": "https://avatars.githubusercontent.com/u/278728?v=4",
"events_url": "https://api.github.com/users/ReimarBauer/events{/privacy}",
"followers_url": "https://api.github.com/users/ReimarBauer/followers",
"following_url": "https://api.github.com/users/ReimarBauer/following{/other_user}",
"gists_url": "https://api.github.com/users/ReimarBauer/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ReimarBauer",
"id": 278728,
"login": "ReimarBauer",
"node_id": "MDQ6VXNlcjI3ODcyOA==",
"organizations_url": "https://api.github.com/users/ReimarBauer/orgs",
"received_events_url": "https://api.github.com/users/ReimarBauer/received_events",
"repos_url": "https://api.github.com/users/ReimarBauer/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ReimarBauer/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ReimarBauer/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ReimarBauer",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2017-06-19T10:58:06Z | 2021-09-08T02:09:52Z | 2017-06-19T11:26:04Z | NONE | resolved | I installed the current master by pip install zipfile in a recent python3 conda environment
base_url = 'http://............127.0.0.1:8082'
request.get(base_url)
crashes
and ends with an UnidodeError
python3.6/encodings/idna.py",
line 165, in encode
raise UnicodeError("label empty or too long")
UnicodeError: label empty or too long
May be you can catch this? | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4168/reactions"
} | https://api.github.com/repos/psf/requests/issues/4168/timeline | null | completed | null | null | false | [
"For posterity, the complete traceback is this:\r\n\r\n```\r\n>>> requests.get(base_url)\r\nTraceback (most recent call last):\r\n File \"/Users/cory/.pyenv/versions/3.6.0/lib/python3.6/encodings/idna.py\", line 165, in encode\r\n raise UnicodeError(\"label empty or too long\")\r\nUnicodeError: label empty or t... |
https://api.github.com/repos/psf/requests/issues/4167 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4167/labels{/name} | https://api.github.com/repos/psf/requests/issues/4167/comments | https://api.github.com/repos/psf/requests/issues/4167/events | https://github.com/psf/requests/issues/4167 | 236,749,806 | MDU6SXNzdWUyMzY3NDk4MDY= | 4,167 | ConnectionRefusedError error on 302 redirects | {
"avatar_url": "https://avatars.githubusercontent.com/u/220772?v=4",
"events_url": "https://api.github.com/users/rasa/events{/privacy}",
"followers_url": "https://api.github.com/users/rasa/followers",
"following_url": "https://api.github.com/users/rasa/following{/other_user}",
"gists_url": "https://api.github.com/users/rasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rasa",
"id": 220772,
"login": "rasa",
"node_id": "MDQ6VXNlcjIyMDc3Mg==",
"organizations_url": "https://api.github.com/users/rasa/orgs",
"received_events_url": "https://api.github.com/users/rasa/received_events",
"repos_url": "https://api.github.com/users/rasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rasa",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2017-06-18T22:30:23Z | 2021-09-08T08:00:43Z | 2017-06-19T00:10:29Z | NONE | resolved | <a name="top"/>302 redirects insert localhost into url (and change scheme from https to http).
Aside: urllib3 works fine:
````python
http = urllib3.PoolManager()
url = 'https://www.apachelounge.com/download/VC14/binaries/httpd-2.4.26-win32-VC14.zip'
r = http.request('GET', url)
````
## Expected Result
No exception
## Actual Result
Exception raised (see below for both [2.7.13](#2.7.13) and [3.6.1](#3.6.1) failures)
## Reproduction Steps
````python
import requests
url = 'https://www.apachelounge.com/download/VC14/binaries/httpd-2.4.26-win32-VC14.zip'
r = requests.head(url)
print(r.status_code)
print(r.headers)
r = requests.head(url, allow_redirects=True)
print(r.status_code)
print(r.headers)
````
## System Information
````
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"implementation": {
"name": "CPython",
"version": "3.6.1"
},
"platform": {
"release": "7",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.1"
},
"system_ssl": {
"version": "100020bf"
},
"urllib3": {
"version": "1.21.1"
},
"using_pyopenssl": false
}
````
<a name="2.7.13"></a>
## Exception (Python 2.7.13) [↑back to top](#top)
````batch
C:\>py get.py
302
{'Keep-Alive': 'timeout=10, max=100', 'Server': 'Apache/2.4.26 (Win64)', 'Connection': 'Keep-Alive',
'Location': 'http://localhost/download/VC14/binaries/httpd-2.4.26-win32-VC14.zip', 'Da
te': 'Sun, 18 Jun 2017 22:33:13 GMT', 'Content-Type': 'text/html; charset=iso-8859-1'}
Traceback (most recent call last):
File "get.py", line 11, in <module>
r = requests.head(url, allow_redirects=True)
File "c:\python\lib\site-packages\requests\api.py", line 98, in head
return request('head', url, **kwargs)
File "c:\python\lib\site-packages\requests\api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "c:\python\lib\site-packages\requests\sessions.py", line 502, in request
resp = self.send(prep, **send_kwargs)
File "c:\python\lib\site-packages\requests\sessions.py", line 634, in send
history = [resp for resp in gen] if allow_redirects else []
File "c:\python\lib\site-packages\requests\sessions.py", line 212, in resolve_redirects
**adapter_kwargs
File "c:\python\lib\site-packages\requests\sessions.py", line 612, in send
r = adapter.send(request, **kwargs)
File "c:\python\lib\site-packages\requests\adapters.py", line 504, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=80): Max retries exceeded with url: /download/VC14/binaries/httpd-2.4.26-win32-VC14.zip (Caused by NewConnec
tionError('<urllib3.connection.HTTPConnection object at 0x00000000035D5D30>: Failed to establish a new connection: [Errno 10061] No connection could be made because the target machine act
ively refused it',))
````
<a name="3.6.1"></a>
## Exception (Python 3.6.1) [↑back to top](#top)
````batch
C:\>py get.py
302
{'Date': 'Sun, 18 Jun 2017 22:24:43 GMT', 'Server': 'Apache/2.4.26 (Win64)',
'Location': 'http://localhost/download/VC14/binaries/httpd-2.4.26-win32-VC14.zip', 'Content-Type': 'text/html;
charset=iso-8859-1', 'Keep-Alive': 'timeout=10, max=100', 'Connection': 'Keep-Alive'}
Traceback (most recent call last):
File "c:\python\lib\site-packages\urllib3\connection.py", line 141, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "c:\python\lib\site-packages\urllib3\util\connection.py", line 83, in create_connection
raise err
File "c:\python\lib\site-packages\urllib3\util\connection.py", line 73, in create_connection
sock.connect(sa)
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\python\lib\site-packages\urllib3\connectionpool.py", line 600, in urlopen
chunked=chunked)
File "c:\python\lib\site-packages\urllib3\connectionpool.py", line 356, in _make_request
conn.request(method, url, **httplib_request_kw)
File "c:\python\lib\http\client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "c:\python\lib\http\client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "c:\python\lib\http\client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "c:\python\lib\http\client.py", line 1026, in _send_output
self.send(msg)
File "c:\python\lib\http\client.py", line 964, in send
self.connect()
File "c:\python\lib\site-packages\urllib3\connection.py", line 166, in connect
conn = self._new_conn()
File "c:\python\lib\site-packages\urllib3\connection.py", line 150, in _new_conn
self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x000000000354AF28>: Failed to establish a new connection: [WinError 10061] No connection could be made
because the target machine actively refused it
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\python\lib\site-packages\requests\adapters.py", line 440, in send
timeout=timeout
File "c:\python\lib\site-packages\urllib3\connectionpool.py", line 649, in urlopen
_stacktrace=sys.exc_info()[2])
File "c:\python\lib\site-packages\urllib3\util\retry.py", line 388, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=80): Max retries exceeded with url: /download/VC14/binaries/httpd-2.4.26-win32-VC14.zip (Caused by NewConnectio
nError('<urllib3.connection.HTTPConnection object at 0x000000000354AF28>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine act
ively refused it',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "get.py", line 11, in <module>
r = requests.head(url, allow_redirects=True)
File "c:\python\lib\site-packages\requests\api.py", line 98, in head
return request('head', url, **kwargs)
File "c:\python\lib\site-packages\requests\api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "c:\python\lib\site-packages\requests\sessions.py", line 502, in request
resp = self.send(prep, **send_kwargs)
File "c:\python\lib\site-packages\requests\sessions.py", line 634, in send
history = [resp for resp in gen] if allow_redirects else []
File "c:\python\lib\site-packages\requests\sessions.py", line 634, in <listcomp>
history = [resp for resp in gen] if allow_redirects else []
File "c:\python\lib\site-packages\requests\sessions.py", line 212, in resolve_redirects
**adapter_kwargs
File "c:\python\lib\site-packages\requests\sessions.py", line 612, in send
r = adapter.send(request, **kwargs)
File "c:\python\lib\site-packages\requests\adapters.py", line 504, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=80): Max retries exceeded with url: /download/VC14/binaries/httpd-2.4.26-win32-VC14.zip (Caused by NewConnec
tionError('<urllib3.connection.HTTPConnection object at 0x000000000354AF28>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine
actively refused it',))
````
[↑back to top](#top) | {
"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/4167/reactions"
} | https://api.github.com/repos/psf/requests/issues/4167/timeline | null | completed | null | null | false | [
"Hey @rasa, you'll find that the redirect link being provided by this endpoint is `http://localhost/download/VC14/binaries/httpd-2.4.26-win32-VC14.zip`. Unless you're hosting this service on your machine on port 80, that connection will never be established. \r\n\r\nI ran a quick test with Curl, and you'll see a si... |
https://api.github.com/repos/psf/requests/issues/4166 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4166/labels{/name} | https://api.github.com/repos/psf/requests/issues/4166/comments | https://api.github.com/repos/psf/requests/issues/4166/events | https://github.com/psf/requests/issues/4166 | 236,627,016 | MDU6SXNzdWUyMzY2MjcwMTY= | 4,166 | Unable to trigger a Jenkins build remotely with a file parameter using python requests | {
"avatar_url": "https://avatars.githubusercontent.com/u/3828412?v=4",
"events_url": "https://api.github.com/users/ankuagar/events{/privacy}",
"followers_url": "https://api.github.com/users/ankuagar/followers",
"following_url": "https://api.github.com/users/ankuagar/following{/other_user}",
"gists_url": "https://api.github.com/users/ankuagar/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ankuagar",
"id": 3828412,
"login": "ankuagar",
"node_id": "MDQ6VXNlcjM4Mjg0MTI=",
"organizations_url": "https://api.github.com/users/ankuagar/orgs",
"received_events_url": "https://api.github.com/users/ankuagar/received_events",
"repos_url": "https://api.github.com/users/ankuagar/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ankuagar/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ankuagar/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ankuagar",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2017-06-17T00:34:15Z | 2021-09-08T08:00:42Z | 2017-06-20T07:26:00Z | NONE | resolved | I was trying to trigger a Jenkins build remotely with a file parameter using python requests
## Expected Result
I was expecting the remote job to be triggered with the contents of file.log saved in ${WORKSPACE}/files/abc.zip
## Actual Result
This code triggers a build.
## What happened instead.
But the file /some/file/path/file.log is not posted to the Jenkins job.
The contents are not available in ${WORKSPACE}/files/abc.zip
## Reproduction Steps
```
python
import requests
url = 'myurl/buildWithParameters'
data = {'Jenkins-Crumb': '8f4d0320c0982763098571789b2b65ec', 'token': 'mytoken'}
filepath='/some/file/path/file.log'
files = {'file': ('files/abc.zip', open(filepath, 'rb')) }
r = requests.post(url, data=data, files=files)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.3"
},
"cryptography": {
"version": "1.9"
},
"implementation": {
"name": "CPython",
"version": "2.7.10"
},
"platform": {
"release": "16.6.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "1010006f",
"version": "17.0.0"
},
"requests": {
"version": "2.17.3"
},
"system_ssl": {
"version": "9081df"
},
"urllib3": {
"version": "1.21.1"
},
"using_pyopenssl": true
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4166/reactions"
} | https://api.github.com/repos/psf/requests/issues/4166/timeline | null | completed | null | null | false | [
"Do you have some indication of what the format of a successful request should be? It's hard to debug this without knowing that success looks like. ",
"@Lukasa No sorry, I don't have format of a successful request. ",
"In that case we can't really help you: if we don't know what you're trying to produce, we can... |
https://api.github.com/repos/psf/requests/issues/4165 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4165/labels{/name} | https://api.github.com/repos/psf/requests/issues/4165/comments | https://api.github.com/repos/psf/requests/issues/4165/events | https://github.com/psf/requests/issues/4165 | 236,557,902 | MDU6SXNzdWUyMzY1NTc5MDI= | 4,165 | figure out sticker delivery | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2017-06-16T18:22:47Z | 2021-11-24T07:00:23Z | 2021-08-26T06:50:11Z | CONTRIBUTOR | resolved | - https://www.blackbox.cool
- https://maillift.com/ | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4165/reactions"
} | https://api.github.com/repos/psf/requests/issues/4165/timeline | null | completed | null | null | false | [
"sir please describe the issue, i would like to work on it..",
"@techytushar, thanks for the interest in helping with Requests! This was a TODO for Kenneth to determine the best way for distributing Requests' stickers. I believe he settled on a solution [here](https://gumroad.com/l/requests-stickers) at gumroad.\... |
https://api.github.com/repos/psf/requests/issues/4164 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4164/labels{/name} | https://api.github.com/repos/psf/requests/issues/4164/comments | https://api.github.com/repos/psf/requests/issues/4164/events | https://github.com/psf/requests/issues/4164 | 236,504,657 | MDU6SXNzdWUyMzY1MDQ2NTc= | 4,164 | RuntimeError: More keyword list entries (7) than format specifiers (6) | {
"avatar_url": "https://avatars.githubusercontent.com/u/7872259?v=4",
"events_url": "https://api.github.com/users/timmartin19/events{/privacy}",
"followers_url": "https://api.github.com/users/timmartin19/followers",
"following_url": "https://api.github.com/users/timmartin19/following{/other_user}",
"gists_url": "https://api.github.com/users/timmartin19/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/timmartin19",
"id": 7872259,
"login": "timmartin19",
"node_id": "MDQ6VXNlcjc4NzIyNTk=",
"organizations_url": "https://api.github.com/users/timmartin19/orgs",
"received_events_url": "https://api.github.com/users/timmartin19/received_events",
"repos_url": "https://api.github.com/users/timmartin19/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/timmartin19/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/timmartin19/subscriptions",
"type": "User",
"url": "https://api.github.com/users/timmartin19",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2017-06-16T14:46:59Z | 2021-11-26T05:00:32Z | 2021-08-28T04:14:45Z | NONE | resolved | _Disclaimer_ I'm not sure if this is actually an issue with the requests library. Additionally, we have had significant trouble consistently reproducing this issue.
We are running a Flask app in AWS ECS. In order to [retrieve task credentials|http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html] in an ECS task, we need to send a request to `http://169.254.170.2/v2/credentials?task_id=:task_id`. Instead we're getting the very strange error in the title from `_socket.getaddrinfo`.
## Expected Result
We get a response (or at least a reasonable error message)
## Actual Result
*Note* Despite our best efforts, we have not been able to reliably reproduce this. It seems to start happening after a few hours.
```
ERROR in exceptions: More keyword list entries (7) than format specifiers (6)
Traceback (most recent call last):
File "/home/app/dashboard-api/dashboard_api/views/pilot_group.py", line 167, in
req = requests.get('http://169.254.170.2' + cred_uri)
File "/usr/local/lib/python3.5/site-packages/requests/api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "/usr/local/lib/python3.5/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.5/site-packages/requests/sessions.py", line 502, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.5/site-packages/raven/breadcrumbs.py", line 297, in send
resp = real_send(self, request, *args, **kwargs)
File "/usr/local/lib/python3.5/site-packages/requests/sessions.py", line 612, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.5/site-packages/requests/adapters.py", line 440, in send
timeout=timeout
File "/usr/local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/usr/local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 356, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/local/lib/python3.5/http/client.py", line 1106, in request
self._send_request(method, url, body, headers)
File "/usr/local/lib/python3.5/http/client.py", line 1151, in _send_request
self.endheaders(body)
File "/usr/local/lib/python3.5/http/client.py", line 1102, in endheaders
self._send_output(message_body)
File "/usr/local/lib/python3.5/http/client.py", line 934, in _send_output
self.send(msg)
File "/usr/local/lib/python3.5/http/client.py", line 877, in send
self.connect()
File "/usr/local/lib/python3.5/site-packages/urllib3/connection.py", line 166, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.5/site-packages/urllib3/connection.py", line 141, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/usr/local/lib/python3.5/site-packages/urllib3/util/connection.py", line 60, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/usr/local/lib/python3.5/socket.py", line 732, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
RuntimeError: More keyword list entries (7) than format specifiers (6)
```
## Reproduction Steps
We are having a lot of trouble consistently reproducing this but this is the code that triggers it when it happens. Typically it starts failing after a few hours. Originally we thought it was an issue with botocore (and potentially refreshing credentials) so we added the following code but we kept getting the same error.
```python
import requests
# The request path from an environment variable populated by ECS
cred_uri = os.environ.get('AWS_CONTAINER_CREDENTIALS_RELATIVE_URI')
if cred_uri:
resp = requests.get('http://169.254.170.2' + cred_uri)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"implementation": {
"name": "CPython",
"version": "3.5.2"
},
"platform": {
"release": "4.9.27-moby",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.18.1"
},
"system_ssl": {
"version": "100020bf"
},
"urllib3": {
"version": "1.21.1"
},
"using_pyopenssl": false
}
```
Other interesting information:
Running on AWS EC2 Container Service (ECS)
Docker v: 17.03.1-ce
ECS agent version: 1.14.3
We're using [raven-python|https://github.com/getsentry/raven-python] which hooks into requests to log the results.
uwsgi is running it in a Flask app with multi processing and multithreading. | {
"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/4164/reactions"
} | https://api.github.com/repos/psf/requests/issues/4164/timeline | null | completed | null | null | false | [
"This error strikes me as being a follow-on. I suspect some exception is happening in or around getaddrinfo, and that error is being masked because an attempt is made to format a string that goes awry. The exception itself seems to be happening in the stdlib though. I'd recommend seeing if you can use strace or som... |
https://api.github.com/repos/psf/requests/issues/4163 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4163/labels{/name} | https://api.github.com/repos/psf/requests/issues/4163/comments | https://api.github.com/repos/psf/requests/issues/4163/events | https://github.com/psf/requests/issues/4163 | 236,449,398 | MDU6SXNzdWUyMzY0NDkzOTg= | 4,163 | can't POST | {
"avatar_url": "https://avatars.githubusercontent.com/u/24896865?v=4",
"events_url": "https://api.github.com/users/ash73/events{/privacy}",
"followers_url": "https://api.github.com/users/ash73/followers",
"following_url": "https://api.github.com/users/ash73/following{/other_user}",
"gists_url": "https://api.github.com/users/ash73/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ash73",
"id": 24896865,
"login": "ash73",
"node_id": "MDQ6VXNlcjI0ODk2ODY1",
"organizations_url": "https://api.github.com/users/ash73/orgs",
"received_events_url": "https://api.github.com/users/ash73/received_events",
"repos_url": "https://api.github.com/users/ash73/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ash73/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ash73/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ash73",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2017-06-16T10:55:57Z | 2021-09-08T08:00:43Z | 2017-06-16T10:58:36Z | NONE | resolved | Trying to use python requests to http post.
r = requests.post(address, data=payload)
r.url only shows the url, not the payload.
My php page is returning an error, but I can't see the full url passed to it.
How do I inspect the WHOLE url posted to the web server to debug it?
Whereas
r = requests.get(...)
r.url returns the entire url including the payload.
TIA. | {
"avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4",
"events_url": "https://api.github.com/users/Lukasa/events{/privacy}",
"followers_url": "https://api.github.com/users/Lukasa/followers",
"following_url": "https://api.github.com/users/Lukasa/following{/other_user}",
"gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Lukasa",
"id": 1382556,
"login": "Lukasa",
"node_id": "MDQ6VXNlcjEzODI1NTY=",
"organizations_url": "https://api.github.com/users/Lukasa/orgs",
"received_events_url": "https://api.github.com/users/Lukasa/received_events",
"repos_url": "https://api.github.com/users/Lukasa/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Lukasa",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4163/reactions"
} | https://api.github.com/repos/psf/requests/issues/4163/timeline | null | completed | null | null | false | [
"In requests, `data` *always* adds data to the request body, and `params` always adds data to the request URL. If you want data in the URL you *must* use `params`, and if you want it in the body you *must* use `data`. This is unrelated to the request verb you're using.",
"Many thanks - resolved."
] |
https://api.github.com/repos/psf/requests/issues/4162 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/4162/labels{/name} | https://api.github.com/repos/psf/requests/issues/4162/comments | https://api.github.com/repos/psf/requests/issues/4162/events | https://github.com/psf/requests/pull/4162 | 236,288,405 | MDExOlB1bGxSZXF1ZXN0MTI1ODkyODcx | 4,162 | Implement low-memory session | {
"avatar_url": "https://avatars.githubusercontent.com/u/3999513?v=4",
"events_url": "https://api.github.com/users/y4n9squared/events{/privacy}",
"followers_url": "https://api.github.com/users/y4n9squared/followers",
"following_url": "https://api.github.com/users/y4n9squared/following{/other_user}",
"gists_url": "https://api.github.com/users/y4n9squared/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/y4n9squared",
"id": 3999513,
"login": "y4n9squared",
"node_id": "MDQ6VXNlcjM5OTk1MTM=",
"organizations_url": "https://api.github.com/users/y4n9squared/orgs",
"received_events_url": "https://api.github.com/users/y4n9squared/received_events",
"repos_url": "https://api.github.com/users/y4n9squared/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/y4n9squared/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/y4n9squared/subscriptions",
"type": "User",
"url": "https://api.github.com/users/y4n9squared",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2017-06-15T19:18:51Z | 2017-06-15T19:22:44Z | 2017-06-15T19:21:18Z | NONE | null | This derived class of sessions.Session is particularly effective at obstruction. | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/4162/reactions"
} | https://api.github.com/repos/psf/requests/issues/4162/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/4162.diff",
"html_url": "https://github.com/psf/requests/pull/4162",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/4162.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/4162"
} | true | [] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.