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/1028
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/1028/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/1028/comments
|
https://api.github.com/repos/psf/requests/issues/1028/events
|
https://github.com/psf/requests/issues/1028
| 9,353,808 |
MDU6SXNzdWU5MzUzODA4
| 1,028 |
Requests 1.0.2 + Broken JSON
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/90247?v=4",
"events_url": "https://api.github.com/users/rdegges/events{/privacy}",
"followers_url": "https://api.github.com/users/rdegges/followers",
"following_url": "https://api.github.com/users/rdegges/following{/other_user}",
"gists_url": "https://api.github.com/users/rdegges/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/rdegges",
"id": 90247,
"login": "rdegges",
"node_id": "MDQ6VXNlcjkwMjQ3",
"organizations_url": "https://api.github.com/users/rdegges/orgs",
"received_events_url": "https://api.github.com/users/rdegges/received_events",
"repos_url": "https://api.github.com/users/rdegges/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/rdegges/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rdegges/subscriptions",
"type": "User",
"url": "https://api.github.com/users/rdegges",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 8 |
2012-12-18T00:37:45Z
|
2021-09-09T02:11:55Z
|
2012-12-18T05:48:02Z
|
NONE
|
resolved
|
Yo!
`response.json` no longer works in requests 1.0.2, instead you must call `response.json()` manually, which breaks a lot of library support.
Will this go back to the old way? If not, I'd be happy to update all my dependencies :o
|
{
"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/1028/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/1028/timeline
| null |
completed
| null | null | false |
[
"In Kennith's [blog post](http://kennethreitz.com/announcing-requests-v100.html) today he wrote:\n\n> Removal of the magic Response.json property. Replaced with a method.\n\nI think this change is intended to stay.\n",
"I don't exactly know why it was changed to a method, but I'm guessing it won't \nbe changed back.\nOn Mon, Dec 17, 2012 at 04:38:02PM -0800, Randall Degges wrote:\n\n> Yo!\n> \n> `response.json` no longer works in requests 1.0.2, instead you must call `response.json()` manually, which breaks a lot of library support.\n> \n> Will this go back to the old way? If not, I'd be happy to update all my dependencies :o\n> \n> ---\n> \n> Reply to this email directly or view it on GitHub:\n> https://github.com/kennethreitz/requests/issues/1028\n",
"And looking at the new json method, I like it. Attributes shouldn't raise exceptions realistically when accessed unless they don't exist. Making it a method and exposing a possible issue with loading the json makes far more sense than the way the old attribute worked.\n\n@rdegges you won't be the only one updating your dependencies ;)\n",
"This is an extremely intentional change. Please read [semver](http://semver.org)\n",
"Yes, it was because you shouldn't get exceptions when accessing an attribute. The old API was wrong.\n",
"Yep, I hadn't really dug into the code. But this makes far more sense.\n",
"Just weighing in as I only noticed this change today. First, @kennethreitz, I totally agree with your reasons for changing it and I'm glad you did! This is a good upgrade.\n\nThat said, I might have preferred a staged transition, like:\n\nv 0.15.0:\n- `response.json` is renamed to `response.json_property`\n- `response.json_method` is the method version of `response.json_property`\n- `response.json` is a new property that issues a DeprecationWarning and returns `response.json_property`\n\nEnd user actions: replace `response.json` with `response.json_property` throughout their code. Other co-installed projects designed for 0.14.1 can keep using `response.json` for now. Installations can upgrade from 0.14.1 to 0.15.0 without breakage.\n\nv 1.0.0:\n- `response.json` now points to `response.json_method`\n\nEnd user actions: replace `response.json_property` with `response.json()` throughout their code. Other co-installed projects designed for 0.15.0 can keep using `response.json_property` for now. Installations can upgrade from 0.15.0 to 1.0.0 without breakage.\n\nv 1.1.0:\n- `response.json_property` and `response.json_method` are removed\n\nI find myself in the situation where it's easy enough to upgrade the code I'm writing to use the 1.0.0 API (which I think is great!), but I have to coordinate with other departments so that we all make the from from 0.14.1 to 1.0.0 at the same moment. There's no intermediate state that supports both the old and new styles at the same time.\n",
"good info\n"
] |
https://api.github.com/repos/psf/requests/issues/1027
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/1027/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/1027/comments
|
https://api.github.com/repos/psf/requests/issues/1027/events
|
https://github.com/psf/requests/issues/1027
| 9,353,519 |
MDU6SXNzdWU5MzUzNTE5
| 1,027 |
Requests 1.0.2 doesn't appear to set session cookies on POST requests
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/48100?v=4",
"events_url": "https://api.github.com/users/bboe/events{/privacy}",
"followers_url": "https://api.github.com/users/bboe/followers",
"following_url": "https://api.github.com/users/bboe/following{/other_user}",
"gists_url": "https://api.github.com/users/bboe/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bboe",
"id": 48100,
"login": "bboe",
"node_id": "MDQ6VXNlcjQ4MTAw",
"organizations_url": "https://api.github.com/users/bboe/orgs",
"received_events_url": "https://api.github.com/users/bboe/received_events",
"repos_url": "https://api.github.com/users/bboe/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bboe/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bboe/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bboe",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-12-18T00:23:15Z
|
2021-09-09T05:30:07Z
|
2012-12-18T05:46:14Z
|
CONTRIBUTOR
|
resolved
|
I can confirm that the example using httpbin.org still works. However, my similar code that sends a POST request (to login) the response object contains the cookie, however the session object is not updated to contain the cookie thus making the session useless unless I manually do the following for POST requests:
```
session.cookies = response.cookies
```
What's also odd is in the httpbin.org example using the `GET` request, while the session's cookies are updated, the response's cookie attribute is empty:
```
>>> import requests
>>> s = requests.session()
>>> r = s.get('http://httpbin.org/cookies/set/sessioncookie/123456789')
>>> s.cookies
<<class 'requests.cookies.RequestsCookieJar'>[Cookie(version=0, name='sessioncookie', value='123456789', port=None, port_specified=False, domain='httpbin.org', domain_specified=False, domain_initial_dot=False, path='/', path_specified=True, secure=False, expires=None, discard=True, comment=None, comment_url=None, rest={}, rfc2109=False)]>
>>> r.cookies
<<class 'requests.cookies.RequestsCookieJar'>[]>
```
|
{
"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/1027/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/1027/timeline
| null |
completed
| null | null | false |
[
"Discovered the problem- cookies are only persisted when a `location` header is present. The sites I am logging into do not send location headers upon login.\n"
] |
https://api.github.com/repos/psf/requests/issues/1026
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/1026/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/1026/comments
|
https://api.github.com/repos/psf/requests/issues/1026/events
|
https://github.com/psf/requests/pull/1026
| 9,352,210 |
MDExOlB1bGxSZXF1ZXN0MzQwMjY0NQ==
| 1,026 |
Added requirements.txt to MANIFEST.in
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/227449?v=4",
"events_url": "https://api.github.com/users/TorKlingberg/events{/privacy}",
"followers_url": "https://api.github.com/users/TorKlingberg/followers",
"following_url": "https://api.github.com/users/TorKlingberg/following{/other_user}",
"gists_url": "https://api.github.com/users/TorKlingberg/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/TorKlingberg",
"id": 227449,
"login": "TorKlingberg",
"node_id": "MDQ6VXNlcjIyNzQ0OQ==",
"organizations_url": "https://api.github.com/users/TorKlingberg/orgs",
"received_events_url": "https://api.github.com/users/TorKlingberg/received_events",
"repos_url": "https://api.github.com/users/TorKlingberg/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/TorKlingberg/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/TorKlingberg/subscriptions",
"type": "User",
"url": "https://api.github.com/users/TorKlingberg",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2012-12-17T23:23:27Z
|
2021-09-08T18:01:09Z
|
2012-12-18T05:49:45Z
|
NONE
|
resolved
|
MANIFEST.in contained test_requests.py but was missing requirements.txt that it depends on.
Now both files will be included in the .tar.gz file that can be downloaded from PyPI.
|
{
"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/1026/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/1026/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/1026.diff",
"html_url": "https://github.com/psf/requests/pull/1026",
"merged_at": "2012-12-18T05:49:45Z",
"patch_url": "https://github.com/psf/requests/pull/1026.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/1026"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/1025
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/1025/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/1025/comments
|
https://api.github.com/repos/psf/requests/issues/1025/events
|
https://github.com/psf/requests/issues/1025
| 9,349,615 |
MDU6SXNzdWU5MzQ5NjE1
| 1,025 |
New urrlib3 breaks App Engine
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/25029?v=4",
"events_url": "https://api.github.com/users/PanosJee/events{/privacy}",
"followers_url": "https://api.github.com/users/PanosJee/followers",
"following_url": "https://api.github.com/users/PanosJee/following{/other_user}",
"gists_url": "https://api.github.com/users/PanosJee/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/PanosJee",
"id": 25029,
"login": "PanosJee",
"node_id": "MDQ6VXNlcjI1MDI5",
"organizations_url": "https://api.github.com/users/PanosJee/orgs",
"received_events_url": "https://api.github.com/users/PanosJee/received_events",
"repos_url": "https://api.github.com/users/PanosJee/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/PanosJee/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/PanosJee/subscriptions",
"type": "User",
"url": "https://api.github.com/users/PanosJee",
"user_view_type": "public"
}
|
[
{
"color": "fbca04",
"default": false,
"description": null,
"id": 615414998,
"name": "GAE Support",
"node_id": "MDU6TGFiZWw2MTU0MTQ5OTg=",
"url": "https://api.github.com/repos/psf/requests/labels/GAE%20Support"
}
] |
closed
| true | null |
[] | null | 6 |
2012-12-17T21:54:45Z
|
2021-09-08T09:00:46Z
|
2012-12-17T22:27:12Z
|
NONE
|
resolved
|
The following import in urllib3/util.py cannot take place
``` python
from ssl import wrap_socket, CERT_NONE, SSLError, PROTOCOL_SSLv23
```
So we have an exception at line 293
``` python
def ssl_wrap_socket(sock, keyfile=None, certfile=None, cert_reqs=CERT_NONE,
ca_certs=None, server_hostname=None,
ssl_version=PROTOCOL_SSLv23):
return wrap_socket(sock, keyfile=keyfile, certfile=certfile,
ca_certs=ca_certs, cert_reqs=cert_reqs,
ssl_version=ssl_version)
```
App engine dies with NameError: name 'CERT_NONE' is not defined
|
{
"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/1025/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/1025/timeline
| null |
completed
| null | null | false |
[
"See @kennethreitz's comment here: https://github.com/kennethreitz/requests/issues/1008\n",
"Does it work with `cert_reqs=None`?\nI have a patch in the pipeline which could be modified to make it work this way.\nSry for breaking it.\n",
"So @sigmavirus24 it seems that GAE support is deprecated :(\n",
"If this is your only problem try to use urllib3 from https://github.com/t-8ch/urllib3/tree/unify_ssl_api\n(current master + some commits)\n",
"urllib3 still strives to maintain GAE support, so feel free to open a bug in our part of the land and we can deal with it there. :)\n",
"Thanks @shazow , I ll try to patch it first!\n"
] |
https://api.github.com/repos/psf/requests/issues/1024
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/1024/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/1024/comments
|
https://api.github.com/repos/psf/requests/issues/1024/events
|
https://github.com/psf/requests/pull/1024
| 9,347,329 |
MDExOlB1bGxSZXF1ZXN0MzQwMDA5Mg==
| 1,024 |
Fix HTTP method encoding problem with attached files
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/69561?v=4",
"events_url": "https://api.github.com/users/etscrivner/events{/privacy}",
"followers_url": "https://api.github.com/users/etscrivner/followers",
"following_url": "https://api.github.com/users/etscrivner/following{/other_user}",
"gists_url": "https://api.github.com/users/etscrivner/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/etscrivner",
"id": 69561,
"login": "etscrivner",
"node_id": "MDQ6VXNlcjY5NTYx",
"organizations_url": "https://api.github.com/users/etscrivner/orgs",
"received_events_url": "https://api.github.com/users/etscrivner/received_events",
"repos_url": "https://api.github.com/users/etscrivner/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/etscrivner/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/etscrivner/subscriptions",
"type": "User",
"url": "https://api.github.com/users/etscrivner",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-12-17T20:49:45Z
|
2021-09-08T23:06:03Z
|
2012-12-17T20:53:22Z
|
NONE
|
resolved
|
Fix HTTP method encoding problem
- Add unit-test to recreate original issue with encoding and attached files.
- No longer attempt to encode HTTP method
- All tests passing against Python 2.7 and 3.3.0
|
{
"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/1024/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/1024/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/1024.diff",
"html_url": "https://github.com/psf/requests/pull/1024",
"merged_at": "2012-12-17T20:53:22Z",
"patch_url": "https://github.com/psf/requests/pull/1024.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/1024"
}
| true |
[
"Beautiful. Thanks :)\n"
] |
https://api.github.com/repos/psf/requests/issues/1023
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/1023/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/1023/comments
|
https://api.github.com/repos/psf/requests/issues/1023/events
|
https://github.com/psf/requests/issues/1023
| 9,344,881 |
MDU6SXNzdWU5MzQ0ODgx
| 1,023 |
Setting u'POST' in requests.models.PreparedRequest.prepare_method breaks attaching files.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/69561?v=4",
"events_url": "https://api.github.com/users/etscrivner/events{/privacy}",
"followers_url": "https://api.github.com/users/etscrivner/followers",
"following_url": "https://api.github.com/users/etscrivner/following{/other_user}",
"gists_url": "https://api.github.com/users/etscrivner/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/etscrivner",
"id": 69561,
"login": "etscrivner",
"node_id": "MDQ6VXNlcjY5NTYx",
"organizations_url": "https://api.github.com/users/etscrivner/orgs",
"received_events_url": "https://api.github.com/users/etscrivner/received_events",
"repos_url": "https://api.github.com/users/etscrivner/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/etscrivner/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/etscrivner/subscriptions",
"type": "User",
"url": "https://api.github.com/users/etscrivner",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 6 |
2012-12-17T19:38:57Z
|
2021-09-09T05:30:05Z
|
2012-12-17T22:03:58Z
|
NONE
|
resolved
|
Running Python 2.7 on Ubuntu 12.04 with requests 1.0.2
The following line of code which performs an HTTP POST request with an attached image file breaks (worked in previous versions of requests):
```
[1] requests.post(url, data=data, files={'file': ('test.jpg', open('/tmp/test123.jpg', 'rb'))}, params=params)
...
UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 1066: ordinal not in range(128)
```
Running this through iPDB and stepping down through the requests API the problem seems directly related to issue #444 - If you're attaching a file then it will be encoded in the final HTTP body as a series of bytes.
The problem is prepare_method in models.py:223 - which, regardless of the version of Python used, tries to unicode encode the HTTP method name in all situations. This causes urllib3 trouble when trying to come up with a final encoding. Since the file serialization behavior is handled in requests and creates HTTP requests with inconsistent encodings in some situations this seems like a bug to me.
A potential solution would be to check for attached files and leave the encoding alone when preparing a request.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/69561?v=4",
"events_url": "https://api.github.com/users/etscrivner/events{/privacy}",
"followers_url": "https://api.github.com/users/etscrivner/followers",
"following_url": "https://api.github.com/users/etscrivner/following{/other_user}",
"gists_url": "https://api.github.com/users/etscrivner/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/etscrivner",
"id": 69561,
"login": "etscrivner",
"node_id": "MDQ6VXNlcjY5NTYx",
"organizations_url": "https://api.github.com/users/etscrivner/orgs",
"received_events_url": "https://api.github.com/users/etscrivner/received_events",
"repos_url": "https://api.github.com/users/etscrivner/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/etscrivner/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/etscrivner/subscriptions",
"type": "User",
"url": "https://api.github.com/users/etscrivner",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/1023/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/1023/timeline
| null |
completed
| null | null | false |
[
"Thanks for the detailed forensics! I'll try to get a fix out for this today.\n\nUnless you want to send a pull requests of course :)\n",
"As requests upgraded to 1.0.2. I came across a similar problem using requests.post(). \n\n``` python\n requests.post(url, data=req)\n```\n\nIt worked fine when I used version 0.14.2.\n\nHere is my traceback.\n\n``` python\n File \"/home/zhanqp/api_test/lib/python2.7/site-packages/requests/api.py\", line 81, in post\n return request('post', url, data=data, **kwargs)\n File \"/home/zhanqp/api_test/lib/python2.7/site-packages/requests/api.py\", line 38, in request\n return session.request(method=method, url=url, **kwargs)\n File \"/home/zhanqp/api_test/lib/python2.7/site-packages/requests/sessions.py\", line 266, in request\n resp = self.send(prep, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies)\n File \"/home/zhanqp/api_test/lib/python2.7/site-packages/requests/sessions.py\", line 357, in send\n r = adapter.send(request, **kwargs)\n File \"/home/zhanqp/api_test/lib/python2.7/site-packages/requests/adapters.py\", line 156, in send\n timeout=timeout,\n File \"/home/zhanqp/api_test/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py\", line 422, in urlopen\n body=body, headers=headers)\n File \"/home/zhanqp/api_test/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py\", line 274, in _make_request\n conn.request(method, url, **httplib_request_kw)\n File \"/user/local/python/lib/python2.7/httplib.py\", line 955, in request\n self._send_request(method, url, body, headers)\n File \"/user/local/python/lib/python2.7/httplib.py\", line 989, in _send_request\n self.endheaders(body)\n File \"/user/local/python/lib/python2.7/httplib.py\", line 951, in endheaders\n self._send_output(message_body)\n File \"/user/local/python/lib/python2.7/httplib.py\", line 809, in _send_output\n msg += message_body\nUnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 6: ordinal not in range(128)\n```\n",
"Tried to reproduce this problem.\n\n``` python\ncoding:utf8\n\nimport requests\nfrom utils import encode\n\nurl = \"http://www.google.com\"\nreq = encode(\"hi\")\n\nreq = requests.post(url, data=req)\nprint req.text\n```\n\nencode is a C function wrapped by ctypes, which encodes a string into byte stream. Curiously, type(req) is str. \n\nI think it is my own encode function that triggered this problem. But It worked fine when I used version 0.14.2.\n",
"@myzhan this should be fixed in 1.0.3, try upgrading to that. On a side note, if you wouldn't mind posting the encode function's code, I'd be interested in playing with it.\n",
"@sigmavirus24 Cool!!! 1.0.3 works fine with my code, thx for your great help. But encode function's code is used for commercial encrypted file, I can't post it, sorry. \n",
"Ah no worries then. I didn't do much to help though. Cheers\n"
] |
https://api.github.com/repos/psf/requests/issues/1022
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/1022/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/1022/comments
|
https://api.github.com/repos/psf/requests/issues/1022/events
|
https://github.com/psf/requests/pull/1022
| 9,343,601 |
MDExOlB1bGxSZXF1ZXN0MzM5ODI4Nw==
| 1,022 |
JSON-related doc fixes
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/58618?v=4",
"events_url": "https://api.github.com/users/kisielk/events{/privacy}",
"followers_url": "https://api.github.com/users/kisielk/followers",
"following_url": "https://api.github.com/users/kisielk/following{/other_user}",
"gists_url": "https://api.github.com/users/kisielk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kisielk",
"id": 58618,
"login": "kisielk",
"node_id": "MDQ6VXNlcjU4NjE4",
"organizations_url": "https://api.github.com/users/kisielk/orgs",
"received_events_url": "https://api.github.com/users/kisielk/received_events",
"repos_url": "https://api.github.com/users/kisielk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kisielk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kisielk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kisielk",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-12-17T19:02:50Z
|
2021-09-08T18:01:08Z
|
2012-12-17T19:03:40Z
|
CONTRIBUTOR
|
resolved
|
Missed a few spots :)
|
{
"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/1022/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/1022/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/1022.diff",
"html_url": "https://github.com/psf/requests/pull/1022",
"merged_at": "2012-12-17T19:03:40Z",
"patch_url": "https://github.com/psf/requests/pull/1022.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/1022"
}
| true |
[
":cake:\n"
] |
https://api.github.com/repos/psf/requests/issues/1021
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/1021/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/1021/comments
|
https://api.github.com/repos/psf/requests/issues/1021/events
|
https://github.com/psf/requests/issues/1021
| 9,342,844 |
MDU6SXNzdWU5MzQyODQ0
| 1,021 |
Proxies are not working in v1.0
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/878541?v=4",
"events_url": "https://api.github.com/users/pankajkgarg/events{/privacy}",
"followers_url": "https://api.github.com/users/pankajkgarg/followers",
"following_url": "https://api.github.com/users/pankajkgarg/following{/other_user}",
"gists_url": "https://api.github.com/users/pankajkgarg/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pankajkgarg",
"id": 878541,
"login": "pankajkgarg",
"node_id": "MDQ6VXNlcjg3ODU0MQ==",
"organizations_url": "https://api.github.com/users/pankajkgarg/orgs",
"received_events_url": "https://api.github.com/users/pankajkgarg/received_events",
"repos_url": "https://api.github.com/users/pankajkgarg/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pankajkgarg/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pankajkgarg/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pankajkgarg",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 5 |
2012-12-17T18:47:54Z
|
2021-09-09T05:30:08Z
|
2012-12-17T19:04:46Z
|
NONE
|
resolved
|
Whenever I am trying to send a request using proxies, I get the following error.
AttributeError: 'PoolManager' object has no attribute 'ProxyManager'
I am running the following command
```
r = requests.get("http://google.com", proxies={"http": "127.0.0.1:8128", "https": "127.0.0.1:8128"}, timeout=100)
```
``` python
/Library/Python/2.7/site-packages/requests/api.pyc in request(method, url, **kwargs)
36
37 session = sessions.Session()
---> 38 return session.request(method=method, url=url, **kwargs)
39
40
/Library/Python/2.7/site-packages/requests/sessions.pyc in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert)
254
255 # Send the request.
--> 256 resp = self.send(prep, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies)
257
258 # Redirect resolving generator.
/Library/Python/2.7/site-packages/requests/sessions.pyc in send(self, request, **kwargs)
345 """Send a given PreparedRequest."""
346 adapter = self.get_adapter(url=request.url)
--> 347 r = adapter.send(request, **kwargs)
348 return r
349
/Library/Python/2.7/site-packages/requests/adapters.pyc in send(self, request, stream, timeout, verify, cert, proxies)
146 """Sends PreparedRequest object. Returns Response object."""
147
--> 148 conn = self.get_connection(request.url, proxies)
149
150 self.cert_verify(conn, request.url, verify, cert)
/Library/Python/2.7/site-packages/requests/adapters.pyc in get_connection(self, url, proxies)
128
129 if proxy:
--> 130 conn = self.poolmanager.ProxyManager(self.poolmanager.proxy_from_url(proxy))
131 else:
132 conn = self.poolmanager.connection_from_url(url)
AttributeError: 'PoolManager' object has no attribute 'ProxyManager'
```
|
{
"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/1021/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/1021/timeline
| null |
completed
| null | null | false |
[
"Sorry for the bug! #1017\n",
"Should be better now!\n",
"@pankajn17 \n\nHow did you get this pretty stack with source context?\n",
"@piotr-dobrogost Python 3.\n",
"IPython does it too.\n"
] |
https://api.github.com/repos/psf/requests/issues/1020
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/1020/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/1020/comments
|
https://api.github.com/repos/psf/requests/issues/1020/events
|
https://github.com/psf/requests/pull/1020
| 9,342,612 |
MDExOlB1bGxSZXF1ZXN0MzM5Nzk5Mw==
| 1,020 |
Fix off-by-one error.
|
{
"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 |
2012-12-17T18:43:59Z
|
2021-09-08T18:01:09Z
|
2012-12-17T18:46:09Z
|
MEMBER
|
resolved
|
Silly, small change, but may as well fix it.
The logic as it stands would do max_redirects + 1 redirects. Which is odd.
|
{
"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/1020/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/1020/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/1020.diff",
"html_url": "https://github.com/psf/requests/pull/1020",
"merged_at": "2012-12-17T18:46:09Z",
"patch_url": "https://github.com/psf/requests/pull/1020.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/1020"
}
| true |
[
"gah, should have just had the index start at 1 :)\n",
"Pft, everyone knows that programmers count from 0.\n"
] |
https://api.github.com/repos/psf/requests/issues/1019
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/1019/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/1019/comments
|
https://api.github.com/repos/psf/requests/issues/1019/events
|
https://github.com/psf/requests/issues/1019
| 9,342,373 |
MDU6SXNzdWU5MzQyMzcz
| 1,019 |
AttributeError: 'HTTPAdapter' object has no attribute 'verify'
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/717901?v=4",
"events_url": "https://api.github.com/users/t-8ch/events{/privacy}",
"followers_url": "https://api.github.com/users/t-8ch/followers",
"following_url": "https://api.github.com/users/t-8ch/following{/other_user}",
"gists_url": "https://api.github.com/users/t-8ch/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/t-8ch",
"id": 717901,
"login": "t-8ch",
"node_id": "MDQ6VXNlcjcxNzkwMQ==",
"organizations_url": "https://api.github.com/users/t-8ch/orgs",
"received_events_url": "https://api.github.com/users/t-8ch/received_events",
"repos_url": "https://api.github.com/users/t-8ch/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/t-8ch/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/t-8ch/subscriptions",
"type": "User",
"url": "https://api.github.com/users/t-8ch",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-12-17T18:36:33Z
|
2021-09-09T05:30:09Z
|
2012-12-17T18:38:43Z
|
CONTRIBUTOR
|
resolved
|
``` python
certs = requests.utils.get_os_ca_bundle_path()
requests.get('https://google.com', verify=certs)
Traceback (most recent call last):
File "<ipython-input-22-b57935839df3>", line 1, in <module>
requests.get('https://google.com', verify=certs)
File "./requests/api.py", line 49, in get
return request('get', url, **kwargs)
File "./requests/api.py", line 38, in request
return session.request(method=method, url=url, **kwargs)
File "./requests/sessions.py", line 256, in request
resp = self.send(prep, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies)
File "./requests/sessions.py", line 347, in send
r = adapter.send(request, **kwargs)
File "./requests/adapters.py", line 150, in send
self.cert_verify(conn, request.url, verify, cert)
File "./requests/adapters.py", line 65, in cert_verify
cert_loc = self.verify
AttributeError: 'HTTPAdapter' object has no attribute 'verify'
```
[Docs](http://docs.python-requests.org/en/v1.0.0/user/advanced/#ssl-cert-verification):
```
You can also pass verify the path to a CA_BUNDLE file for private certs.
You can also set the REQUESTS_CA_BUNDLE environment variable.
```
|
{
"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/1019/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/1019/timeline
| null |
completed
| null | null | false |
[
"Oops, simple fix. Sorry about that.\n"
] |
https://api.github.com/repos/psf/requests/issues/1018
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/1018/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/1018/comments
|
https://api.github.com/repos/psf/requests/issues/1018/events
|
https://github.com/psf/requests/issues/1018
| 9,341,561 |
MDU6SXNzdWU5MzQxNTYx
| 1,018 |
AttributeError: 'PreparedRequest' object has no attribute 'data'
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/352270?v=4",
"events_url": "https://api.github.com/users/michaelhelmick/events{/privacy}",
"followers_url": "https://api.github.com/users/michaelhelmick/followers",
"following_url": "https://api.github.com/users/michaelhelmick/following{/other_user}",
"gists_url": "https://api.github.com/users/michaelhelmick/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/michaelhelmick",
"id": 352270,
"login": "michaelhelmick",
"node_id": "MDQ6VXNlcjM1MjI3MA==",
"organizations_url": "https://api.github.com/users/michaelhelmick/orgs",
"received_events_url": "https://api.github.com/users/michaelhelmick/received_events",
"repos_url": "https://api.github.com/users/michaelhelmick/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/michaelhelmick/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/michaelhelmick/subscriptions",
"type": "User",
"url": "https://api.github.com/users/michaelhelmick",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 8 |
2012-12-17T18:09:46Z
|
2021-09-09T05:30:07Z
|
2012-12-17T22:22:08Z
|
NONE
|
resolved
|
Hey guys, just wanted to bring this issue forward. With requests 1.0.0
So the error came from when I went to test `Twython` with the new `requests` release.
And because it bothered me, I removed `self` from all variables that used `self` like `self.callback_url`
Also, I striped the code out of the actual function `get_authentication_tokens` (so that's why you'll see ref to that function in the traceback)
``` python
import requests
from requests_oauthlib import OAuth1
app_key = u'SUPERDUPERSECRETKEY'
app_secret = u'SUPERDUPERSECRETSECRET'
callback_url = 'http://example.com'
headers = {'User-Agent': 'Twython v2.5.5'}
auth = OAuth1(app_key, app_secret,
signature_type='auth_header')
request_args['oauth_callback'] = callback_url
response = requests.get('https://api.twitter.com/oauth/request_token', params=request_args, headers=headers, auth=auth)
if response.status_code != 200:
raise TwythonAuthError("Seems something couldn't be verified with your OAuth junk. Error: %s, Message: %s" % (response.status_code, response.content))
request_tokens = dict(parse_qsl(response.content))
if not request_tokens:
raise TwythonError('Unable to decode request tokens.')
oauth_callback_confirmed = request_tokens.get('oauth_callback_confirmed') == 'true'
auth_url_params = {
'oauth_token': request_tokens['oauth_token'],
}
# Use old-style callback argument if server didn't accept new-style
if callback_url and not oauth_callback_confirmed:
auth_url_params['oauth_callback'] = callback_url
request_tokens['auth_url'] = 'https://api.twitter.com/oauth/authenticate?' + urllib.urlencode(auth_url_params)
return request_tokens
```
Anyways, when I try to run this code I get the error:
```
Traceback (most recent call last):
File "twython.py", line 585, in <module>
auth_props = t.get_authentication_tokens()
File "twython.py", line 271, in get_authentication_tokens
response = requests.get('https://api.twitter.com/oauth/request_token', params=request_args, headers=headers, auth=self.auth)
File "/Users/mikehelmick/.virtualenv/twython/lib/python2.7/site-packages/requests/api.py", line 49, in get
return request('get', url, **kwargs)
File "/Users/mikehelmick/.virtualenv/twython/lib/python2.7/site-packages/requests/api.py", line 38, in request
return session.request(method=method, url=url, **kwargs)
File "/Users/mikehelmick/.virtualenv/twython/lib/python2.7/site-packages/requests/sessions.py", line 253, in request
prep = req.prepare()
File "/Users/mikehelmick/.virtualenv/twython/lib/python2.7/site-packages/requests/models.py", line 200, in prepare
p.prepare_auth(self.auth)
File "/Users/mikehelmick/.virtualenv/twython/lib/python2.7/site-packages/requests/models.py", line 336, in prepare_auth
r = auth(self)
File "/Users/mikehelmick/.virtualenv/twython/lib/python2.7/site-packages/requests_oauthlib/core.py", line 41, in __call__
decoded_body = extract_params(r.data)
AttributeError: 'PreparedRequest' object has no attribute 'data'
```
|
{
"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/1018/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/1018/timeline
| null |
completed
| null | null | false |
[
"`requests-oauthlib` needs to updated still.\n\n`PreparedRequest` has a `body` parameter.\n",
"Yeah, for the moment none of the external-to-Requests auth code has been updated for v1.\n",
"Can you raise this against [requests/requests-oauthlib](https://github.com/requests/requests-oauthlib) as well?\n",
"@kennethreitz Well, that just isn't going to do. All code must be shipped at once. No :cake: for you. :rage4: \n",
"@Lukasa Sure.\n",
"@michaelhelmick pull requests accepted :)\n",
":+1: If I find some time to fix it up, I def. will. Currently at work though! \n\n## \n\nMike Helmick\n\nOn Monday, December 17, 2012 at 1:15 PM, Kenneth Reitz wrote:\n\n> @michaelhelmick (https://github.com/michaelhelmick) pull requests accepted :)\n> \n> —\n> Reply to this email directly or view it on GitHub (https://github.com/kennethreitz/requests/issues/1018#issuecomment-11452999). \n",
"This is being handled in requests/requests-oauthlib#1, so we don't need this issue. =)\n"
] |
https://api.github.com/repos/psf/requests/issues/1017
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/1017/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/1017/comments
|
https://api.github.com/repos/psf/requests/issues/1017/events
|
https://github.com/psf/requests/issues/1017
| 9,337,318 |
MDU6SXNzdWU5MzM3MzE4
| 1,017 |
PoolManager object has no attribute ProxyManager
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2682247?v=4",
"events_url": "https://api.github.com/users/athoik/events{/privacy}",
"followers_url": "https://api.github.com/users/athoik/followers",
"following_url": "https://api.github.com/users/athoik/following{/other_user}",
"gists_url": "https://api.github.com/users/athoik/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/athoik",
"id": 2682247,
"login": "athoik",
"node_id": "MDQ6VXNlcjI2ODIyNDc=",
"organizations_url": "https://api.github.com/users/athoik/orgs",
"received_events_url": "https://api.github.com/users/athoik/received_events",
"repos_url": "https://api.github.com/users/athoik/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/athoik/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/athoik/subscriptions",
"type": "User",
"url": "https://api.github.com/users/athoik",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-12-17T16:04:22Z
|
2021-09-09T05:30:08Z
|
2012-12-17T19:05:14Z
|
NONE
|
resolved
|
Dear all,
I want to use requests library (current master) behind a proxy and this is what i get:
```
debian:~# export http_proxy=http://192.168.1.1:3128
debian:~# python
Python 2.6.6 (r266:84292, Dec 27 2010, 00:02:40)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> requests.get("http://www.gr")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/root/.local/lib/python2.6/site-packages/requests/api.py", line 49, in get
return request('get', url, **kwargs)
File "/root/.local/lib/python2.6/site-packages/requests/api.py", line 38, in request
return session.request(method=method, url=url, **kwargs)
File "/root/.local/lib/python2.6/site-packages/requests/sessions.py", line 256, in request
resp = self.send(prep, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies)
File "/root/.local/lib/python2.6/site-packages/requests/sessions.py", line 347, in send
r = adapter.send(request, **kwargs)
File "/root/.local/lib/python2.6/site-packages/requests/adapters.py", line 148, in send
conn = self.get_connection(request.url, proxies)
File "/root/.local/lib/python2.6/site-packages/requests/adapters.py", line 130, in get_connection
conn = self.poolmanager.ProxyManager(self.poolmanager.proxy_from_url(proxy))
AttributeError: 'PoolManager' object has no attribute 'ProxyManager'
>>> requests.__version__
'1.0.0'
```
|
{
"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/1017/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/1017/timeline
| null |
completed
| null | null | false |
[
"Yup, that looks wrong.\n\n@kennethreitz, I haven't ramped up on the adaptors stuff yet, but it feels like [line 130 of adapters.py](https://github.com/kennethreitz/requests/blob/master/requests/adapters.py#L130) should read `conn = ProxyManager.(self.poolmanager.proxy_from_url(proxy))`. You'd need to import `ProxyManager` too.\n\nIf I get up to speed tonight I'll branch and raise a PR, but I thought I'd put this here as I might not.\n",
"all better!\n"
] |
https://api.github.com/repos/psf/requests/issues/1016
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/1016/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/1016/comments
|
https://api.github.com/repos/psf/requests/issues/1016/events
|
https://github.com/psf/requests/issues/1016
| 9,327,760 |
MDU6SXNzdWU5MzI3NzYw
| 1,016 |
OAuth1 with realm parameter
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/545809?v=4",
"events_url": "https://api.github.com/users/daniel-lundin/events{/privacy}",
"followers_url": "https://api.github.com/users/daniel-lundin/followers",
"following_url": "https://api.github.com/users/daniel-lundin/following{/other_user}",
"gists_url": "https://api.github.com/users/daniel-lundin/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/daniel-lundin",
"id": 545809,
"login": "daniel-lundin",
"node_id": "MDQ6VXNlcjU0NTgwOQ==",
"organizations_url": "https://api.github.com/users/daniel-lundin/orgs",
"received_events_url": "https://api.github.com/users/daniel-lundin/received_events",
"repos_url": "https://api.github.com/users/daniel-lundin/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/daniel-lundin/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/daniel-lundin/subscriptions",
"type": "User",
"url": "https://api.github.com/users/daniel-lundin",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-12-17T09:31:39Z
|
2021-09-09T05:30:09Z
|
2012-12-17T13:48:14Z
|
NONE
|
resolved
|
The OAuth1-wrapper included in requests doesn't include a parameter for oauth-parameter realm. I tried to add it as a regular post/get parameter but this leads to it being included in the base_string used to calculate the signature. This is not per spec.
The oauthlib.oauth1.rfc5849.Server excludes the realm parameter(even if received as a post/get parameter) so I get a signature mismatch.
|
{
"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/1016/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/1016/timeline
| null |
completed
| null | null | false |
[
"OAuth is being moved to another module.\n",
"For the interested: [requests/requests-oauthlib](https://github.com/requests/requests-oauthlib).\n"
] |
https://api.github.com/repos/psf/requests/issues/1015
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/1015/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/1015/comments
|
https://api.github.com/repos/psf/requests/issues/1015/events
|
https://github.com/psf/requests/issues/1015
| 9,325,847 |
MDU6SXNzdWU5MzI1ODQ3
| 1,015 |
Consider iter_json
|
{
"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 |
[] |
{
"closed_at": "2013-05-29T07:59:12Z",
"closed_issues": 12,
"created_at": "2012-11-27T18:41:46Z",
"creator": {
"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"
},
"description": ":sparkles: :cake: :sparkles:",
"due_on": null,
"html_url": "https://github.com/psf/requests/milestone/18",
"id": 219754,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/18/labels",
"node_id": "MDk6TWlsZXN0b25lMjE5NzU0",
"number": 18,
"open_issues": 0,
"state": "closed",
"title": "v1.0.0",
"updated_at": "2013-05-29T07:59:12Z",
"url": "https://api.github.com/repos/psf/requests/milestones/18"
}
| 0 |
2012-12-17T07:37:38Z
|
2021-09-09T05:30:11Z
|
2012-12-17T07:42:38Z
|
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/1015/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/1015/timeline
| null |
completed
| null | null | false |
[] |
|
https://api.github.com/repos/psf/requests/issues/1014
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/1014/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/1014/comments
|
https://api.github.com/repos/psf/requests/issues/1014/events
|
https://github.com/psf/requests/issues/1014
| 9,323,530 |
MDU6SXNzdWU5MzIzNTMw
| 1,014 |
raw interface no longer working?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4",
"events_url": "https://api.github.com/users/ghost/events{/privacy}",
"followers_url": "https://api.github.com/users/ghost/followers",
"following_url": "https://api.github.com/users/ghost/following{/other_user}",
"gists_url": "https://api.github.com/users/ghost/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ghost",
"id": 10137,
"login": "ghost",
"node_id": "MDQ6VXNlcjEwMTM3",
"organizations_url": "https://api.github.com/users/ghost/orgs",
"received_events_url": "https://api.github.com/users/ghost/received_events",
"repos_url": "https://api.github.com/users/ghost/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ghost/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ghost",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-12-17T03:51:38Z
|
2021-09-09T05:30:11Z
|
2012-12-17T03:52:29Z
|
NONE
|
resolved
|
I recently upgraded from Requests 0.11.1 to 0.14.2. I get a few scripts that rely on the library to download media files (couple of megabytes each). Before, this approach worked just fine:
```
import requests
r = requests.get('http://docs.python-requests.org/')
while True:
print 'reading...'
chunk = r.raw.read(64 * 1024)
print 'got a chunk of %d bytes' % len(chunk)
if len(chunk) == 0:
break
```
Now, the first read() returns zero byte. Am I doing something wrong?
|
{
"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/1014/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/1014/timeline
| null |
completed
| null | null | false |
[
"You have to add `prefetch=False` parameter\n"
] |
https://api.github.com/repos/psf/requests/issues/1013
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/1013/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/1013/comments
|
https://api.github.com/repos/psf/requests/issues/1013/events
|
https://github.com/psf/requests/issues/1013
| 9,318,349 |
MDU6SXNzdWU5MzE4MzQ5
| 1,013 |
requests.session not persisting cookies
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2616964?v=4",
"events_url": "https://api.github.com/users/geancarlo2/events{/privacy}",
"followers_url": "https://api.github.com/users/geancarlo2/followers",
"following_url": "https://api.github.com/users/geancarlo2/following{/other_user}",
"gists_url": "https://api.github.com/users/geancarlo2/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/geancarlo2",
"id": 2616964,
"login": "geancarlo2",
"node_id": "MDQ6VXNlcjI2MTY5NjQ=",
"organizations_url": "https://api.github.com/users/geancarlo2/orgs",
"received_events_url": "https://api.github.com/users/geancarlo2/received_events",
"repos_url": "https://api.github.com/users/geancarlo2/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/geancarlo2/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/geancarlo2/subscriptions",
"type": "User",
"url": "https://api.github.com/users/geancarlo2",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-12-16T18:55:19Z
|
2021-09-09T05:30:12Z
|
2012-12-16T20:12:59Z
|
NONE
|
resolved
|
Hello,
I have tried the following sample code from http://docs.python-requests.org/en/latest/user/advanced/ with requests 0.14.2:
import requests
s = requests.session()
s.get('http://httpbin.org/cookies/set/sessioncookie/123456789')
r = s.get("http://httpbin.org/cookies")
print r.text
which yields the following output on wireshark http://imgur.com/a/aCwKN#0.
As you can see in the 3rd capture, the sessioncookie is not being sent and consequently the reply's content has no cookie data
Also this code:
import requests
r = requests.get("http://httpbin.org/cookies", cookies = {"sessioncookie":"123456789"})
print r.text
causes an error:
Traceback (most recent call last):
File "C:\Users\geancarlo\Documents\Visual Studio 2010\Projects\woonro-vote\woo
nro-vote\test.py", line 2, in <module>
r = requests.get("http://httpbin.org/cookies", cookies = {"sessioncookie":"1
23456789"})
File "C:\Python27\lib\site-packages\requests-0.14.2-py2.7.egg\requests\api.py"
, line 60, in get
return request('get', url, *_kwargs)
File "C:\Python27\lib\site-packages\requests-0.14.2-py2.7.egg\requests\api.py"
, line 49, in request
return session.request(method=method, url=url, *_kwargs)
File "C:\Python27\lib\site-packages\requests-0.14.2-py2.7.egg\requests\session
s.py", line 165, in request
prep = req.prepare()
File "C:\Python27\lib\site-packages\requests-0.14.2-py2.7.egg\requests\models.
py", line 193, in prepare
p.prepare_cookies(self.cookies)
File "C:\Python27\lib\site-packages\requests-0.14.2-py2.7.egg\requests\models.
py", line 358, in prepare_cookies
cookie_header = get_cookie_header(cookies, self)
File "C:\Python27\lib\site-packages\requests-0.14.2-py2.7.egg\requests\cookies
.py", line 116, in get_cookie_header
jar.add_cookie_header(r)
File "C:\Python27\lib\cookielib.py", line 1324, in add_cookie_header
cookies = self._cookies_for_request(request)
File "C:\Python27\lib\cookielib.py", line 1250, in _cookies_for_request
cookies.extend(self._cookies_for_domain(domain, request))
File "C:\Python27\lib\cookielib.py", line 1230, in _cookies_for_domain
if not self._policy.domain_return_ok(domain, request):
File "C:\Python27\lib\cookielib.py", line 1147, in domain_return_ok
req_host, erhn = eff_request_host(request)
File "C:\Python27\lib\cookielib.py", line 604, in eff_request_host
erhn = req_host = request_host(request)
File "C:\Python27\lib\cookielib.py", line 589, in request_host
url = request.get_full_url()
File "C:\Python27\lib\site-packages\requests-0.14.2-py2.7.egg\requests\cookies
.py", line 51, in get_full_url
return self._r.full_url
AttributeError: 'PreparedRequest' object has no attribute 'full_url'
Press any key to continue . . .
|
{
"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/1013/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/1013/timeline
| null |
completed
| null | null | false |
[
"You aren't using requests v14.2, you're using the development version that is currently being rewritten.\n\nInstall with pip.\n"
] |
https://api.github.com/repos/psf/requests/issues/1012
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/1012/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/1012/comments
|
https://api.github.com/repos/psf/requests/issues/1012/events
|
https://github.com/psf/requests/pull/1012
| 9,316,546 |
MDExOlB1bGxSZXF1ZXN0MzM4NjE3Mg==
| 1,012 |
Fixed small bug where user couldn't add custom headers
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2013449?v=4",
"events_url": "https://api.github.com/users/bodziec/events{/privacy}",
"followers_url": "https://api.github.com/users/bodziec/followers",
"following_url": "https://api.github.com/users/bodziec/following{/other_user}",
"gists_url": "https://api.github.com/users/bodziec/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bodziec",
"id": 2013449,
"login": "bodziec",
"node_id": "MDQ6VXNlcjIwMTM0NDk=",
"organizations_url": "https://api.github.com/users/bodziec/orgs",
"received_events_url": "https://api.github.com/users/bodziec/received_events",
"repos_url": "https://api.github.com/users/bodziec/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bodziec/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bodziec/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bodziec",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-12-16T15:01:40Z
|
2021-09-08T18:01:08Z
|
2012-12-16T20:14:23Z
|
CONTRIBUTOR
|
resolved
|
I think someone made a typo:
self.headers = CaseInsensitiveDict(self.headers)
should be:
self.headers = CaseInsensitiveDict(headers)
Cheers,
Bartek
|
{
"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/1012/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/1012/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/1012.diff",
"html_url": "https://github.com/psf/requests/pull/1012",
"merged_at": "2012-12-16T20:14:23Z",
"patch_url": "https://github.com/psf/requests/pull/1012.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/1012"
}
| true |
[
"Thanks!\n"
] |
https://api.github.com/repos/psf/requests/issues/1011
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/1011/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/1011/comments
|
https://api.github.com/repos/psf/requests/issues/1011/events
|
https://github.com/psf/requests/pull/1011
| 9,313,402 |
MDExOlB1bGxSZXF1ZXN0MzM4NTA3NA==
| 1,011 |
Fixed relative import
|
{
"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 |
2012-12-16T03:56:54Z
|
2014-07-20T01:34:30Z
|
2012-12-16T04:45:24Z
|
NONE
| null |
For Python 3 support.
|
{
"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/1011/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/1011/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/1011.diff",
"html_url": "https://github.com/psf/requests/pull/1011",
"merged_at": "2012-12-16T04:45:24Z",
"patch_url": "https://github.com/psf/requests/pull/1011.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/1011"
}
| true |
[
"It's worth noting that, without the fix, nose reports eight failures, finishing with an `ImportError`, whereas with this fix, failures jump to 34 errors and 28 failures.\n",
"thanks!\n"
] |
https://api.github.com/repos/psf/requests/issues/1010
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/1010/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/1010/comments
|
https://api.github.com/repos/psf/requests/issues/1010/events
|
https://github.com/psf/requests/issues/1010
| 9,312,665 |
MDU6SXNzdWU5MzEyNjY1
| 1,010 |
Install through pip fails under Python 3.3
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/749270?v=4",
"events_url": "https://api.github.com/users/harmesy/events{/privacy}",
"followers_url": "https://api.github.com/users/harmesy/followers",
"following_url": "https://api.github.com/users/harmesy/following{/other_user}",
"gists_url": "https://api.github.com/users/harmesy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/harmesy",
"id": 749270,
"login": "harmesy",
"node_id": "MDQ6VXNlcjc0OTI3MA==",
"organizations_url": "https://api.github.com/users/harmesy/orgs",
"received_events_url": "https://api.github.com/users/harmesy/received_events",
"repos_url": "https://api.github.com/users/harmesy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/harmesy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/harmesy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/harmesy",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2012-12-16T01:22:55Z
|
2021-09-09T05:30:12Z
|
2012-12-16T04:48:02Z
|
NONE
|
resolved
|
Hey, sorry if I'm going about this in the wrong way, new to this.
I was attempting to install requests to a new virtualenv using python3 and pip. It failed with the following:
```
Downloading/unpacking git+https://github.com/kennethreitz/requests
Cloning https://github.com/kennethreitz/requests to /var/folders/wz/jd2dflq52hbd0t48t3th34xw0000gn/T/pip-57zi3u-build
Running setup.py egg_info for package from git+https://github.com/kennethreitz/requests
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/var/folders/wz/jd2dflq52hbd0t48t3th34xw0000gn/T/pip-57zi3u-build/setup.py", line 6, in <module>
import requests
File "./requests/__init__.py", line 54, in <module>
from .api import request, get, head, post, patch, put, delete, options
File "./requests/api.py", line 14, in <module>
from . import sessions
ImportError: cannot import name sessions
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/var/folders/wz/jd2dflq52hbd0t48t3th34xw0000gn/T/pip-57zi3u-build/setup.py", line 6, in <module>
import requests
File "./requests/__init__.py", line 54, in <module>
from .api import request, get, head, post, patch, put, delete, options
File "./requests/api.py", line 14, in <module>
from . import sessions
ImportError: cannot import name sessions
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /var/folders/wz/jd2dflq52hbd0t48t3th34xw0000gn/T/pip-57zi3u-build
```
When I tried the same with python 2.7.2 it worked fine and installed without any issues.
I modified api.py, line 22 from `from adapters import HTTPAdapter` to `from .adapters import HTTPAdapter` and it seemed to fix the problem when installing with python3. I also tried reinstalling into a new virtualenv using python 2.7.2 with the above change and it seemed to work fine.
I'm pretty much brand new to python, so the the above change could have more consequences than I'm aware of, but I just thought I'd let you know.
Thanks.
|
{
"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/1010/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/1010/timeline
| null |
completed
| null | null | false |
[
"I'm getting the same thing when attempting to install from the repository (this). I've mirrored @harmesy's fix in a [pull request](https://github.com/kennethreitz/requests/pull/1011).\n",
"And, @harmesy, you went about this in a completely correct way. :+1: \n",
"Closing since there was a pull request. Thanks again! :cake:\n"
] |
https://api.github.com/repos/psf/requests/issues/1009
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/1009/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/1009/comments
|
https://api.github.com/repos/psf/requests/issues/1009/events
|
https://github.com/psf/requests/pull/1009
| 9,306,702 |
MDExOlB1bGxSZXF1ZXN0MzM4Mjk2Ng==
| 1,009 |
Auth documentation.
|
{
"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 | 6 |
2012-12-15T13:20:21Z
|
2021-09-08T18:01:07Z
|
2012-12-17T19:27:36Z
|
MEMBER
|
resolved
|
Thoughts? Not sure whether we want a separate section on the Requests org in general, but we can add that as a separate change if we do.
|
{
"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/1009/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/1009/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/1009.diff",
"html_url": "https://github.com/psf/requests/pull/1009",
"merged_at": "2012-12-17T19:27:36Z",
"patch_url": "https://github.com/psf/requests/pull/1009.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/1009"
}
| true |
[
"Well, I think I'd like to add a whole new page to the docs for authentication. I'd like the conanical usage docs to be here.\n",
"Cool, I'll try to get on this sometime this week. Sorry about disappearing over the weekend, it was manic. Stupid Christmas. :cake:\n",
"UNACCEPTABLE\n",
"But look, I got Requests a christmas tree and everything! IT HAS GIFTS UNDER IT!\n\n:christmas_tree: \n:gift: :gift: :gift: \n",
"Is this closer to what you wanted?\n\nNB: I've got zero experience with Sphinx so this may not compile properly.\n",
"beautiful :)\n"
] |
https://api.github.com/repos/psf/requests/issues/1008
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/1008/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/1008/comments
|
https://api.github.com/repos/psf/requests/issues/1008/events
|
https://github.com/psf/requests/issues/1008
| 9,306,282 |
MDU6SXNzdWU5MzA2Mjgy
| 1,008 |
ConnectionError with App Engine
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/461998?v=4",
"events_url": "https://api.github.com/users/cihati/events{/privacy}",
"followers_url": "https://api.github.com/users/cihati/followers",
"following_url": "https://api.github.com/users/cihati/following{/other_user}",
"gists_url": "https://api.github.com/users/cihati/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cihati",
"id": 461998,
"login": "cihati",
"node_id": "MDQ6VXNlcjQ2MTk5OA==",
"organizations_url": "https://api.github.com/users/cihati/orgs",
"received_events_url": "https://api.github.com/users/cihati/received_events",
"repos_url": "https://api.github.com/users/cihati/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cihati/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cihati/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cihati",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 6 |
2012-12-15T12:43:36Z
|
2021-09-09T05:00:47Z
|
2012-12-15T21:13:48Z
|
NONE
|
resolved
|
Hi,
I'm using App Engine & Requests library. So far, I haven't had any problems. I recently came across with something I couldn't solve:
I'm writing a web application that uses Facebook Graph API. So far, Requests have worked well but I'm now trying to add a somewhat costly query, and I bump into an error.
The following does NOT work (I use MYFACEBOOKID and MYTOKEN, please change it to relevant values please):
``` python
import fix_path
import webapp2
from lib import requests
class MainHandler(webapp2.RequestHandler):
def get(self):
url = 'https://graph.facebook.com/MYFACEBOOKID?access_token=MYTOKEN&fields=music.fields(id,name,hometown),gender,birthday,name,friends.fields(id,gender,name,birthday,music.fields(id,name,hometown))&method=GET&format=json'
r = requests.get(url)
self.response.write(r.json)
app = webapp2.WSGIApplication([
('/', MainHandler)
], debug=True)
```
For the above code piece, I get the following error:
``` python
Traceback (most recent call last):
File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.5.1/webapp2.py", line 1536, in __call__
rv = self.handle_exception(request, response, e)
File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.5.1/webapp2.py", line 1530, in __call__
rv = self.router.dispatch(request, response)
File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.5.1/webapp2.py", line 1278, in default_dispatcher
return route.handler_adapter(request, response)
File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.5.1/webapp2.py", line 1102, in __call__
return handler.dispatch()
File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.5.1/webapp2.py", line 572, in dispatch
return self.handle_exception(e, self.app.debug)
File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.5.1/webapp2.py", line 570, in dispatch
return method(*args, **kwargs)
File "/base/data/home/apps/s~benzeshen1/oguz.363884243820635627/main.py", line 30, in get
r = requests.get(url)
File "/base/data/home/apps/s~benzeshen1/oguz.363884243820635627/lib/requests/api.py", line 63, in get
return request('get', url, **kwargs)
File "/base/data/home/apps/s~benzeshen1/oguz.363884243820635627/lib/requests/api.py", line 49, in request
return session.request(method=method, url=url, **kwargs)
File "/base/data/home/apps/s~benzeshen1/oguz.363884243820635627/lib/requests/sessions.py", line 269, in request
return self._send_request(r, **args)
File "/base/data/home/apps/s~benzeshen1/oguz.363884243820635627/lib/requests/sessions.py", line 273, in _send_request
r.send(prefetch=kwargs.get("prefetch"))
File "/base/data/home/apps/s~benzeshen1/oguz.363884243820635627/lib/requests/models.py", line 641, in send
raise ConnectionError(e)
ConnectionError: HTTPSConnectionPool(host='graph.facebook.com', port=443): Max retries exceeded with url: /MYFACEBOOKID?access_token=MYTOKEN&fields=music.fields(id,name,hometown),gender,birthday,name,friends.fields(id,gender,name,birthday,music.fields(id,name,hometown))&method=GET&format=json
```
However, this works using App Engine urlfetch:
``` python
import fix_path
import webapp2
from google.appengine.api import urlfetch
class MainHandler(webapp2.RequestHandler):
def get(self):
url = 'https://graph.facebook.com/MYFACEBOOKID?access_token=MYTOKEN&fields=music.fields(id,name,hometown),gender,birthday,name,friends.fields(id,gender,name,birthday,music.fields(id,name,hometown))&method=GET&format=json'
result = urlfetch.fetch(url, deadline=60)
if result.status_code == 200:
self.response.write(result.content)
app = webapp2.WSGIApplication([
('/', MainHandler)
], debug=True)
```
How can I solve this issue?
|
{
"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/1008/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/1008/timeline
| null |
completed
| null | null | false |
[
"App engine is not supported, as it is not Python.\n",
"in using Requests on App Engine, and hitting the Facebook Graph API, I was debugging a similar issue with:\n\n```\nConnectionError: HTTPSConnectionPool(host='graph.facebook.com', port=443): Max retries exceeded\n```\n\noccurring. I believe this is just an unfortunate error in the SSL layer that is not the actual error occurring.\n\nBy switching to using the `data=` arg in the `requests.post` and also adding the `verify=False` arg to prevent sensitivity around SSL, I was able to get the call through without the `ConnectionError` being raised.\n\nSee:\nhttp://docs.python-requests.org/en/latest/api/#lower-level-classes\n\nIn my case, the response I got from Facebook was:\n\n```\n{u'error': {u'message': u'Too many requests in batch message. Maximum batch size is 50',\n u'type': u'GraphBatchException'}}\n```\n\nThus Facebook is just not liking the number of things in my batch call, but the wrong error is being raised and confusing things immensely.\n",
"I broke it while enabling SNI in urllib3.\nIt will be fixed by shazow/urllib3#130 (ping @shazow)\nTry removing the `ssl_wrap_socket()` function from `requests.packages.urllib3.util.py`\n",
"Ping received. I plan to put a few hours into urllib3 this weekend. I'll put this one at the top of my list.\n",
"(Master has it now)\n",
"Per @sigmavirus24, I'm watching this as a possible root cause of a similar-looking problem in Gittip, hitting Twitter: https://github.com/zetaweb/www.gittip.com/issues/531.\n"
] |
https://api.github.com/repos/psf/requests/issues/1007
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/1007/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/1007/comments
|
https://api.github.com/repos/psf/requests/issues/1007/events
|
https://github.com/psf/requests/pull/1007
| 9,306,111 |
MDExOlB1bGxSZXF1ZXN0MzM4MjgxNg==
| 1,007 |
Updated Travis CI URL in README
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/9906?v=4",
"events_url": "https://api.github.com/users/passy/events{/privacy}",
"followers_url": "https://api.github.com/users/passy/followers",
"following_url": "https://api.github.com/users/passy/following{/other_user}",
"gists_url": "https://api.github.com/users/passy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/passy",
"id": 9906,
"login": "passy",
"node_id": "MDQ6VXNlcjk5MDY=",
"organizations_url": "https://api.github.com/users/passy/orgs",
"received_events_url": "https://api.github.com/users/passy/received_events",
"repos_url": "https://api.github.com/users/passy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/passy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/passy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/passy",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-12-15T12:13:26Z
|
2021-09-08T18:01:07Z
|
2012-12-15T21:14:41Z
|
CONTRIBUTOR
|
resolved
|
The old URL appears to be broken, redirecting to https://travis-ci.org//kennethreitz/requests
Also, according to [their wiki](http://about.travis-ci.org/docs/user/status-images/) the _secure_ isn't required anymore.
|
{
"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/1007/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/1007/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/1007.diff",
"html_url": "https://github.com/psf/requests/pull/1007",
"merged_at": "2012-12-15T21:14:41Z",
"patch_url": "https://github.com/psf/requests/pull/1007.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/1007"
}
| true |
[
"thanks!\n"
] |
https://api.github.com/repos/psf/requests/issues/1006
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/1006/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/1006/comments
|
https://api.github.com/repos/psf/requests/issues/1006/events
|
https://github.com/psf/requests/pull/1006
| 9,305,511 |
MDExOlB1bGxSZXF1ZXN0MzM4MjYxOQ==
| 1,006 |
Use range in favor of xrange for py3k test compatibility
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/9906?v=4",
"events_url": "https://api.github.com/users/passy/events{/privacy}",
"followers_url": "https://api.github.com/users/passy/followers",
"following_url": "https://api.github.com/users/passy/following{/other_user}",
"gists_url": "https://api.github.com/users/passy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/passy",
"id": 9906,
"login": "passy",
"node_id": "MDQ6VXNlcjk5MDY=",
"organizations_url": "https://api.github.com/users/passy/orgs",
"received_events_url": "https://api.github.com/users/passy/received_events",
"repos_url": "https://api.github.com/users/passy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/passy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/passy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/passy",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2012-12-15T10:20:52Z
|
2021-09-08T18:01:06Z
|
2012-12-15T10:22:25Z
|
CONTRIBUTOR
|
resolved
|
request_count is 2 so it really makes no difference performance-wise at all.
|
{
"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/1006/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/1006/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/1006.diff",
"html_url": "https://github.com/psf/requests/pull/1006",
"merged_at": "2012-12-15T10:22:25Z",
"patch_url": "https://github.com/psf/requests/pull/1006.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/1006"
}
| true |
[
"thanks!\n",
"Well, that was fast!\n",
":cake:\n",
":yum:\n"
] |
https://api.github.com/repos/psf/requests/issues/1005
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/1005/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/1005/comments
|
https://api.github.com/repos/psf/requests/issues/1005/events
|
https://github.com/psf/requests/issues/1005
| 9,303,971 |
MDU6SXNzdWU5MzAzOTcx
| 1,005 |
Documentation
|
{
"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 |
[] |
{
"closed_at": "2013-05-29T07:59:12Z",
"closed_issues": 12,
"created_at": "2012-11-27T18:41:46Z",
"creator": {
"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"
},
"description": ":sparkles: :cake: :sparkles:",
"due_on": null,
"html_url": "https://github.com/psf/requests/milestone/18",
"id": 219754,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/18/labels",
"node_id": "MDk6TWlsZXN0b25lMjE5NzU0",
"number": 18,
"open_issues": 0,
"state": "closed",
"title": "v1.0.0",
"updated_at": "2013-05-29T07:59:12Z",
"url": "https://api.github.com/repos/psf/requests/milestones/18"
}
| 10 |
2012-12-15T04:53:02Z
|
2021-09-09T05:29:58Z
|
2013-01-10T08:49:17Z
|
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/1005/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/1005/timeline
| null |
completed
| null | null | false |
[
"Document new logging.\n",
"Document porting to v1.0.0.\n",
"Work in progress.\n",
"The majority of breakages I see from 0.14.2 to 1.0.x is due to:\n`TypeError: 'instancemethod' object has no attribute '__getitem__'`\n\nWhenever I try to access response.json\n\nSo it's probably good to have this one highlighted in the porting doc?\n\nThanks :)\n",
"@woozyking that was in the notes for 1.0, json is now a method not an attribute, i.e., use `response.json()` instead of `response.json`\n",
":+1: would be good to have a troubleshooting section\n",
"Whoops thought this was a bug report 9_9. But yeah, should be a transition section like @woozyking suggests.\n",
"@sigmavirus24 yep, I saw that. Just saying to highlight it in the porting doc :)\n",
"You're probably already aware, but I'd also like to point out that the configuration documentation is out of date: http://docs.python-requests.org/en/latest/api/#configurations\n",
"We are :)\n"
] |
|
https://api.github.com/repos/psf/requests/issues/1004
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/1004/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/1004/comments
|
https://api.github.com/repos/psf/requests/issues/1004/events
|
https://github.com/psf/requests/issues/1004
| 9,303,816 |
MDU6SXNzdWU5MzAzODE2
| 1,004 |
Configuration Simplicity
|
{
"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 |
[] |
{
"closed_at": "2013-05-29T07:59:12Z",
"closed_issues": 12,
"created_at": "2012-11-27T18:41:46Z",
"creator": {
"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"
},
"description": ":sparkles: :cake: :sparkles:",
"due_on": null,
"html_url": "https://github.com/psf/requests/milestone/18",
"id": 219754,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/18/labels",
"node_id": "MDk6TWlsZXN0b25lMjE5NzU0",
"number": 18,
"open_issues": 0,
"state": "closed",
"title": "v1.0.0",
"updated_at": "2013-05-29T07:59:12Z",
"url": "https://api.github.com/repos/psf/requests/milestones/18"
}
| 2 |
2012-12-15T04:22:30Z
|
2021-09-09T05:30:11Z
|
2012-12-17T10:02:48Z
|
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/1004/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/1004/timeline
| null |
completed
| null | null | false |
[
"Configuration exists in two levels:\n- Session\n- Connection-level.\n",
"Removed most needless modes.\n"
] |
|
https://api.github.com/repos/psf/requests/issues/1003
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/1003/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/1003/comments
|
https://api.github.com/repos/psf/requests/issues/1003/events
|
https://github.com/psf/requests/issues/1003
| 9,303,738 |
MDU6SXNzdWU5MzAzNzM4
| 1,003 |
py.test
|
{
"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 |
[] |
{
"closed_at": "2013-05-29T07:59:12Z",
"closed_issues": 12,
"created_at": "2012-11-27T18:41:46Z",
"creator": {
"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"
},
"description": ":sparkles: :cake: :sparkles:",
"due_on": null,
"html_url": "https://github.com/psf/requests/milestone/18",
"id": 219754,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/18/labels",
"node_id": "MDk6TWlsZXN0b25lMjE5NzU0",
"number": 18,
"open_issues": 0,
"state": "closed",
"title": "v1.0.0",
"updated_at": "2013-05-29T07:59:12Z",
"url": "https://api.github.com/repos/psf/requests/milestones/18"
}
| 1 |
2012-12-15T04:09:47Z
|
2021-09-09T05:30:10Z
|
2012-12-17T13:39:43Z
|
CONTRIBUTOR
|
resolved
|
Move back to py.test.
|
{
"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/1003/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/1003/timeline
| null |
completed
| null | null | false |
[
"done.\n"
] |
https://api.github.com/repos/psf/requests/issues/1002
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/1002/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/1002/comments
|
https://api.github.com/repos/psf/requests/issues/1002/events
|
https://github.com/psf/requests/pull/1002
| 9,299,167 |
MDExOlB1bGxSZXF1ZXN0MzM3OTU3Mg==
| 1,002 |
Remove testing artifacts
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/9906?v=4",
"events_url": "https://api.github.com/users/passy/events{/privacy}",
"followers_url": "https://api.github.com/users/passy/followers",
"following_url": "https://api.github.com/users/passy/following{/other_user}",
"gists_url": "https://api.github.com/users/passy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/passy",
"id": 9906,
"login": "passy",
"node_id": "MDQ6VXNlcjk5MDY=",
"organizations_url": "https://api.github.com/users/passy/orgs",
"received_events_url": "https://api.github.com/users/passy/received_events",
"repos_url": "https://api.github.com/users/passy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/passy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/passy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/passy",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-12-14T22:11:11Z
|
2021-09-08T18:01:05Z
|
2012-12-15T04:06:56Z
|
CONTRIBUTOR
|
resolved
|
These files look like they were accidentally added to the repository. Sorry if I'm wrong. :)
|
{
"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/1002/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/1002/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/1002.diff",
"html_url": "https://github.com/psf/requests/pull/1002",
"merged_at": "2012-12-15T04:06:56Z",
"patch_url": "https://github.com/psf/requests/pull/1002.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/1002"
}
| true |
[
"sigh, thanks :)\n"
] |
https://api.github.com/repos/psf/requests/issues/1001
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/1001/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/1001/comments
|
https://api.github.com/repos/psf/requests/issues/1001/events
|
https://github.com/psf/requests/pull/1001
| 9,220,152 |
MDExOlB1bGxSZXF1ZXN0MzMzOTQwMg==
| 1,001 |
Import oauthlib without the obsolete wrapper.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/470362?v=4",
"events_url": "https://api.github.com/users/matthewlmcclure/events{/privacy}",
"followers_url": "https://api.github.com/users/matthewlmcclure/followers",
"following_url": "https://api.github.com/users/matthewlmcclure/following{/other_user}",
"gists_url": "https://api.github.com/users/matthewlmcclure/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/matthewlmcclure",
"id": 470362,
"login": "matthewlmcclure",
"node_id": "MDQ6VXNlcjQ3MDM2Mg==",
"organizations_url": "https://api.github.com/users/matthewlmcclure/orgs",
"received_events_url": "https://api.github.com/users/matthewlmcclure/received_events",
"repos_url": "https://api.github.com/users/matthewlmcclure/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/matthewlmcclure/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/matthewlmcclure/subscriptions",
"type": "User",
"url": "https://api.github.com/users/matthewlmcclure",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2012-12-12T15:47:21Z
|
2021-09-08T18:01:06Z
|
2012-12-15T04:07:18Z
|
CONTRIBUTOR
|
resolved
|
Fixes #1000.
|
{
"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/1001/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/1001/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/1001.diff",
"html_url": "https://github.com/psf/requests/pull/1001",
"merged_at": "2012-12-15T04:07:18Z",
"patch_url": "https://github.com/psf/requests/pull/1001.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/1001"
}
| true |
[
"@kennethreitz,\n\nIf I'm not mistaken, the Travis CI builds were failing before this pull request. Correct?\n",
"They were. =)\n",
"Thanks!\n"
] |
https://api.github.com/repos/psf/requests/issues/1000
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/1000/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/1000/comments
|
https://api.github.com/repos/psf/requests/issues/1000/events
|
https://github.com/psf/requests/issues/1000
| 9,219,999 |
MDU6SXNzdWU5MjE5OTk5
| 1,000 |
requests.auth has an orphaned reference to ._oauth
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/470362?v=4",
"events_url": "https://api.github.com/users/matthewlmcclure/events{/privacy}",
"followers_url": "https://api.github.com/users/matthewlmcclure/followers",
"following_url": "https://api.github.com/users/matthewlmcclure/following{/other_user}",
"gists_url": "https://api.github.com/users/matthewlmcclure/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/matthewlmcclure",
"id": 470362,
"login": "matthewlmcclure",
"node_id": "MDQ6VXNlcjQ3MDM2Mg==",
"organizations_url": "https://api.github.com/users/matthewlmcclure/orgs",
"received_events_url": "https://api.github.com/users/matthewlmcclure/received_events",
"repos_url": "https://api.github.com/users/matthewlmcclure/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/matthewlmcclure/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/matthewlmcclure/subscriptions",
"type": "User",
"url": "https://api.github.com/users/matthewlmcclure",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-12-12T15:43:38Z
|
2021-09-09T05:30:40Z
|
2012-12-15T04:07:19Z
|
CONTRIBUTOR
|
resolved
|
Symptom:
```
Traceback (most recent call last):
...
File "/Users/mlm/.virtualenvs/mlm/src/requests/requests/auth.py", line 68, in __init__
self.client = Client(client_key, client_secret, resource_owner_key,
NameError: global name 'Client' is not defined
```
Using:
```
(mlm)
(mlm)(master) [email protected]:~/.virtualenvs/mlm/src/requests
$ git show
commit d74bd7e1a28eb80cd9dba1a0d149f35dd35ab3e0
Merge: a7344a0 500dc78
Author: Kenneth Reitz <[email protected]>
Date: Wed Dec 12 00:09:43 2012 -0800
Merge pull request #998 from jamshid/master
Issue #996 Location should not be followed unless 30X response
(mlm)
(mlm)(master) [email protected]:~/.virtualenvs/mlm/src/requests
$
```
|
{
"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/1000/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/1000/timeline
| null |
completed
| null | null | false |
[
"Enjoy your #1000 :sparkles: :beers: :sparkles:\n"
] |
https://api.github.com/repos/psf/requests/issues/999
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/999/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/999/comments
|
https://api.github.com/repos/psf/requests/issues/999/events
|
https://github.com/psf/requests/pull/999
| 9,214,843 |
MDExOlB1bGxSZXF1ZXN0MzMzNjU0Nw==
| 999 |
Add "connection timeout" feature in addition to regular timeout.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2663845?v=4",
"events_url": "https://api.github.com/users/pasha-r/events{/privacy}",
"followers_url": "https://api.github.com/users/pasha-r/followers",
"following_url": "https://api.github.com/users/pasha-r/following{/other_user}",
"gists_url": "https://api.github.com/users/pasha-r/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pasha-r",
"id": 2663845,
"login": "pasha-r",
"node_id": "MDQ6VXNlcjI2NjM4NDU=",
"organizations_url": "https://api.github.com/users/pasha-r/orgs",
"received_events_url": "https://api.github.com/users/pasha-r/received_events",
"repos_url": "https://api.github.com/users/pasha-r/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pasha-r/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pasha-r/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pasha-r",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 4 |
2012-12-12T12:52:04Z
|
2021-09-08T23:05:04Z
|
2012-12-12T16:39:00Z
|
NONE
|
resolved
|
Hi!
I'd like to suggest a new feature - two types of timeouts.
Regular one - happens when we wait for response from server on existing connection.
And a new one - connection timeout. Happens only when we try to create a new socket connection.
I added new request parameter connect_timeout and two new exceptions ConnectionTimeout and OperationTimeout.
But why anybody would need such a thing?
It can be useful when a call to some HTTP API takes a long time to answer the query (for ex. reading lots of data), but not so much to connect to the server.
With this new feature we can set bigger timeout and smaller connect_timeout, so network failures, dead API servers or DNS problems could be detected fast.
Other use case is - write request gone bad.
We connected to the server, called PUT to create some new record and caught timeout while waiting for response. Some async APIs work so that your request was actually processed despite broken connection.
And with two separate exceptions we can react differently in such a case - on ConnectionTimeout we know for sure nothing've been done so we can repeat the call. On OperationTimeout we may (or may not) poll the server for some indication that something is already going on and if not repeat the call.
On implementation:
I've implemented this feature in a way that does not break expected behavior for an existing code using the library.
New exceptions - ConnectionTimeout and OperationTimeout are subclasses of existing Timeout class.
Same goes for urllib3 TimeoutError and it's new subclasses.
New parameter connect_timeout is optional and when not given, value of the timeout parameter is used for both timeouts.
New HTTPConnectionTwo class (lame name, any suggestions?) takes one timeout in **init** method and then checks whether it's a single value or a pair, so it also can be initialized exactly like HTTPConnection.
And thank you so much for the great library!
##
Pasha Kirichenko
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2663845?v=4",
"events_url": "https://api.github.com/users/pasha-r/events{/privacy}",
"followers_url": "https://api.github.com/users/pasha-r/followers",
"following_url": "https://api.github.com/users/pasha-r/following{/other_user}",
"gists_url": "https://api.github.com/users/pasha-r/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pasha-r",
"id": 2663845,
"login": "pasha-r",
"node_id": "MDQ6VXNlcjI2NjM4NDU=",
"organizations_url": "https://api.github.com/users/pasha-r/orgs",
"received_events_url": "https://api.github.com/users/pasha-r/received_events",
"repos_url": "https://api.github.com/users/pasha-r/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pasha-r/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pasha-r/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pasha-r",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/999/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/999/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/999.diff",
"html_url": "https://github.com/psf/requests/pull/999",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/999.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/999"
}
| true |
[
"Just read about feature freeze. Oops!\n\nShould I close this one and reopen later or it can hang in here until time comes?\n",
"You'll almost certainly need a new PR when the refactor is finished as all of the internals will be different. =)\n\nFor the future, urllib3 is a vendored dependency that is maintained [here](https://github.com/shazow/urllib3). Any time you need to make a change in a urllib3 file it should be made in the mainline repository, not here.\n",
"My bad!\nI close this request and will split the changes. urllib3 changes will go into it's main repo.\n\nThanks.\n",
"No need to apologise, it's not an inconvenience. =) Thanks for contributing!\n"
] |
https://api.github.com/repos/psf/requests/issues/998
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/998/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/998/comments
|
https://api.github.com/repos/psf/requests/issues/998/events
|
https://github.com/psf/requests/pull/998
| 9,208,683 |
MDExOlB1bGxSZXF1ZXN0MzMzMzM5Mg==
| 998 |
Issue #996 Location should not be followed unless 30X response
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/8549?v=4",
"events_url": "https://api.github.com/users/jamshid/events{/privacy}",
"followers_url": "https://api.github.com/users/jamshid/followers",
"following_url": "https://api.github.com/users/jamshid/following{/other_user}",
"gists_url": "https://api.github.com/users/jamshid/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jamshid",
"id": 8549,
"login": "jamshid",
"node_id": "MDQ6VXNlcjg1NDk=",
"organizations_url": "https://api.github.com/users/jamshid/orgs",
"received_events_url": "https://api.github.com/users/jamshid/received_events",
"repos_url": "https://api.github.com/users/jamshid/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jamshid/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jamshid/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jamshid",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-12-12T08:05:27Z
|
2021-09-08T18:01:05Z
|
2012-12-12T08:09:43Z
|
NONE
|
resolved
|
Issue #996 Location should not be followed unless 30X response
|
{
"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/998/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/998/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/998.diff",
"html_url": "https://github.com/psf/requests/pull/998",
"merged_at": "2012-12-12T08:09:43Z",
"patch_url": "https://github.com/psf/requests/pull/998.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/998"
}
| true |
[
"Thanks!\n"
] |
https://api.github.com/repos/psf/requests/issues/997
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/997/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/997/comments
|
https://api.github.com/repos/psf/requests/issues/997/events
|
https://github.com/psf/requests/issues/997
| 9,205,082 |
MDU6SXNzdWU5MjA1MDgy
| 997 |
Requests v0.14.2 - requests.session() fails on post() with KeyError exception
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2872088?v=4",
"events_url": "https://api.github.com/users/jeanmarcrousseau/events{/privacy}",
"followers_url": "https://api.github.com/users/jeanmarcrousseau/followers",
"following_url": "https://api.github.com/users/jeanmarcrousseau/following{/other_user}",
"gists_url": "https://api.github.com/users/jeanmarcrousseau/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jeanmarcrousseau",
"id": 2872088,
"login": "jeanmarcrousseau",
"node_id": "MDQ6VXNlcjI4NzIwODg=",
"organizations_url": "https://api.github.com/users/jeanmarcrousseau/orgs",
"received_events_url": "https://api.github.com/users/jeanmarcrousseau/received_events",
"repos_url": "https://api.github.com/users/jeanmarcrousseau/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jeanmarcrousseau/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jeanmarcrousseau/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jeanmarcrousseau",
"user_view_type": "public"
}
|
[] |
closed
| 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"
}
|
[
{
"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"
}
] | null | 10 |
2012-12-12T03:44:58Z
|
2021-09-09T02:11:43Z
|
2013-01-19T16:38:03Z
|
NONE
|
resolved
|
Hello All,
I am a _big_ fan of Requests, and have just upgraded from v0.14.0 on Python 3.2.3 to v0.14.2 on Python 3.3.0. I think that the upgrade to Requests broke my code when using a `requests.session()` object. I use Fiddler for some transport debugging, which is why I'm using the loopback address on port 8888.
_Please note_ that everything works as expected if I use a `requests.post()` object instead of using a `requests.session()` object for the request (obviously bypassing the proxy).
My code looks as follows:
``` python
s = requests.session(proxies={'http': '127.0.0.1:8888'})
r = s.post(url, data=soap_req, headers=headers)
```
The call to `s.post()` results in a `KeyError: None` exception in `connection_from_host()` in `class PoolManager` in poolmanager.py.
The offending line is:
``` python
pool_cls = pool_classes_by_scheme[scheme]
```
Debugging shows `pool_key = (None, '127.0.0.1', 8888)`
What puzzles me is that scheme shows up as _None_ (as shown in the 1st element in the tuple above). Debugging indeed verifies scheme is NoneType, which makes no sense, since it has a default value of 'http' when it enters the method.
I would appreciate anyone who can shed light and/or provide a fix for the above. I'm at the limit of my debugging skills. Please advise if you need more info from my side for further troubleshooting.
Thanks in advance,
Jean-Marc
|
{
"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/997/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/997/timeline
| null |
completed
| null | null | false |
[
"I took a quick look at this before I left for work this morning and couldn't reproduce it. I spent literally 5 minutes on it though, so I suspect it's real. =)\n\nIt shouldn't happen though, Requests creates sessions under the hood when you use the verb methods. If you're familiar with how to use `PDB`, it'd be interesting to see what's going on around [line 555 of models.py](https://github.com/kennethreitz/requests/blob/master/requests/models.py#L555). If you don't get around to it today I'll take a look when I get back from work, but that won't be until like 6pm GMT.\n",
"Lukasa,\n\nAppreciate the feedback. \n\nI did some debugging around line 555 (I'm using Wing, so I used breakpoints to examine state etc).\n\n`_p` is of type `ParseResult` and looks normal (ie. it has a correctly populated scheme, netloc and path).\n\n`no_proxy` points to a `filter` object with a bunch of built-in methods (nothing obvious to inspect).\n\n`proxy` contains `'127.0.0.1:8888'`\n\nThe code then steps into the line:\n\n`if proxy and not any(map(_p.hostname.endswith, no_proxy)):`\n\nand calls `get_connection_for_url()`\n\n`if self.config.get('keep_alive'):` is `True` so it then calls\n\n`conn = self._poolmanager.connection_from_url(url)`\n\nwhich calls `connection_from_url()`\n\nu = `Url(scheme=None, auth=None, host='127.0.0.1', port=8888, path=None, query=None, fragment=None)`\n\nit then calls `self.connection_from_host()` with the following values\n\n```\nu.host = '127.0.0.1'\nu.port = 8888\nu.scheme = None\n```\n\nfinally, the code enters `connection_from_host()` and since `u.scheme` is not undefined, it is not assigned the default value of `'http'`, which causes `pool_cls = pool_classes_by_scheme[scheme]` to fail a couple of lines further on.\n\nHopefully the above is enough detail for you to troubleshoot?\n\nAppreciate the help!\n\nJM\n",
"Lukasa,\n\nAll this points to the way in which `parse_url()` handles a missing scheme. I noted that if the `url` passed in doesn't contain a scheme, then this is set to `None`, which blows up a little later.\n\nI went back and modded my code from\n\n`s = requests.session(proxies={'http': '127.0.0.1:8888'})`\n\nto\n\n`s = requests.session(proxies={'http': 'http://127.0.0.1:8888'})`\n\nand now all works as expected.\n\nBased on the code in the Proxies section at http://docs.python-requests.org/en/latest/user/advanced/\n\nI haven't done anything wrong, so can I assume that this is a bug?\n\nPlease let me know.\n\nThanks,\n\nJM\n",
"Yes, this is definitely a bug. =) Good spot, and excellent detail in your report, thanks so much!\n\nI think Requests' documentation is documenting the behaviour we want. We can get this by adding a function call in line 558 (or some inline code) that puts the scheme into the proxy URL if it's missing. Thus, to carry on the example from [here](http://docs.python-requests.org/en/latest/user/advanced/#proxies), we'd change `\"10.10.1.10:3128\"` to `\"http://10.10.1.10:3128\"` and `\"10.10.1.10:1080\"` into `\"https://10.10.1.10:1080\"`.\n\nThe only worry here is that people might have code that passes their HTTPS traffic through an HTTP proxy, which this would break (unless the expressly indicate the scheme in their proxy URL). @kennethreitz, is this a problem?\n",
"You're welcome. It's the least I can do to make some small contribution to such a great library!\n\nJM\n",
"@jeanmarcrousseau is this still an issue with v1.0.3?\n",
"I'm not sure - Lukasa was going to address, so rather check with him...\n\nJM\n\nOn Tue, Dec 18, 2012 at 9:47 PM, Ian Cordasco [email protected]:\n\n> @jeanmarcrousseau https://github.com/jeanmarcrousseau is this still an\n> issue with v1.0.3?\n> \n> —\n> Reply to this email directly or view it on GitHubhttps://github.com/kennethreitz/requests/issues/997#issuecomment-11515467.\n",
"As of v1.0.4, we don't prepend the scheme to a proxy URL that doesn't have one, and we probably should.\n",
"I'm pretty sure this is resolved as of sometime around v1.1, so I'm closing this. Thanks for the report! =)\n",
"My pleasure. :-)\n\nJM\n\nOn Sat, Jan 19, 2013 at 11:38 AM, Cory Benfield [email protected]:\n\n> I'm pretty sure this is resolved as of sometime around v1.1, so I'm\n> closing this. Thanks for the report! =)\n> \n> —\n> Reply to this email directly or view it on GitHubhttps://github.com/kennethreitz/requests/issues/997#issuecomment-12457069.\n"
] |
https://api.github.com/repos/psf/requests/issues/996
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/996/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/996/comments
|
https://api.github.com/repos/psf/requests/issues/996/events
|
https://github.com/psf/requests/issues/996
| 9,199,531 |
MDU6SXNzdWU5MTk5NTMx
| 996 |
Location header does not mean "redirect", only when response status is 30X
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/8549?v=4",
"events_url": "https://api.github.com/users/jamshid/events{/privacy}",
"followers_url": "https://api.github.com/users/jamshid/followers",
"following_url": "https://api.github.com/users/jamshid/following{/other_user}",
"gists_url": "https://api.github.com/users/jamshid/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jamshid",
"id": 8549,
"login": "jamshid",
"node_id": "MDQ6VXNlcjg1NDk=",
"organizations_url": "https://api.github.com/users/jamshid/orgs",
"received_events_url": "https://api.github.com/users/jamshid/received_events",
"repos_url": "https://api.github.com/users/jamshid/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jamshid/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jamshid/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jamshid",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2012-12-11T22:54:02Z
|
2021-09-09T04:00:35Z
|
2012-12-12T09:55:37Z
|
NONE
|
resolved
|
When using strict_mode (which should be the default, buggy browsers be damned) and a POST gets a 301 redirect, your library will correctly issue a POST to the uri pointed to by Location, but if _that_ response is a 201 with a Location header it will loop indefinitely until requests.exceptions.TooManyRedirects.
``` python
# Fails if /foo/ responds with a 301 to /bar/, and that responds with a 201 with a Location header.
my_config = {'strict_mode': True, 'verbose': sys.stderr}
print requests.post('http://example.com/foo/', data='', allow_redirects=True, config=my_config)
```
This "while" test should only follow "Location" if the response code is a redirect. A Location header on a 201 response is perfectly valid, just end the request there.
This seems like a correct fix:
``` python
--- orig-0.14.2/models.py 2012-11-30 22:44:13.000000000 +0000
+++ ./models.py 2012-12-11 22:26:41.000000000 +0000
@@ -232,7 +232,7 @@
if r.status_code in REDIRECT_STATI and not self.redirect:
- while (('location' in r.headers) and
+ while (('location' in r.headers and r.status_code in REDIRECT_STATI) and
((r.status_code is codes.see_other) or (self.allow_redirects))):
r.content # Consume socket so it can be released
```
|
{
"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/996/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/996/timeline
| null |
completed
| null | null | false |
[
"Looks good to me. Want to open a Pull Request with the fix? =)\n",
"Sure, will figure out git and do it tomorrow.\n",
"Resolved by #996. Thanks a bunch! =D\n"
] |
https://api.github.com/repos/psf/requests/issues/995
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/995/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/995/comments
|
https://api.github.com/repos/psf/requests/issues/995/events
|
https://github.com/psf/requests/issues/995
| 9,184,910 |
MDU6SXNzdWU5MTg0OTEw
| 995 |
Expose “source address” variable for users on 2.7 or 3.2+
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/206730?v=4",
"events_url": "https://api.github.com/users/fhsm/events{/privacy}",
"followers_url": "https://api.github.com/users/fhsm/followers",
"following_url": "https://api.github.com/users/fhsm/following{/other_user}",
"gists_url": "https://api.github.com/users/fhsm/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/fhsm",
"id": 206730,
"login": "fhsm",
"node_id": "MDQ6VXNlcjIwNjczMA==",
"organizations_url": "https://api.github.com/users/fhsm/orgs",
"received_events_url": "https://api.github.com/users/fhsm/received_events",
"repos_url": "https://api.github.com/users/fhsm/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/fhsm/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fhsm/subscriptions",
"type": "User",
"url": "https://api.github.com/users/fhsm",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 13 |
2012-12-11T16:22:35Z
|
2021-09-09T04:00:40Z
|
2013-02-10T22:41:28Z
|
NONE
|
resolved
|
In Python 2.7 and 3.2+ the ability to make a request from a particular source IP address was added to [httplib](http://docs.python.org/2/library/httplib.html#httplib.HTTPConnection) and [socket](http://docs.python.org/2/library/socket.html#socket.create_connection) closing Python [issue 3972](http://bugs.python.org/issue3972) which had previously been addressed by [Alex Martelli on SO](http://stackoverflow.com/questions/1150332/source-interface-with-python-and-urllib2). It would be great if the Requests API exposed this standard library functionality.
|
{
"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/995/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/995/timeline
| null |
completed
| null | null | false |
[
"We could expose this in the refactor as a connection parameter.\n\n@shazow, what would need to change in urllib3?\n",
"See https://github.com/shazow/urllib3/issues/9.\n\nHow do we feel about Py26 support these days?\n",
"I'd still like Py26 support, but I guess I can just upgrade to 2.7 on all my old machines that I use (except for those not under my control)\n",
"@shazow Last I checked, @kennethreitz's 'official' position was that we must support 2.7 and 3.3, and anything else is a bonus.\n",
"I still believe 2.6 falls under that umbrella too. Why wouldn't you just make this a feature that is unsupported on 2.6? \n\nThis feature is _not_ worth dropping 2.6 support for.\n",
"Cool. =)\n\nIn that case, have the code throw `NotImplementedError` for Python 2.6?\n",
"That sounds reasonable.\n",
"+1\n",
"+1, if anyone would like to take a crack at the respective issue for urllib3, that would be appreciated. :)\n",
"@shazow see you over at shazow/urllib3#9 ...\n",
"@kennethreitz I've had a look around urllib3 and started working on getting `source_address` into the API. Making it work is easy, making it fail nicely is much harder. How would you envision exposing `source_address` in the the requests' API? \n\nI'm struggling with a good way to avoid making an API that invites user's to over specify the outbound sockets used by the connection pool such that they are slammed with _error 98_'s and we are slammed with all sorts of impossible to reproduce issues around socket allocation/release.\n",
"@fhsm, think about how you might sanely like to access the `source_address` attribute? I would think it could be an attribute on the `Response` object, but then we're currently under a feature freeze (see: #1168, #1165). I would hope this doesn't get bumped due to it though, since it was an accepted feature before the freeze started.\n",
"@fhsm if you specify a port of 0 then that's the magic code to let the OS pick a free port for you.\n\nI have a branch with source_address support working, conversation will probably happen here: https://github.com/shazow/urllib3/issues/9#issuecomment-15871420 but I'll leave a comment here for people landing here from google.\n"
] |
https://api.github.com/repos/psf/requests/issues/994
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/994/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/994/comments
|
https://api.github.com/repos/psf/requests/issues/994/events
|
https://github.com/psf/requests/issues/994
| 9,152,215 |
MDU6SXNzdWU5MTUyMjE1
| 994 |
OAuth package ignore path segments when signing request.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/22207?v=4",
"events_url": "https://api.github.com/users/lcostantino/events{/privacy}",
"followers_url": "https://api.github.com/users/lcostantino/followers",
"following_url": "https://api.github.com/users/lcostantino/following{/other_user}",
"gists_url": "https://api.github.com/users/lcostantino/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lcostantino",
"id": 22207,
"login": "lcostantino",
"node_id": "MDQ6VXNlcjIyMjA3",
"organizations_url": "https://api.github.com/users/lcostantino/orgs",
"received_events_url": "https://api.github.com/users/lcostantino/received_events",
"repos_url": "https://api.github.com/users/lcostantino/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lcostantino/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lcostantino/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lcostantino",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-12-10T17:43:37Z
|
2021-09-09T05:30:41Z
|
2012-12-10T18:05:51Z
|
NONE
|
resolved
|
Not a Request issue, but just in case......
When signing a url like http://www.sample.com/mylogs;version=1.1 the ";version=1.1" won't be taken in account, so the request will probably fail due to invalid signature.
path segment are ignored on:
oauthlib/oauth1/rfc5849/signature.py:
def normalize_base_string_uri(...)
return urlparse.urlunparse((scheme, netloc, path, u'',u'',u''))
This should fix it:
return urlparse.urlunparse((scheme, netloc, path, params, u'',u''))
|
{
"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/994/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/994/timeline
| null |
completed
| null | null | false |
[
"Could you please raise this issue against [oauthlib](https://github.com/idan/oauthlib)? As you pointed out, this issue is not in requests.\n\nThanks!\n"
] |
https://api.github.com/repos/psf/requests/issues/993
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/993/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/993/comments
|
https://api.github.com/repos/psf/requests/issues/993/events
|
https://github.com/psf/requests/issues/993
| 9,092,093 |
MDU6SXNzdWU5MDkyMDkz
| 993 |
Unable to supress equals sign in query string for singleton keys
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2990139?v=4",
"events_url": "https://api.github.com/users/jemcevoy/events{/privacy}",
"followers_url": "https://api.github.com/users/jemcevoy/followers",
"following_url": "https://api.github.com/users/jemcevoy/following{/other_user}",
"gists_url": "https://api.github.com/users/jemcevoy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jemcevoy",
"id": 2990139,
"login": "jemcevoy",
"node_id": "MDQ6VXNlcjI5OTAxMzk=",
"organizations_url": "https://api.github.com/users/jemcevoy/orgs",
"received_events_url": "https://api.github.com/users/jemcevoy/received_events",
"repos_url": "https://api.github.com/users/jemcevoy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jemcevoy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jemcevoy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jemcevoy",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-12-07T15:50:09Z
|
2021-09-09T05:30:41Z
|
2012-12-07T17:03:53Z
|
NONE
|
resolved
|
Hi Ken,
I really appreciate the Python Requests library that you have put together… It really saves a lot of plumbing when using a REST API from Python.
However, I have run into an issue sending a singleton key using the library and have not been able to figure out how to suppress the = that is passed as part of the query string. I have tried setting the value of the key to None and an empty string ‘’ but the equals sign is still sent to apache.
It looks to me that keys without values are legitimate according to http://en.wikipedia.org/wiki/Query_string#Web_forms
Quote:
• Within each pair, the field name and value are separated by an equals sign. The equals sign may be omitted if the value is an empty string.
How hard would it be to suppress the = in the URL when the value for the key is None? As an example, I added key3 to the dictionary in your documentation below.
http://docs.python-requests.org/en/latest/user/quickstart/#passing-parameters-in-urls
> > > payload = {'key1': 'value1', 'key2': 'value2', ‘key3’:None}
> > > r = requests.get("http://httpbin.org/get", params=payload)
You can see that the URL has been correctly encoded by printing the URL:
> > > print r.url
> > > u'http://httpbin.org/get?key2=value2&key3&key1=value1'
--jim
|
{
"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/993/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/993/timeline
| null |
completed
| null | null | false |
[
"This issue has been raised before (see the discussion after the closing of #917). To summarize that discussion, the [HTML5 working draft spec](http://www.w3.org/TR/2012/WD-html5-20120329/) (4.10.22.5, point 4.10) is clear that the `=` character must be present. Suppressing the `=` sign is therefore against the standard, and so we won't be making this change in the library. =)\n\nYou have a few options. You can construct the query string yourself and append it, e.g.\n\n``` python\nquery_string = \"?key2=value2&key3&key1=value1'\nurl = 'http://httpbin.org/get' + query_string\n```\n\nOr you can use the [pre-request Event Hook](http://docs.python-requests.org/en/latest/user/advanced/#event-hooks) to intercept the URL at the last minute and remove any equals signs you don't want. This is probably neater. =)\n\nThanks for your suggestion! If you're still having problems, let me know. =D\n",
"As I wrote in issue #917\n\n> [It's misleading at best to have to embed query string into url in spite of the fact there's `params` param.](https://github.com/kennethreitz/requests/issues/917#issuecomment-10707261)\n\nIt's just bad api.\nI'll be counting all issues raising this problem This is the second one after #917.\n"
] |
https://api.github.com/repos/psf/requests/issues/992
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/992/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/992/comments
|
https://api.github.com/repos/psf/requests/issues/992/events
|
https://github.com/psf/requests/pull/992
| 9,065,210 |
MDExOlB1bGxSZXF1ZXN0MzI2ODI0OQ==
| 992 |
Give Response objects a length, and make them iterable
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/359029?v=4",
"events_url": "https://api.github.com/users/mwielgoszewski/events{/privacy}",
"followers_url": "https://api.github.com/users/mwielgoszewski/followers",
"following_url": "https://api.github.com/users/mwielgoszewski/following{/other_user}",
"gists_url": "https://api.github.com/users/mwielgoszewski/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mwielgoszewski",
"id": 359029,
"login": "mwielgoszewski",
"node_id": "MDQ6VXNlcjM1OTAyOQ==",
"organizations_url": "https://api.github.com/users/mwielgoszewski/orgs",
"received_events_url": "https://api.github.com/users/mwielgoszewski/received_events",
"repos_url": "https://api.github.com/users/mwielgoszewski/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mwielgoszewski/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mwielgoszewski/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mwielgoszewski",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-12-06T19:40:41Z
|
2021-09-08T18:01:04Z
|
2012-12-06T19:44:34Z
|
CONTRIBUTOR
|
resolved
|
I've often it useful to be able to call len() and iterate (by line) over Response objects. This pull requests adds the `__len__()` and `__iter__()` Python special methods to the Response class.
|
{
"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/992/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/992/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/992.diff",
"html_url": "https://github.com/psf/requests/pull/992",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/992.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/992"
}
| true |
[
"These things have both been considered and proposed before, and we have opted out for various reasons.\n\nThanks for the contribution, though! It's a logical change, just not one that we're ready to make yet :)\n",
"@mwielgoszewski just to elaborate on @kennethreitz's comment.\n\nWith the `pre_fetch=False` option, your solution will not work for `__len__` when the server doesn't provide a Content-Length header. As for iterating over the response, there's far more to a response than just the content. So iterating over a response makes little sense in my personal opinion. As it is, the API for iterating over the content is complete for both values of `pre_fetch`.\n\nStick around, I'm sure there's far more you can contribute elsewhere in the project.\n"
] |
https://api.github.com/repos/psf/requests/issues/991
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/991/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/991/comments
|
https://api.github.com/repos/psf/requests/issues/991/events
|
https://github.com/psf/requests/pull/991
| 9,059,912 |
MDExOlB1bGxSZXF1ZXN0MzI2NTM5OQ==
| 991 |
Changes license from ISC to Apache2
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/131414?v=4",
"events_url": "https://api.github.com/users/lyndsysimon/events{/privacy}",
"followers_url": "https://api.github.com/users/lyndsysimon/followers",
"following_url": "https://api.github.com/users/lyndsysimon/following{/other_user}",
"gists_url": "https://api.github.com/users/lyndsysimon/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lyndsysimon",
"id": 131414,
"login": "lyndsysimon",
"node_id": "MDQ6VXNlcjEzMTQxNA==",
"organizations_url": "https://api.github.com/users/lyndsysimon/orgs",
"received_events_url": "https://api.github.com/users/lyndsysimon/received_events",
"repos_url": "https://api.github.com/users/lyndsysimon/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lyndsysimon/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lyndsysimon/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lyndsysimon",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-12-06T16:51:13Z
|
2021-09-08T18:01:04Z
|
2012-12-06T18:21:15Z
|
CONTRIBUTOR
|
resolved
|
Per @kennethreitz's implied intent in 5c1bc201c46297d39d591e5d30e0e65a989bd22c, this change implements the Apache 2.0 license across requests, in every location I could find a license specified.
|
{
"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/991/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/991/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/991.diff",
"html_url": "https://github.com/psf/requests/pull/991",
"merged_at": "2012-12-06T18:21:15Z",
"patch_url": "https://github.com/psf/requests/pull/991.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/991"
}
| true |
[
"Thanks dude!\n"
] |
https://api.github.com/repos/psf/requests/issues/990
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/990/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/990/comments
|
https://api.github.com/repos/psf/requests/issues/990/events
|
https://github.com/psf/requests/pull/990
| 9,052,115 |
MDExOlB1bGxSZXF1ZXN0MzI2MTQxNA==
| 990 |
Unicode filename uploading
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/171325?v=4",
"events_url": "https://api.github.com/users/ekratskih/events{/privacy}",
"followers_url": "https://api.github.com/users/ekratskih/followers",
"following_url": "https://api.github.com/users/ekratskih/following{/other_user}",
"gists_url": "https://api.github.com/users/ekratskih/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ekratskih",
"id": 171325,
"login": "ekratskih",
"node_id": "MDQ6VXNlcjE3MTMyNQ==",
"organizations_url": "https://api.github.com/users/ekratskih/orgs",
"received_events_url": "https://api.github.com/users/ekratskih/received_events",
"repos_url": "https://api.github.com/users/ekratskih/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ekratskih/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ekratskih/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ekratskih",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2012-12-06T12:38:34Z
|
2021-09-08T18:01:03Z
|
2012-12-06T18:23:54Z
|
NONE
|
resolved
|
When trying to upload filename with non ASCII symbols (for example: "Тестовый файл.txt") I'm getting this exception:
> > UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 60: ordinal not in range(128)
This commit fixes 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/990/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/990/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/990.diff",
"html_url": "https://github.com/psf/requests/pull/990",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/990.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/990"
}
| true |
[
"Hi @ekratskih, as you might be able to tell, this is a problem with urllib3 (which I maintain). I welcome you to submit a pull request with a similar fix directly to urllib3, but please include a unit test. https://github.com/shazow/urllib3\n",
"Thanks for the report @ekratskih, and thanks for taking this off our hands @shazow! :cake:\n\nClosed as 'not our fault'.\n",
"Related: shazow/urllib3/issues/119\n"
] |
https://api.github.com/repos/psf/requests/issues/989
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/989/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/989/comments
|
https://api.github.com/repos/psf/requests/issues/989/events
|
https://github.com/psf/requests/issues/989
| 9,048,269 |
MDU6SXNzdWU5MDQ4MjY5
| 989 |
streaming a response with iter_lines doesn't work
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/81654?v=4",
"events_url": "https://api.github.com/users/gdamjan/events{/privacy}",
"followers_url": "https://api.github.com/users/gdamjan/followers",
"following_url": "https://api.github.com/users/gdamjan/following{/other_user}",
"gists_url": "https://api.github.com/users/gdamjan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/gdamjan",
"id": 81654,
"login": "gdamjan",
"node_id": "MDQ6VXNlcjgxNjU0",
"organizations_url": "https://api.github.com/users/gdamjan/orgs",
"received_events_url": "https://api.github.com/users/gdamjan/received_events",
"repos_url": "https://api.github.com/users/gdamjan/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/gdamjan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gdamjan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/gdamjan",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 23 |
2012-12-06T10:04:23Z
|
2021-09-09T05:00:51Z
|
2013-01-22T14:01:01Z
|
NONE
|
resolved
|
Using the following simple server to simulate a streaming http service, requests 0.14.2 doesn't stream the response. it waits until some amount of data is received or until the end.
The client
```
import requests
url = 'http://localhost:8000/a/b/c'
req = requests.get(url, prefetch=False)
for line in req.iter_lines():
print repr(line)
```
The server
```
from wsgiref.simple_server import make_server
import time
def simple_app(environ, start_response):
status = '200 OK'
headers = [('Content-type', 'text/plain; charset=utf-8')]
start_response(status, headers)
for i in range(10):
yield "line %d\r\n" % i
time.sleep(1)
httpd = make_server('', 8000, simple_app)
print("Serving on port 8000...")
httpd.serve_forever()
```
|
{
"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/989/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/989/timeline
| null |
completed
| null | null | false |
[
"Change your line:\n\n``` python\nfor line in req.iter_lines():\n```\n\nto:\n\n``` python\nfor line in req.iter_lines(chunk_size=10):\n```\n\nYou'll find this works. =)\n\n@sigmavirus24: IIRC, you worked on the streaming stuff last. Why is the default iter_lines chunk size so large (10240 bytes)? Is there a design decision I don't know about there?\n",
"confirmed, chunk_size=10 does fix the issue. \n\nI'll leave this issue open, until it's decided what the default should be.\n",
"@lukasa I think you have me mistaken for someone but if I remember correctly \n1024 was considered because that's 1MB. It isn't unreasonable, most web stuff \nis much larger than that and it is configurable.\n",
"Also @gdamjan it was already decided if I remember correctly so you can close this if you feel your needs were met.\n\nAt this point, with the refactor coming up we could change it to half the current size since we can really announce the breaking changes then. But that still wouldn't fix his problem. To try to phrase this how @kennethreitz will see it, 90% of people's cases will be sufficiently met by this default, and probably 10% will be affected negatively. He likes to ignore that 10% if possible. (Paraphrasing from one of his talks.)\n",
"Is this related to any of the issues discussed in #844?\n",
"@slingamn yes, the first item on your list I believe is related\n",
"No, item 4 is the relevant one. =)\n",
"10 kB is simply ludicrously large. If you load my website homepage, you'll get only slightly more than 10kB of data _in total_. That includes CSS, images, Javascript, the lot. To use that as the default _line_ size is braindead.\n",
"I agree, this seems foolishly large.\n",
"iter_content's existance, however, based on the concept of extremely large files.\n",
"So leave `iter_content` as is, and just change the default `chunk_size` on `iter_lines`? Everybody wins?\n",
"+1\n",
"Got a preference for what default value to use? =)\n",
"Erp, my mistake, thought this was all iter_content related.\n",
"From #844 seems like people liked 1024\n",
"It's certainly likely to be better than what we've got. It wouldn't have prevented this issue being raised, though.\n",
"1024 is still too much for ex. when streaming CouchDB's changes feed in continuous mode.\n",
"We can also do 512, 256, 128, 64, 32, 16, or 8. Only the last of which would have prevented this issue. Pick your poison. :P\n",
"@sigmavirus24: Good point well made. =D\n\nNevertheless, I'd be inclined to go slightly smaller. 512 is tempting.\n",
"What are the usage scenarios of iter_lines ? \nIn my scenarios I don't see _lines_ as long as 512 bytes. At most they are around 100 bytes.\n",
"Oh, OK, I get the context now.\n\nOne thing I've been meaning to get around to: understanding `_fileobject.readline()` from Python's `socket` module. This is an API to wrap a socket and read lines from it like you would from a regular file. Here's a Gist of the code for convenience: [https://gist.github.com/4231260]\n\nIt looks like it reads a byte at a time in some cases and `self._rbufsize` bytes (default 8192) at a time in others. It also looks like it's doing something clever. Maybe we need something like this.\n",
"You mean buffer the stream so we can return the default sizes? I was thinking of this but I realized it isn't realistic for every situation.\n",
"Resolved (finally!) by #1122.\n"
] |
https://api.github.com/repos/psf/requests/issues/988
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/988/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/988/comments
|
https://api.github.com/repos/psf/requests/issues/988/events
|
https://github.com/psf/requests/issues/988
| 9,004,675 |
MDU6SXNzdWU5MDA0Njc1
| 988 |
Debugging traces
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/602685?v=4",
"events_url": "https://api.github.com/users/SmithSamuelM/events{/privacy}",
"followers_url": "https://api.github.com/users/SmithSamuelM/followers",
"following_url": "https://api.github.com/users/SmithSamuelM/following{/other_user}",
"gists_url": "https://api.github.com/users/SmithSamuelM/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/SmithSamuelM",
"id": 602685,
"login": "SmithSamuelM",
"node_id": "MDQ6VXNlcjYwMjY4NQ==",
"organizations_url": "https://api.github.com/users/SmithSamuelM/orgs",
"received_events_url": "https://api.github.com/users/SmithSamuelM/received_events",
"repos_url": "https://api.github.com/users/SmithSamuelM/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/SmithSamuelM/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/SmithSamuelM/subscriptions",
"type": "User",
"url": "https://api.github.com/users/SmithSamuelM",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 13 |
2012-12-05T00:46:03Z
|
2021-09-09T05:00:47Z
|
2013-01-26T17:57:11Z
|
NONE
|
resolved
|
Couldn't find anywhere to ask this question so forgive me for opening up an issue.
Is there a way in Requests to get a trace of the over the wire http for a request response.
In httplib2 your could do it by setting httplib2.debuglevel
I hope requests has something better. such as a trace attribute on the response object.
|
{
"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/988/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/988/timeline
| null |
completed
| null | null | false |
[
"I'm not certain there is but the tests print debugging information occasionally. The clue may lie in there. I know urllib3 does do logging but I'm not sure how we control that honestly. \n",
"urllib3 logs to its `__name__` logger namespace (that's usually \"urllib3\", or \"requests.packages.urllib3\" for requests). There is a handy helper for getting it to print: `urllib3.add_stderr_logger()`\n\nOr for requests, you'd do: `requests.packages.urllib3.add_stderr_logger()`\n",
"Thanks thats helpful to know. I think it would be a good idea, in keeping with the Requests motto of Human Friendly Http, to add an optional parameter that automatically setup the capture of the http over the wire. I have found that in a production environment its a really useful capability when you are interfacing to external services that have \"bugs\". Usually the easiest way to get them to acknowledge the bug is to provide a trace of the http packets involved. One approach I have used with httplib2 is to redirect the debug stderr to a string variable and then expose it as an attribute that also gets attached to any exceptions. That way whatever facility it trapping exceptions can extract the trace. \n\nI guess if I start using Requests, that it is something I would look into doing.\n",
"@SmithSamuelM you should probably wait until the great refactor (#970) is over before you look into adding it, but at that, I think the logging you're looking for belongs in (if it doesn't already exist in) urllib3.\n",
"Good, that will make it easy. The idea is to do something like this\n\nresponse=requests.get(..., trace=True)\nresponse.trace\n Would have the over the wire packet flow\n",
"Not sure @kennethreitz will approve of the extra parameter. At best you might be able to add that as a configuration parameter. Even so, as I already said, the majority of the trace work only makes sense if it is performed in urllib3. If it doesn't exist there, you'll be hard pressed to see it introduced in requests.\n",
"Ya well, I guess I would have to make the case. A config parameter is fine. The idea is to make it easy to turn on and off from the requests api not have to import urlib3 and then do extra configuration just to get a trace. \nI mean if configurating stuff at the urllib3 layer was the preferred path then why use requests at all. Just configure urllib3 and do it the hard way?\n",
"Of course inside the api the configuration would be performed at the urllib3 layer but the complexity is not exposed to the requests user\n",
"Thanks for your helpful comments\n",
"Tried the \n\n``` python\nrequests.packages.urllib3.add_stderr_logger()\n```\n\nAll it logged was this\n\n2012-12-20 09:30:12,493 INFO Starting new HTTPS connection (1): example.com\n2012-12-20 09:30:12,806 DEBUG \"POST /soap/default HTTP/1.1\" 500 572\n\nNot even close to the level of detail that httplib2 logs\n",
"I'm sure @shazow would be delighted to have extra logging in urllib3. =D\n",
"This feature should be implemented in urllib3 not requests. Discussion is in shazow/urllib3/issues/107\n",
"Looking at httplib2 a bit, this is most definitely something for urllib3 and not us. I'm closing it, but someone else can feel free to re-open later.\n"
] |
https://api.github.com/repos/psf/requests/issues/987
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/987/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/987/comments
|
https://api.github.com/repos/psf/requests/issues/987/events
|
https://github.com/psf/requests/pull/987
| 8,993,158 |
MDExOlB1bGxSZXF1ZXN0MzIzMjMwMg==
| 987 |
Update docs to reflect correct use of raw.
|
{
"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 |
2012-12-04T18:16:41Z
|
2021-09-08T23:05:06Z
|
2012-12-05T01:34:20Z
|
MEMBER
|
resolved
|
Small one. Resolves issue #979.
|
{
"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/987/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/987/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/987.diff",
"html_url": "https://github.com/psf/requests/pull/987",
"merged_at": "2012-12-05T01:34:20Z",
"patch_url": "https://github.com/psf/requests/pull/987.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/987"
}
| true |
[
":+1:\n",
"Excellent, thanks!\n"
] |
https://api.github.com/repos/psf/requests/issues/986
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/986/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/986/comments
|
https://api.github.com/repos/psf/requests/issues/986/events
|
https://github.com/psf/requests/issues/986
| 8,962,552 |
MDU6SXNzdWU4OTYyNTUy
| 986 |
"Content-Length": 0 Doesn't Work
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/421730?v=4",
"events_url": "https://api.github.com/users/ruli/events{/privacy}",
"followers_url": "https://api.github.com/users/ruli/followers",
"following_url": "https://api.github.com/users/ruli/following{/other_user}",
"gists_url": "https://api.github.com/users/ruli/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ruli",
"id": 421730,
"login": "ruli",
"node_id": "MDQ6VXNlcjQyMTczMA==",
"organizations_url": "https://api.github.com/users/ruli/orgs",
"received_events_url": "https://api.github.com/users/ruli/received_events",
"repos_url": "https://api.github.com/users/ruli/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ruli/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ruli/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ruli",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-12-03T20:24:54Z
|
2021-09-09T05:30:42Z
|
2012-12-03T21:55:18Z
|
NONE
|
resolved
|
Hi Everyone,
This is rather a minor issue. However it makes more sense if integer is supported.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/421730?v=4",
"events_url": "https://api.github.com/users/ruli/events{/privacy}",
"followers_url": "https://api.github.com/users/ruli/followers",
"following_url": "https://api.github.com/users/ruli/following{/other_user}",
"gists_url": "https://api.github.com/users/ruli/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ruli",
"id": 421730,
"login": "ruli",
"node_id": "MDQ6VXNlcjQyMTczMA==",
"organizations_url": "https://api.github.com/users/ruli/orgs",
"received_events_url": "https://api.github.com/users/ruli/received_events",
"repos_url": "https://api.github.com/users/ruli/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ruli/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ruli/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ruli",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/986/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/986/timeline
| null |
completed
| null | null | false |
[
"We've discussed this in the past (I cannot seem to find the issue though). Integers don't actually make sense in the context of the specification, if I remember correctly.\n\n--EDIT-- \n\nFound it: #865\n",
"I see, had a misunderstanding of Content-Length. It's actually in octets, and the simplest representation of octets in Python are in strings.\n\nClosed (hope this helps other ppl who wonders about similar issues)\n"
] |
https://api.github.com/repos/psf/requests/issues/985
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/985/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/985/comments
|
https://api.github.com/repos/psf/requests/issues/985/events
|
https://github.com/psf/requests/pull/985
| 8,956,832 |
MDExOlB1bGxSZXF1ZXN0MzIxMzk4OQ==
| 985 |
Use console syntax highlighting in the readme file
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/200401?v=4",
"events_url": "https://api.github.com/users/arturdryomov/events{/privacy}",
"followers_url": "https://api.github.com/users/arturdryomov/followers",
"following_url": "https://api.github.com/users/arturdryomov/following{/other_user}",
"gists_url": "https://api.github.com/users/arturdryomov/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/arturdryomov",
"id": 200401,
"login": "arturdryomov",
"node_id": "MDQ6VXNlcjIwMDQwMQ==",
"organizations_url": "https://api.github.com/users/arturdryomov/orgs",
"received_events_url": "https://api.github.com/users/arturdryomov/received_events",
"repos_url": "https://api.github.com/users/arturdryomov/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/arturdryomov/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/arturdryomov/subscriptions",
"type": "User",
"url": "https://api.github.com/users/arturdryomov",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-12-03T17:21:53Z
|
2021-09-08T17:06:07Z
|
2012-12-03T17:23:33Z
|
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/985/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/985/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/985.diff",
"html_url": "https://github.com/psf/requests/pull/985",
"merged_at": "2012-12-03T17:23:33Z",
"patch_url": "https://github.com/psf/requests/pull/985.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/985"
}
| true |
[
"thanks!\n"
] |
|
https://api.github.com/repos/psf/requests/issues/984
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/984/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/984/comments
|
https://api.github.com/repos/psf/requests/issues/984/events
|
https://github.com/psf/requests/pull/984
| 8,932,308 |
MDExOlB1bGxSZXF1ZXN0MzIwNDc0OQ==
| 984 |
Improved conformance of link header parsing. Added unit tests as well
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1366?v=4",
"events_url": "https://api.github.com/users/deontologician/events{/privacy}",
"followers_url": "https://api.github.com/users/deontologician/followers",
"following_url": "https://api.github.com/users/deontologician/following{/other_user}",
"gists_url": "https://api.github.com/users/deontologician/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/deontologician",
"id": 1366,
"login": "deontologician",
"node_id": "MDQ6VXNlcjEzNjY=",
"organizations_url": "https://api.github.com/users/deontologician/orgs",
"received_events_url": "https://api.github.com/users/deontologician/received_events",
"repos_url": "https://api.github.com/users/deontologician/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/deontologician/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/deontologician/subscriptions",
"type": "User",
"url": "https://api.github.com/users/deontologician",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2012-12-03T00:06:27Z
|
2021-09-08T23:05:05Z
|
2012-12-03T06:51:53Z
|
NONE
|
resolved
|
In [RFC-5988](http://tools.ietf.org/html/rfc5988) link headers are allowed to specify multiple rels per link by separating them with a space
```
Link: </>;rel="rel1 rel2"
```
In addition, there can be multiple links with the same rel, which the current .links() implementation doesn't allow since it overwrites earlier links with later ones.
This patch adds both of those capabilities, and in addition changes the "url" tag to the "href" tag in order to align better with the RFCs terminology (because the link header derives from the link html tag, which uses href).
Several of the regex's used are modified version of those from the mnot/redbot project.
I added unit tests in the patch, but there are also some basic end to end tests [here](https://gist.github.com/4191608)
|
{
"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/984/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/984/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/984.diff",
"html_url": "https://github.com/psf/requests/pull/984",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/984.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/984"
}
| true |
[
"Thanks for the pull request!\n\nUnfortunately, I won't be merging this at this time. All of the fallacies that you pointed out were known at the time of implementation. We decided to go the pragmatic route :)\n\nIn the future, we may utilize a MultiDict to have multiple values for a single key.\n",
"So, is the main issue with this patch is that it returns a dict of lists, rather than a multidict?\n",
"I'd say so.\n\nIt's also significantly harder to maintain and complicated, but the MultiDict is the main thing. \n"
] |
https://api.github.com/repos/psf/requests/issues/983
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/983/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/983/comments
|
https://api.github.com/repos/psf/requests/issues/983/events
|
https://github.com/psf/requests/pull/983
| 8,924,543 |
MDExOlB1bGxSZXF1ZXN0MzIwMzI1Nw==
| 983 |
Add the ability to turn off HTTP 0.9 support.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/448087?v=4",
"events_url": "https://api.github.com/users/jszakmeister/events{/privacy}",
"followers_url": "https://api.github.com/users/jszakmeister/followers",
"following_url": "https://api.github.com/users/jszakmeister/following{/other_user}",
"gists_url": "https://api.github.com/users/jszakmeister/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jszakmeister",
"id": 448087,
"login": "jszakmeister",
"node_id": "MDQ6VXNlcjQ0ODA4Nw==",
"organizations_url": "https://api.github.com/users/jszakmeister/orgs",
"received_events_url": "https://api.github.com/users/jszakmeister/received_events",
"repos_url": "https://api.github.com/users/jszakmeister/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jszakmeister/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jszakmeister/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jszakmeister",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 6 |
2012-12-02T16:34:20Z
|
2021-09-08T17:06:07Z
|
2012-12-02T16:43:32Z
|
CONTRIBUTOR
|
resolved
|
While debugging an issue I discovered requests was coming back with 200
response, when it really shouldn't have. It turns out this happened for
two reasons: the jetty server running the app was rather lame and
didn't fail the request as a Bad Request, and httplib was happy to let
malformed data through and call it success.
It turns out httplib's strict flag controls this behavior of whether or
not to validate the status line. The underlying urllib3 supports the
concept as well. There was a bug there to that is now fixed upstream.
The last step is exposing this through requests. This introduces a
supports_http0.9 flag to help control this behavior. It defaults to
to True to preserve the current behavior. Setting it to False will
allow the underlying HTTPConnection to validate the status line.
|
{
"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/983/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/983/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/983.diff",
"html_url": "https://github.com/psf/requests/pull/983",
"merged_at": "2012-12-02T16:43:32Z",
"patch_url": "https://github.com/psf/requests/pull/983.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/983"
}
| true |
[
"FYI: I did try to add a test for that, but didn't find a publicly available service to test against. I could create a test that stands up a couple of sockets, if you like. But I wanted to see what you guys thought before going through that trouble.\n\nAlso, this will require a new urllib3 to make this work, since urllib3 was not passing the `strict` flag to the underlying connection. The flag was already present in the API (so this landing on master won't cause a problem)... it's just that strict mode won't actually be enabled without a newer version.\n",
"Thanks! I'll be happy to add this if you remove the argument. I don't see any reason to make this optional.\n",
"Actually, I'll merge it now. It may get changed before release though :D\n",
"I didn't see any other way for a user to pass a config in to override the default. Am I missing something?\n",
"BTW, thanks for merging it!\n",
"absolutely!\n"
] |
https://api.github.com/repos/psf/requests/issues/982
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/982/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/982/comments
|
https://api.github.com/repos/psf/requests/issues/982/events
|
https://github.com/psf/requests/pull/982
| 8,907,539 |
MDExOlB1bGxSZXF1ZXN0MzIwMTI5OQ==
| 982 |
Added support for persistent connections (keep-alive) in proxy mode
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1771332?v=4",
"events_url": "https://api.github.com/users/vlaci/events{/privacy}",
"followers_url": "https://api.github.com/users/vlaci/followers",
"following_url": "https://api.github.com/users/vlaci/following{/other_user}",
"gists_url": "https://api.github.com/users/vlaci/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/vlaci",
"id": 1771332,
"login": "vlaci",
"node_id": "MDQ6VXNlcjE3NzEzMzI=",
"organizations_url": "https://api.github.com/users/vlaci/orgs",
"received_events_url": "https://api.github.com/users/vlaci/received_events",
"repos_url": "https://api.github.com/users/vlaci/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/vlaci/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vlaci/subscriptions",
"type": "User",
"url": "https://api.github.com/users/vlaci",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2012-12-02T00:34:37Z
|
2021-09-08T23:05:10Z
|
2012-12-02T08:56:44Z
|
CONTRIBUTOR
|
resolved
|
Fix for issue https://github.com/kennethreitz/requests/issues/875
- Proxy is now also comes from the connection pool if keep-alive is enabled
- Also contains tests to see if a connection is pooled or not
|
{
"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/982/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/982/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/982.diff",
"html_url": "https://github.com/psf/requests/pull/982",
"merged_at": "2012-12-02T08:56:44Z",
"patch_url": "https://github.com/psf/requests/pull/982.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/982"
}
| true |
[
"Thanks! I love the simplicity of this too. Much better approach.\n\n:sparkles: :cake: :sparkles:\n",
"@vlaci \nHave you seen https://github.com/shazow/urllib3/blob/master/dummyserver/server.py?\n",
"I hadn't but after I was I'd say the wsgi implementation is not applicable here. In fact, tt may have been worth using the SocketServerThread one if it was included in requests' repository but it wasn't.\n"
] |
https://api.github.com/repos/psf/requests/issues/981
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/981/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/981/comments
|
https://api.github.com/repos/psf/requests/issues/981/events
|
https://github.com/psf/requests/pull/981
| 8,899,647 |
MDExOlB1bGxSZXF1ZXN0MzIwMDA5OQ==
| 981 |
JSON request support
|
{
"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 | 6 |
2012-12-01T18:05:14Z
|
2021-09-08T17:06:06Z
|
2012-12-01T22:59:47Z
|
NONE
|
resolved
|
Hi Kenneth,
I know you remain unconvinced about https://github.com/kennethreitz/requests/issues/769 etc., but I keep wanting to make my code simpler by writing this
```
requests.post(url, json={...}).json
```
And I suspect I'm very much not alone. I'd like to start by maintaining a fork that is at least reasonably correct, if not good enough for inclusion. So, if you could poke some holes in my first stab at implementing this, I would appreciate it.
Thanks.
|
{
"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/981/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/981/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/981.diff",
"html_url": "https://github.com/psf/requests/pull/981",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/981.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/981"
}
| true |
[
"Try writing this as a hook. This way you don't need to fork anything :)\n",
"Check out the `magic_json` branch on my github3.py project. The hook @piotr-dobrogost mentioned can be seen in action there and is written for my needs.\n",
"Also, had you bothered to search through the closed issues, your suspicion would be confirmed and you would also know that it has been denied. It isn't the role of requests to duplicate what a single extra import and call would do. And when written not as a hook, it will provide a shorter stack trace when you pass improper JSON.\n",
"@sigmavirus24, he referenced #769 in his post, he knows. =)\n",
"Apologies. This is what I get for reading it on a \"smart\"phone screen. The \nGitHub for Android app seems to spuriously not show links.\n",
"not happening ;)\n"
] |
https://api.github.com/repos/psf/requests/issues/980
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/980/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/980/comments
|
https://api.github.com/repos/psf/requests/issues/980/events
|
https://github.com/psf/requests/pull/980
| 8,896,208 |
MDExOlB1bGxSZXF1ZXN0MzE5OTU2NA==
| 980 |
Github name change
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/105168?v=4",
"events_url": "https://api.github.com/users/dbrgn/events{/privacy}",
"followers_url": "https://api.github.com/users/dbrgn/followers",
"following_url": "https://api.github.com/users/dbrgn/following{/other_user}",
"gists_url": "https://api.github.com/users/dbrgn/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dbrgn",
"id": 105168,
"login": "dbrgn",
"node_id": "MDQ6VXNlcjEwNTE2OA==",
"organizations_url": "https://api.github.com/users/dbrgn/orgs",
"received_events_url": "https://api.github.com/users/dbrgn/received_events",
"repos_url": "https://api.github.com/users/dbrgn/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dbrgn/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dbrgn/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dbrgn",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2012-12-01T14:39:18Z
|
2021-09-08T17:06:05Z
|
2012-12-01T15:56:48Z
|
CONTRIBUTOR
|
resolved
|
I renamed my Github account from @gwrtheyrn to @dbrgn.
|
{
"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/980/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/980/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/980.diff",
"html_url": "https://github.com/psf/requests/pull/980",
"merged_at": "2012-12-01T15:56:48Z",
"patch_url": "https://github.com/psf/requests/pull/980.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/980"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/979
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/979/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/979/comments
|
https://api.github.com/repos/psf/requests/issues/979/events
|
https://github.com/psf/requests/issues/979
| 8,876,107 |
MDU6SXNzdWU4ODc2MTA3
| 979 |
quickstart and api docs: prefetch=False is required to read raw content
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/991641?v=4",
"events_url": "https://api.github.com/users/Fak3/events{/privacy}",
"followers_url": "https://api.github.com/users/Fak3/followers",
"following_url": "https://api.github.com/users/Fak3/following{/other_user}",
"gists_url": "https://api.github.com/users/Fak3/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Fak3",
"id": 991641,
"login": "Fak3",
"node_id": "MDQ6VXNlcjk5MTY0MQ==",
"organizations_url": "https://api.github.com/users/Fak3/orgs",
"received_events_url": "https://api.github.com/users/Fak3/received_events",
"repos_url": "https://api.github.com/users/Fak3/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Fak3/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Fak3/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Fak3",
"user_view_type": "public"
}
|
[] |
closed
| 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"
}
|
[
{
"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"
}
] | null | 1 |
2012-11-30T22:16:50Z
|
2021-09-09T05:30:42Z
|
2012-12-05T19:03:56Z
|
NONE
|
resolved
|
Quickstart section "raw response content" does not say about the requirement: https://github.com/kennethreitz/requests/blob/master/docs/user/quickstart.rst#raw-response-content
Also API docs at http://docs.python-requests.org/en/latest/api/ missing this requirement
(requirement introduced on 0.13.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"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/979/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/979/timeline
| null |
completed
| null | null | false |
[
"Resolved by #987. Thanks for the report!\n"
] |
https://api.github.com/repos/psf/requests/issues/978
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/978/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/978/comments
|
https://api.github.com/repos/psf/requests/issues/978/events
|
https://github.com/psf/requests/issues/978
| 8,837,783 |
MDU6SXNzdWU4ODM3Nzgz
| 978 |
Build issue related to s/chardet/charade/ change
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/41057?v=4",
"events_url": "https://api.github.com/users/samv/events{/privacy}",
"followers_url": "https://api.github.com/users/samv/followers",
"following_url": "https://api.github.com/users/samv/following{/other_user}",
"gists_url": "https://api.github.com/users/samv/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/samv",
"id": 41057,
"login": "samv",
"node_id": "MDQ6VXNlcjQxMDU3",
"organizations_url": "https://api.github.com/users/samv/orgs",
"received_events_url": "https://api.github.com/users/samv/received_events",
"repos_url": "https://api.github.com/users/samv/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/samv/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/samv/subscriptions",
"type": "User",
"url": "https://api.github.com/users/samv",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 9 |
2012-11-30T01:11:43Z
|
2021-09-09T00:01:03Z
|
2012-12-27T12:56:27Z
|
NONE
|
resolved
|
Hi, I'm seeing this in my 'pip install' command:
```
Obtaining requests from git+git://github.com/kennethreitz/requests.git#egg=requests (from -r requirements.txt (line 19))
Cloning git://github.com/kennethreitz/requests.git to ./env/src/requests
Running setup.py egg_info for package requests
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/var/local/maria/hudson/workspace/platform-api-console/env/src/requests/setup.py", line 6, in <module>
import requests
File "requests/__init__.py", line 53, in <module>
from .models import Request, Response
File "requests/models.py", line 37, in <module>
from .compat import (
ImportError: cannot import name chardet
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/var/local/maria/hudson/workspace/platform-api-console/env/src/requests/setup.py", line 6, in <module>
import requests
File "requests/__init__.py", line 53, in <module>
from .models import Request, Response
File "requests/models.py", line 37, in <module>
from .compat import (
ImportError: cannot import name chardet
```
Pinning to 8f86ff633a2646442f2d8976046b5c0025e772c1 works around 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/978/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/978/timeline
| null |
completed
| null | null | false |
[
"Yes, it's under development and is not working properly at this time.\n",
"I also have this error. Has this been fixed?\n",
"Yeah, this was fixed a very long time ago. Are you sure it's exactly this error?\n",
"Thanks for the quick response. I'm getting this error after I use py2exe on my app that uses requests. My apologies if this is a different error.\n\n File \"requests__init__.pyc\", line 58, in <module>\n File \"requests\\utils.pyc\", line 25, in <module>\n File \"requests\\compat.pyc\", line 7, in <module>\nImportError: cannot import name chardet\n",
"Yeah, that will be a different error. py2exe is fiddly when it comes to packaging. You'll want to take a look at what `setup.py` includes in the [packages list](https://github.com/kennethreitz/requests/blob/master/setup.py#L17-L25), and make sure that all of these folders end up present in your py2exe build.\n",
"Yeah, I added the packages but when I try to compile, I get \"error: package directory 'requests' does not exist\". So finicky. Do I need to put 'requests-2.2.1-py2.7.egg' instead of 'requests' or is there are a parameter to specify my site-packages folder, even though I couldn't find it when I read the documentation.\n\nUpdate: I changed it to only include the package 'requests' instead of all those that were listed, and changed the syntax to match the syntax on the py2exe site and it seems to work right now. I think the info in that link is wrong or outdated.\n",
"Uh...the info in what link?\n",
"The link you gave in the previous reply. :)\n",
"Oh, I see. No, that's not out of date, it just serves a specific purpose. py2exe almost certainly uses a totally different mechanism, meaning that what you do with that is likely to be different.\n"
] |
https://api.github.com/repos/psf/requests/issues/977
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/977/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/977/comments
|
https://api.github.com/repos/psf/requests/issues/977/events
|
https://github.com/psf/requests/pull/977
| 8,824,110 |
MDExOlB1bGxSZXF1ZXN0MzE3NzU1MQ==
| 977 |
Update README.rst
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/423776?v=4",
"events_url": "https://api.github.com/users/ondrowan/events{/privacy}",
"followers_url": "https://api.github.com/users/ondrowan/followers",
"following_url": "https://api.github.com/users/ondrowan/following{/other_user}",
"gists_url": "https://api.github.com/users/ondrowan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ondrowan",
"id": 423776,
"login": "ondrowan",
"node_id": "MDQ6VXNlcjQyMzc3Ng==",
"organizations_url": "https://api.github.com/users/ondrowan/orgs",
"received_events_url": "https://api.github.com/users/ondrowan/received_events",
"repos_url": "https://api.github.com/users/ondrowan/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ondrowan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ondrowan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ondrowan",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-11-29T18:58:56Z
|
2021-09-08T17:06:06Z
|
2012-11-29T18:59:49Z
|
CONTRIBUTOR
|
resolved
|
There was a typo in AUTHORS link - it pointed to develop branch which no longer exists.
|
{
"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/977/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/977/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/977.diff",
"html_url": "https://github.com/psf/requests/pull/977",
"merged_at": "2012-11-29T18:59:49Z",
"patch_url": "https://github.com/psf/requests/pull/977.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/977"
}
| true |
[
"thanks!\n"
] |
https://api.github.com/repos/psf/requests/issues/976
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/976/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/976/comments
|
https://api.github.com/repos/psf/requests/issues/976/events
|
https://github.com/psf/requests/pull/976
| 8,771,803 |
MDExOlB1bGxSZXF1ZXN0MzE1Nzg4NQ==
| 976 |
Repaired import error.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/72997?v=4",
"events_url": "https://api.github.com/users/futoase/events{/privacy}",
"followers_url": "https://api.github.com/users/futoase/followers",
"following_url": "https://api.github.com/users/futoase/following{/other_user}",
"gists_url": "https://api.github.com/users/futoase/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/futoase",
"id": 72997,
"login": "futoase",
"node_id": "MDQ6VXNlcjcyOTk3",
"organizations_url": "https://api.github.com/users/futoase/orgs",
"received_events_url": "https://api.github.com/users/futoase/received_events",
"repos_url": "https://api.github.com/users/futoase/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/futoase/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/futoase/subscriptions",
"type": "User",
"url": "https://api.github.com/users/futoase",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 8 |
2012-11-28T16:32:25Z
|
2021-09-08T17:06:06Z
|
2012-11-28T16:33:56Z
|
CONTRIBUTOR
|
resolved
|
There is no chardet2 directory. Change the import statement.
|
{
"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/976/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/976/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/976.diff",
"html_url": "https://github.com/psf/requests/pull/976",
"merged_at": "2012-11-28T16:33:56Z",
"patch_url": "https://github.com/psf/requests/pull/976.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/976"
}
| true |
[
"Thanks!\n",
"Thank you for adopting! :+1: \n",
"Any chance to get a new release ? This break installation with py3.x \n",
"@gawel I doubt it. Just use the 0.14.2 tag and install from there, i.e., find what commit it belongs to and do `pip install -e git+git://github.com/kennethreitz/requests.git@sha`\n",
"Well, there is no doubt :)\n\n```\ncmdargs=[local('/home/gawel/py/pyquery/.tox/py33/bin/pip'), 'install', '--download-cache=/home/gawel/.buildout/tox/_download', 'nose', 'requests']\nenv={'PYTHONIOENCODING': 'utf_8', 'LC_CTYPE': 'fr_FR.UTF-8', 'LOGNAME': 'gawel', 'USER': 'gawel', 'PATH': '/home/gawel/py/pyquery/.tox/py33/bin:/home/gawel/py/bin:/home/gawel/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/home/gawel/.oh-my-vim/bin', 'GNOME_KEYRING_CONTROL': '/tmp/keyring-NnujB6', 'DISPLAY': ':0.0', 'SSH_AGENT_PID': '13212', 'LANG': 'fr_FR.UTF-8', 'TERM': 'xterm', 'SHELL': '/usr/bin/zsh', 'XDG_SESSION_PATH': '/org/freedesktop/DisplayManager/Session1', 'XAUTHORITY': '/home/gawel/.Xauthority', 'LANGUAGE': 'fr:en', 'SHLVL': '1', 'MANDATORY_PATH': '/usr/share/gconf/fluxbox.mandatory.path', 'WINDOWID': '20971946', 'EDITOR': 'vim --remote-silent', 'GREP_COLOR': '1;32', 'HOME': '/home/gawel', 'USERNAME': 'gawel', 'PYTHONPATH': '', 'SSH_AUTH_SOCK': '/tmp/ssh-nTYLBlQ13163/agent.13163', 'GDMSESSION': 'fluxbox', 'LSCOLORS': 'Gxfxcxdxbxegedabagacad', 'GNOME_KEYRING_PID': '13154', 'XDG_SEAT_PATH': '/org/freedesktop/DisplayManager/Seat0', 'XDG_SESSION_COOKIE': '373f267b0b8e9855d44d9fc100000008-1354114981.800514-1245713271', 'DBUS_SESSION_BUS_ADDRESS': 'unix:abstract=/tmp/dbus-ajtHzXBpRy,guid=5b9f6e1a081e9f6bc10e3d6d0004b59a', '_': '/home/gawel/py/pyquery/./bin/tox', 'LC_MESSAGES': 'fr_FR.UTF-8', 'DESKTOP_SESSION': 'fluxbox', 'GREP_OPTIONS': '--color=auto', 'XDG_CONFIG_DIRS': '/etc/xdg/xdg-fluxbox:/etc/xdg', 'DEFAULTS_PATH': '/usr/share/gconf/fluxbox.default.path', 'OLDPWD': '/home/gawel', 'GTK_MODULES': 'canberra-gtk-module:canberra-gtk-module', 'XDG_DATA_DIRS': '/usr/share/fluxbox:/usr/local/share/:/usr/share/', 'PWD': '/home/gawel/py/pyquery', 'PIP_DOWNLOAD_CACHE': '/home/gawel/.buildout/tox/_download', 'COLORTERM': 'gnome-terminal', 'PAGER': '/home/gawel/bin/vimpager', 'LC_COLLATE': 'fr_FR.UTF-8'}\nDownloading/unpacking nose\n Using download cache from /home/gawel/.buildout/tox/_download/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fn%2Fnose%2Fnose-1.2.1.tar.gz\n Running setup.py egg_info for package nose\n\n no previously-included directories found matching 'doc/.build'\nDownloading/unpacking requests\n Using download cache from /home/gawel/.buildout/tox/_download/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fr%2Frequests%2Frequests-0.14.2.tar.gz\n Running setup.py egg_info for package requests\n Traceback (most recent call last):\n File \"<string>\", line 16, in <module>\n File \"/home/gawel/py/pyquery/.tox/py33/build/requests/setup.py\", line 6, in <module>\n import requests\n File \"./requests/__init__.py\", line 52, in <module>\n from . import utils\n File \"./requests/utils.py\", line 22, in <module>\n from .compat import parse_http_list as _parse_list_header\n File \"./requests/compat.py\", line 112, in <module>\n from .packages import chardet2 as chardet\n ImportError: cannot import name chardet2\n```\n\nI will add requests as a pyquery dependencie. So I can really tell users to install requests from a git tag before installing pyquery :)\n\nI'm working on it. So I'm a bit impatient :) But I can wait.\n",
"Huh. Interesting. Didn't realize that. 0.14.1 works perfectly though. I'm 100% certain of that. And I'm using it for github3.py without complaint from any users.\n",
"And you still have an error with master:\n\n```\n Cloning git://github.com/kennethreitz/requests.git (to master) to /tmp/pip-us3ss0-build\n Running setup.py egg_info for package from git+git://github.com/kennethreitz/requests.git@master\n Traceback (most recent call last):\n File \"<string>\", line 16, in <module>\n File \"/tmp/pip-us3ss0-build/setup.py\", line 6, in <module>\n import requests\n File \"./requests/__init__.py\", line 53, in <module>\n from .models import Request, Response\n File \"./requests/models.py\", line 37, in <module>\n from .compat import (\n ImportError: cannot import name chardet\n```\n\nBut I saw an opened issue about chardet so maybe it's a known problem.\n",
"Yeah I'm working on a single fork of chardet that works under both python 2 and 3. That's over at sigmavirus24/charade (pull requests welcome) and that will become the new standard. @kennethreitz pulled in a non-functional version to replace chardet with. Any imports referring to chardet should now be broken and replaced by charade. For right now, the charade tests are failing unfortunately and I hope to have them passing in the majority soon. The latest version should be entirely functional.\n"
] |
https://api.github.com/repos/psf/requests/issues/975
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/975/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/975/comments
|
https://api.github.com/repos/psf/requests/issues/975/events
|
https://github.com/psf/requests/issues/975
| 8,758,609 |
MDU6SXNzdWU4NzU4NjA5
| 975 |
Auth persists though redirect.
|
{
"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"
}
|
[
{
"color": "e102d8",
"default": false,
"description": null,
"id": 117745,
"name": "Planned",
"node_id": "MDU6TGFiZWwxMTc3NDU=",
"url": "https://api.github.com/repos/psf/requests/labels/Planned"
}
] |
closed
| 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"
}
|
[
{
"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"
}
] | null | 14 |
2012-11-28T09:49:10Z
|
2021-09-09T01:22:24Z
|
2013-01-23T21:06:49Z
|
MEMBER
|
resolved
|
After the refactor is finished, we should take a look at the default Auth handlers. Right now their authentication information will be passed on a redirect, which is not forbidden by the spec, but is probably not the best default behaviour. We should probably be secure by default.
This behaviour should probably be optional, in case anyone relies on it.
This is related to and inspired by #627.
This should not be started until after #970, i.e. after v1.0.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"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/975/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/975/timeline
| null |
completed
| null | null | false |
[
"I feel like these can be optional arguments to the author handlers.\n\nSent from my iPhone\n\nOn Nov 28, 2012, at 1:49 AM, Cory Benfield [email protected] wrote:\n\nAfter the refactor is finished, we should take a look at the default Auth\nhandlers. Right now their authentication information will be passed on a\nredirect, which is not forbidden by the spec, but is probably not the best\ndefault behaviour. We should probably be secure by default.\n\nThis behaviour should probably be optional, in case anyone relies on it.\n\nThis is related to and inspired by\n#627https://github.com/kennethreitz/requests/issues/627\n.\n\nThis should not be started until after\n#970https://github.com/kennethreitz/requests/issues/970,\ni.e. after v1.0.0.\n\n—\nReply to this email directly or view it on\nGitHubhttps://github.com/kennethreitz/requests/issues/975.\n",
"+1, that was my intended design too. Not gonna touch it though until you're done, so that I don't rely on an API you change. =D\n",
"\"This behaviour should probably be optional, in case anyone relies on it.\"\n\nI am relying on it, and hope to figure out a way to get the same effect in urllib2; if someone happens to know how, feel free to answer the related [stackoverflow question](http://stackoverflow.com/questions/13701082/urllib2-http-basic-auth-after-redirect).\n",
"Touching back on the main topic, how would the authentication handlers handle this? Would they have access to the url being requested and only perform authentication for a specified domain (if an option to do so is set)? \n",
"@lukasa I am holding your feet to the fire on this one. ;)\n",
"@sigmavirus24: I'd forgotten about this, so thankyou! I'll take a look at it tonight and see how problematic it's likely to be.\n",
"Should auth persist across redirects to subdomains? What about from one subdomain to another? Put another way, should auth persist in these situations (not likely to happen in real life)?\n\nhttp://google.com/ -> http://mail.google.com/\nhttp://www.google.com/ -> http://mail.google.com/\n\nThoughts @sigmavirus24 @kennethreitz?\n",
"We should keep it simple.\n",
"if someone doesn't want it to persist through redirects, then they shouldn't allow redirects.\n",
"@kennethreitz, while I like that I think if we see a 307 (after a POST) we should just return that response as if the user had specified allow redirects to be False. It's safer and it follows spec.\n",
"@kennethreitz; Are you happy to make that the policy? If so, I'm happy to simply say that the user should disallow redirects and not write any code. =P\n",
"Yes :)\n",
"Heh, awesome, then I pronounce this issue closed as 'Not a bug'. =D\n",
"Oh god, I keep confusing issues.\n"
] |
https://api.github.com/repos/psf/requests/issues/974
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/974/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/974/comments
|
https://api.github.com/repos/psf/requests/issues/974/events
|
https://github.com/psf/requests/issues/974
| 8,751,878 |
MDU6SXNzdWU4NzUxODc4
| 974 |
Delete cookie
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/351995?v=4",
"events_url": "https://api.github.com/users/shawcx/events{/privacy}",
"followers_url": "https://api.github.com/users/shawcx/followers",
"following_url": "https://api.github.com/users/shawcx/following{/other_user}",
"gists_url": "https://api.github.com/users/shawcx/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/shawcx",
"id": 351995,
"login": "shawcx",
"node_id": "MDQ6VXNlcjM1MTk5NQ==",
"organizations_url": "https://api.github.com/users/shawcx/orgs",
"received_events_url": "https://api.github.com/users/shawcx/received_events",
"repos_url": "https://api.github.com/users/shawcx/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/shawcx/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/shawcx/subscriptions",
"type": "User",
"url": "https://api.github.com/users/shawcx",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2012-11-28T05:00:34Z
|
2021-09-09T05:00:52Z
|
2013-01-21T20:45:47Z
|
NONE
|
resolved
|
Does requests support cookie deletion? Here is a simplified example trying to communicate with Tornado
On the server side...
```
class Login(tornado.web.RequestHandler):
def post(self):
self.set_secure_cookie('id', 1234)
class Logout(tornado.web.RequestHandler):
def get(self):
self.clear_cookie('id')
```
On the client side doing something like this...
```
cookies = {}
session = requests.session(cookies=cookies)
session.post('http://localhost:8080/login')
print session.cookie['id']
session.get('http://localhost:8080/logout')
print session.cookie['id']
```
|
{
"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/974/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/974/timeline
| null |
completed
| null | null | false |
[
"Yeah. `session.cookies` should be an instance of `RequestsCookieJar` [https://github.com/kennethreitz/requests/blob/master/requests/cookies.py], which implements `MutableMapping` and should allow deletion through the dictionary interface, e.g., with `del`.\n",
"Wait, I misunderstood you --- the question is whether we correctly implement deletion of cookies at the server's request. The convention for doing this is for the server to send a Set-Cookie header with an expiration time in the past; see page 7 of [http://tools.ietf.org/html/rfc6265].\n\nOur management of this is deferred to Python's `cookielib`, but AFAIK it is working --- is it not working for you? If not, could you write a test case against httpbin.org?\n",
"We use the standard library's cookie handling code, so if it does it right, so do we. =)\n"
] |
https://api.github.com/repos/psf/requests/issues/973
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/973/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/973/comments
|
https://api.github.com/repos/psf/requests/issues/973/events
|
https://github.com/psf/requests/pull/973
| 8,748,803 |
MDExOlB1bGxSZXF1ZXN0MzE0OTY2NQ==
| 973 |
Fix #972
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-11-28T03:14:53Z
|
2021-09-08T17:06:04Z
|
2012-11-28T16:40:09Z
|
CONTRIBUTOR
|
resolved
|
Someone forgot a comma
|
{
"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/973/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/973/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/973.diff",
"html_url": "https://github.com/psf/requests/pull/973",
"merged_at": "2012-11-28T16:40:09Z",
"patch_url": "https://github.com/psf/requests/pull/973.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/973"
}
| true |
[
"By the way, the tests fail because the tests themselves are broken, not because of anything I did ;)\n",
"poke @kennethreitz \n"
] |
https://api.github.com/repos/psf/requests/issues/972
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/972/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/972/comments
|
https://api.github.com/repos/psf/requests/issues/972/events
|
https://github.com/psf/requests/issues/972
| 8,738,159 |
MDU6SXNzdWU4NzM4MTU5
| 972 |
Can't pip install f553857beb4424786f8d665019686551905483d6 - error: package directory 'requests/packages/chardetrequests/packages/urllib3' does not exist
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/470362?v=4",
"events_url": "https://api.github.com/users/matthewlmcclure/events{/privacy}",
"followers_url": "https://api.github.com/users/matthewlmcclure/followers",
"following_url": "https://api.github.com/users/matthewlmcclure/following{/other_user}",
"gists_url": "https://api.github.com/users/matthewlmcclure/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/matthewlmcclure",
"id": 470362,
"login": "matthewlmcclure",
"node_id": "MDQ6VXNlcjQ3MDM2Mg==",
"organizations_url": "https://api.github.com/users/matthewlmcclure/orgs",
"received_events_url": "https://api.github.com/users/matthewlmcclure/received_events",
"repos_url": "https://api.github.com/users/matthewlmcclure/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/matthewlmcclure/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/matthewlmcclure/subscriptions",
"type": "User",
"url": "https://api.github.com/users/matthewlmcclure",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-11-27T21:29:21Z
|
2021-09-09T05:30:44Z
|
2012-11-28T16:40:10Z
|
CONTRIBUTOR
|
resolved
|
```
[email protected]:~
$ pip install git+https://github.com/kennethreitz/requests.git@f553857beb4424786f8d665019686551905483d6#egg=requests-f553857
Downloading/unpacking requests-f553857 from git+https://github.com/kennethreitz/requests.git@f553857beb4424786f8d665019686551905483d6#egg=requests-f553857
Cloning https://github.com/kennethreitz/requests.git (to f553857beb4424786f8d665019686551905483d6) to /var/folders/vk/p95wm1qx0vdf0087p0z9qzc40000gn/T/pip-build/requests-f553857
Could not find a tag or branch 'f553857beb4424786f8d665019686551905483d6', assuming commit.
Running setup.py egg_info for package requests-f553857
error: package directory 'requests/packages/chardetrequests/packages/urllib3' does not exist
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info/requests.egg-info
writing pip-egg-info/requests.egg-info/PKG-INFO
writing top-level names to pip-egg-info/requests.egg-info/top_level.txt
writing dependency_links to pip-egg-info/requests.egg-info/dependency_links.txt
writing manifest file 'pip-egg-info/requests.egg-info/SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
error: package directory 'requests/packages/chardetrequests/packages/urllib3' does not exist
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /var/folders/vk/p95wm1qx0vdf0087p0z9qzc40000gn/T/pip-build/requests-f553857
Storing complete log in /Users/mlm/.pip/pip.log
```
|
{
"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/972/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/972/timeline
| null |
completed
| null | null | false |
[
"@matthewlmcclure try out my branch, this should fix your issue.\n"
] |
https://api.github.com/repos/psf/requests/issues/971
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/971/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/971/comments
|
https://api.github.com/repos/psf/requests/issues/971/events
|
https://github.com/psf/requests/issues/971
| 8,735,307 |
MDU6SXNzdWU4NzM1MzA3
| 971 |
Real logging
|
{
"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 |
{
"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"
}
|
[
{
"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_at": "2013-05-29T07:59:12Z",
"closed_issues": 12,
"created_at": "2012-11-27T18:41:46Z",
"creator": {
"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"
},
"description": ":sparkles: :cake: :sparkles:",
"due_on": null,
"html_url": "https://github.com/psf/requests/milestone/18",
"id": 219754,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/18/labels",
"node_id": "MDk6TWlsZXN0b25lMjE5NzU0",
"number": 18,
"open_issues": 0,
"state": "closed",
"title": "v1.0.0",
"updated_at": "2013-05-29T07:59:12Z",
"url": "https://api.github.com/repos/psf/requests/milestones/18"
}
| 4 |
2012-11-27T20:13:12Z
|
2021-09-09T05:30:12Z
|
2012-12-15T04:52:04Z
|
CONTRIBUTOR
|
resolved
|
- WARNING for things that shouldn't happen and can cause unexpected behaviour or problems,
- ERROR for when things are broken,
- INFO for major operations (i aim for about 1 info message per major event, like a new connection),
- DEBUG should have enough information to debug WARNINGs
|
{
"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/971/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/971/timeline
| null |
completed
| null | null | false |
[
"https://github.com/shazow/urllib3/blob/master/urllib3/__init__.py#L29\n",
"the \"right\" thing to do is only add handlers to the log namespace you're interested, ie.\n\ncorrect: `logging.getLogger('myapp').addHandler(...)`\nwrong: `logging.getLogger().addHandler(...)`\n",
"I'd like to add that any time there's a log statement within the beginning of an except block, that `log.exception()` is called to capture the backtrace along with the error message.\n",
"Need to document.\n"
] |
https://api.github.com/repos/psf/requests/issues/970
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/970/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/970/comments
|
https://api.github.com/repos/psf/requests/issues/970/events
|
https://github.com/psf/requests/issues/970
| 8,734,031 |
MDU6SXNzdWU4NzM0MDMx
| 970 |
Refactor
|
{
"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 |
[] |
{
"closed_at": "2013-05-29T07:59:12Z",
"closed_issues": 12,
"created_at": "2012-11-27T18:41:46Z",
"creator": {
"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"
},
"description": ":sparkles: :cake: :sparkles:",
"due_on": null,
"html_url": "https://github.com/psf/requests/milestone/18",
"id": 219754,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/18/labels",
"node_id": "MDk6TWlsZXN0b25lMjE5NzU0",
"number": 18,
"open_issues": 0,
"state": "closed",
"title": "v1.0.0",
"updated_at": "2013-05-29T07:59:12Z",
"url": "https://api.github.com/repos/psf/requests/milestones/18"
}
| 28 |
2012-11-27T19:38:04Z
|
2021-09-09T05:30:10Z
|
2012-12-17T13:39:36Z
|
CONTRIBUTOR
|
resolved
|
Breaking changes. Fixing things. Making this project sustainable.
## Goals
- Externalize functionality, utilize new Requests organization. (#938)
- Introduce better object model (https://twitter.com/dozba/status/273477717721223168)
- Introduce Transport Adapters (#895)
- Remove most configuration.
|
{
"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/970/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/970/timeline
| null |
completed
| null | null | false |
[
"Do we need safe mode? Seems silly.\n",
"It's a maintainability headache: chuck it. =D\n",
"Also removing danger mode.\n",
"There shall be only one mode: awesome mode.\n",
"Strict mode is valid, but only if we plan to support other RFC-complaint behavior. Currently, this is only POST redirects. \n\nAny others in the foreseeable future?\n",
"Maybe modes should be accomplished via hooks, which could be maintained as a separate project like Piotr suggested.\n",
"Maybe.\n",
"Hand written notes about the refactor:\n\n\n",
"`Request` -> `PreparedRequest` -> `Response`\n",
"`Request` -> `PreparedRequest` -> `Session` - > `TransportAdapter` -> `Response`\n",
"Does a session send a request, or does a request send itself through a session?\n\nI think a session sends a request through a connection.\n",
"`Request.send()` always felt a bit weird, idk.\n",
"You can create a request yourself, send it through a session. No reason to use connections directly.\n\napi/session level stuff will remain as it is today.\n",
"``` pycon\n>>> Request(method=..., url=...).prepare()\n<PreparedRequest [GET]>\n\n>>> session.send(_)\n<Response [200]>)\n```\n",
"timeout attached to send\n",
"Hmmm, perhaps cert, verify too\n",
"yeah, that makes sense\n",
"and prefetch\n",
"Man, this is going _really_ well.\n",
"I hope so, I woke up to about a million emails. =D\n",
"http://cl.ly/image/02031C300N0h\n",
"> http://cl.ly/image/02031C300N0h\n\nI :heart: you so much showing the body of the request.\n",
"@sigmavirus24 the best part is that it's fully mutable :)\n",
":+1:\n",
"So close!\n",
"I think all that's left is:\n- Proxies\n- Session adapter registry\n",
"Seriously, so close. Just gotta trust the env now.\n",
"DONE\n"
] |
https://api.github.com/repos/psf/requests/issues/969
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/969/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/969/comments
|
https://api.github.com/repos/psf/requests/issues/969/events
|
https://github.com/psf/requests/issues/969
| 8,732,801 |
MDU6SXNzdWU4NzMyODAx
| 969 |
Feature Freeze
|
{
"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 |
{
"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"
}
|
[
{
"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_at": "2013-05-29T07:59:12Z",
"closed_issues": 12,
"created_at": "2012-11-27T18:41:46Z",
"creator": {
"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"
},
"description": ":sparkles: :cake: :sparkles:",
"due_on": null,
"html_url": "https://github.com/psf/requests/milestone/18",
"id": 219754,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/18/labels",
"node_id": "MDk6TWlsZXN0b25lMjE5NzU0",
"number": 18,
"open_issues": 0,
"state": "closed",
"title": "v1.0.0",
"updated_at": "2013-05-29T07:59:12Z",
"url": "https://api.github.com/repos/psf/requests/milestones/18"
}
| 2 |
2012-11-27T19:01:37Z
|
2021-09-09T05:30:10Z
|
2012-12-17T13:39:51Z
|
CONTRIBUTOR
|
resolved
|
I'm abruptly refactoring the codebase for v1.0.
In order for this to work, there needs to be a feature freeze until I'm done. It shouldn't take long.
|
{
"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/969/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/969/timeline
| null |
completed
| null | null | false |
[
"Turn off pull requests and issues ;) (only kidding)\n",
"done.\n"
] |
https://api.github.com/repos/psf/requests/issues/968
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/968/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/968/comments
|
https://api.github.com/repos/psf/requests/issues/968/events
|
https://github.com/psf/requests/issues/968
| 8,732,049 |
MDU6SXNzdWU4NzMyMDQ5
| 968 |
Switch to Apache 2
|
{
"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 |
{
"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"
}
|
[
{
"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_at": "2013-05-29T07:59:12Z",
"closed_issues": 12,
"created_at": "2012-11-27T18:41:46Z",
"creator": {
"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"
},
"description": ":sparkles: :cake: :sparkles:",
"due_on": null,
"html_url": "https://github.com/psf/requests/milestone/18",
"id": 219754,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/18/labels",
"node_id": "MDk6TWlsZXN0b25lMjE5NzU0",
"number": 18,
"open_issues": 0,
"state": "closed",
"title": "v1.0.0",
"updated_at": "2013-05-29T07:59:12Z",
"url": "https://api.github.com/repos/psf/requests/milestones/18"
}
| 40 |
2012-11-27T18:39:54Z
|
2021-09-09T05:30:45Z
|
2012-11-27T19:33:36Z
|
CONTRIBUTOR
|
resolved
|
I've been wanting to do this for a long time.
I don't care bout incompatibility with GPLv2.
|
{
"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/968/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/968/timeline
| null |
completed
| null | null | false |
[
"Evaluate licenses of vendored libraries (NOTICES) for compatibility.\n",
"Shouldn't be a problem.\n",
"Why not MIT (or Zoidberg)?\n",
"The current license is functionally equivalent to the MIT/X11 and 2-clause BSD.\n\nApache 2 provides a number of protections that a project with an audience as large as Requests could benefit from.\n",
"One major disadvantage of Apache 2 is that it requires a license line to be added to each file. Super annoying, but worth it.\n",
"@kennethreitz: I can't see that requirement in the License instructions...\n",
"@Lukasa hmm, it's a long document. I might be crazy ;)\n",
"Humorously enough @kennethreitz, you might be thinking of the GPL's requirement to have itself in **every** file ;)\n",
"Haha, quite possible! \n",
"=P Nice.\n\nAnyway, we currently vendor urllib3, chardet, chardet2 and oauthlib. They use: MIT, LGPL, LGPL (again) and and 3-clause BSD. Those are the licenses we need to be compatible with.\n\nThe LGPLs might be...fun.\n",
"Fucking character encodings.\n",
"Indeed.\n\nSo, [it looks like](http://stackoverflow.com/questions/1174240/apache-and-lgpl-license-compatibility) we're fine on the LGPL front so long as we don't change chardet. If we fork chardet (see #951) then that would need to be relicensed under the LGPL. Of course, we could do that as part of the Requests org and then vendor that into requests as a relicensed copy.\n\nMy head hurts.\n\nFor now, we're fine on the LGPL front.\n",
"Hmm, I was planning on forking it :(\n",
"Looks like MIT and BSD are fine too.\n",
"Sweet, pulling the trigger.\n",
"@kenneth: You'd have to fork it as a separate project, relicensed under the LGPL, and then vendor that forked project into Requests. Not the end of the world, but a hassle.\n",
"@Lukasa I think it's appropriate.\n\nWhat shall we call it? Chardetter? FuckUnicode?\n",
"funicode.\n",
"How about [I Don't Know Exactly How, But I'm Sure This Is Joel's Fault](http://www.joelonsoftware.com/articles/Unicode.html).\n",
"Or ForkChardet with a bit of a tongue-in-cheek meaning ;) (Lame I know, I'll see myself out)\n",
"I actually do want to call it FuckChardet, but I don't want to promote any negativity. \n",
"Charred. \n",
"charmander.\n",
"CharStar? Pointers and whatnot :P\n\n@shazow I was thinking of that too ;)\n",
"crash\n",
"http://www.wolframalpha.com/input/?i=words+that+start+with+char\n",
"Charted\n",
"Oooh \"Charade\"\n",
"sharted.\n\n(Also, +1 to Charade.)\n",
"Charade. Sold.\n"
] |
https://api.github.com/repos/psf/requests/issues/967
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/967/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/967/comments
|
https://api.github.com/repos/psf/requests/issues/967/events
|
https://github.com/psf/requests/pull/967
| 8,731,896 |
MDExOlB1bGxSZXF1ZXN0MzE0MjgxNQ==
| 967 |
Sign requests even if they have no body data.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/470362?v=4",
"events_url": "https://api.github.com/users/matthewlmcclure/events{/privacy}",
"followers_url": "https://api.github.com/users/matthewlmcclure/followers",
"following_url": "https://api.github.com/users/matthewlmcclure/following{/other_user}",
"gists_url": "https://api.github.com/users/matthewlmcclure/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/matthewlmcclure",
"id": 470362,
"login": "matthewlmcclure",
"node_id": "MDQ6VXNlcjQ3MDM2Mg==",
"organizations_url": "https://api.github.com/users/matthewlmcclure/orgs",
"received_events_url": "https://api.github.com/users/matthewlmcclure/received_events",
"repos_url": "https://api.github.com/users/matthewlmcclure/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/matthewlmcclure/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/matthewlmcclure/subscriptions",
"type": "User",
"url": "https://api.github.com/users/matthewlmcclure",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2012-11-27T18:35:03Z
|
2021-09-08T17:06:04Z
|
2012-11-27T18:43:57Z
|
CONTRIBUTOR
|
resolved
|
Addresses #966.
|
{
"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/967/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/967/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/967.diff",
"html_url": "https://github.com/psf/requests/pull/967",
"merged_at": "2012-11-27T18:43:57Z",
"patch_url": "https://github.com/psf/requests/pull/967.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/967"
}
| true |
[
"@idan?\n",
"Merging. We can revert if needed.\n",
"Thanks @kennethreitz.\n"
] |
https://api.github.com/repos/psf/requests/issues/966
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/966/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/966/comments
|
https://api.github.com/repos/psf/requests/issues/966/events
|
https://github.com/psf/requests/issues/966
| 8,731,753 |
MDU6SXNzdWU4NzMxNzUz
| 966 |
Sign requests with empty body data
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/470362?v=4",
"events_url": "https://api.github.com/users/matthewlmcclure/events{/privacy}",
"followers_url": "https://api.github.com/users/matthewlmcclure/followers",
"following_url": "https://api.github.com/users/matthewlmcclure/following{/other_user}",
"gists_url": "https://api.github.com/users/matthewlmcclure/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/matthewlmcclure",
"id": 470362,
"login": "matthewlmcclure",
"node_id": "MDQ6VXNlcjQ3MDM2Mg==",
"organizations_url": "https://api.github.com/users/matthewlmcclure/orgs",
"received_events_url": "https://api.github.com/users/matthewlmcclure/received_events",
"repos_url": "https://api.github.com/users/matthewlmcclure/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/matthewlmcclure/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/matthewlmcclure/subscriptions",
"type": "User",
"url": "https://api.github.com/users/matthewlmcclure",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-11-27T18:30:41Z
|
2021-09-09T05:30:42Z
|
2012-12-03T10:25:03Z
|
CONTRIBUTOR
|
resolved
|
The current implementation of `requests.auth.OAuth1.__call__` doesn't sign requests if there is no body data.
> ```
> ...
> elif r.data:
> # The data we passed was either definitely not urlencoded
> # (because extract_params returned nothing) or doesn't have a
> # content header that assures us that it is. Assume then that the
> # data shouldn't be part of the signature.
> r.url, r.headers, _ = self.client.sign(unicode(r.full_url),
> unicode(r.method),
> None,
> r.headers)
> else:
> _oauth_signed = False
> ...
> ```
The [Twitter documentation](https://dev.twitter.com/docs/auth/implementing-sign-twitter) indicates that their server expects a body-less POST request with an Authorization header to get a request token.
> ```
> POST /oauth/request_token HTTP/1.1
> User-Agent: themattharris' HTTP Client
> Host: api.twitter.com
> Accept: */*
> Authorization:
> OAuth oauth_callback="http%3A%2F%2Flocalhost%2Fsign-in-with-twitter%2F",
> oauth_consumer_key="cChZNFj6T5R0TigYB9yd1w",
> oauth_nonce="ea9ec8429b68d6b77cd5600adbbb0456",
> oauth_signature="F1Li3tvehgcraF8DMJ7OyxO4w9Y%3D",
> oauth_signature_method="HMAC-SHA1",
> oauth_timestamp="1318467427",
> oauth_version="1.0"
> ```
So when I try to use Requests to get a request token from Twitter's API, it fails because requests doesn't sign the request.
```
(develop) [email protected]:~/Downloads/src/requests
$ python ~/Downloads/oauth_request.py
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): api.twitter.com
DEBUG:requests.packages.urllib3.connectionpool:"POST /oauth/request_token HTTP/1.1" 401 62
{'Accept': '*/*',
'Accept-Encoding': 'gzip, deflate, compress',
'Content-Length': '0',
'User-Agent': 'python-requests/0.14.2 CPython/2.7.3 Darwin/11.4.2'}
401
```
Here's the source code of the test:
```
import logging
from pprint import pprint
import urllib
import requests
from requests.auth import OAuth1
logging.basicConfig(level='DEBUG')
client_key = u'SsGHcZLVD0hBxOBSBj4AA'
client_secret = u'...'
queryoauth = OAuth1(client_key, client_secret)
r = requests.post(
'https://api.twitter.com/oauth/request_token',
auth=OAuth1(client_key, client_secret, callback_uri=u'http://127.0.0.1:62231/'))
pprint(r.request.headers)
pprint(r.status_code)
```
If I change:
> ```
> elif r.data:
> ```
to:
> ```
> else:
> ```
it works for my simple test case:
```
(develop) [email protected]:~/Downloads/src/requests
$ git checkout sign-without-body
Switched to branch 'sign-without-body'
(sign-without-body) [email protected]:~/Downloads/src/requests
$ python ~/Downloads/oauth_request.py
DEBUG:oauthlib.oauth1.rfc5849:Collected params: [(u'oauth_nonce', u'177959798967978713371354040025'), (u'oauth_timestamp', u'1354040025'), (u'oauth_consumer_key', u'SsGHcZLVD0hBxOBSBj4AA'), (u'oauth_signature_method', u'HMAC-SHA1'), (u'oauth_version', u'1.0'), (u'oauth_callback', u'http://127.0.0.1:62231/')]
DEBUG:oauthlib.oauth1.rfc5849:Normalized params: oauth_callback=http%3A%2F%2F127.0.0.1%3A62231%2F&oauth_consumer_key=SsGHcZLVD0hBxOBSBj4AA&oauth_nonce=177959798967978713371354040025&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1354040025&oauth_version=1.0
DEBUG:oauthlib.oauth1.rfc5849:Normalized URI: https://api.twitter.com/oauth/request_token
DEBUG:oauthlib.oauth1.rfc5849:Base signing string: POST&https%3A%2F%2Fapi.twitter.com%2Foauth%2Frequest_token&oauth_callback%3Dhttp%253A%252F%252F127.0.0.1%253A62231%252F%26oauth_consumer_key%3DSsGHcZLVD0hBxOBSBj4AA%26oauth_nonce%3D177959798967978713371354040025%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1354040025%26oauth_version%3D1.0
DEBUG:oauthlib.oauth1.rfc5849:Signature: 64/bL32kyqvfe0LyI3bPUt04sk8=
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): api.twitter.com
DEBUG:requests.packages.urllib3.connectionpool:"POST /oauth/request_token HTTP/1.1" 200 151
{'Accept': '*/*',
'Accept-Encoding': 'gzip, deflate, compress',
'Authorization': 'OAuth oauth_nonce="177959798967978713371354040025", oauth_timestamp="1354040025", oauth_version="1.0", oauth_signature_method="HMAC-SHA1", oauth_consumer_key="SsGHcZLVD0hBxOBSBj4AA", oauth_callback="http%3A%2F%2F127.0.0.1%3A62231%2F", oauth_signature="64%2FbL32kyqvfe0LyI3bPUt04sk8%3D"',
'Content-Length': '0',
'User-Agent': 'python-requests/0.14.2 CPython/2.7.3 Darwin/11.4.2'}
200
```
Is that a reasonable change to make in Requests?
If not, why doesn't the implementation sign requests with empty bodies? And how should a caller make a request for a Twitter request token?
|
{
"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/966/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/966/timeline
| null |
completed
| null | null | false |
[
"Yup, this is just a bug. My bad.\n",
"Resolved by #967.\n"
] |
https://api.github.com/repos/psf/requests/issues/965
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/965/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/965/comments
|
https://api.github.com/repos/psf/requests/issues/965/events
|
https://github.com/psf/requests/pull/965
| 8,731,684 |
MDExOlB1bGxSZXF1ZXN0MzE0MjcyMg==
| 965 |
Pass hooks to redirected 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"
}
|
[] |
closed
| true | null |
[] | null | 5 |
2012-11-27T18:28:08Z
|
2021-09-08T17:06:04Z
|
2012-11-27T18:30:12Z
|
MEMBER
|
resolved
|
Basically what it says on the tin.
Discovered while providing a solution to #627.
|
{
"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/965/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/965/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/965.diff",
"html_url": "https://github.com/psf/requests/pull/965",
"merged_at": "2012-11-27T18:30:12Z",
"patch_url": "https://github.com/psf/requests/pull/965.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/965"
}
| true |
[
"Hmm, in the future i think these will be persisted in the session.\n",
"Agreed, it would be a better model.\n",
"They still needed to be passed though, unless I'm missing something.\n",
"In the refactor, the sessions will ideally be accessible to all the requests.\n",
"Was this removed with (or before) Requests 1.1? My hook is not getting called when following redirects. I made essentially the same change as in the commit. However, this resulted in the hook getting called twice for the final 200 response. I am preparing a pull request for Requests 1.1, that does not double-call the hook.\n"
] |
https://api.github.com/repos/psf/requests/issues/964
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/964/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/964/comments
|
https://api.github.com/repos/psf/requests/issues/964/events
|
https://github.com/psf/requests/issues/964
| 8,712,000 |
MDU6SXNzdWU4NzEyMDAw
| 964 |
Divisive language in license documentation
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/441188?v=4",
"events_url": "https://api.github.com/users/romlok/events{/privacy}",
"followers_url": "https://api.github.com/users/romlok/followers",
"following_url": "https://api.github.com/users/romlok/following{/other_user}",
"gists_url": "https://api.github.com/users/romlok/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/romlok",
"id": 441188,
"login": "romlok",
"node_id": "MDQ6VXNlcjQ0MTE4OA==",
"organizations_url": "https://api.github.com/users/romlok/orgs",
"received_events_url": "https://api.github.com/users/romlok/received_events",
"repos_url": "https://api.github.com/users/romlok/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/romlok/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/romlok/subscriptions",
"type": "User",
"url": "https://api.github.com/users/romlok",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 8 |
2012-11-27T09:32:04Z
|
2021-09-09T05:30:45Z
|
2012-11-27T09:49:10Z
|
NONE
|
resolved
|
I do not feel that the documentation for a Python library is the place to make political statements (in this case permissive vs copyleft). Such language serves only to aggravate those with differing viewpoints, and leave a lesser impression on those who are just weary of it all! :)
I would suggest removing the section entirely, and just beginning the "Requests License" section with the "Requests is released under the terms of the ISC license:" line.
|
{
"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/964/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/964/timeline
| null |
completed
| null | null | false |
[
"You raise an interesting philosophical point: isn't the choice of a license _itself_ a political statement? Surely anyone who is opposed to permissive licenses (or, to be more generous, would prefer copyleft ones) would be equally irked by the simple presence of the ISC license?\n\nThe previous comment is mostly tongue-in-cheek. =) The maintainer of a Python library (or indeed anyone on the internet) has the freedom to make whatever political points they choose in the manner of their choosing. Additionally, the statement being referred to is not in the main section of the documentation, so only those who actively seek out information about the license will read it (trust me, those people are the minority).\n\nRequests is an opinionated library. To see this, you only have to scroll through the (many) closed feature requests which end with Kenneth saying \"No, that's not how Requests does it\". It seems reasonable that this opinionated nature carry over to its documentation.\n\nThankyou for your suggestion, though! If you have any further queries or suggestions, please don't hesitate to raise them. =)\n",
"It's in the [introduction of the user guide](http://docs.python-requests.org/en/latest/user/intro/) (the very first page!); that's hardly obscure, or limited to license junkies... :P\n\nMy issue is not with the choice of license, or with people having opinions (what a hypocrite I would be!), but with the pontificating tone of the section in question. I, and many other people, do not appreciate others trying to force their opinions on me, even if the opinions expressed are agreeable.\n\nThat notwithstanding, the statement regarding commercial GPL use is misleading, at best. Mainly down to the use of the word \"product\", rather than \"software\" (eg. plenty of closed-hardware \"products\" include GPL'd code).\n\nQuite frankly, I can see no reason to bring up the GPL at all in this section, if it's not actually being used..?\n",
"Good point about its location. Clearly I'm so familiar with the documentation I just assume everyone does what I do and skip straight to Quickstart.\n\nRegarding the tone, I think we have a legitimate difference of opinion here. My reading of that section is that the tone isn't pontifical but informative. It does not say \"Do not use the GPL\", it says \"Don't use the GPL _without thinking_\", which is very different.\n\nThat said, I'm happy for @kennethreitz to weigh in here if he feels differently.\n",
"Difference of opinion? On MY Internet? :)\n\n> [The GPL] should most certainly not be your go-to license for your next open source project.\n\n...is what I mean by pontificating.\n\nPersonally, I don't think the choice of license needs explanatory documentation. Those who care about licensing issues will understand (or vehemently disagree! ;) ), and those who don't care... don't care!\nIf included, however, I would suggest something more simple, eg:\n\n> Requests is distributed under the terms of the ISC license, so that both proprietary and open-source projects can use it freely:\n> [text of ISC license]\n",
"@Lukasa that's exactly the intention: :cocktail: \n",
"Well, let's see if I can make everyone happy. I'll submit a PR this evening with revised wording that keeps the original intent clear.\n",
"As someone who consistently licensed projects under the GPL and continues to work on GPL'd projects when I first looked at requests and flask and saw the anti-GPL ideologies I was turned off to the point of deciding to use urllib/2 for a while there. I was on vacation a few months later with a terrible internet connection and started reading more into the various licenses and their uses. Clearly I'm not turned off anymore by the anti-GPL language since I recommend and use requests profusely besides trying to help make it better. I do however realize that there are times when the usefulness of a module or library or project in general outweigh my typical copyleft leaning. As such, github3.py is 3-clause BSD licensed and is used by at least one company that I know of and by a second that I'm not 100% sure about. If it had been GPL'd would they have used it? I'm not entirely certain that's a question that can be answered, but I do think it would have been less likely that they would use it.\n\nI started a new project that I have stalled that is GPL'd but it isn't meant as a library but rather a commandline utility. I'm sure Kenneth and Armin would be disappointed in that (not they care what I do) but I didn't see the need to use a more permissive license at all.\n\nIn short: purpose and intended audience should play a role in your license decision, but read and educate yourself about your choices. \n",
"Everything has a time and place. \n"
] |
https://api.github.com/repos/psf/requests/issues/963
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/963/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/963/comments
|
https://api.github.com/repos/psf/requests/issues/963/events
|
https://github.com/psf/requests/issues/963
| 8,704,461 |
MDU6SXNzdWU4NzA0NDYx
| 963 |
More complete OAuth tutorial documentation
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/470362?v=4",
"events_url": "https://api.github.com/users/matthewlmcclure/events{/privacy}",
"followers_url": "https://api.github.com/users/matthewlmcclure/followers",
"following_url": "https://api.github.com/users/matthewlmcclure/following{/other_user}",
"gists_url": "https://api.github.com/users/matthewlmcclure/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/matthewlmcclure",
"id": 470362,
"login": "matthewlmcclure",
"node_id": "MDQ6VXNlcjQ3MDM2Mg==",
"organizations_url": "https://api.github.com/users/matthewlmcclure/orgs",
"received_events_url": "https://api.github.com/users/matthewlmcclure/received_events",
"repos_url": "https://api.github.com/users/matthewlmcclure/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/matthewlmcclure/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/matthewlmcclure/subscriptions",
"type": "User",
"url": "https://api.github.com/users/matthewlmcclure",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 7 |
2012-11-27T03:05:08Z
|
2021-09-09T05:30:00Z
|
2012-12-27T12:57:22Z
|
CONTRIBUTOR
|
resolved
|
The documentation at http://requests.readthedocs.org/en/latest/user/quickstart/#oauth-authentication explains how to use:
1. client_key
2. client_secret
3. resource_owner_key
4. resource_owner_secret
But it omits the steps to get a resource_owner_key and resource_owner_secret.
It would be nice to have a self-contained start-to-finish tutorial to make an OAuth 1.0 (RFC 5849) authorized resource request to, say, Twitter's API, and maybe one other using OAuth 2.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"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/963/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/963/timeline
| null |
completed
| null | null | false |
[
"Agreed.\n\nHowever, we're taking steps towards pulling the OAuth code out of Requests itself and into the new Requests org (see #938). This will involve removing the OAuth stuff from the main Requests documentation and adding it to [requests/requests-oauthlib](https://github.com/requests/requests-oauthlib). Can I ask you to raise the 'start-to-finish' tutorial idea as an issue on that repository?\n\nThanks for the idea, it's a good one!\n",
"@Lukasa for the time being I thinik it's fine to add it to the Requests documentation since that's where everyone will be looking for the time being.\n\n@matthewlmcclure it won't hurt to submit a PR. On the other hand, afaik, oauthlib doesn't have OAuth2 completely finished. Their API might be finished but having information in the tutorial about that may be misleading for the moment. As for a start-to-finish tutorial using the Twitter API as an example, perhaps we could get Twython's permission to excerpt/adapt some of their code for the example?\n",
"Once we move it out, I still want the documentation to exist in Request's docs. It'll be official, just outside of core.\n\nA bit of a refactor of the documentation is on order. I've been thinking about this lately. We'll need an 'Authentication' guide, with sections for every type of authentication.\n",
"I'm working through the process of getting it to work myself, and I left some useful notes on getting it to work in #966.\n",
"The documentation for OAuth is now quite broken. I'm unsure how to actually get it working again :-(\n",
"@r1chardj0n3s it'll be updated shortly. The new library that provides the OAuth class is `requests-oauthlib`\n",
"Thanks!\n"
] |
https://api.github.com/repos/psf/requests/issues/962
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/962/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/962/comments
|
https://api.github.com/repos/psf/requests/issues/962/events
|
https://github.com/psf/requests/pull/962
| 8,688,137 |
MDExOlB1bGxSZXF1ZXN0MzEyNTk3Nw==
| 962 |
Add a bit more to the developer's documentation
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 5 |
2012-11-26T18:30:24Z
|
2021-09-08T17:06:03Z
|
2012-11-26T20:26:39Z
|
CONTRIBUTOR
|
resolved
|
I'm not sure what else could be added to satisfy #601. If this is sufficient,
I suggest closing that.
Also, this is just a docs change, if Travis fails (since it seems backed up
and I don't have the time to make sure this passes) it isn't my fault. ;)
|
{
"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/962/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/962/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/962.diff",
"html_url": "https://github.com/psf/requests/pull/962",
"merged_at": "2012-11-26T20:26:39Z",
"patch_url": "https://github.com/psf/requests/pull/962.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/962"
}
| true |
[
"@kennethreitz, before you merge this, can we get a consensus on whether we officially support 3.1 and 3.3? If we do, it might be worth getting TravisCI to test on them so we don't regress.\n",
"I'm fairly confident that @travisci never added python 3.3 support although I haven't received any answer either way. My reasoning for claiming the supported versions were up to and including 3.3 was [setup.py](https://github.com/kennethreitz/requests/blob/develop/setup.py#L67). If that is wrong, I don't want to be right ;)\n",
"Mm, I know that Kenneth wants to support 3.3, with 3.2 and 3.1 being bonuses, but if we're going to claim we support something we should make sure not to regress on it. =) Otherwise, we shouldn't claim we support it so that people don't get mad when it breaks.\n",
"@Lukasa I should have added that I'm +10 on waiting for @kennethreitz to weigh in. ;)\n",
"Perfect :)\n\n---\n\nWe'll drop 3.1 support when Travis drops support for it, which is soon.\n"
] |
https://api.github.com/repos/psf/requests/issues/961
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/961/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/961/comments
|
https://api.github.com/repos/psf/requests/issues/961/events
|
https://github.com/psf/requests/issues/961
| 8,656,608 |
MDU6SXNzdWU4NjU2NjA4
| 961 |
TooManyRedirects getting page with 200 status code
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1195074?v=4",
"events_url": "https://api.github.com/users/inactivist/events{/privacy}",
"followers_url": "https://api.github.com/users/inactivist/followers",
"following_url": "https://api.github.com/users/inactivist/following{/other_user}",
"gists_url": "https://api.github.com/users/inactivist/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/inactivist",
"id": 1195074,
"login": "inactivist",
"node_id": "MDQ6VXNlcjExOTUwNzQ=",
"organizations_url": "https://api.github.com/users/inactivist/orgs",
"received_events_url": "https://api.github.com/users/inactivist/received_events",
"repos_url": "https://api.github.com/users/inactivist/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/inactivist/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/inactivist/subscriptions",
"type": "User",
"url": "https://api.github.com/users/inactivist",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 11 |
2012-11-25T21:28:33Z
|
2021-09-09T05:30:47Z
|
2012-11-25T22:21:54Z
|
NONE
|
resolved
|
I'm not sure why but requests raises `TooManyRedirects` on a `.get()` of a page that has a 200 status response.
URL:
http://shorouknews.com/news/view.aspx?cdate=25112012&id=04c4889a-893c-49a2-8fea-5e2acb25dfc3
``` python
import requests
url = "http://shorouknews.com/news/view.aspx?cdate=25112012&id=04c4889a-893c-49a2-8fea-5e2acb25dfc3"
r = requests.get(url)
print r.url
print r.headers
```
Output:
```
Traceback (most recent call last):
File "/home/inactivist/src/python/requests-redirects-test.py", line 4, in <module>
r = requests.get(url)
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 65, in get
return request('get', url, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/safe_mode.py", line 39, in wrapped
return function(method, url, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 51, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 241, in request
r.send(prefetch=prefetch)
File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 648, in send
self._build_response(r)
File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 241, in _build_response
raise TooManyRedirects()
TooManyRedirects
```
Let's see what lynx tells us about the page:
```
$ lynx -dump -head "http://shorouknews.com/news/view.aspx?cdate=25112012&id=04c4889a-893c-49a2-8fea-5e2acb25dfc3"
HTTP/1.1 200 OK
Server: cloudflare-nginx
Date: Sun, 25 Nov 2012 21:15:02 GMT
Content-Type: text/html; charset=utf-8
Connection: close
Cache-Control: private
Vary: Accept-Encoding
Set-Cookie: ASP.NET_SessionId=w3vuvi5lwsip2luzqxzoc31t; path=/; HttpOnly
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Set-Cookie: __cfduid=dc85a7b4e254397782142f2d681d5ca071353878100; expires=Mon, 2
3-Dec-2019 23:50:00 GMT; path=/; domain=.shorouknews.com
```
## Version Info
Requests 0.14.2, installed via `pip install requests`
Python 2.7.1
Ubuntu 11.04 32 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/961/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/961/timeline
| null |
completed
| null | null | false |
[
"Bizarrely, I can't repro this. Using OS X, but otherwise the exact same setup. @sigmavirus, can you repro this?\n",
"Using lynx you don't send the same request - `User-Agent` is different for example. Set `allow_redirect=False` and see the first response you get using Requests.\n",
"I'm not on Ubuntu but I have access to a few I can test on but they're not 11.04 they're 10.04 which are kept very much up-to-date. I'll also test on my slackware machines. \n",
"I literally just remembered that I have an Ubuntu box in my house. On 12.04, Python 2.7.3, I _can_ repro this. So definitely a real bug.\n",
"So, preliminary investigation reveals that on OS X I am not redirected when I access that URL. On Ubuntu, I get a redirect to `/mobile/news/view.aspx?cdate=25112012&id=04c4889a-893c-49a2-8fea-5e2acb25dfc3` (for those not following, that's a redirect to the mobile version of that page). Then, every subsequent access redirects me to the same page.\n\nThe only difference between the two requests as far as I can see is the User Agent header. On Linux: `python-requests/0.14.2 CPython/2.7.3 Linux/3.2.0-32-generic`. On OS X: `python-requests/0.14.2 CPython/2.7.2 Darwin/12.2.0`.\n\nMy guess is that the website is at fault here, and is using the user-agent to redirect to the mobile version of a page based on having Linux in it (assuming that it's Android). That doesn't explain why it then enters a redirect loop, but clearly it does.\n",
"I get a redirect for:\n\n> requests.get(url, allow_redirects=False, headers={'User-Agent': 'gene'})\n\nbut not for:\n\n> requests.get(url, allow_redirects=False, headers={'User-Agent': 'gen'})\n\nJust an odd website. Redirects to mobile site, then keeps on redirecting to the same url.\n",
"Yeah, that's correct. Requests isn't misbehaving here, the site is.\n\nTo fix it, change your user agent to whatever you want, e.g.:\n\n``` python\nimport requests\n\nr = requests.get('http://shorouknews.com/news/view.aspx?cdate=25112012&id=04c4889a-893c-49a2-8fea-5e2acb25dfc3', headers={'User-Agent': 'python-requests/0.14.2 CPython/2.7.2'})\n```\n",
"Closed as \"not a bug\".\n",
"@Lukasa : I'm not surprised the web site is misbehaving (I should have probed more thoroughly) -- thanks for the mitigation tip.\n",
"@inactivist: No worries, it's not always easy to probe. Besides, your bug report was awesome: thorough and contained tons of information. Thanks!\n",
"@Lukasa: Thanks for the positive feedback. I aims to please!\n\nI'm definitely a requests newbie, but so far I love it. And I have to say, the response here (on a Sunday, no less!) was freaking awesome. Thanks, @all!\n"
] |
https://api.github.com/repos/psf/requests/issues/960
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/960/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/960/comments
|
https://api.github.com/repos/psf/requests/issues/960/events
|
https://github.com/psf/requests/issues/960
| 8,655,765 |
MDU6SXNzdWU4NjU1NzY1
| 960 |
New project requests-hooks?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/92239?v=4",
"events_url": "https://api.github.com/users/piotr-dobrogost/events{/privacy}",
"followers_url": "https://api.github.com/users/piotr-dobrogost/followers",
"following_url": "https://api.github.com/users/piotr-dobrogost/following{/other_user}",
"gists_url": "https://api.github.com/users/piotr-dobrogost/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/piotr-dobrogost",
"id": 92239,
"login": "piotr-dobrogost",
"node_id": "MDQ6VXNlcjkyMjM5",
"organizations_url": "https://api.github.com/users/piotr-dobrogost/orgs",
"received_events_url": "https://api.github.com/users/piotr-dobrogost/received_events",
"repos_url": "https://api.github.com/users/piotr-dobrogost/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/piotr-dobrogost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/piotr-dobrogost/subscriptions",
"type": "User",
"url": "https://api.github.com/users/piotr-dobrogost",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 8 |
2012-11-25T20:41:08Z
|
2021-09-09T05:30:09Z
|
2012-12-17T13:48:37Z
|
NONE
|
resolved
|
@kennethreitz
How about creating new project requests-hooks with various hooks for requests? I could maintain it if you want.
|
{
"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/960/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/960/timeline
| null |
completed
| null | null | false |
[
"I'm +1 many times over. ;)\n",
"You are +1 for me being a maintainer or for a new project? I'm joking :)\n",
"Do we have some examples of stuff that could go there?\n",
"Sure, timing a request! :) More seriously a hook which would implement various retry strategies would be very good way to show power of hooks. I think we could find a couple more ideas in all those closed issues but I don't remember any right now.\n",
"Cool. I didn't have a good mental picture of what would go there, but now that I do, I'm +1 on this too.\n",
"@piotr-dobrogost both ;)\n\nAlso, if a separate repository is not acceptable to @kennethreitz, my next choice would be to add a sort of \"Recipes\" section to the docs which could include hook recipes.\n",
"And I just realized that with hooks, I could add a hook to my session object in github3.py to process the args and if `files` is not specified, use `json.dumps` on data. ... Now to ponder on whether that magic is a good idea or not... \n",
"I'll have to think about this :)\n"
] |
https://api.github.com/repos/psf/requests/issues/959
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/959/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/959/comments
|
https://api.github.com/repos/psf/requests/issues/959/events
|
https://github.com/psf/requests/issues/959
| 8,655,101 |
MDU6SXNzdWU4NjU1MTAx
| 959 |
__version__ should be set to `dev` unless tagged
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/92239?v=4",
"events_url": "https://api.github.com/users/piotr-dobrogost/events{/privacy}",
"followers_url": "https://api.github.com/users/piotr-dobrogost/followers",
"following_url": "https://api.github.com/users/piotr-dobrogost/following{/other_user}",
"gists_url": "https://api.github.com/users/piotr-dobrogost/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/piotr-dobrogost",
"id": 92239,
"login": "piotr-dobrogost",
"node_id": "MDQ6VXNlcjkyMjM5",
"organizations_url": "https://api.github.com/users/piotr-dobrogost/orgs",
"received_events_url": "https://api.github.com/users/piotr-dobrogost/received_events",
"repos_url": "https://api.github.com/users/piotr-dobrogost/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/piotr-dobrogost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/piotr-dobrogost/subscriptions",
"type": "User",
"url": "https://api.github.com/users/piotr-dobrogost",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 7 |
2012-11-25T20:01:41Z
|
2021-09-09T05:30:46Z
|
2012-11-26T01:01:59Z
|
NONE
|
resolved
|
Currently after `pip install git+git://github.com/kennethreitz/requests`, `pip freeze` shows `requests==<THE_NEWEST_RELEASED_VERSION>` which is misleading as this is true only until the first commit after release :) For this reason I think `__version__` should be `dev` in all untagged changesets. This is what urllib3 does for example. Or even better yet version could be `<THE_NEWEST_RELEASED_VERSION>.post1` or `<THE_NEXT_PLANNED_VERSION>.dev1` or similar.
|
{
"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/959/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/959/timeline
| null |
completed
| null | null | false |
[
"For my personal projects I usually use `next-planned-release-number.b` for beta. This way I can push a beta version to PyPI for people to test and make it obvious that it is not guaranteed to be stable.\n",
"I disagree — Python Packaging doesn't support these types of versions officially, and it causes additional maintenance.\n",
"@kennethreitz [PEP386](http://www.python.org/dev/peps/pep-0386/) actually allows for the syntax I suggested. See this [section](http://www.python.org/dev/peps/pep-0386/#the-new-versioning-algorithm) in specific.\n",
"Interesting. I'm still not going to maintain that though :)\n",
"Ok.\n",
"> Python Packaging doesn't support these types of versions officially\n\nTrue, `dev` is not supported. The other two were slightly off too - I corrected them.\n\n> and it causes additional maintenance.\n\nYou mean one additional commit after tagging marking version as development one? I wonder if this could be automated using git hook attached to tagging operation?\n",
"No thank you.\n"
] |
https://api.github.com/repos/psf/requests/issues/958
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/958/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/958/comments
|
https://api.github.com/repos/psf/requests/issues/958/events
|
https://github.com/psf/requests/pull/958
| 8,652,018 |
MDExOlB1bGxSZXF1ZXN0MzExNDk5OA==
| 958 |
Add parameter to iter_content to disable content decoding
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/589034?v=4",
"events_url": "https://api.github.com/users/domoritz/events{/privacy}",
"followers_url": "https://api.github.com/users/domoritz/followers",
"following_url": "https://api.github.com/users/domoritz/following{/other_user}",
"gists_url": "https://api.github.com/users/domoritz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/domoritz",
"id": 589034,
"login": "domoritz",
"node_id": "MDQ6VXNlcjU4OTAzNA==",
"organizations_url": "https://api.github.com/users/domoritz/orgs",
"received_events_url": "https://api.github.com/users/domoritz/received_events",
"repos_url": "https://api.github.com/users/domoritz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/domoritz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/domoritz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/domoritz",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 5 |
2012-11-25T16:21:34Z
|
2021-09-08T17:06:02Z
|
2012-11-25T19:20:29Z
|
NONE
|
resolved
|
I wanted to use requests to transfer a file chunk by chunk. However, before I transferred the body, I copied a header from the original response to the new response. Since request decodes gzip and deflate, the header was wrong and my content couldn't be interpreted by the browser.
This patch adds an option to `iter_content.` to disable decoding of gzip or deflate content.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/589034?v=4",
"events_url": "https://api.github.com/users/domoritz/events{/privacy}",
"followers_url": "https://api.github.com/users/domoritz/followers",
"following_url": "https://api.github.com/users/domoritz/following{/other_user}",
"gists_url": "https://api.github.com/users/domoritz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/domoritz",
"id": 589034,
"login": "domoritz",
"node_id": "MDQ6VXNlcjU4OTAzNA==",
"organizations_url": "https://api.github.com/users/domoritz/orgs",
"received_events_url": "https://api.github.com/users/domoritz/received_events",
"repos_url": "https://api.github.com/users/domoritz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/domoritz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/domoritz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/domoritz",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/958/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/958/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/958.diff",
"html_url": "https://github.com/psf/requests/pull/958",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/958.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/958"
}
| true |
[
"`iter_content()` is supposed to always decode thus adding parameter changing this is not the right thing to do and I guess it won't be accepted. I thing there was some discussion about adding similar method for raw data but the idea was rejected. You could find this discussion in closed issues and voice your concern there. Isn't `raw` what you need?\n",
"Okay, thanks for the input. I have a solution for myself but thought that other people might be interested in this as well. I'll close the issue then.\n",
"What's your solution?\n",
"1st: Copy the code from `iter_content` but without the call that deflates or unzips.\n2nd (hack): Set the `content-encoding` to `\"\"` before calling `iter_content`.\n",
"Interesting. See #844 for a related issue (related to byte encodings of Unicode codepoints, rather than gzip).\n"
] |
https://api.github.com/repos/psf/requests/issues/957
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/957/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/957/comments
|
https://api.github.com/repos/psf/requests/issues/957/events
|
https://github.com/psf/requests/pull/957
| 8,640,436 |
MDExOlB1bGxSZXF1ZXN0MzExMzY3NA==
| 957 |
Attach Content-Length to everything.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 9 |
2012-11-25T02:49:27Z
|
2021-09-08T17:06:02Z
|
2012-11-25T03:54:29Z
|
CONTRIBUTOR
|
resolved
|
Closes #223
Sorry this took so long.
|
{
"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/957/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/957/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/957.diff",
"html_url": "https://github.com/psf/requests/pull/957",
"merged_at": "2012-11-25T03:54:29Z",
"patch_url": "https://github.com/psf/requests/pull/957.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/957"
}
| true |
[
"Merging as soon as the build passes :)\n",
"TypeError: object of type 'file' has no len()\n",
"Yeah, didn't expect there to be a failed test. Just ran them and this should pass. Sorry about that.\n",
"No worries! \n",
"Bah, too exhausted to deal with this tonight, I'll need think about a better way to handle python 2 and 3 tomorrow. And I need to reinstall python 3 on my machine so I don't have to rely on Travis \n",
":cake:\n",
":beers: \n",
"@sigmavirus24 Re: handle Python 2 and 3, I'd like to suggest [Pythonbrew](https://github.com/utahta/pythonbrew).\n",
"@Lukasa very interesting. Thanks! I'll look more closely at it later tonight or tomorrow. \n"
] |
https://api.github.com/repos/psf/requests/issues/956
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/956/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/956/comments
|
https://api.github.com/repos/psf/requests/issues/956/events
|
https://github.com/psf/requests/pull/956
| 8,636,863 |
MDExOlB1bGxSZXF1ZXN0MzExMzAzOA==
| 956 |
Try to resolve OAuth+JSON problems.
|
{
"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 | 8 |
2012-11-24T21:44:17Z
|
2021-09-08T17:06:01Z
|
2012-11-26T08:40:27Z
|
MEMBER
|
resolved
|
This is an attempt to solve issue #910 (and hopefully #896 by association).
This solution is unlikely to cause a regression except in one specific case, where the form data _is_ urlencoded but doesn't have the correct Content-Type header set. If we think that's a likely scenario, I can go back and make the test for that case less restrictive. The flip side is that we will not mistakenly include data we shouldn't.
There aren't any tests for OAuth functionality in Requests, so I have no idea if this makes things worse or better. My local tests seem to suggest that everything is ok though, so let's assume it's all awesome. =D
NB: I'm aware that we've moved the OAuth stuff to requests/requests-oauth. I'll raise an equivalent PR over there if we decide to use this one, but there are a few open issues here that make raising this PR here useful as well.
@idan: Does this look right to you?
@michaelhelmick: Does my branch resolve your issues?
|
{
"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/956/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/956/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/956.diff",
"html_url": "https://github.com/psf/requests/pull/956",
"merged_at": "2012-11-26T08:40:27Z",
"patch_url": "https://github.com/psf/requests/pull/956.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/956"
}
| true |
[
"I'll merge once @idan approves :)\n",
"Looks good to me!\n",
":cake:\n",
"Hate to break it to ya, but this `0.14.2 dev` actually broke the first of my tests, just basic authenticating.\n\nThe app key and secret are part of a testing app, so feel free to use it, and you can change the callback to whatever.\n\n``` python\napp_key = 'RpN99dBp7nlTdVYotBDkag'\napp_secret = 'qZzIwlI7qCU2MQyL8oYzZDdI976seimyskoxTFx0'\n\n# Code\nt = Twython(app_key=app_key,\n app_secret=app_secret,\n callback_url='http://michaelhelmick.com/')\n\nauth_props = t.get_authentication_tokens()\nprint auth_props['auth_url']\n```\n\nAnyways, I run that code and this stacktrace:\n\n```\nTraceback (most recent call last):\n File \"twython.py\", line 585, in <module>\n auth_props = t.get_authentication_tokens()\n File \"twython.py\", line 274, in get_authentication_tokens\n raise TwythonAuthError(\"Seems something couldn't be verified with your OAuth junk. Error: %s, Message: %s\" % (response.status_code, response.content))\n__main__.TwythonAuthError: \"Seems something couldn't be verified with your OAuth junk. Error: 401, Message: Failed to validate oauth signature and token\"\n```\n\nIf I run this code with `0.14.2 stable` everything works out fine and dandy. :sunflower: \n",
"Blergh, my fail. Need to look at it when I get back to desk, may have run\ntests with wrong branch\n\nOn Nov 26, 2012, at 19:13, Mike Helmick [email protected] wrote:\n\nHate to break it to ya, but this 0.14.2 dev actually broke the first of my\ntests, just basic authenticating.\n\nThe app key and secret are part of a testing app, so feel free to use it,\nand you can change the callback to whatever.\n\napp_key = 'RpN99dBp7nlTdVYotBDkag'app_secret =\n'qZzIwlI7qCU2MQyL8oYzZDdI976seimyskoxTFx0'\n\n# Codet = Twython(app_key=app_key,\n\n```\n app_secret=app_secret,\n callback_url='http://michaelhelmick.com/')\n```\n\nauth_props = t.get_authentication_tokens()print auth_props['auth_url']\n\nAnyways, I run that code and this stacktrace:\n\nTraceback (most recent call last):\n File \"twython.py\", line 585, in <module>\n auth_props = t.get_authentication_tokens()\n File \"twython.py\", line 274, in get_authentication_tokens\n raise TwythonAuthError(\"Seems something couldn't be verified with\nyour OAuth junk. Error: %s, Message: %s\" % (response.status_code,\nresponse.content))\n**main**.TwythonAuthError: \"Seems something couldn't be verified with\nyour OAuth junk. Error: 401, Message: Failed to validate oauth\nsignature and token\"\n\nIf I run this code with 0.14.2 stable everything works out fine and\ndandy. [image:\n:sunflower:]\n\n—\nReply to this email directly or view it on\nGitHubhttps://github.com/kennethreitz/requests/pull/956#issuecomment-10724126.\n",
"I'm not that surprised that it broke. =(\n\nWhen @idan can work out what the break is I'll open another PR to fix the issue.\n",
"Reverted for now, will revisit when I'm not bankrupt on time.\n",
"Remind me, merge conflict.\n"
] |
https://api.github.com/repos/psf/requests/issues/955
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/955/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/955/comments
|
https://api.github.com/repos/psf/requests/issues/955/events
|
https://github.com/psf/requests/pull/955
| 8,630,040 |
MDExOlB1bGxSZXF1ZXN0MzExMTkzOA==
| 955 |
Python 3.1 compatibility.
|
{
"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 |
2012-11-24T14:26:21Z
|
2021-09-08T23:01:16Z
|
2012-11-26T08:30:49Z
|
MEMBER
|
resolved
|
Resolves Issue #882, Requests now functions with Python 3.1 (again!).
|
{
"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/955/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/955/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/955.diff",
"html_url": "https://github.com/psf/requests/pull/955",
"merged_at": "2012-11-26T08:30:49Z",
"patch_url": "https://github.com/psf/requests/pull/955.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/955"
}
| true |
[
"Had to force a re-test, Travis spuriously failed.\n",
"+1, especially since this is entirely my fault\n",
"thanks!\n"
] |
https://api.github.com/repos/psf/requests/issues/954
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/954/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/954/comments
|
https://api.github.com/repos/psf/requests/issues/954/events
|
https://github.com/psf/requests/issues/954
| 8,609,899 |
MDU6SXNzdWU4NjA5ODk5
| 954 |
Specify SSL Protocol Version
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/308101?v=4",
"events_url": "https://api.github.com/users/nolochemical/events{/privacy}",
"followers_url": "https://api.github.com/users/nolochemical/followers",
"following_url": "https://api.github.com/users/nolochemical/following{/other_user}",
"gists_url": "https://api.github.com/users/nolochemical/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nolochemical",
"id": 308101,
"login": "nolochemical",
"node_id": "MDQ6VXNlcjMwODEwMQ==",
"organizations_url": "https://api.github.com/users/nolochemical/orgs",
"received_events_url": "https://api.github.com/users/nolochemical/received_events",
"repos_url": "https://api.github.com/users/nolochemical/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nolochemical/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nolochemical/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nolochemical",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-11-23T16:12:35Z
|
2021-09-09T05:30:49Z
|
2012-11-23T17:41:48Z
|
NONE
|
resolved
|
I pretty sure this may fix some of the ssl errors regarding clients trying to connect etc.
I base this primarily on pythons ssl wrap functionality from 2.7 http://docs.python.org/2.7/library/ssl.html#ssl.wrap_socket
and openssl's CLI server test tools
openssl s_client -connect servername:443 -ssl3
openssl s_client -connect servername:443 -ssl2
...
...
Clearly this would be a reverse compat feature, but I'm hoping there are enough devs who crave the lower level ssl control of ssl.wrap_socket with this libs tidy stability.
Mmmmmm bound ssl sockets :+1: [http://docs.python.org/2.7/library/ssl.html?highlight=ssl#client-side-operation]
Thanks for reading :)
|
{
"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/954/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/954/timeline
| null |
completed
| null | null | false |
[
"Thanks for the suggestion!\n\nKenneth is working on refactoring requests to use Transport Adapters (see #895), which will allow specification of options like these. For this reason, we're not accepting any Pull Requests that add this functionality, since they'll cease to work when we make the move.\n\nAfter the change, however, one of the most highly requested features is proper handling of SSL versions, including falling back to older versions (like browsers do), so we'll likely revisit this issue again.\n"
] |
https://api.github.com/repos/psf/requests/issues/953
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/953/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/953/comments
|
https://api.github.com/repos/psf/requests/issues/953/events
|
https://github.com/psf/requests/pull/953
| 8,609,421 |
MDExOlB1bGxSZXF1ZXN0MzEwNzQ4Mg==
| 953 |
Fixes so that safe_mode works for Sessions
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/54217?v=4",
"events_url": "https://api.github.com/users/heyman/events{/privacy}",
"followers_url": "https://api.github.com/users/heyman/followers",
"following_url": "https://api.github.com/users/heyman/following{/other_user}",
"gists_url": "https://api.github.com/users/heyman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/heyman",
"id": 54217,
"login": "heyman",
"node_id": "MDQ6VXNlcjU0MjE3",
"organizations_url": "https://api.github.com/users/heyman/orgs",
"received_events_url": "https://api.github.com/users/heyman/received_events",
"repos_url": "https://api.github.com/users/heyman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/heyman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/heyman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/heyman",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 15 |
2012-11-23T15:56:20Z
|
2021-09-08T23:07:26Z
|
2012-11-26T08:31:45Z
|
CONTRIBUTOR
|
resolved
|
This fixes issue #888. That safe_mode doesn't work when doing requests from a Session instance.
Could be fixed in a number of different ways of course, and if you don't like the way I've done it here, the failing test should still be useful.
|
{
"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/953/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/953/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/953.diff",
"html_url": "https://github.com/psf/requests/pull/953",
"merged_at": "2012-11-26T08:31:45Z",
"patch_url": "https://github.com/psf/requests/pull/953.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/953"
}
| true |
[
"Are you aware of issue #639 and my pull request #671 fixing this?\n",
"Piotr, why not reopen your PR then? \n",
"Well I haven't received any response to https://github.com/kennethreitz/requests/pull/671#issuecomment-8787392 yet...\n",
"@piotr-dobrogost I saw your pull request after I had made the fix, and since it was closed I figured I could open this one. I don't really care which solution is merged as long as it solves the problem :).\n",
"I recall @kennethreitz first said he did not like the patch, then after a while he said he actually could accept it but then nothing more happened. If you compare our pull requests you notice that your change to `Session._send_request()` is not enough as this is not being called when `return_response` param is false (https://github.com/kennethreitz/requests/blob/v0.14.2/requests/sessions.py#L237) The change must be made on `Request.send()` level which always is called and that's what I did in my patch.\n",
"Thanks!\n",
"@kennethreitz \n\nI'm curious why didn't you merge my 6 months old pull request #671 which solves problem for all cases but you merged this one which does not? Thanks.\n",
"@piotr-dobrogost the new one is far simpler. The less code the better.\n",
"The new one is not correct to begin with. I guess this is more important than amount of code...\n“Everything must be made as simple as possible. **But not simpler.**” ― Albert Einstein\n\n> the new one is far simpler.\n\nI hope you don't count adding 13 lines of code to **tests** instead 51 lines of code in my pull as being simpler...\n",
"What's wrong with this one?\n",
"It does not fix the problem when `return_response` is false. I explained this in my [comment](https://github.com/kennethreitz/requests/pull/953#issuecomment-10677611) above.\n",
"I don't see how this is incompatible?\n",
"Incompatible with what? Which part of my [comment](https://github.com/kennethreitz/requests/pull/953#issuecomment-10677611) is not clear?\n",
"The problem seems to be that if you make a request where `return_response` is set to `False`, and then subsequently call its `.send()` method, that method call can still throw exceptions. I don't know why anyone would actually do that instead of delaying their function call, but I guess they might.\n",
"This is how grequests works, which is why it was added :)\n\nThis API is being reworked for the refactor, however. Let's defer to that.\n"
] |
https://api.github.com/repos/psf/requests/issues/952
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/952/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/952/comments
|
https://api.github.com/repos/psf/requests/issues/952/events
|
https://github.com/psf/requests/issues/952
| 8,601,130 |
MDU6SXNzdWU4NjAxMTMw
| 952 |
Streaming Requests
|
{
"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 |
[] |
{
"closed_at": "2013-05-29T07:59:12Z",
"closed_issues": 12,
"created_at": "2012-11-27T18:41:46Z",
"creator": {
"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"
},
"description": ":sparkles: :cake: :sparkles:",
"due_on": null,
"html_url": "https://github.com/psf/requests/milestone/18",
"id": 219754,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/18/labels",
"node_id": "MDk6TWlsZXN0b25lMjE5NzU0",
"number": 18,
"open_issues": 0,
"state": "closed",
"title": "v1.0.0",
"updated_at": "2013-05-29T07:59:12Z",
"url": "https://api.github.com/repos/psf/requests/milestones/18"
}
| 9 |
2012-11-23T10:54:15Z
|
2021-09-09T05:29:58Z
|
2013-01-10T07:23:57Z
|
CONTRIBUTOR
|
resolved
|
Currently refactoring the codebase for v1.0. Cleaning things up.
Plan:
- Replace the current `prefetch` parameter with `stream`.
- Make all uploads stream.
Is there any downside to streaming all uploads? @mitsuhiko quick opinion?
---
Related: #895
|
{
"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/952/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/952/timeline
| null |
completed
| null | null | false |
[
"If you're streaming files, I don't see a problem. If you're iterating over generators, then you don't know the content-length in advance and you either need to send the less-supported chunked encoding or ask for the length in advance.\n",
"I don't see anything objectionable about requiring a Content-Length in \nadvance.\n",
"Nah, bytestrings would simply be uploaded as they currently are.\n\nGenerators would use chunked encoding, and potentially have an option for content-length (or they could simply set the header themselves and we'd recognize that)\n",
"I meant for streaming uploads ;)\n",
"Streaming uploads will happen soon, but not for 1.0.\n",
"Open again! \n\nLet's do this.\n",
":metal:\n",
"Turns out we already support file-like objects. This is going to be super simple.\n",
"Done.\n"
] |
https://api.github.com/repos/psf/requests/issues/951
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/951/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/951/comments
|
https://api.github.com/repos/psf/requests/issues/951/events
|
https://github.com/psf/requests/issues/951
| 8,600,799 |
MDU6SXNzdWU4NjAwNzk5
| 951 |
Fork Chardet
|
{
"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 |
[] |
{
"closed_at": "2013-05-29T07:59:12Z",
"closed_issues": 12,
"created_at": "2012-11-27T18:41:46Z",
"creator": {
"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"
},
"description": ":sparkles: :cake: :sparkles:",
"due_on": null,
"html_url": "https://github.com/psf/requests/milestone/18",
"id": 219754,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/18/labels",
"node_id": "MDk6TWlsZXN0b25lMjE5NzU0",
"number": 18,
"open_issues": 0,
"state": "closed",
"title": "v1.0.0",
"updated_at": "2013-05-29T07:59:12Z",
"url": "https://api.github.com/repos/psf/requests/milestones/18"
}
| 29 |
2012-11-23T10:42:55Z
|
2021-09-09T05:30:43Z
|
2012-12-01T15:57:03Z
|
CONTRIBUTOR
|
resolved
|
Maintain a simple adaptation of chardet/chardet2 that works in codebases.
Shouldn't be difficult.
|
{
"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/951/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/951/timeline
| null |
completed
| null | null | false |
[
"Could you elaborate?\n",
"Chardet is for Python 2. Chardet 2 is for Python 3.\n\nOur chardet should work for both.\n",
"@Lukasa @kennethreitz #939 solves these problems without any major disadvantage I can think of. Furthermore it has the slight advantage of letting the package maintainers easily add separate versions of any other package `requests` may depend on in the future without having to follow this same forking approach everytime. But this is just my humble opinion, of course :-)\n",
"Oh, so \"chardet2\" already supports python 2, even though it says it doesn't. Easy enough.\n",
"No longer needed.\n",
"Har\n\nKenneth Reitz [email protected] wrote:\n\n> Oh, so \"chardet2\" already supports python 2, even though it says it\n> doesn't. Easy enough.\n> \n> ---\n> \n> Reply to this email directly or view it on GitHub:\n> https://github.com/kennethreitz/requests/issues/951#issuecomment-10775501\n",
"I take that back.\n",
"oh look, a nifty guide!\n\nhttp://getpython3.com/diveintopython3/case-study-porting-chardet-to-python-3.html\n",
"Where are you forking chardet to? \n",
"@sigmavirus24 do what to do it for me? :)\n",
"I was under the impression it was going to be forked to the requests organization. If you want me to do it give me the permissions too. :P\n",
"See sigmavirus24/charade\n",
"So as of sigmavirus24/charade@3ac2bce7 I feel confident in saying that the library should work in both python 2 and 3. I just need tests to try this on. I figured I'd move discussion from #907 to here since this is the correct issue and it's open.\n\nIf anyone has some test cases I could use to verify that it works, I will :heart: you.\n",
"I just scoured the forks of dcramer/chardet and found one with Mark's tests & test runner. Running the tests now on python2 first.\n",
"Well it's definitely not ready yet. \n\nLike I said before ~1 week should suffice.\n",
"Ready enough for me to continue with development :)\n",
"From the tests running in python3, I'm guessing not.\n",
"Yeah, nothing's working at all. But... i'm excited :)\n",
"yeah, dcramer/chardet is a terrible fork.\n",
"Yeah, I'm starting to get that. I'm going to look at some other forks to work \nwith.\n",
"The original chardet used to support Python 3. You may want to look at https://github.com/puzzlet/chardet/tree/MarkPilgrim/src-python3\n",
"@puzzlet that seems extraordinarily useful. Thank you! We're trying to make one library for both python 2 and 3, I've add you and @kennethreitz as contributors. Any and all further help you could provide would be greatly appreciated.\n\nOn a separate topic, @kennethreitz, the library shouldn't give you problems anymore, it just might not (yet) give you the correct encoding.\n",
"omg it works!\n",
"I love you so much.\n",
"The tests just imply that it doesn't detect the correct encoding like it \nshould. So far diffing the files in puzzlet's links and mine are showing only \nstylistic (pep8) changes. I haven't run the tests on Mark's original python3 \ncode but, I'm looking.\n\nI think part of the problem is coming from the universaldetector file. I used \nMark's logic for the comparison's, i.e., `str <= '\\202'` becomes `ord(str) \n<= 202`. My concern is that when you do `ord('\\202')` that doesn't become \n202, that becomes 130.\n\nTechnically everything that was true for that statment will work BUT the \nproblem is now that extra characters are included there. Also, doesn't help \nthat I have never actually studied Mozilla's algorithm for doing all of this.\n\n:shrug: I'll get it back to being actually reliable.\n",
"Looking forward to it! I'm happy that my basic tests are at least working now :)\n",
"I was thinking of the wrong file. And that bit that I mentioned is unrelated to detection of anything other than JP languages (I think). (The file I was thinking of was jpcntx.py)\n",
"I may have found the issue ;)\n",
"\\o/\n"
] |
https://api.github.com/repos/psf/requests/issues/950
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/950/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/950/comments
|
https://api.github.com/repos/psf/requests/issues/950/events
|
https://github.com/psf/requests/issues/950
| 8,600,158 |
MDU6SXNzdWU4NjAwMTU4
| 950 |
JSON-encoded data alongside files in POST request is not supported
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/417223?v=4",
"events_url": "https://api.github.com/users/guewen/events{/privacy}",
"followers_url": "https://api.github.com/users/guewen/followers",
"following_url": "https://api.github.com/users/guewen/following{/other_user}",
"gists_url": "https://api.github.com/users/guewen/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/guewen",
"id": 417223,
"login": "guewen",
"node_id": "MDQ6VXNlcjQxNzIyMw==",
"organizations_url": "https://api.github.com/users/guewen/orgs",
"received_events_url": "https://api.github.com/users/guewen/received_events",
"repos_url": "https://api.github.com/users/guewen/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/guewen/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/guewen/subscriptions",
"type": "User",
"url": "https://api.github.com/users/guewen",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 6 |
2012-11-23T10:21:47Z
|
2021-09-09T01:22:31Z
|
2012-11-23T10:22:56Z
|
NONE
|
resolved
|
Hi,
When we need to POST a request containing a JSON-encoded body along with files, we get a `cannot encode objects that are not 2-tuples` error.
An example of such an API is https://www.pingen.com/en/developer/endpoints-documents.html, see in the `upload` tab.
```
File "/home/gbaconnier/buildout/eggs/requests-0.14.2-py2.7.egg/requests/api.py", line 98, in post
return request('post', url, data=data, **kwargs)
File "/home/gbaconnier/buildout/eggs/requests-0.14.2-py2.7.egg/requests/safe_mode.py", line 31, in wrapped
return function(method, url, **kwargs)
File "/home/gbaconnier/buildout/eggs/requests-0.14.2-py2.7.egg/requests/api.py", line 51, in request
return session.request(method=method, url=url, **kwargs)
File "/home/gbaconnier/buildout/eggs/requests-0.14.2-py2.7.egg/requests/sessions.py", line 241, in request
r.send(prefetch=prefetch)
File "/home/gbaconnier/buildout/eggs/requests-0.14.2-py2.7.egg/requests/models.py", line 532, in send
(body, content_type) = self._encode_files(self.files)
File "/home/gbaconnier/buildout/eggs/requests-0.14.2-py2.7.egg/requests/models.py", line 358, in _encode_files
fields = to_key_val_list(self.data)
File "/home/gbaconnier/buildout/eggs/requests-0.14.2-py2.7.egg/requests/utils.py", line 157, in to_key_val_list
raise ValueError('cannot encode objects that are not 2-tuples')
ValueError: cannot encode objects that are not 2-tuples
```
So I have `data` as `str` (json-encoded) and `files` being a `dict` with a `tuple`.
That's because on line 532, `self._encode_files` is called when we have `files` and in this method, at line 358, `data` is expected to not be a `str`.
|
{
"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/950/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/950/timeline
| null |
completed
| null | null | false |
[
"Requests doesn't work this way.\n\nYou need to create your entire body yourself and provide it to 'data'.\n",
"Ok, that's done on my side. Thanks for your faster than lightning answer.\n",
"Anytime :)\n",
"Hi, I am a QA and need to automate our API's which has similar requirement. Can you please explain how to achieve it using Requests library. To be specific my requirement is I have \"send\" API which sends email to mentioned email id with subject and message body along with valid token as json data. This works fine but how can I send email with attachments e.g. pdf or image files using Request.\nIt would be of great help if you provide some working example code here as I am not a developer.\nMy json data looks like this\npayload = {\"message\":{\"to\":\"[email protected]\",\"subject\":\"test msg\",\"message\":\"test msg\"},\"elementToken\":\"some-valid-token\"}\nr = requests.post(\"https://some-server.com/send\", data={'data': json.dumps(payload), 'file': open('logo.png')})\n\nThanks in advance\nSwapnil\n",
"@swapnilpatne The answer depends entirely on how the upstream API expects the data to be delivered. Most likely it wants multipart data. If that's the case, Requests does not provide an easy abstraction for this use case. You'd need to build the correct multipart body yourself and provide it as opaque data for Requests to send.\n\nUnfortunately, providing advice on how to do this is quite a bit beyond the scope of this bug tracker. =) May I recommend asking the question at Stack Overflow, or attempting to contact someone in our IRC chatroom?\n",
"Thanks for quick response, yes it expects multipart data. I will post my query on Stack Overflow\nThanks again :)\n"
] |
https://api.github.com/repos/psf/requests/issues/949
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/949/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/949/comments
|
https://api.github.com/repos/psf/requests/issues/949/events
|
https://github.com/psf/requests/issues/949
| 8,591,109 |
MDU6SXNzdWU4NTkxMTA5
| 949 |
Eventlet support
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/331423?v=4",
"events_url": "https://api.github.com/users/jmg/events{/privacy}",
"followers_url": "https://api.github.com/users/jmg/followers",
"following_url": "https://api.github.com/users/jmg/following{/other_user}",
"gists_url": "https://api.github.com/users/jmg/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jmg",
"id": 331423,
"login": "jmg",
"node_id": "MDQ6VXNlcjMzMTQyMw==",
"organizations_url": "https://api.github.com/users/jmg/orgs",
"received_events_url": "https://api.github.com/users/jmg/received_events",
"repos_url": "https://api.github.com/users/jmg/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jmg/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jmg/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jmg",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-11-23T01:54:11Z
|
2021-09-09T05:30:50Z
|
2012-11-23T01:55:54Z
|
NONE
|
resolved
|
First at all, thanks for porting requests to the asynchronous world, I loved it!
However I'm using Eventlet instead of Gevent so I adapted the code to make
it work with Eventlet. You can see it at https://github.com/jmg/erequests.
I was wondering if we can make a unified version where the library can
detect or be configured to use either Eventlet or Gevent based on the user
needs.
Many thanks.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/331423?v=4",
"events_url": "https://api.github.com/users/jmg/events{/privacy}",
"followers_url": "https://api.github.com/users/jmg/followers",
"following_url": "https://api.github.com/users/jmg/following{/other_user}",
"gists_url": "https://api.github.com/users/jmg/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jmg",
"id": 331423,
"login": "jmg",
"node_id": "MDQ6VXNlcjMzMTQyMw==",
"organizations_url": "https://api.github.com/users/jmg/orgs",
"received_events_url": "https://api.github.com/users/jmg/received_events",
"repos_url": "https://api.github.com/users/jmg/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jmg/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jmg/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jmg",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/949/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/949/timeline
| null |
completed
| null | null | false |
[
"Sorry, I wanted to open this on the grequests repository.\n"
] |
https://api.github.com/repos/psf/requests/issues/948
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/948/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/948/comments
|
https://api.github.com/repos/psf/requests/issues/948/events
|
https://github.com/psf/requests/pull/948
| 8,581,738 |
MDExOlB1bGxSZXF1ZXN0MzA5ODc0Mg==
| 948 |
Back to issue #630, .isalnum() was sufficient in addressing the issue.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/359029?v=4",
"events_url": "https://api.github.com/users/mwielgoszewski/events{/privacy}",
"followers_url": "https://api.github.com/users/mwielgoszewski/followers",
"following_url": "https://api.github.com/users/mwielgoszewski/following{/other_user}",
"gists_url": "https://api.github.com/users/mwielgoszewski/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mwielgoszewski",
"id": 359029,
"login": "mwielgoszewski",
"node_id": "MDQ6VXNlcjM1OTAyOQ==",
"organizations_url": "https://api.github.com/users/mwielgoszewski/orgs",
"received_events_url": "https://api.github.com/users/mwielgoszewski/received_events",
"repos_url": "https://api.github.com/users/mwielgoszewski/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mwielgoszewski/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mwielgoszewski/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mwielgoszewski",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-11-22T16:12:29Z
|
2021-09-08T17:06:00Z
|
2012-11-23T10:01:20Z
|
CONTRIBUTOR
|
resolved
|
Adding a try/except block just masks any issues that are raised here, issues that the developer should definitely be made aware of.
|
{
"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/948/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/948/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/948.diff",
"html_url": "https://github.com/psf/requests/pull/948",
"merged_at": "2012-11-23T10:01:20Z",
"patch_url": "https://github.com/psf/requests/pull/948.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/948"
}
| true |
[
"Thanks!\n"
] |
https://api.github.com/repos/psf/requests/issues/947
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/947/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/947/comments
|
https://api.github.com/repos/psf/requests/issues/947/events
|
https://github.com/psf/requests/pull/947
| 8,554,183 |
MDExOlB1bGxSZXF1ZXN0MzA4Njk0NA==
| 947 |
Only return a path if the cacert.pem file exists.
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1619297?v=4",
"events_url": "https://api.github.com/users/JohnPeacockMessageSystems/events{/privacy}",
"followers_url": "https://api.github.com/users/JohnPeacockMessageSystems/followers",
"following_url": "https://api.github.com/users/JohnPeacockMessageSystems/following{/other_user}",
"gists_url": "https://api.github.com/users/JohnPeacockMessageSystems/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JohnPeacockMessageSystems",
"id": 1619297,
"login": "JohnPeacockMessageSystems",
"node_id": "MDQ6VXNlcjE2MTkyOTc=",
"organizations_url": "https://api.github.com/users/JohnPeacockMessageSystems/orgs",
"received_events_url": "https://api.github.com/users/JohnPeacockMessageSystems/received_events",
"repos_url": "https://api.github.com/users/JohnPeacockMessageSystems/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JohnPeacockMessageSystems/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JohnPeacockMessageSystems/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JohnPeacockMessageSystems",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 3 |
2012-11-21T18:40:29Z
|
2021-09-08T17:06:00Z
|
2012-11-23T10:02:18Z
|
NONE
|
resolved
|
This will permit the deletion of just that one file in order
to fall back to the [probably more accurate but less consistent]
Distro provided CA certs.
I need to be able to add our internal CA and I don't want to have to patch your module every time I upgrade. Personally, I think it is backwards to prefer your own CA certs with no good way to prefer
the OS/Distro provided certs. I realize it makes your testing much easier since you have a known
list of certs. Providing an environment override is a poor substitute to an actual API.
|
{
"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/947/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/947/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/947.diff",
"html_url": "https://github.com/psf/requests/pull/947",
"merged_at": "2012-11-23T10:02:18Z",
"patch_url": "https://github.com/psf/requests/pull/947.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/947"
}
| true |
[
"If that file doesn't exist, it return from that function should be `None`, correct?\n\nThere is an actual API for providing your own CA bundle, it's just not well documented ;)\n",
"No, the return from that function is the filename, whether or not the file exists. And I figured out I could pass my own CA bundle path in the verify parameter, but in my case, that would mean I'd have to patch the module that calls this code, so it seems easier to make \"requests\" DTRT instead. ;-)\n",
"This seems hacky, but I'll accept it just for you.\n"
] |
https://api.github.com/repos/psf/requests/issues/946
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/946/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/946/comments
|
https://api.github.com/repos/psf/requests/issues/946/events
|
https://github.com/psf/requests/issues/946
| 8,470,749 |
MDU6SXNzdWU4NDcwNzQ5
| 946 |
Cookie error
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/31465?v=4",
"events_url": "https://api.github.com/users/jorilallo/events{/privacy}",
"followers_url": "https://api.github.com/users/jorilallo/followers",
"following_url": "https://api.github.com/users/jorilallo/following{/other_user}",
"gists_url": "https://api.github.com/users/jorilallo/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorilallo",
"id": 31465,
"login": "jorilallo",
"node_id": "MDQ6VXNlcjMxNDY1",
"organizations_url": "https://api.github.com/users/jorilallo/orgs",
"received_events_url": "https://api.github.com/users/jorilallo/received_events",
"repos_url": "https://api.github.com/users/jorilallo/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorilallo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorilallo/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorilallo",
"user_view_type": "public"
}
|
[] |
closed
| 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"
}
|
[
{
"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"
}
] | null | 3 |
2012-11-19T14:41:40Z
|
2021-09-09T05:30:51Z
|
2012-11-19T16:08:34Z
|
NONE
|
resolved
|
After upgrading from 0.10.x to the newest, I'm getting the following error on some requests:
https://gist.github.com/6efe9228a53f0e3d8270
Note that this request uses oAuth add-on but I'm experiencing it without it as well. Python 2.7.2
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/31465?v=4",
"events_url": "https://api.github.com/users/jorilallo/events{/privacy}",
"followers_url": "https://api.github.com/users/jorilallo/followers",
"following_url": "https://api.github.com/users/jorilallo/following{/other_user}",
"gists_url": "https://api.github.com/users/jorilallo/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jorilallo",
"id": 31465,
"login": "jorilallo",
"node_id": "MDQ6VXNlcjMxNDY1",
"organizations_url": "https://api.github.com/users/jorilallo/orgs",
"received_events_url": "https://api.github.com/users/jorilallo/received_events",
"repos_url": "https://api.github.com/users/jorilallo/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jorilallo/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jorilallo/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jorilallo",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/946/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/946/timeline
| null |
completed
| null | null | false |
[
"Yup, that's pretty unlikely to be an OAuth issue.\n\nI can't look into this while I'm at work, but I'll take a pass at it when I get home.\n",
"So I lied slightly.\n\nOut of interest, can you try uninstalling and reinstalling Requests (`pip uninstall requests` followed by `pip install requests`). It looks like Requests had some major cookies related changes in V0.12, and the most pertinent commit seems to be 4d6871d9176c13affe625b1885278d396a39f21d. This should turn all `dicts` passed in as the cookie parameter into `CookieJars`. In your traceback this doesn't seem to have happened, so I just want to rule out the possibility that this code is absent in your install.\n",
"I started to doubt myself if I misread one previous error and tried this with buildin OAuth1 support instead of requests-oauth and it worked. requests-oauth hasn't been updated in 5 months so it's most likely out of date. Closing.\n"
] |
https://api.github.com/repos/psf/requests/issues/945
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/945/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/945/comments
|
https://api.github.com/repos/psf/requests/issues/945/events
|
https://github.com/psf/requests/pull/945
| 8,449,653 |
MDExOlB1bGxSZXF1ZXN0MzA0MjA2OA==
| 945 |
Respect the no_proxy environment variable.
|
{
"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 | 5 |
2012-11-18T12:09:48Z
|
2021-09-09T00:01:22Z
|
2012-11-23T10:03:28Z
|
MEMBER
|
resolved
|
This change is in response to issue #879.
The `no_proxy` environment variable is a pretty strange beast, so this code is a little less elegant than I'd like.
I also concluded that the right place to handle it was in `get_environ_proxies()`, but it might be better to hoist some of this code out and handle it in `models.py`. If you think that's a better idea, let me know and I'll make the changes to do that instead.
|
{
"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/945/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/945/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/945.diff",
"html_url": "https://github.com/psf/requests/pull/945",
"merged_at": "2012-11-23T10:03:28Z",
"patch_url": "https://github.com/psf/requests/pull/945.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/945"
}
| true |
[
"Wow, Travis has kind of imploded here.\n\nI don't really know what to do about this, the tests all pass fine for me.\n",
"This is what I get for not running the tests using `nose`. =D All better now!\n",
"@Lukasa py.test is still the best :)\n",
"Nice, thanks!\n",
"+1 py.test is the best.\n"
] |
https://api.github.com/repos/psf/requests/issues/944
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/944/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/944/comments
|
https://api.github.com/repos/psf/requests/issues/944/events
|
https://github.com/psf/requests/issues/944
| 8,449,513 |
MDU6SXNzdWU4NDQ5NTEz
| 944 |
OAuth import fails in Python 3.2
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1092128?v=4",
"events_url": "https://api.github.com/users/sybrenstuvel/events{/privacy}",
"followers_url": "https://api.github.com/users/sybrenstuvel/followers",
"following_url": "https://api.github.com/users/sybrenstuvel/following{/other_user}",
"gists_url": "https://api.github.com/users/sybrenstuvel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sybrenstuvel",
"id": 1092128,
"login": "sybrenstuvel",
"node_id": "MDQ6VXNlcjEwOTIxMjg=",
"organizations_url": "https://api.github.com/users/sybrenstuvel/orgs",
"received_events_url": "https://api.github.com/users/sybrenstuvel/received_events",
"repos_url": "https://api.github.com/users/sybrenstuvel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sybrenstuvel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sybrenstuvel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sybrenstuvel",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 25 |
2012-11-18T11:43:17Z
|
2021-09-09T05:30:49Z
|
2012-11-23T10:10:09Z
|
NONE
|
resolved
|
I'm trying out Request's OAuth support on Python 3.2. The following code:
``` python
import requests
from requests.auth import OAuth1
url = 'https://api.twitter.com/1/account/settings.json'
queryoauth = OAuth1('client_key', 'client_secret',
'resource_owner_key', 'resource_owner_secret',
signature_type='query')
r = requests.get(url, auth=queryoauth)
```
gives me this error:
```
Traceback (most recent call last):
File "simple_oauth_test.py", line 8, in <module>
signature_type='query')
File "/home/sybren/.virtualenvs/flickrapi-py32/lib/python3.2/site-packages/requests-0.14.1-py3.2.egg/requests/auth.py", line 68, in __init__
self.client = Client(client_key, client_secret, resource_owner_key,
NameError: global name 'Client' is not defined
```
requests/auth.py contains the following:
``` python
try:
from ._oauth import (Client, SIGNATURE_HMAC, SIGNATURE_TYPE_AUTH_HEADER, extract_params)
except (ImportError, SyntaxError):
SIGNATURE_HMAC = None
SIGNATURE_TYPE_AUTH_HEADER = None
```
Removing the try/except clause to show the actual import error gives me this:
```
Traceback (most recent call last):
File "/home/sybren/.virtualenvs/flickrapi-py32/lib/python3.2/site-packages/requests-0.14.1-py3.2.egg/requests/_oauth.py", line 15, in <module>
from oauthlib.oauth1 import rfc5849
ImportError: No module named oauthlib.oauth1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "simple_oauth_test.py", line 1, in <module>
import requests
File "/home/sybren/.virtualenvs/flickrapi-py32/lib/python3.2/site-packages/requests-0.14.1-py3.2.egg/requests/__init__.py", line 53, in <module>
from .models import Request, Response
File "/home/sybren/.virtualenvs/flickrapi-py32/lib/python3.2/site-packages/requests-0.14.1-py3.2.egg/requests/models.py", line 19, in <module>
from .auth import HTTPBasicAuth, HTTPProxyAuth
File "/home/sybren/.virtualenvs/flickrapi-py32/lib/python3.2/site-packages/requests-0.14.1-py3.2.egg/requests/auth.py", line 22, in <module>
from ._oauth import (Client, SIGNATURE_HMAC, SIGNATURE_TYPE_AUTH_HEADER, extract_params)
File "/home/sybren/.virtualenvs/flickrapi-py32/lib/python3.2/site-packages/requests-0.14.1-py3.2.egg/requests/_oauth.py", line 22, in <module>
from oauthlib.oauth1 import rfc5849
File "/home/sybren/.virtualenvs/flickrapi-py32/lib/python3.2/site-packages/requests-0.14.1-py3.2.egg/requests/packages/oauthlib/oauth1/__init__.py", line 12, in <module>
from .rfc5849 import Client, Server
File "/home/sybren/.virtualenvs/flickrapi-py32/lib/python3.2/site-packages/requests-0.14.1-py3.2.egg/requests/packages/oauthlib/oauth1/rfc5849/__init__.py", line 22
SIGNATURE_HMAC = u"HMAC-SHA1"
^
SyntaxError: invalid syntax
```
String literals with a u-prefix are not supported for Python 3.x before 3.3. Since the largest install base of 3.x still runs on 3.2 (I'm assuming, given the recent release date of 3.3) it would be very nice if we could use OAuth on Python 3.2.
|
{
"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/944/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/944/timeline
| null |
completed
| null | null | false |
[
"It's my understanding that the general intent is that `requests` will stop supporting Python 3.2 and move to supporting Python 3.3, in no small part because of this syntax.\n\n@kennethreitz, do you want this to be fixed now, or should we just leave this until it fixes itself in 3.3 and so consider this a \"won't fix\"?\n",
"According to http://docs.python-requests.org/en/latest/community/faq/#python-3-support Python 3.1 and 3.2 are officially supported, so I'm a little taken aback by this response.\n",
"Taken aback by which part? =)\n\nI didn't say I wouldn't fix it, I asked Kenneth what he wanted to do. He may (and probably will) say that it should be fixed. The reason I asked is that I know he's expressed a desire to stop supporting 3.1 and 3.2 in the past (because of how much easier it is to support 3.3), and if he was planning to do that in the near future then I could better spend my time fixing things that will still be bugs in 3.3.\n\nRequests is still pre-version 1.0, and support for previous versions is withdrawn from time-to-time. Requests used to support Python 2.5, now it doesn't. In fact, I'm startled that we claim to support 3.1, because we haven't been testing on 3.1 for quite some time, and so we could easily have broken something.\n\nThe question is not whether we want the bug fixed: we do. The question is whether we treat it as a priority. If someone else (yourself, for instance) supplied a Pull Request with the fix, it'd almost certainly be accepted, and I encourage you to do just that.\n\nEDIT: In fact, we have an outstanding Python 3.1 bug too, in the form of #882.\n",
"Ah, that clarifies things, thanks. I'll see if I can fix this for you, but first I have to get my own code in working order (I'm changing the Python FlickrAPI client from the old authentication method to OAuth)\n",
"Sounds good. =)\n\nWhile we're on the OAuth topic, I'd like to draw your attention to #938. Based on the way Requests is moving, I suspect that the OAuth support will end up being pulled out of the main Requests trunk and into a new module, much like the Kerberos and NTLM stuff. I doubt this will happen in the immediate future, but certainly in the medium term. (In case you're interested, part of the reason is that we don't have much in the way of tests for the authentication stuff, and keeping them in their own modules makes it easier to do testing.)\n",
"I'll keep an eye on that, thanks. So far Requests has been amazingly easy to work with, so you won't loose me any time soon ;-)\n",
"That is indeed the plan.\n",
"@kennethreitz is the plan to fix it for 3.2, or to wait until Py3.3?\n",
"OAuthlib simply doesn't support Python 3 at this time.\n",
"According to http://pypi.python.org/pypi/oauthlib all their Python 3 tests pass since version 0.3.2, so apparently Python 3 is supported. Their \"Support Python 3\" issue [#55](https://github.com/idan/oauthlib/issues/55) was closed a month ago.\n\nSo as far as supporting Python 3 goes, I think this particular issue is far from closed.\n",
"Ah, I'm a bit out of date! \n\nLet's do a new pull.\n",
"Fuck it, I'm extracting this out. \n",
"\\o/\n",
"https://github.com/requests/requests-oauthlib\n",
"Had to be done, I just didn't want to be the one to do it because @kennethreitz might make me maintain it. The idea of working with OAuth keeps me up at night.\n",
"Yeah, it'll be super simple. All the actual work is done by @idan and team :)\n",
"Yeah, I'm the maintainer of the Python Flickr API implementation, and they've moved to OAuth so I have no choice...\n",
"I'll update the built in version first though. I won't rip it out until 1.0.\n\nI really need to work on that.\n",
"Gah, not enough hours in a day, man.\n",
"@sybrenstuvel: Sucks to be you. =D\n\n@kennethreitz: Mm, there's a lot on your plate. I tried to go through and close a few issues last week, because it had gotten a bit out of control. ATM I'm trying to triage new issues so I can keep the trivial ones off your radar.\n",
"@Lukasa you're doing an absolutely kick-ass job, and you've made this project twice as sustainable as it already was. This Thanksgiving, I'm thankful for you :P\n\n:sparkles: :cake: :sparkles:\n",
"@Lukasa haha thanks :P\n\n@kennethreitz and @Lukasa thank you both for the great lib! My work has become a lot easier thanks to you guys.\n",
"@sybrenstuvel: In all seriousness, I run around, patch small holes, close issues and write docs. The general awesomeness of this library was in place before I got to this project, I'm just basking in reflected glory. =)\n\n@kennethreitz: Thanks Kenneth, always affirming to know that my contribution is valuable. =D This thanksgiving (and the one before, and the one before that...) I'm thankful for your ludicrous productivity. If I was half as productive as you I'd be way better paid. =P\n",
"Released! https://github.com/requests/requests-oauthlib\n",
"Awesome!\n"
] |
https://api.github.com/repos/psf/requests/issues/943
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/943/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/943/comments
|
https://api.github.com/repos/psf/requests/issues/943/events
|
https://github.com/psf/requests/issues/943
| 8,442,014 |
MDU6SXNzdWU4NDQyMDE0
| 943 |
Setting timeout on celery worker causes TypeError when attempting to throw TimeoutError
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/909098?v=4",
"events_url": "https://api.github.com/users/russellballestrini/events{/privacy}",
"followers_url": "https://api.github.com/users/russellballestrini/followers",
"following_url": "https://api.github.com/users/russellballestrini/following{/other_user}",
"gists_url": "https://api.github.com/users/russellballestrini/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/russellballestrini",
"id": 909098,
"login": "russellballestrini",
"node_id": "MDQ6VXNlcjkwOTA5OA==",
"organizations_url": "https://api.github.com/users/russellballestrini/orgs",
"received_events_url": "https://api.github.com/users/russellballestrini/received_events",
"repos_url": "https://api.github.com/users/russellballestrini/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/russellballestrini/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/russellballestrini/subscriptions",
"type": "User",
"url": "https://api.github.com/users/russellballestrini",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-11-17T15:53:40Z
|
2021-09-09T05:30:51Z
|
2012-11-17T16:04:53Z
|
NONE
|
resolved
|
# Problem
Setting a request timeout causes a TypeError when attempting to throw TimeoutError which is inherits from PoolError.
# Possible solution
Set a default message in the PoolError constructor.
```
#def __init__(self, pool, message):
def __init__(self, pool, message=''):
```
# Traceback
```
[2012-11-17 15:47:24,980: ERROR/MainProcess] Unrecoverable error: TypeError('__init__() takes exactly 3 arguments (2 given)', <class 'requests.packages.urllib3.exceptions.TimeoutError'>, ("HTTPConnectionPool(host='looney.com', port=80): Request timed out. (timeout=1.0)",))
Traceback (most recent call last):
File "/home/user/virtpy/lib/python2.6/site-packages/celery/worker/__init__.py", line 347, in start
component.start()
File "/home/user/virtpy/lib/python2.6/site-packages/celery/worker/consumer.py", line 390, in start
self.consume_messages()
File "/home/user/virtpy/lib/python2.6/site-packages/celery/worker/consumer.py", line 474, in consume_messages
readers[fileno](fileno, event)
File "/home/user/virtpy/lib/python2.6/site-packages/billiard/pool.py", line 669, in handle_event
self._it.next()
File "/home/user/virtpy/lib/python2.6/site-packages/billiard/pool.py", line 642, in _process_result
ready, task = poll(timeout)
File "/home/user/virtpy/lib/python2.6/site-packages/billiard/pool.py", line 1059, in _poll_result
return True, self._quick_get()
TypeError: ('__init__() takes exactly 3 arguments (2 given)', <class 'requests.packages.urllib3.exceptions.TimeoutError'>,("HTTPConnectionPool(host='looney.com', port=80): Request timed out. (timeout=1.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"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/943/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/943/timeline
| null |
completed
| null | null | false |
[
"Oops, this appears to be a bug in urllib3 not requests... I will attempt to place a pull request on that project.\n",
"Heh, fair enough. Thanks for the bug report anyway! =)\n"
] |
https://api.github.com/repos/psf/requests/issues/942
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/942/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/942/comments
|
https://api.github.com/repos/psf/requests/issues/942/events
|
https://github.com/psf/requests/pull/942
| 8,440,792 |
MDExOlB1bGxSZXF1ZXN0MzAzOTE2Mw==
| 942 |
MockRequest needs a type property for Py3.3
|
{
"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 |
2012-11-17T13:01:56Z
|
2021-09-08T23:01:12Z
|
2012-11-23T10:04:21Z
|
MEMBER
|
resolved
|
This resolves Issue #883.
At least, it does on my box. We'll see what Travis says.
|
{
"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/942/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/942/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/942.diff",
"html_url": "https://github.com/psf/requests/pull/942",
"merged_at": "2012-11-23T10:04:21Z",
"patch_url": "https://github.com/psf/requests/pull/942.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/942"
}
| true |
[
"Simple enough ;)\n"
] |
https://api.github.com/repos/psf/requests/issues/941
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/941/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/941/comments
|
https://api.github.com/repos/psf/requests/issues/941/events
|
https://github.com/psf/requests/pull/941
| 8,440,127 |
MDExOlB1bGxSZXF1ZXN0MzAzODkyMw==
| 941 |
Update documentation on Sessions.
|
{
"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 |
2012-11-17T10:59:39Z
|
2021-09-08T23:07:15Z
|
2012-11-17T11:03:03Z
|
MEMBER
|
resolved
|
This resolves issue #870.
This documentation isn't great, we should consider improving the API docs in future.
|
{
"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/941/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/941/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/941.diff",
"html_url": "https://github.com/psf/requests/pull/941",
"merged_at": "2012-11-17T11:03:03Z",
"patch_url": "https://github.com/psf/requests/pull/941.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/941"
}
| true |
[
"+1\n"
] |
https://api.github.com/repos/psf/requests/issues/940
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/940/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/940/comments
|
https://api.github.com/repos/psf/requests/issues/940/events
|
https://github.com/psf/requests/pull/940
| 8,434,914 |
MDExOlB1bGxSZXF1ZXN0MzAzNjUyMw==
| 940 |
Update docs to reflect use of 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"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2012-11-16T23:06:11Z
|
2021-09-08T17:05:59Z
|
2012-11-17T11:03:33Z
|
MEMBER
|
resolved
|
Resolves issue #917.
|
{
"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/940/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/940/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/940.diff",
"html_url": "https://github.com/psf/requests/pull/940",
"merged_at": "2012-11-17T11:03:33Z",
"patch_url": "https://github.com/psf/requests/pull/940.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/940"
}
| true |
[] |
https://api.github.com/repos/psf/requests/issues/939
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/939/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/939/comments
|
https://api.github.com/repos/psf/requests/issues/939/events
|
https://github.com/psf/requests/pull/939
| 8,419,772 |
MDExOlB1bGxSZXF1ZXN0MzAyODU0MA==
| 939 |
! Fixes packaging and installation behaviour under Python2 and Python3.
|
{
"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 | 10 |
2012-11-16T13:46:12Z
|
2014-06-20T11:43:11Z
|
2012-11-27T18:32:58Z
|
NONE
| null |
Long short story again... This PR aims at fixing #916 and #918 while still keeping dependencies vendored (unlike in #929 where I had removed them)... So, what I did was to remove everything except `__init__.py` from the`packages` folder (which made up `requests.packages`) from inside "requests" and separate it into three packages inside the `dependencies` folder:
- `dependencies/common`: This contains all the packages needed by **requests** and which work _both_ on PY2 and PY3 ( currently **urllib3** only ). It will be made into a package (`requests.packages.common`) by `setuptools`/`distutils` during installation via the `package_dir` instruction.
- `dependencies/python2`: This contains PY2 specific packages ( currently **oauthlib** and **chardet** ). It will be made into a package (`requests.packages.environment`) during installation on PY2 (via the `package_dir` instruction).
- `dependencies/python3`: This contains PY3 specific packages ( currently **chardet2** ). It will be made into a package (`requests.packages.environment`) during installation on PY3 (via the `package_dir` instruction).
Next, I added a `recursive-include` targeting the `dependencies` folder, so that _all_ the packages get included when `sdist`ing (no matter what version of Python is used to do the actual packaging)... Finally I moved the `requests` source folder to `source/requests` to cheat `nose`'s test loader and force it to use the installed version instead. A few changes to the `Makefile` were also necessary, and that's all there's to it.
I have tested this in every supported Python version and is working great (Travis CI says the same). If you want to test `pip` before merging I have uploaded a testing package of this precise version which installs flawlessly under Python2.6+.
```
pip install requests-packaging-fixes
```
**Edit:** The problems described in #916 and #916 had been caused not by a change on `setup.py` (since there were none which could potentially have caused this) but due to the fact that 0.14.1 and 0.14.2 were packaged under different versions of Python. I could reproduce the current behaviour by checking-out both sources and packaging them with Python3 for 0.14.1 (this would include all vendored packages) and with Python2 for 0.14.2 (this would leave out **chardet2**). Weird, but 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/939/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/939/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/939.diff",
"html_url": "https://github.com/psf/requests/pull/939",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/939.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/939"
}
| true |
[
"This is impressive work! =D\n\nThat said, I'm not sure @kennethreitz is going to be super-keen on moving the primary requests files into a directory not called \"requests\". If you could find another way around the `nose` test loader (which might mean a hack involving `sys.path`), he'll probably be quite a bit happier.\n",
"@Lukasa: Thank you :-) Hmm... Let's wait for his opinion. I actually tried to do that, but it didn't prove easy... :p\n",
"@kennethreitz Are you considering merging this as-is or is there anything you'd like me to change?\n",
"It looks like Kenneth is going in a different direction with `chardet` (see issue #951). Additionally, it seems that newer versions of `oauthlib` support Python 3, so these two things together might solve this issue. This is @kennethreitz's call, but I suspect a new version of `oauthlib` and a fork of `chardet` will solve our problems.\n",
"@bmcustodio I didn't intentionally close the ticket! I am doing some cleanup and switched the default branch from 'develop' to 'master'. That apparently closed all pending pull requests :(\n",
"@kennethreitz Oh sorry then. My bad :(\n",
"I'll respond soon — I haven't yet because i honestly haven't figured out why it broke....\n",
"@kennethreitz it broke because you ran `setup.py register` with only one version of python. With that in mind, only that version's vendored dependencies were included, i.e., python2's were included by not python3's.\n",
"I've always done it that way. Something else changed.\n",
"@kennethreitz the setup.py file you used changed. It conditionally included the packages based on python version. Unfortunately it also based it on which version you ran it with. This is the [line](https://github.com/kennethreitz/requests/blob/master/setup.py#L28) in question\n"
] |
https://api.github.com/repos/psf/requests/issues/938
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/938/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/938/comments
|
https://api.github.com/repos/psf/requests/issues/938/events
|
https://github.com/psf/requests/issues/938
| 8,399,522 |
MDU6SXNzdWU4Mzk5NTIy
| 938 |
Tracking: 'requests' org
|
{
"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"
}
|
[
{
"color": "e102d8",
"default": false,
"description": null,
"id": 117745,
"name": "Planned",
"node_id": "MDU6TGFiZWwxMTc3NDU=",
"url": "https://api.github.com/repos/psf/requests/labels/Planned"
}
] |
closed
| 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"
}
|
[
{
"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_at": "2013-05-29T07:59:12Z",
"closed_issues": 12,
"created_at": "2012-11-27T18:41:46Z",
"creator": {
"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"
},
"description": ":sparkles: :cake: :sparkles:",
"due_on": null,
"html_url": "https://github.com/psf/requests/milestone/18",
"id": 219754,
"labels_url": "https://api.github.com/repos/psf/requests/milestones/18/labels",
"node_id": "MDk6TWlsZXN0b25lMjE5NzU0",
"number": 18,
"open_issues": 0,
"state": "closed",
"title": "v1.0.0",
"updated_at": "2013-05-29T07:59:12Z",
"url": "https://api.github.com/repos/psf/requests/milestones/18"
}
| 20 |
2012-11-15T19:55:30Z
|
2021-09-09T03:00:33Z
|
2013-05-29T07:59:12Z
|
CONTRIBUTOR
|
resolved
|
A GitHub org for Requests has been created.
http://github.com/requests
The purpose of this org is to keep track of the assets and supporting libraries around Requests.
Examples:
- requests-ntlm
- requests-oauth
- requests-docs-jp
- requests-docs-fr
|
{
"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/938/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/938/timeline
| null |
completed
| null | null | false |
[
"As @kennethreitz pointed out, the org needs a logo. I'm design-blind and have no taste, so someone else should take that on. =D\n",
"I can't design anything either. What about the owl on docs.python-requests.org ?\n",
"I think that's a sea turtle.\n\nOn Thu, Nov 15, 2012 at 1:43 PM, Ian Cordasco [email protected]:\n\n> I can't design anything either. What about the owl on\n> docs.python-requests.org ?\n> \n> —\n> Reply to this email directly or view it on GitHubhttps://github.com/kennethreitz/requests/issues/938#issuecomment-10426849.\n",
"`\\(o_O)/` I'm apparently blind. \n",
"This will mostly be a documentation change. \n\nThese changes can be made today.\n",
"What stuff are you looking to have in the docs?\n",
"the new auth stuff, mostly :)\n",
"Wouldn't be a good idea to put the requests repository inside requests organization? (and updating the website link)\n",
"Any advantage from doing that would be severely outweighed by breaking links all over the internet. =)\n",
"I also have no interest in moving requests's repo, regardless of any benefits. It's my project, it belongs in my github profile :)\n",
"See, when I say that it sounds sycophantic. =P\n",
"> See, when I say that it sounds sycophantic. =P\n\nThis x2\n",
":camel: \n",
":monkey: I'm bad at this game\n",
":chart_with_upwards_trend: :penguin:\n",
":metal: :metal: :8ball: \n",
":dancer: :dancers: :slot_machine: :sleeping: \n",
":octocat: :octopus: :baby: :baby_bottle: :100: \n",
":accept: :baby_chick: :calling: :dash: :earth_africa: :fallen_leaf: \n",
"I don't know how to make pretty pictures (sorry to break the chain), but I moved RestSharp out of my personal account into an org and I regretted it greatly (broken links, misdirected pull requests/issues, etc). So +1 to not moving kennethreitz/requests from where it is.\n"
] |
https://api.github.com/repos/psf/requests/issues/937
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/937/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/937/comments
|
https://api.github.com/repos/psf/requests/issues/937/events
|
https://github.com/psf/requests/pull/937
| 8,325,460 |
MDExOlB1bGxSZXF1ZXN0Mjk4MjQ1Mg==
| 937 |
Fix for default_user_agent when SIGCHILD intercepted
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/42767?v=4",
"events_url": "https://api.github.com/users/cleg/events{/privacy}",
"followers_url": "https://api.github.com/users/cleg/followers",
"following_url": "https://api.github.com/users/cleg/following{/other_user}",
"gists_url": "https://api.github.com/users/cleg/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/cleg",
"id": 42767,
"login": "cleg",
"node_id": "MDQ6VXNlcjQyNzY3",
"organizations_url": "https://api.github.com/users/cleg/orgs",
"received_events_url": "https://api.github.com/users/cleg/received_events",
"repos_url": "https://api.github.com/users/cleg/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/cleg/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cleg/subscriptions",
"type": "User",
"url": "https://api.github.com/users/cleg",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-11-13T15:45:44Z
|
2021-09-08T17:05:59Z
|
2012-11-15T10:11:55Z
|
CONTRIBUTOR
|
resolved
|
In environment, where SIGCHILD interrupted (e.g. running code under gunicorn) — platform.system() and platform.release() causes `IOError: [Errno 10] No child processes`
Tail of the stacktrace in this case:
```
File "/Users/cleg/Projects/nimble-all/server/eggs/braintree-2.14.1-py2.7.egg/braintree/util/http_strategy/requests_strategy.py", line 2, in <module>
import requests
File "/usr/local/lib/python2.7/site-packages/requests/__init__.py", line 53, in <module>
from .models import Request, Response
File "/usr/local/lib/python2.7/site-packages/requests/models.py", line 27, in <module>
from .defaults import SCHEMAS
File "/usr/local/lib/python2.7/site-packages/requests/defaults.py", line 34, in <module>
'User-Agent': default_user_agent(),
File "/usr/local/lib/python2.7/site-packages/requests/utils.py", line 546, in default_user_agent
'%s/%s' % (platform.system(), platform.release()),
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/platform.py", line 1303, in release
return uname()[2]
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/platform.py", line 1250, in uname
processor = _syscmd_uname('-p','')
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/platform.py", line 1007, in _syscmd_uname
rc = f.close()
IOError: [Errno 10] No child processes
```
I've implementer simple workaround to make this code workable in any circumstances. Maybe it's not the best solution in this case, but it does the trick. Maybe better add general error handling to whole `default_user_agent` function.
|
{
"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/937/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/937/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/937.diff",
"html_url": "https://github.com/psf/requests/pull/937",
"merged_at": "2012-11-15T10:11:55Z",
"patch_url": "https://github.com/psf/requests/pull/937.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/937"
}
| true |
[
"Seems reasonable. Thanks!\n"
] |
https://api.github.com/repos/psf/requests/issues/936
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/936/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/936/comments
|
https://api.github.com/repos/psf/requests/issues/936/events
|
https://github.com/psf/requests/issues/936
| 8,301,157 |
MDU6SXNzdWU4MzAxMTU3
| 936 |
Provide response.request.text to show body of a POST request
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/2781040?v=4",
"events_url": "https://api.github.com/users/GEErickson/events{/privacy}",
"followers_url": "https://api.github.com/users/GEErickson/followers",
"following_url": "https://api.github.com/users/GEErickson/following{/other_user}",
"gists_url": "https://api.github.com/users/GEErickson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/GEErickson",
"id": 2781040,
"login": "GEErickson",
"node_id": "MDQ6VXNlcjI3ODEwNDA=",
"organizations_url": "https://api.github.com/users/GEErickson/orgs",
"received_events_url": "https://api.github.com/users/GEErickson/received_events",
"repos_url": "https://api.github.com/users/GEErickson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/GEErickson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/GEErickson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/GEErickson",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 2 |
2012-11-12T19:55:51Z
|
2021-09-09T05:30:43Z
|
2012-12-03T10:08:28Z
|
NONE
|
resolved
|
It would be helpful if there was a {response}.request.text or {response}.request.body function to show what was sent in the body of a POST request after url-encoding.
Great library, by the way.
|
{
"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/936/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/936/timeline
| null |
completed
| null | null | false |
[
"This becomes tricky. \n\nIf you look around in `models.py` you'll see where the body is constructed. It could very possibly be a file-like object. With that in mind loading it into memory twice can be quite expensive, especially if we store it ad infinitum. While I like the idea, I don't think it is exactly feasible. Sorry.\n\nOn the other hand, I can not close issues and have no \"official\" status inside the project, so mine is just an opinion. Feel free to continue to advocate for this. \n",
"@sigmavirus24 is correct\n"
] |
https://api.github.com/repos/psf/requests/issues/935
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/935/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/935/comments
|
https://api.github.com/repos/psf/requests/issues/935/events
|
https://github.com/psf/requests/issues/935
| 8,261,837 |
MDU6SXNzdWU4MjYxODM3
| 935 |
Sending multipart data - we need better API
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/92239?v=4",
"events_url": "https://api.github.com/users/piotr-dobrogost/events{/privacy}",
"followers_url": "https://api.github.com/users/piotr-dobrogost/followers",
"following_url": "https://api.github.com/users/piotr-dobrogost/following{/other_user}",
"gists_url": "https://api.github.com/users/piotr-dobrogost/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/piotr-dobrogost",
"id": 92239,
"login": "piotr-dobrogost",
"node_id": "MDQ6VXNlcjkyMjM5",
"organizations_url": "https://api.github.com/users/piotr-dobrogost/orgs",
"received_events_url": "https://api.github.com/users/piotr-dobrogost/received_events",
"repos_url": "https://api.github.com/users/piotr-dobrogost/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/piotr-dobrogost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/piotr-dobrogost/subscriptions",
"type": "User",
"url": "https://api.github.com/users/piotr-dobrogost",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 14 |
2012-11-10T13:28:26Z
|
2021-09-08T19:00:37Z
|
2013-01-06T19:32:08Z
|
NONE
|
resolved
|
Currently sending multipart data is supported by using `files` argument which is ugly from the API point of view and not obvious (see issue #190, SO question [How to send a “multipart/form-data” with requests in python?](http://stackoverflow.com/questions/12385179/).
I'd like to fix it. The following APIs come to mind:
1. Introducing new `transfer_encoding` parameter and encoding `data` according to it's value with fallback to `application/x-www-form-urlencoded`.
2. Introducing new parameter `multipart_data`.
3. Respecting `Transfer-Encoding` header when sending `data` with fallback to `application/x-www-form-urlencoded` if this header is not set.
I like the first option the best. What do you think?
|
{
"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/935/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/935/timeline
| null |
completed
| null | null | false |
[
"It will also work if you use `data` & `files` together, but you're right it is a bit of a pain. Honestly I like 1 and 3, and I prefer 1 to 3 as well, but I absolutely abhor 2.\n",
"I think `files` is a great API. I'm not a fan of all the external contributions that have been made around it though, mostly involving tuples.\n",
"@kennethreitz \nWhat's great about using `files` as the name of the parameter for sending multipart data? Multipart data has nothing to do with sending files. Using (abusing) `files` to send data when there already exists `data` param is illogical. The fact it's wrong comes from the fact that every file is kind of data but data is not always a file. If anything we could expect users to pass files to `data` param but not the other way around like it is now. Sending files may require giving more metadata than sending plain data so it's kind of ok to have additional `files` param for this purpose. But there's no justification for forcing users to pass their data to `files` param if all they want is to send _data_ not files. `Files` param is currently abused to send multipart data only because it happens that uploading files uses multipart transfer encoding in http which is just implementation detail and as such shouldn't be exposed in any way through the API.\n\nAlso, could you elaborate on what's wrong with tuples as `files` value?\n",
"With respect to the tuples I think he means having tuples akin to `('field name', ('different file name', open('file')))` that people tend to use.\n",
"Locally, i made an ugly modif to accept ('field name', (None, open('file'))) which is really minimal (3 lignes in models.py).\nJust to say i'm also interested to be able to send multiparts messages without filename\n\n```\n if fn:\n new_fields.append((k, (fn, fp.read())))\n else:\n # we want no filename at all\n new_fields.append((k, fp.read()))\n```\n\nthis comment is something like a +1 to solve the subject ;)\n",
"To chime in here... I really think we should be able to:\n- Use multipart/mixed optionally\n- Content-Disposition on each part should be optional.\n\nI just wrote this to suit my needs, definitely needs to be humanized: https://gist.github.com/4220756\n\nI like the files way of doing it as it is. I think we just need an options param to specify how the files will be rendered.\n",
"Closing for now. The upcoming generator api will be an excellent one to solve these problems. Ideally, we can include a class for multipart-form, and it's **iter** method will be uploaded automatically.\n",
"Is there any way to send each different 'Content-Type' in the multipart-form data for each single input param\ne.g.\nContent-Type: multipart/form-data;boundary=q235Ht2tTWJhuFmC8sJxbQ7YGU7FwQafcZd8B\nAccept-Charset: utf-8\n\"Content-Disposition: form-data; name=\"creative_id\"\n\"Content-Type: text/plain;charset=ISO-8859-1”\n…\n\"Content-Disposition: form-data; name=“file_role\"\"\n\"Content-Type: text/plain;charset=ISO-8859-1”\n…\n\"Content-Disposition: form-data; name=\"Filename\"\"\n\"Content-Type: text/plain;charset=ISO-8859-1\n\"Content-Disposition: form-data; name=\"file\"; filename=\"advertise_A.png\"\n \"Content-Type: image/x-png\"\n\nFor the whole request, the header will be \nContent-Type: multipart/form-data;\nbut for its params like creative_id and file_role, \nI would like to send Content-Type: text/plain;charset=ISO-8859-1 \nand for the file itself Content-Type: image/x-png\n\nI tried this in two ways, but it doesnt work:\nheaders = {'Content-Type':'text/plain;charset=ISO-8859-1'} \n files = {'file': open(asset_file, 'rb')}\nand then in POST (url, files=files, headers=headers, params=values)\n\nOR\n\nfiles = {'file1': (open(asset_file, 'rb'), 'image/x-png'), 'creative_id': (1727968, 'text/plain;charset=ISO-8859-1'), 'file_role': ('PRIMARY', 'text/plain;charset=ISO-8859-1')}\nand then in POST (url, files=files)\n",
"@vidula-mediamath questions belong on [StackOverflow](https://stackoverflow.com/questions/tagged/python-requests)\n",
"sorry, I will use [StackOverflow](https://stackoverflow.com/questions/tagged/python-requests)\n",
"I would still love to see an implementation of https://github.com/kennethreitz/requests/issues/935#issuecomment-11932921\n",
"@kennethreitz It already exists [here](http://toolbelt.readthedocs.org/en/latest/uploading-data.html#streaming-multipart-data-encoder).\n",
"`\\o/`\n",
"So actually there's a minor difference. The default Encoder doesn't have an `__iter__` API. But it probably should because httplib's read size is 8192 and that can be dreadfully slow. Chunking things allows us to return our own chunk-size (and we could allow the user to override that size if they know better).\n"
] |
https://api.github.com/repos/psf/requests/issues/934
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/934/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/934/comments
|
https://api.github.com/repos/psf/requests/issues/934/events
|
https://github.com/psf/requests/pull/934
| 8,257,729 |
MDExOlB1bGxSZXF1ZXN0Mjk1Mzg1Mw==
| 934 |
adding NTLM authentication support
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1144197?v=4",
"events_url": "https://api.github.com/users/btoews/events{/privacy}",
"followers_url": "https://api.github.com/users/btoews/followers",
"following_url": "https://api.github.com/users/btoews/following{/other_user}",
"gists_url": "https://api.github.com/users/btoews/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/btoews",
"id": 1144197,
"login": "btoews",
"node_id": "MDQ6VXNlcjExNDQxOTc=",
"organizations_url": "https://api.github.com/users/btoews/orgs",
"received_events_url": "https://api.github.com/users/btoews/received_events",
"repos_url": "https://api.github.com/users/btoews/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/btoews/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/btoews/subscriptions",
"type": "User",
"url": "https://api.github.com/users/btoews",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 41 |
2012-11-10T02:09:28Z
|
2021-09-08T23:11:03Z
|
2012-11-16T22:35:18Z
|
CONTRIBUTOR
|
resolved
|
Adding support for NTLM authentication. Relies on https://github.com/bnoordhuis/python-ntlm.
|
{
"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/934/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/934/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/934.diff",
"html_url": "https://github.com/psf/requests/pull/934",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/934.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/934"
}
| true |
[
"This looks rather elegant.\n",
"This works for me unless I attempt to download with prefetch=False, at which point I get 401 - Unauthorized.\n",
"I'm not able to replicate this:\n\n```\n>>> requests.get('http://192.168.172.134:8080/NANS1dT4').headers\n{'connection': 'close', 'content-type': 'text/html', 'www-authenticate': 'NTLM', 'content-length': '0', 'server': 'Apache'}\n>>> requests.get('http://192.168.172.134:8080/NANS1dT4',auth=requests.auth.HttpNtlmAuth('dfghdfgh\\\\sdfg','asdfasdf'))\n<Response [200]>\n>>> requests.get('http://192.168.172.134:8080/NANS1dT4',auth=requests.auth.HttpNtlmAuth('dfghdfgh\\\\sdfg','asdfasdf'),prefetch=True)\n<Response [200]>\n>>> requests.get('http://192.168.172.134:8080/NANS1dT4',auth=requests.auth.HttpNtlmAuth('dfghdfgh\\\\sdfg','asdfasdf'),prefetch=False)\n<Response [200]>\n```\n\nCan you give more details?\n",
"I see a difference in usage that may account for you not being able to reproduce it like that. Possibly an incorrect usage - I don't know the internals of requests well enough yet. I have patched support for this into my copy of the 'easywebdav' library. If you look at the original code (it's short, and my only change from that is to patch in the HttpNtmlAuth) at https://github.com/amnong/easywebdav/blob/master/easywebdav/client.py you'll see that it creates a session, sets the auth on that, and then repeatedly makes direct requests against that session. In your example, you're passing the auth details directly with the request. Could that be the difference?\n",
"That shouldn't be an issue:\n\n```\n>>> s = requests.session()\n>>> s.auth = requests.auth.HttpNtlmAuth('dfghdfgh\\\\sdfg','asdfasdf')\n>>> s.get('http://192.168.172.134:8080/NANS1dT4')\n<Response [200]>\n>>> s.get('http://192.168.172.134:8080/NANS1dT4',prefetch=True)\n<Response [200]>\n>>> s.get('http://192.168.172.134:8080/NANS1dT4',prefetch=False)\n<Response [200]>\n```\n\nI am not using a proper Windows server to test this against because I don't have one. It could be an issue resulting from the janky server I am using... Is there any way you could send the requests through a proxy and paste in the request/response headers from the logs?\n",
"well, looking at your code again, you don't apear to be using the NTLM authentication. It looks like you are trying to do basic auth. \n",
"Yep, that's not my code, I've just patched one of your auth objects into my local copy of that in the hope of getting it working. (A remote server we've been using happily for years has suddenly turned off all auth options except ntlm).\n\nI'm looking into my options for getting some better diagnostics, headers, etc. I don't think a proxy is an option for us.\n",
"gotcha\n",
"Unrelated to this bug, depending on your situation, you could probably get away with something like this for faking NTLM auth http://ntlmaps.sourceforge.net/\n",
"This looks good and it worked perfectly for me. However, the link to the python-ntlm library isn't correct. The most updated source of the library is on [Google Code](http://code.google.com/p/python-ntlm) not Github. A fairly recent version can be fetched from pypi.\n\nWith that said, I have no strong opinion about whether this should be in requests proper or in a separate add-on library.\n",
"Yeah. I just committed some changes to the google code one today. I just\nhate svn so I have been using the GitHub one for testing. Pip one works\ntoo.\n\nI too would be fine with putting it in a separate project if people think\nthat would be better. Pros? Cons?\n\nBen Toews\n\nOn Nov 12, 2012, at 18:45, David Fischer [email protected] wrote:\n\nThis looks good and it worked perfectly for me. However, the link to the\npython-ntlm library isn't correct. The most updated source of the library\nis on Google Code http://code.google.com/p/python-ntlm not Github. A\nfairly recent version can be fetched from pypi.\n\nWith that said, I have no strong opinion about whether this should be in\nrequests proper or in a separate add-on library.\n\n—\nReply to this email directly or view it on\nGitHubhttps://github.com/kennethreitz/requests/pull/934#issuecomment-10311211.\n",
"Use git-svn @mastahyeti ;)\n",
"In the past I would have said let other libraries handle this, but lately there's been a push to include other authentication mechanisms (Kerberos, OAuth, etc) into requests proper even if they have dependencies. If that's the route the library is going then I say include this patch.\n\nThere are no tests that go with this patch, but there aren't any that go with the Kerberos auth either. I'm not sure how easy an authentication handler like this is to test since setting up a simple test server for NTLM auth is probably more complicated than it is worth.\n",
"That has been my feeling also.\n\nBen Toews\n\nOn Nov 14, 2012, at 12:46, David Fischer [email protected] wrote:\n\nIn the past I would have said let other libraries handle this, but lately\nthere's been a push to include other authentication mechanisms (Kerberos,\nOAuth, etc) into requests proper even if they have dependencies. If that's\nthe route the library is going then I say include this patch.\n\nThere are no tests that go with this patch, but there aren't any that go\nwith the Kerberos auth either. I'm not sure how easy an authentication\nhandler like this is to test since setting up a simple test server for NTLM\nauth is probably more complicated than it is worth.\n\n—\nReply to this email directly or view it on\nGitHubhttps://github.com/kennethreitz/requests/pull/934#issuecomment-10378250.\n",
"The lack of tests (both here and on Kerberos) makes me nervous about having them in the mainline build (because they'd have to be supported), but they're absolutely things Requests should be able to do. The problem with leaving them outside the mainline is that their discoverability becomes crappy, and so we'll get lots of people asking here and on SO how to do NTLM auth.\n\nI wonder if we can find some way to have some kind of 'official' set of Requests plugins for the broader range of authentication methods. This would leave these authentication methods under the control of the people who know something about them (i.e. not me =D ), but still make it easy for people to find and use them with Requests. I'm thinking a drop-in plugin, e.g.\n\n```\npip install requests\npip install requests-ntlm\n```\n\nAnd then:\n\n``` Python\nimport requests\nfrom requests_ntlm import NTLMAuth\n\nauth = NTLMAuth('lukasa', 'notmypassword')\nr = requests.get('http://httpbin.org/get', auth=auth)\n```\n\nand so on.\n\nEh, I dunno. Thoughts?\n",
"@Lukasa I'd feel much more comfortable with that myself :)\n",
"Cool. I'll have a think this evening about how best to handle this. Maybe something in the docs.\n\nIn the meantime, @mastahyeti, how do you feel about acting as maintainer of a Requests NTLM authentication package?\n",
"Why not start a requests organization? Maintainers of add Jonsson get their own team. That team alone has push privileges to that package /repo. We could even mirror requests there.\n",
"Sounds like a good idea, @sigmavirus24. I won't look into it until I finish work, but that combined with some documentation might be a good way to keep everything together.\n",
"Documentation makes everything better. Let's just wait on @kennethreitz to make the org if he agrees. \n",
"Interesting. I wouldn't want requests there myself, but everything around it could exist there. \n",
"@kennethreitz Yeah, that occurred to me too. I wouldn't have proposed moving it: it's yours, and besides, we'd break ALL THE LINKS. I then thought about mirroring requests, but that's also a bad idea: there should only be one place on Github where you can go for requests itself.\n\nOtherwise, that might be a decent idea. What auth stuff would we move? (This, obviously, but what else would you like to pull out?)\n",
"GitHub should have org repo aliasing :)\n",
"This for now. OAuth, potentially, but the name is already taken. \n",
"This will align with the current refactor of requests that is underway. I'll create the org.\n\nWe can also move the documentation forks (fr/jp) there.\n\nWe need a logo too :)\n",
"_/me casually deletes out-of-date post._\n\nAwesome, sounds good to me. @mastahyeti, you cool with maintaining a repo there instead of this pull request?\n",
"Created! https://github.com/requests/requests-ntlm\n",
"I'm actually not a fan of the duplicated namespace, but it may be the best option.\n",
"@mastahyeti, you should have push access to the repo now :)\n",
"Yeah, the duplicated namespace is weird. Probably better for `pip` though.\n\nI quite want to pull Kerberos out of `auth.py` too, but I don't want to do it until we can find a maintainer. Might see if I can get myself up to speed on Kerberos, actually.\n"
] |
https://api.github.com/repos/psf/requests/issues/933
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/933/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/933/comments
|
https://api.github.com/repos/psf/requests/issues/933/events
|
https://github.com/psf/requests/pull/933
| 8,257,618 |
MDExOlB1bGxSZXF1ZXN0Mjk1Mzc5Ng==
| 933 |
Adding HTTP NTLM Authentication
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1144197?v=4",
"events_url": "https://api.github.com/users/btoews/events{/privacy}",
"followers_url": "https://api.github.com/users/btoews/followers",
"following_url": "https://api.github.com/users/btoews/following{/other_user}",
"gists_url": "https://api.github.com/users/btoews/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/btoews",
"id": 1144197,
"login": "btoews",
"node_id": "MDQ6VXNlcjExNDQxOTc=",
"organizations_url": "https://api.github.com/users/btoews/orgs",
"received_events_url": "https://api.github.com/users/btoews/received_events",
"repos_url": "https://api.github.com/users/btoews/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/btoews/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/btoews/subscriptions",
"type": "User",
"url": "https://api.github.com/users/btoews",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 1 |
2012-11-10T01:58:17Z
|
2021-09-08T17:05:58Z
|
2012-11-10T01:59:43Z
|
CONTRIBUTOR
|
resolved
|
I hacked together an auth class for doing NTLM authentication. It relies on https://github.com/bnoordhuis/python-ntlm . I'm not quite sure how to write a test for this with httpbin. any thoughts?
in regards to issue #932
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1144197?v=4",
"events_url": "https://api.github.com/users/btoews/events{/privacy}",
"followers_url": "https://api.github.com/users/btoews/followers",
"following_url": "https://api.github.com/users/btoews/following{/other_user}",
"gists_url": "https://api.github.com/users/btoews/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/btoews",
"id": 1144197,
"login": "btoews",
"node_id": "MDQ6VXNlcjExNDQxOTc=",
"organizations_url": "https://api.github.com/users/btoews/orgs",
"received_events_url": "https://api.github.com/users/btoews/received_events",
"repos_url": "https://api.github.com/users/btoews/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/btoews/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/btoews/subscriptions",
"type": "User",
"url": "https://api.github.com/users/btoews",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/933/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/933/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/933.diff",
"html_url": "https://github.com/psf/requests/pull/933",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/933.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/933"
}
| true |
[
"sorry guys. I had an extra commit in there that should have been on another branch. trying again.\n"
] |
https://api.github.com/repos/psf/requests/issues/932
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/932/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/932/comments
|
https://api.github.com/repos/psf/requests/issues/932/events
|
https://github.com/psf/requests/issues/932
| 8,257,594 |
MDU6SXNzdWU4MjU3NTk0
| 932 |
add support for NTLM authentication
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1144197?v=4",
"events_url": "https://api.github.com/users/btoews/events{/privacy}",
"followers_url": "https://api.github.com/users/btoews/followers",
"following_url": "https://api.github.com/users/btoews/following{/other_user}",
"gists_url": "https://api.github.com/users/btoews/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/btoews",
"id": 1144197,
"login": "btoews",
"node_id": "MDQ6VXNlcjExNDQxOTc=",
"organizations_url": "https://api.github.com/users/btoews/orgs",
"received_events_url": "https://api.github.com/users/btoews/received_events",
"repos_url": "https://api.github.com/users/btoews/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/btoews/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/btoews/subscriptions",
"type": "User",
"url": "https://api.github.com/users/btoews",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 0 |
2012-11-10T01:55:12Z
|
2021-09-09T05:30:56Z
|
2012-11-10T02:11:23Z
|
CONTRIBUTOR
|
resolved
|
HTTP NTLM authentication should be supported
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/1144197?v=4",
"events_url": "https://api.github.com/users/btoews/events{/privacy}",
"followers_url": "https://api.github.com/users/btoews/followers",
"following_url": "https://api.github.com/users/btoews/following{/other_user}",
"gists_url": "https://api.github.com/users/btoews/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/btoews",
"id": 1144197,
"login": "btoews",
"node_id": "MDQ6VXNlcjExNDQxOTc=",
"organizations_url": "https://api.github.com/users/btoews/orgs",
"received_events_url": "https://api.github.com/users/btoews/received_events",
"repos_url": "https://api.github.com/users/btoews/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/btoews/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/btoews/subscriptions",
"type": "User",
"url": "https://api.github.com/users/btoews",
"user_view_type": "public"
}
|
{
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/932/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/932/timeline
| null |
completed
| null | null | false |
[] |
https://api.github.com/repos/psf/requests/issues/931
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/931/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/931/comments
|
https://api.github.com/repos/psf/requests/issues/931/events
|
https://github.com/psf/requests/issues/931
| 8,253,483 |
MDU6SXNzdWU4MjUzNDgz
| 931 |
avoid reverse DNS lookup?
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/860372?v=4",
"events_url": "https://api.github.com/users/jric/events{/privacy}",
"followers_url": "https://api.github.com/users/jric/followers",
"following_url": "https://api.github.com/users/jric/following{/other_user}",
"gists_url": "https://api.github.com/users/jric/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jric",
"id": 860372,
"login": "jric",
"node_id": "MDQ6VXNlcjg2MDM3Mg==",
"organizations_url": "https://api.github.com/users/jric/orgs",
"received_events_url": "https://api.github.com/users/jric/received_events",
"repos_url": "https://api.github.com/users/jric/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jric/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jric/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jric",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 7 |
2012-11-09T22:05:04Z
|
2021-09-08T23:06:54Z
|
2012-11-23T20:19:13Z
|
NONE
|
resolved
|
I have a url that I can load instantly in my browser. However, when I load it from Python (I tried urllib2 also), I get about a 5 second delay. The same delay happens if I use curl.
I did a little bit of profiling, and it looks like it's getting hung up in a getaddrinfo() call, which I'm not sure why it needs to make, but I would like to bypass. I can bypass it if I access the url with an IP instead of hostname, but for maintainability, I would rather not do this in the long term.
Wondering if you know why some of these libraries are doing the reverse DNS lookup, and if you would consider providing an option to bypass it?
|
{
"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/931/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/931/timeline
| null |
completed
| null | null | false |
[
"This doesn't sound like a reverse DNS issue. `getaddrinfo()` is a standard DNS resolution function, so if you're using a hostname (i.e. not a raw IP address), you need to make this call to resolve the URL.\n\nIf I had to guess, I'd say your browser implements a DNS cache, so it can avoid the need to resolve the hostname most of the time.\n\nIf this bothers you, you could attempt to implement a DNS cache in your Python code. Probably wouldn't be too hard. =)\n",
"Hmm. Ok. Now I'm confused, because the forward lookup should be very fast, since it comes from my /etc/hosts file, and should not even need to be cached. Anyway, here is the stack trace, in case it's useful\n\n File \"./find_references.py\", line 68, in findExistingRefs\n r = requests.get(url)\n File \"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests-0.13.1-py2.7.egg/requests/api.py\", line 54, in get\n return request('get', url, *_kwargs)\n File \"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests-0.13.1-py2.7.egg/requests/safe_mode.py\", line 37, in wrapped\n return function(method, url, *_kwargs)\n File \"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests-0.13.1-py2.7.egg/requests/api.py\", line 42, in request\n return s.request(method=method, url=url, *_kwargs)\n File \"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests-0.13.1-py2.7.egg/requests/sessions.py\", line 230, in request\n r.send(prefetch=prefetch)\n File \"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests-0.13.1-py2.7.egg/requests/models.py\", line 604, in send\n timeout=self.timeout,\n File \"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests-0.13.1-py2.7.egg/requests/packages/urllib3/connectionpool.py\", line 384, in urlopen\n body=body, headers=headers)\n File \"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests-0.13.1-py2.7.egg/requests/packages/urllib3/connectionpool.py\", line 254, in _make_request\n conn.request(method, url, *_httplib_request_kw)\n File \"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py\", line 958, in request\n self._send_request(method, url, body, headers)\n File \"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py\", line 992, in _send_request\n self.endheaders(body)\n File \"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py\", line 954, in endheaders\n self._send_output(message_body)\n File \"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py\", line 814, in _send_output\n self.send(msg)\n File \"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py\", line 776, in send\n self.connect()\n File \"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py\", line 757, in connect\n self.timeout, self.source_address)\n File \"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py\", line 553, in create_connection\n for res in getaddrinfo(host, port, 0, SOCK_STREAM):\nKeyboardInterrupt\n",
"I had a similar issue a while back with grequests (previously requests.async) as a result of http://code.google.com/p/gevent/issues/detail?id=21 . Aside from that though, I can't see why this should be happening. requests relies on urrlib3->httplib->socket for getaddrinfo. Socket definitely respects /etc/hosts.\n",
"Can you try making the raw socket call yourself? For instance, if I try to lookup the nonexistent domain name `test.lukasa.co.uk`, by calling `socket.getaddrinfo('test.lukasa.co.uk', 'http')`, I timeout unless I put that domain in my hosts file. Can you check whether you can reproduce this behaviour?\n",
"@jric: Is this still a problem?\n",
"Closed for inactivity.\n",
"I just ran into this problem on a new machine. `socket.getaddrinfo` takes several seconds to resolve a name from `/etc/hosts`. I then changed the `/etc/hosts` entries from `127.0.0.1` to `::1` and resolution was instant. It appears `getaddrinfo` is attempting IPv6 lookup _before_ consulting the hosts file for IPv4. FWIW, this isn't a requests bug.\n"
] |
https://api.github.com/repos/psf/requests/issues/930
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/930/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/930/comments
|
https://api.github.com/repos/psf/requests/issues/930/events
|
https://github.com/psf/requests/pull/930
| 8,221,341 |
MDExOlB1bGxSZXF1ZXN0MjkzNjk3NQ==
| 930 |
adding UTF-8 status codes
|
{
"avatar_url": "https://avatars.githubusercontent.com/u/74351?v=4",
"events_url": "https://api.github.com/users/maxcountryman/events{/privacy}",
"followers_url": "https://api.github.com/users/maxcountryman/followers",
"following_url": "https://api.github.com/users/maxcountryman/following{/other_user}",
"gists_url": "https://api.github.com/users/maxcountryman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/maxcountryman",
"id": 74351,
"login": "maxcountryman",
"node_id": "MDQ6VXNlcjc0MzUx",
"organizations_url": "https://api.github.com/users/maxcountryman/orgs",
"received_events_url": "https://api.github.com/users/maxcountryman/received_events",
"repos_url": "https://api.github.com/users/maxcountryman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/maxcountryman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/maxcountryman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/maxcountryman",
"user_view_type": "public"
}
|
[] |
closed
| true | null |
[] | null | 5 |
2012-11-08T22:31:09Z
|
2021-09-08T17:05:59Z
|
2012-11-09T00:24:36Z
|
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/930/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/930/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/930.diff",
"html_url": "https://github.com/psf/requests/pull/930",
"merged_at": "2012-11-09T00:24:36Z",
"patch_url": "https://github.com/psf/requests/pull/930.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/930"
}
| true |
[
"Looks like py2.7 is just going to stall Travis through no fault of your own. :(\n",
"Looks like Travis finally got caught up. :)\n",
"Haha, this is fantastic :)\n",
":sparkles: :cake: :sparkles:\n",
"I'm glad Travis caught up. I thought this was neat and it would suck if it had a failing status because of a faulty clone/box\n"
] |
|
https://api.github.com/repos/psf/requests/issues/929
|
https://api.github.com/repos/psf/requests
|
https://api.github.com/repos/psf/requests/issues/929/labels{/name}
|
https://api.github.com/repos/psf/requests/issues/929/comments
|
https://api.github.com/repos/psf/requests/issues/929/events
|
https://github.com/psf/requests/pull/929
| 8,204,907 |
MDExOlB1bGxSZXF1ZXN0MjkyODc4MA==
| 929 |
! Fixes packaging and installation problems under Python 3.
|
{
"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 | 7 |
2012-11-08T13:59:45Z
|
2014-06-18T21:23:25Z
|
2012-11-15T10:20:28Z
|
NONE
| null |
Long short story, the associated commit aims at fixing #916 by refactoring the setup script and moving dependencies out of the package itself... These are now downloaded from PyPI whenever necessary before installation (via `install_requires`) while keeping compatibility with Python 2 and Python 3 in the same codebase (`chardet` is now resolved via two external requirements file).
The only downside of this is that one cannot import `requests` in `setup.py` (since that would require importing `charder`, which is not available at that time). Thus, the version is repeated both in `setup.py` and `requests/__init__.py`. I'll have a go at that once I find some more time, but for now this seems like acceptable for me.
**Note:** The package's version had been kept as `0.14.1` in the previous release. I decided to amend that to `0.14.2` instead of `0.14.3.dev0` or something like that, since maybe @kennethreitz wants to manage that himself. :-)
| 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/929/reactions"
}
|
https://api.github.com/repos/psf/requests/issues/929/timeline
| null | null | false |
{
"diff_url": "https://github.com/psf/requests/pull/929.diff",
"html_url": "https://github.com/psf/requests/pull/929",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/929.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/929"
}
| true |
[
"Not to be a downer, but I'm fairly certain @kennethreitz wants to keep everything vendored.\n",
"@sigmavirus24: In my opinion, the only scenario where dependencies should be kept vendored would be the case where they'd need to be modified from their original distributions in any way... For everything else there's `pip` with a requirements file or `setuptools`'s `install_requires`. Or am I missing something here?\n",
"Vendoring, like static linking, eliminates a whole class of bugs caused by slightly different behaviour in different versions of a library. As an additional advantage, it means that if there is a bug that appears to be caused by a dependency, the maintainer(s) know exactly what version of the dependency is being used, and they don't have to replicate the environment on someone else's machine. (Speaking from personal experience, this can be a nightmare, especially because 90% of bug reports do not list the versions of the dependency they have installed.)\n\nThere _might_ be an argument for not vendoring chardet, though. I don't have enough familiarity with why chardet was vendored to answer that.\n",
"Well put, @Lukasa. This bug was likely caused by a small accidental change to setup.py\n",
"@Lukasa: Hmm I see... If @kennethreitz then decides to keep the packages vendored I can try to tackle this problem by other means.\n",
"@bmcustodio that is the plan :)\n",
"@kennethreitz: Ok, so I'll have a look at that as soon as possible! :-)\n"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.