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/5183 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5183/labels{/name} | https://api.github.com/repos/psf/requests/issues/5183/comments | https://api.github.com/repos/psf/requests/issues/5183/events | https://github.com/psf/requests/pull/5183 | 487,654,430 | MDExOlB1bGxSZXF1ZXN0MzEyODcxMTY1 | 5,183 | Re-add newline to docstring for proper rendering | {
"avatar_url": "https://avatars.githubusercontent.com/u/7754936?v=4",
"events_url": "https://api.github.com/users/convoliution/events{/privacy}",
"followers_url": "https://api.github.com/users/convoliution/followers",
"following_url": "https://api.github.com/users/convoliution/following{/other_user}",
"gists_url": "https://api.github.com/users/convoliution/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/convoliution",
"id": 7754936,
"login": "convoliution",
"node_id": "MDQ6VXNlcjc3NTQ5MzY=",
"organizations_url": "https://api.github.com/users/convoliution/orgs",
"received_events_url": "https://api.github.com/users/convoliution/received_events",
"repos_url": "https://api.github.com/users/convoliution/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/convoliution/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/convoliution/subscriptions",
"type": "User",
"url": "https://api.github.com/users/convoliution",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2019-08-30T20:16:06Z | 2021-08-30T00:06:35Z | 2019-10-25T02:59:36Z | NONE | resolved | #4987 had [removed the existence of a blank line before a doctest block](https://github.com/psf/requests/pull/4987/files#diff-35c843f55d3e3abf0fca8d08b73bc26cL7), which results in [the documentation for `requests.codes`](https://2.python-requests.org/en/master/api/#status-code-lookup) being improperly rendered:

This PR re-introduces the blank line, which appears to be? suggested by [reST spec](http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#doctest-blocks) and worked for NumPy as well [at some point](https://github.com/numpy/numpy/pull/14085). | {
"avatar_url": "https://avatars.githubusercontent.com/u/7754936?v=4",
"events_url": "https://api.github.com/users/convoliution/events{/privacy}",
"followers_url": "https://api.github.com/users/convoliution/followers",
"following_url": "https://api.github.com/users/convoliution/following{/other_user}",
"gists_url": "https://api.github.com/users/convoliution/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/convoliution",
"id": 7754936,
"login": "convoliution",
"node_id": "MDQ6VXNlcjc3NTQ5MzY=",
"organizations_url": "https://api.github.com/users/convoliution/orgs",
"received_events_url": "https://api.github.com/users/convoliution/received_events",
"repos_url": "https://api.github.com/users/convoliution/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/convoliution/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/convoliution/subscriptions",
"type": "User",
"url": "https://api.github.com/users/convoliution",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5183/reactions"
} | https://api.github.com/repos/psf/requests/issues/5183/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5183.diff",
"html_url": "https://github.com/psf/requests/pull/5183",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5183.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5183"
} | true | [
"Hi @convoliution, would you mind rebasing this onto the current master branch?",
"Hi @nateprewitt!\r\n\r\nIt looks like the problem addressed by this PR has effectively been resolved by someone else, because [the status codes section of the docs](https://requests.kennethreitz.org/en/master/api/#status-code-looku... |
https://api.github.com/repos/psf/requests/issues/5182 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5182/labels{/name} | https://api.github.com/repos/psf/requests/issues/5182/comments | https://api.github.com/repos/psf/requests/issues/5182/events | https://github.com/psf/requests/pull/5182 | 487,639,936 | MDExOlB1bGxSZXF1ZXN0MzEyODU5MzE2 | 5,182 | Python 2.7 comptability | {
"avatar_url": "https://avatars.githubusercontent.com/u/6771947?v=4",
"events_url": "https://api.github.com/users/epenet/events{/privacy}",
"followers_url": "https://api.github.com/users/epenet/followers",
"following_url": "https://api.github.com/users/epenet/following{/other_user}",
"gists_url": "https://api.github.com/users/epenet/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/epenet",
"id": 6771947,
"login": "epenet",
"node_id": "MDQ6VXNlcjY3NzE5NDc=",
"organizations_url": "https://api.github.com/users/epenet/orgs",
"received_events_url": "https://api.github.com/users/epenet/received_events",
"repos_url": "https://api.github.com/users/epenet/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/epenet/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/epenet/subscriptions",
"type": "User",
"url": "https://api.github.com/users/epenet",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2019-08-30T19:33:19Z | 2021-08-30T00:06:42Z | 2019-08-30T19:40:29Z | NONE | resolved | Refs #5175 | {
"avatar_url": "https://avatars.githubusercontent.com/u/6771947?v=4",
"events_url": "https://api.github.com/users/epenet/events{/privacy}",
"followers_url": "https://api.github.com/users/epenet/followers",
"following_url": "https://api.github.com/users/epenet/following{/other_user}",
"gists_url": "https://api.github.com/users/epenet/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/epenet",
"id": 6771947,
"login": "epenet",
"node_id": "MDQ6VXNlcjY3NzE5NDc=",
"organizations_url": "https://api.github.com/users/epenet/orgs",
"received_events_url": "https://api.github.com/users/epenet/received_events",
"repos_url": "https://api.github.com/users/epenet/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/epenet/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/epenet/subscriptions",
"type": "User",
"url": "https://api.github.com/users/epenet",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5182/reactions"
} | https://api.github.com/repos/psf/requests/issues/5182/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5182.diff",
"html_url": "https://github.com/psf/requests/pull/5182",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5182.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5182"
} | true | [
"Duplicate of #5174 "
] |
https://api.github.com/repos/psf/requests/issues/5181 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5181/labels{/name} | https://api.github.com/repos/psf/requests/issues/5181/comments | https://api.github.com/repos/psf/requests/issues/5181/events | https://github.com/psf/requests/issues/5181 | 487,536,978 | MDU6SXNzdWU0ODc1MzY5Nzg= | 5,181 | Documentation says there should be 4 hooks | {
"avatar_url": "https://avatars.githubusercontent.com/u/8445610?v=4",
"events_url": "https://api.github.com/users/v-stickykeys/events{/privacy}",
"followers_url": "https://api.github.com/users/v-stickykeys/followers",
"following_url": "https://api.github.com/users/v-stickykeys/following{/other_user}",
"gists_url": "https://api.github.com/users/v-stickykeys/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/v-stickykeys",
"id": 8445610,
"login": "v-stickykeys",
"node_id": "MDQ6VXNlcjg0NDU2MTA=",
"organizations_url": "https://api.github.com/users/v-stickykeys/orgs",
"received_events_url": "https://api.github.com/users/v-stickykeys/received_events",
"repos_url": "https://api.github.com/users/v-stickykeys/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/v-stickykeys/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/v-stickykeys/subscriptions",
"type": "User",
"url": "https://api.github.com/users/v-stickykeys",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2019-08-30T15:13:10Z | 2021-09-04T00:06:16Z | 2019-08-30T17:02:28Z | NONE | resolved | Documentation says there should be 4 event hooks but there is only 1 in the code.
## Expected Result
4 available hooks per documentation: args, pre_request, post_request, response
https://2.python-requests.org//en/v0.10.6/user/advanced/#event-hooks
## Actual Result
<img width="720" alt="requests_hook_error" src="https://user-images.githubusercontent.com/8445610/64031455-71c58580-cb16-11e9-8108-5125ea54546d.png">
Only 1 valid hook: response
```python
"""
requests.hooks
~~~~~~~~~~~~~~
This module provides the capabilities for the Requests hooks system.
Available hooks:
``response``:
The response generated from a Request.
"""
HOOKS = ['response']
def default_hooks():
return {event: [] for event in HOOKS}
# TODO: response is the only one
```
## Reproduction Steps
```python
import requests
requests.get('<any_url>', hooks=dict(post_request=print_req))
def print_req(request):
print(request)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.7"
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.7.3"
},
"platform": {
"release": "18.6.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "1010103f",
"version": "19.0.0"
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1000213f"
},
"urllib3": {
"version": "1.25.3"
},
"using_pyopenssl": true
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
| {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5181/reactions"
} | https://api.github.com/repos/psf/requests/issues/5181/timeline | null | completed | null | null | false | [
"Hi valmack@, this is a link to the docs from 7 years ago. You’ll find current documentation by looking at version 2.22.0."
] |
https://api.github.com/repos/psf/requests/issues/5180 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5180/labels{/name} | https://api.github.com/repos/psf/requests/issues/5180/comments | https://api.github.com/repos/psf/requests/issues/5180/events | https://github.com/psf/requests/issues/5180 | 487,366,546 | MDU6SXNzdWU0ODczNjY1NDY= | 5,180 | Warning if run single test case using setup.py test | {
"avatar_url": "https://avatars.githubusercontent.com/u/5009485?v=4",
"events_url": "https://api.github.com/users/magus0219/events{/privacy}",
"followers_url": "https://api.github.com/users/magus0219/followers",
"following_url": "https://api.github.com/users/magus0219/following{/other_user}",
"gists_url": "https://api.github.com/users/magus0219/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/magus0219",
"id": 5009485,
"login": "magus0219",
"node_id": "MDQ6VXNlcjUwMDk0ODU=",
"organizations_url": "https://api.github.com/users/magus0219/orgs",
"received_events_url": "https://api.github.com/users/magus0219/received_events",
"repos_url": "https://api.github.com/users/magus0219/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/magus0219/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/magus0219/subscriptions",
"type": "User",
"url": "https://api.github.com/users/magus0219",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 0 | 2019-08-30T08:50:48Z | 2019-08-30T09:46:10Z | null | NONE | null | I want to run single test case by running
`pipenv run python setup.py test -a tests/test_requests.py::TestRequests::test_invalid_url`
## Expected Result
Can see result of single test case
## Actual Result
if pytest=5.1:
```
running test
running egg_info
writing requests.egg-info/PKG-INFO
writing dependency_links to requests.egg-info/dependency_links.txt
writing requirements to requests.egg-info/requires.txt
writing top-level names to requests.egg-info/top_level.txt
reading manifest file 'requests.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'NOTICE'
warning: no files found matching 'requirements.txt'
writing manifest file 'requests.egg-info/SOURCES.txt'
running build_ext
Traceback (most recent call last):
File "setup.py", line 111, in <module>
'Source': 'https://github.com/kennethreitz/requests',
File "/Users/magus0219/Documents/PycharmProjects/requests/venv/lib/python3.7/site-packages/setuptools-40.8.0-py3.7.egg/setuptools/__init__.py", line 145, in setup
File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users/magus0219/Documents/PycharmProjects/requests/venv/lib/python3.7/site-packages/setuptools-40.8.0-py3.7.egg/setuptools/command/test.py", line 228, in run
File "setup.py", line 33, in run_tests
errno = pytest.main(self.pytest_args)
File "/Users/magus0219/Documents/PycharmProjects/requests/venv/lib/python3.7/site-packages/_pytest/config/__init__.py", line 58, in main
config = _prepareconfig(args, plugins)
File "/Users/magus0219/Documents/PycharmProjects/requests/venv/lib/python3.7/site-packages/_pytest/config/__init__.py", line 192, in _prepareconfig
raise TypeError(msg.format(args, type(args)))
TypeError: `args` parameter expected to be a list or tuple of strings, got: 'tests/test_requests.py::TestRequests::test_invalid_url' (type: <class 'str'>)
```
if pytest==3.10 in Pipfile.lock
```
====================================================================================================== warnings summary ======================================================================================================
/Users/magus0219/.local/share/virtualenvs/requests-573Zkhn_/lib/python3.7/site-packages/_pytest/config/__init__.py:194
/Users/magus0219/.local/share/virtualenvs/requests-573Zkhn_/lib/python3.7/site-packages/_pytest/config/__init__.py:194: RemovedInPytest4Warning: passing a string to pytest.main() is deprecated, pass a list of arguments instead.
_issue_config_warning(warning, config=config)
-- Docs: https://docs.pytest.org/en/latest/warnings.html
```
## Reproduction Steps
```sh
pipenv run python setup.py test -a tests/test_requests.py::TestRequests::test_invalid_url
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.7.4"
},
"platform": {
"release": "18.7.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1000213f"
},
"urllib3": {
"version": "1.25.2"
},
"using_pyopenssl": false
}
``` | null | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5180/reactions"
} | https://api.github.com/repos/psf/requests/issues/5180/timeline | null | null | null | null | false | [] |
https://api.github.com/repos/psf/requests/issues/5179 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5179/labels{/name} | https://api.github.com/repos/psf/requests/issues/5179/comments | https://api.github.com/repos/psf/requests/issues/5179/events | https://github.com/psf/requests/pull/5179 | 486,283,008 | MDExOlB1bGxSZXF1ZXN0MzExNzY3MDE5 | 5,179 | HTTPDigestAuth thread fix | {
"avatar_url": "https://avatars.githubusercontent.com/u/6771947?v=4",
"events_url": "https://api.github.com/users/epenet/events{/privacy}",
"followers_url": "https://api.github.com/users/epenet/followers",
"following_url": "https://api.github.com/users/epenet/following{/other_user}",
"gists_url": "https://api.github.com/users/epenet/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/epenet",
"id": 6771947,
"login": "epenet",
"node_id": "MDQ6VXNlcjY3NzE5NDc=",
"organizations_url": "https://api.github.com/users/epenet/orgs",
"received_events_url": "https://api.github.com/users/epenet/received_events",
"repos_url": "https://api.github.com/users/epenet/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/epenet/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/epenet/subscriptions",
"type": "User",
"url": "https://api.github.com/users/epenet",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 0 | 2019-08-28T10:08:56Z | 2022-01-03T15:29:11Z | null | NONE | null | Ensure thread-state is initialised on handle_401
Refs #5178 | 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/5179/reactions"
} | https://api.github.com/repos/psf/requests/issues/5179/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5179.diff",
"html_url": "https://github.com/psf/requests/pull/5179",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5179.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5179"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/5178 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5178/labels{/name} | https://api.github.com/repos/psf/requests/issues/5178/comments | https://api.github.com/repos/psf/requests/issues/5178/events | https://github.com/psf/requests/issues/5178 | 485,992,682 | MDU6SXNzdWU0ODU5OTI2ODI= | 5,178 | HTTPDigestAuth fails from secondary thread | {
"avatar_url": "https://avatars.githubusercontent.com/u/6771947?v=4",
"events_url": "https://api.github.com/users/epenet/events{/privacy}",
"followers_url": "https://api.github.com/users/epenet/followers",
"following_url": "https://api.github.com/users/epenet/following{/other_user}",
"gists_url": "https://api.github.com/users/epenet/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/epenet",
"id": 6771947,
"login": "epenet",
"node_id": "MDQ6VXNlcjY3NzE5NDc=",
"organizations_url": "https://api.github.com/users/epenet/orgs",
"received_events_url": "https://api.github.com/users/epenet/received_events",
"repos_url": "https://api.github.com/users/epenet/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/epenet/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/epenet/subscriptions",
"type": "User",
"url": "https://api.github.com/users/epenet",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 0 | 2019-08-27T19:30:30Z | 2019-08-27T19:30:30Z | null | NONE | null | Hi,
I am looking into this [Home Assistant issue 13524](https://github.com/home-assistant/home-assistant/issues/13524) where a request is prepared once at startup (on an initialisation thread), and then updated at regular interval from a thread pool. This is working fine with HTTPBasicAuth, but failing with HTTPDigestAuth.
Is this a bug? or is this by design? If it is by design, can you help me find a workaround for Home Assistant?
## Expected Result
```
{
"authenticated": true,
"user": "user"
}
```
## Actual Result
```
Traceback (most recent call last):
File ".../python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File ".../python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "test.py", line 8, in do_update
request
File ".../python3.7/site-packages/requests/sessions.py", line 653, in send
r = dispatch_hook('response', hooks, r, **kwargs)
File ".../python3.7/site-packages/requests/hooks.py", line 31, in dispatch_hook
_hook_data = hook(hook_data, **kwargs)
File ".../python3.7/site-packages/requests/auth.py", line 247, in handle_401
if self._thread_local.pos is not None:
AttributeError: '_thread._local' object has no attribute 'pos'
```
## Reproduction Steps
```python
import requests
import threading
def do_update(name, request):
print("do_update %s: starting", name)
with requests.Session() as sess:
response = sess.send(
request
)
print(response.text)
print("do_update %s: finishing", name)
method = 'GET'
resource = 'http://httpbin.org/digest-auth/auth/user/passwd'
auth = requests.auth.HTTPDigestAuth('user', 'passwd')
request = requests.Request(
method, resource, auth=auth
).prepare()
#Works on main thread
do_update("main thread", request)
#Doesn't work on secondary thread
x = threading.Thread(target=do_update, args=("other thread",request,))
x.start()
x.join()
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.7.4"
},
"platform": {
"release": "4.19.57+",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "101000bf"
},
"urllib3": {
"version": "1.25.3"
},
"using_pyopenssl": false
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
| 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/5178/reactions"
} | https://api.github.com/repos/psf/requests/issues/5178/timeline | null | null | null | null | false | [] |
https://api.github.com/repos/psf/requests/issues/5177 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5177/labels{/name} | https://api.github.com/repos/psf/requests/issues/5177/comments | https://api.github.com/repos/psf/requests/issues/5177/events | https://github.com/psf/requests/issues/5177 | 485,962,234 | MDU6SXNzdWU0ODU5NjIyMzQ= | 5,177 | Set "Content-Disposition" header in `file` multipart failed | {
"avatar_url": "https://avatars.githubusercontent.com/u/22146250?v=4",
"events_url": "https://api.github.com/users/WK-GiHu/events{/privacy}",
"followers_url": "https://api.github.com/users/WK-GiHu/followers",
"following_url": "https://api.github.com/users/WK-GiHu/following{/other_user}",
"gists_url": "https://api.github.com/users/WK-GiHu/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/WK-GiHu",
"id": 22146250,
"login": "WK-GiHu",
"node_id": "MDQ6VXNlcjIyMTQ2MjUw",
"organizations_url": "https://api.github.com/users/WK-GiHu/orgs",
"received_events_url": "https://api.github.com/users/WK-GiHu/received_events",
"repos_url": "https://api.github.com/users/WK-GiHu/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/WK-GiHu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/WK-GiHu/subscriptions",
"type": "User",
"url": "https://api.github.com/users/WK-GiHu",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 1 | 2019-08-27T18:23:09Z | 2022-12-05T14:42:52Z | null | NONE | null | Summary.
- Source: [requests/models.py](https://github.com/psf/requests/blob/428f7a275914f60a8f1e76a7d69516d617433d30/requests/models.py)
```
class RequestEncodingMixin(object):
...
def _encode_files(files, data):
...
rf = RequestField(name=k, data=fdata, filename=fn, headers=fh)
rf.make_multipart(content_type=ft)
```
Variable `fh` holdes the 4th tuple item passed from
```
files = {'settings': (filename, io.BytesIO(b'some,data,to,send\nanother,row,to,send\n'),
'app/xml', {'Content-Disposition':'attachment'} )}
```
The `rf.header dict` get set passing `headers=fh` with `'Content-Disposition':....`
Calling `rf.make_multipart(content_type=ft)`, at the next line, only passing the 3trd tuple item.
The method [`make_multipart` - urllib3/fields.py](https://github.com/urllib3/urllib3/blob/ae7f8bbb57e74ffdb327c5e510963a886fa4ed8b/src/urllib3/fields.py) is defined as
```
def make_multipart(
self, content_disposition=None, content_type=None, content_location=None
):
self.headers["Content-Disposition"] = content_disposition or u"form-data"
...
```
which replaces, as `content_disposition` is `None`, the allready set `self.headers["Content-Disposition"]` with the default `u"form-data"`.
## Expected Result
```
--e96a4935b8d5b2355f1da3070faa4b28
Content-Disposition: attachment; name="settings"; filename="settings.xml"
Content-Type: app/xml
some,data,to,send
another,row,to,send
--e96a4935b8d5b2355f1da3070faa4b28--
```
## Actual Result
```
--e96a4935b8d5b2355f1da3070faa4b28
Content-Disposition: form-data; name="settings"; filename="settings.xml"
Content-Type: app/xml
some,data,to,send
another,row,to,send
--e96a4935b8d5b2355f1da3070faa4b28--
```
## Reproduction Steps
```python
import requests
url = 'http://127.0.0.1:8080'
filename = "settings.xml"
files = {'settings': (filename, io.BytesIO(b'some,data,to,send\nanother,row,to,send\n'),
'app/xml', {'Content-Disposition':'attachment'} )}
r = requests.post(url, files=files)
```
## System Information
Tested with Python: 3.5 - urllib3: 1.23 - requests: 2.19.1
## Possible Solution
Pass **all** three parameter explicit to `.make_multipart(...`, e.g.
rf.make_multipart(content_disposition=fh.get('Content-Disposition'),
content_type=ft,
content_location=fh.get('Content-Location')
| 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/5177/reactions"
} | https://api.github.com/repos/psf/requests/issues/5177/timeline | null | null | null | null | false | [
"This isn't documented as intended to work. This it's effectively a feature request and the project is under feature freeze "
] |
https://api.github.com/repos/psf/requests/issues/5176 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5176/labels{/name} | https://api.github.com/repos/psf/requests/issues/5176/comments | https://api.github.com/repos/psf/requests/issues/5176/events | https://github.com/psf/requests/issues/5176 | 485,763,791 | MDU6SXNzdWU0ODU3NjM3OTE= | 5,176 | Why is requests logging a 401 and 200 status code in the same request | {
"avatar_url": "https://avatars.githubusercontent.com/u/12075115?v=4",
"events_url": "https://api.github.com/users/JimFawkes/events{/privacy}",
"followers_url": "https://api.github.com/users/JimFawkes/followers",
"following_url": "https://api.github.com/users/JimFawkes/following{/other_user}",
"gists_url": "https://api.github.com/users/JimFawkes/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JimFawkes",
"id": 12075115,
"login": "JimFawkes",
"node_id": "MDQ6VXNlcjEyMDc1MTE1",
"organizations_url": "https://api.github.com/users/JimFawkes/orgs",
"received_events_url": "https://api.github.com/users/JimFawkes/received_events",
"repos_url": "https://api.github.com/users/JimFawkes/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JimFawkes/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JimFawkes/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JimFawkes",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2019-08-27T11:54:37Z | 2021-09-04T00:06:10Z | 2019-08-30T17:07:26Z | NONE | resolved | I am running the following from the python repl with logs set to DEBUG:
```python
response = requests.get(
url=endpoint_url,
auth=requests.auth.HTTPDigestAuth(username, password),
)
```
This results in:
```
[2019-08-27 13:47:23,361 - DEBUG - connectionpool.py:815] Starting new HTTPS connection (1): my.url.com:port
[2019-08-27 13:47:23,532 - DEBUG - connectionpool.py:396] https://my.url.com:port "GET /some/important/endpoint?$skiptoken='12345' HTTP/1.1" 401 0
[2019-08-27 13:47:24,086 - DEBUG - connectionpool.py:396] https://my.url.com:port "GET /some/important/endpoint?$skiptoken='12345' HTTP/1.1" 200 951999
```
Why am I seeing a 401 response logged before the final 200?
Is there something wrong with the authentication?
In addition to this I sometimes (very rarely) have a situation where the request never returns and only printed the 401 log. What is causing this error.
See also my [stackoverflow](https://stackoverflow.com/questions/57670089/why-is-python-requests-not-terminating-and-why-are-these-seperate-logs-printed) question for more details. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5176/reactions"
} | https://api.github.com/repos/psf/requests/issues/5176/timeline | null | completed | null | null | false | [
"Hi @JimFawkes,\r\n\r\nThe 401 response is part of the way HTTP digest authentication, regardless of the http client (browser, curl, wget, requests, etc.) : the server provides the \"WWW-Authenticate\" header as part of the 401 response, which can then be used to generate and send the hash for the second attempts.\... |
https://api.github.com/repos/psf/requests/issues/5175 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5175/labels{/name} | https://api.github.com/repos/psf/requests/issues/5175/comments | https://api.github.com/repos/psf/requests/issues/5175/events | https://github.com/psf/requests/issues/5175 | 485,009,801 | MDU6SXNzdWU0ODUwMDk4MDE= | 5,175 | python-requests master now broken on Python 2.7 | {
"avatar_url": "https://avatars.githubusercontent.com/u/1710526?v=4",
"events_url": "https://api.github.com/users/sjlongland/events{/privacy}",
"followers_url": "https://api.github.com/users/sjlongland/followers",
"following_url": "https://api.github.com/users/sjlongland/following{/other_user}",
"gists_url": "https://api.github.com/users/sjlongland/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sjlongland",
"id": 1710526,
"login": "sjlongland",
"node_id": "MDQ6VXNlcjE3MTA1MjY=",
"organizations_url": "https://api.github.com/users/sjlongland/orgs",
"received_events_url": "https://api.github.com/users/sjlongland/received_events",
"repos_url": "https://api.github.com/users/sjlongland/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sjlongland/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sjlongland/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sjlongland",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2019-08-26T02:12:32Z | 2021-09-04T00:06:11Z | 2019-09-19T17:17:33Z | NONE | resolved | Summary.
## Expected Result
Working `python-requests`
## Actual Result
```
build 26-Aug-2019 10:21:30 Traceback (most recent call last):
build 26-Aug-2019 10:21:30 File "/usr/bin/widesky-tagset-manager", line 11, in <module>
build 26-Aug-2019 10:21:30 load_entry_point('widesky-toolkit==0.3.0', 'console_scripts', 'widesky-tagset-manager')()
build 26-Aug-2019 10:21:30 File "/usr/lib/python2.7/dist-packages/widesky_toolkit/tagset/tagset_manager.py", line 91, in main
build 26-Aug-2019 10:21:30 ), args)
build 26-Aug-2019 10:21:30 File "/usr/lib/python2.7/dist-packages/widesky_toolkit/tagset/operations/base_op.py", line 28, in perform_op
build 26-Aug-2019 10:21:30 op = cls(connection, args)
build 26-Aug-2019 10:21:30 File "/usr/lib/python2.7/dist-packages/widesky_toolkit/tagset/operations/install_tagset.py", line 29, in __init__
build 26-Aug-2019 10:21:30 super(InstallTagsetOp, self).__init__(connection, args)
build 26-Aug-2019 10:21:30 File "/usr/lib/python2.7/dist-packages/widesky_toolkit/tagset/operations/base_op.py", line 51, in __init__
build 26-Aug-2019 10:21:30 self._repo = TagSetRepository.get_instance(args)
build 26-Aug-2019 10:21:30 File "/usr/lib/python2.7/dist-packages/widesky_toolkit/tagset/repo/repository.py", line 81, in get_instance
build 26-Aug-2019 10:21:30 return implementation(parsed_uri, args)
build 26-Aug-2019 10:21:30 File "/usr/lib/python2.7/dist-packages/widesky_toolkit/tagset/repo/webdav.py", line 45, in __init__
build 26-Aug-2019 10:21:30 verify_ssl=verify, cert=cert)
build 26-Aug-2019 10:21:30 File "/usr/lib/python2.7/dist-packages/easywebdav/__init__.py", line 5, in connect
build 26-Aug-2019 10:21:30 return Client(*args, **kwargs)
build 26-Aug-2019 10:21:30 File "/usr/lib/python2.7/dist-packages/easywebdav/client.py", line 83, in __init__
build 26-Aug-2019 10:21:30 self.session = requests.session()
build 26-Aug-2019 10:21:30 File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 774, in session
build 26-Aug-2019 10:21:30 return Session()
build 26-Aug-2019 10:21:30 File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 422, in __init__
build 26-Aug-2019 10:21:30 super().__init__()
build 26-Aug-2019 10:21:30 TypeError: super() takes at least 1 argument (0 given)
```
## Reproduction Steps
```
stuartl@vk4msl-ws:~$ docker run --rm -ti debian:stretch bash
Unable to find image 'debian:stretch' locally
stretch: Pulling from library/debian
9cc2ad81d40d: Pull complete
Digest: sha256:94a5c04481bb50a4f34ebbb105e39388700202a6e34cb41b9b9afdaca854567c
Status: Downloaded newer image for debian:stretch
root@4f09a4eb7e2a:/# apt-get update && apt-get install -y python-pip git
… wait for package installation…
root@4f09a4eb7e2a:/# pip2 install git+http://github.com/psf/requests.git
Collecting git+http://github.com/psf/requests.git
Cloning http://github.com/psf/requests.git to /tmp/pip-OMHRQ6-build
Collecting certifi>=2017.4.17 (from requests==2.22.0)
Downloading https://files.pythonhosted.org/packages/69/1b/b853c7a9d4f6a6d00749e94eb6f3a041e342a885b87340b79c1ef73e3a78/certifi-2019.6.16-py2.py3-none-any.whl (157kB)
100% |################################| 163kB 320kB/s
Collecting chardet<3.1.0,>=3.0.2 (from requests==2.22.0)
Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
100% |################################| 143kB 315kB/s
Collecting idna<2.9,>=2.5 (from requests==2.22.0)
Downloading https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl (58kB)
100% |################################| 61kB 1.9MB/s
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests==2.22.0)
Downloading https://files.pythonhosted.org/packages/e6/60/247f23a7121ae632d62811ba7f273d0e58972d75e58a94d329d51550a47d/urllib3-1.25.3-py2.py3-none-any.whl (150kB)
100% |################################| 153kB 4.8MB/s
Installing collected packages: certifi, chardet, idna, urllib3, requests
Found existing installation: idna 2.2
Not uninstalling idna at /usr/lib/python2.7/dist-packages, outside environment /usr
Running setup.py install for requests ... done
Successfully installed certifi-2019.6.16 chardet-3.0.4 idna-2.8 requests-2.22.0 urllib3-1.25.3
root@4f09a4eb7e2a:/# python2
Python 2.7.13 (default, Sep 26 2018, 18:42:22)
[GCC 6.3.0 20170516] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> requests.session()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 774, in session
return Session()
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 422, in __init__
super().__init__()
TypeError: super() takes at least 1 argument (0 given)
>>>
```
## System Information
```
root@4f09a4eb7e2a:/# python -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "2.7.13"
},
"platform": {
"release": "4.15.0-55-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "101000bf"
},
"urllib3": {
"version": "1.25.3"
},
"using_pyopenssl": false
}
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5175/reactions"
} | https://api.github.com/repos/psf/requests/issues/5175/timeline | null | completed | null | null | false | [
"This should be resolved with 09fd857. Thanks @sjlongland!"
] |
https://api.github.com/repos/psf/requests/issues/5174 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5174/labels{/name} | https://api.github.com/repos/psf/requests/issues/5174/comments | https://api.github.com/repos/psf/requests/issues/5174/events | https://github.com/psf/requests/pull/5174 | 484,780,150 | MDExOlB1bGxSZXF1ZXN0MzEwNTg0OTQ0 | 5,174 | Fix build - use python 2.7 compatible super() call. | {
"avatar_url": "https://avatars.githubusercontent.com/u/1268088?v=4",
"events_url": "https://api.github.com/users/asherf/events{/privacy}",
"followers_url": "https://api.github.com/users/asherf/followers",
"following_url": "https://api.github.com/users/asherf/following{/other_user}",
"gists_url": "https://api.github.com/users/asherf/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/asherf",
"id": 1268088,
"login": "asherf",
"node_id": "MDQ6VXNlcjEyNjgwODg=",
"organizations_url": "https://api.github.com/users/asherf/orgs",
"received_events_url": "https://api.github.com/users/asherf/received_events",
"repos_url": "https://api.github.com/users/asherf/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/asherf/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/asherf/subscriptions",
"type": "User",
"url": "https://api.github.com/users/asherf",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 6 | 2019-08-24T05:15:09Z | 2021-08-30T00:06:39Z | 2019-09-19T17:18:16Z | NONE | resolved | Issue introduced here: https://github.com/psf/requests/pull/4983/files#diff-28e67177469c0d36b068d68d9f6043bfR425 | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5174/reactions"
} | https://api.github.com/repos/psf/requests/issues/5174/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5174.diff",
"html_url": "https://github.com/psf/requests/pull/5174",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5174.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5174"
} | true | [
"@nateprewitt @kennethreitz friendly ping 🙏",
"@asherf, I think the first parameter should be the base class\r\n```python\r\n super(SessionRedirectMixin, self).__init__()\r\n```\r\nnot the current class\r\n```python\r\n #Invalid\r\n super(Session, self).__init__()\r\n```\r\n\r\nRefs #5175 ",
"> @asher... |
https://api.github.com/repos/psf/requests/issues/5173 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5173/labels{/name} | https://api.github.com/repos/psf/requests/issues/5173/comments | https://api.github.com/repos/psf/requests/issues/5173/events | https://github.com/psf/requests/issues/5173 | 484,681,693 | MDU6SXNzdWU0ODQ2ODE2OTM= | 5,173 | Inconsistent properties of the Response class | {
"avatar_url": "https://avatars.githubusercontent.com/u/16962445?v=4",
"events_url": "https://api.github.com/users/supersaeyan/events{/privacy}",
"followers_url": "https://api.github.com/users/supersaeyan/followers",
"following_url": "https://api.github.com/users/supersaeyan/following{/other_user}",
"gists_url": "https://api.github.com/users/supersaeyan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/supersaeyan",
"id": 16962445,
"login": "supersaeyan",
"node_id": "MDQ6VXNlcjE2OTYyNDQ1",
"organizations_url": "https://api.github.com/users/supersaeyan/orgs",
"received_events_url": "https://api.github.com/users/supersaeyan/received_events",
"repos_url": "https://api.github.com/users/supersaeyan/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/supersaeyan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/supersaeyan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/supersaeyan",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2019-08-23T19:37:47Z | 2021-09-04T00:06:16Z | 2019-08-23T20:21:38Z | NONE | resolved | **Summary.**
A couple of members of the Response class like status_code, encoding, history, reason, cookies are public attributes while text is a property.
The inconsistency is that text is a property, which means by default, it is just a getter(which should be the intended behavior) but end users can set values to status_code and other such attributes since it is a public member of the Response class and would allow setting values.
**## Expected Result**
These members should be immutable
`import requests
In [2]: response = requests.get('https://www.google.com')
In [3]: response.status_code
Out[3]: 200
In [4]: response.headers
Out[4]: {'Date': 'Fri, 23 Aug 2019 18:54:26 GMT', 'Expires': '-1', 'Cache-Control': 'private, max-age=0', 'Content-Type': 'text/html; charset=ISO-8859-1', 'P3P': 'CP="This is not a P3P policy! See g.co/p3phelp for more info."', 'Content-Encoding': 'gzip', 'Server': 'gws', 'X-XSS-Protection': '0', 'X-Frame-Options': 'SAMEORIGIN', 'Set-Cookie': '1P_JAR=2019-08-23-18; expires=Sun, 22-Sep-2019 18:54:26 GMT; path=/; domain=.google.com, NID=188=hbFKD-1Uk27aRwtbI8lFqFNsvMhOGHkCuXy7_rl2pogI2-hR_sV6vV0jgeS4UokUn22ZLFRTaiwZszzo8bPZrdbAYa_jRTFHese7S5YkC8tYU6ltDNyz-zsMk8asR2zmq6kIH2o7Dt8aaKmskx4Ln4D7fJw3Gk0FGMXjW5EKWxg; expires=Sat, 22-Feb-2020 18:54:26 GMT; path=/; domain=.google.com; HttpOnly', 'Alt-Svc': 'quic=":443"; ma=2592000; v="46,43,39"', 'Transfer-Encoding': 'chunked'}
In [5]: response.headers = {} # Should have raised AttributeError "Can't set attribute"
In [6]: response.headers
Out[6]: {}
`
**## Actual Result**
response.headers got set to {}
**## Reproduction Steps**
```python
import requests
response = requests.get('https://www.google.com')
print(response.status_code)
response.status_code = 69
response.status_code = 666
print(response.status_code)
```
**## System Information**
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.7.4"
},
"platform": {
"release": "4.15.0-58-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.21.0"
},
"system_ssl": {
"version": "1010100f"
},
"urllib3": {
"version": "1.24.1"
},
"using_pyopenssl": false
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
| {
"avatar_url": "https://avatars.githubusercontent.com/u/16962445?v=4",
"events_url": "https://api.github.com/users/supersaeyan/events{/privacy}",
"followers_url": "https://api.github.com/users/supersaeyan/followers",
"following_url": "https://api.github.com/users/supersaeyan/following{/other_user}",
"gists_url": "https://api.github.com/users/supersaeyan/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/supersaeyan",
"id": 16962445,
"login": "supersaeyan",
"node_id": "MDQ6VXNlcjE2OTYyNDQ1",
"organizations_url": "https://api.github.com/users/supersaeyan/orgs",
"received_events_url": "https://api.github.com/users/supersaeyan/received_events",
"repos_url": "https://api.github.com/users/supersaeyan/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/supersaeyan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/supersaeyan/subscriptions",
"type": "User",
"url": "https://api.github.com/users/supersaeyan",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5173/reactions"
} | https://api.github.com/repos/psf/requests/issues/5173/timeline | null | completed | null | null | false | [
"I tried converting attributes to properties but setters would be required for different components to set the corresponding values to these properties, which would make them mutable again.",
"One hacky solution would be to create a container class, whose object is returned without setters and the corresponding p... |
https://api.github.com/repos/psf/requests/issues/5172 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5172/labels{/name} | https://api.github.com/repos/psf/requests/issues/5172/comments | https://api.github.com/repos/psf/requests/issues/5172/events | https://github.com/psf/requests/pull/5172 | 483,683,996 | MDExOlB1bGxSZXF1ZXN0MzA5NzE0MTUx | 5,172 | Fix Issue of Ignoring Session-level Settings | {
"avatar_url": "https://avatars.githubusercontent.com/u/11529426?v=4",
"events_url": "https://api.github.com/users/AndTheDaysGoBy/events{/privacy}",
"followers_url": "https://api.github.com/users/AndTheDaysGoBy/followers",
"following_url": "https://api.github.com/users/AndTheDaysGoBy/following{/other_user}",
"gists_url": "https://api.github.com/users/AndTheDaysGoBy/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/AndTheDaysGoBy",
"id": 11529426,
"login": "AndTheDaysGoBy",
"node_id": "MDQ6VXNlcjExNTI5NDI2",
"organizations_url": "https://api.github.com/users/AndTheDaysGoBy/orgs",
"received_events_url": "https://api.github.com/users/AndTheDaysGoBy/received_events",
"repos_url": "https://api.github.com/users/AndTheDaysGoBy/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/AndTheDaysGoBy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/AndTheDaysGoBy/subscriptions",
"type": "User",
"url": "https://api.github.com/users/AndTheDaysGoBy",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 11 | 2019-08-21T22:36:53Z | 2022-01-03T15:29:17Z | null | NONE | null | A re-write of https://github.com/psf/requests/pull/4935
Addresses: https://github.com/psf/requests/issues/4938
and perhaps others.
In short, there are three types of values: the instance values (e.g. those passed in via the `get(...)`, `request(...)`, etc.), the session values (e.g. those set for the session such as `s.verify = "/some/cert"`), and system or environment level values (e.g. the environment variable for the CA_BUNDLE that, at times, becomes the value for the verify flag).
Working with @sorech02, we determined that the best course of action was to just move the session level merging before the environment merging. I.e., the current flow is as follows: one of the simple request calls is made, e.g. `request`, `get`, `delete`, etc., then, the `merge_environment_settings` method is called wherein environment values are merged in (e.g. the CA_BUNDLE value) and then the session level settings are merged in via the `merge_settings` calls in `merge_environment_settings`.
This is too late because, by default, trust_env is set to True, which will result in the `verify` value passed into the session merging to not be none. One solution is to make sure you set trust_env to False before using the verify flag with a custom certificate, but we deemed this to only be a work around.
The true fix, as described above, is to ensure that the settings which are constructed give the proper precedence to the values given. I.e. passed > session > environment.
We were forced to leave the `setdefaults` (which effectively reapply the session values if there are no values set) in the `def send` alone because, at times, one might use `send` itself when constructing prepared requests (i.e. not via `request`, `get`, etc.). In which case, the function must still ensure to use the session level settings. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5172/reactions"
} | https://api.github.com/repos/psf/requests/issues/5172/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5172.diff",
"html_url": "https://github.com/psf/requests/pull/5172",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5172.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5172"
} | true | [
"Sadly, running on my machine, the unit tests pass. I would hope someone else could attempt to run the tests of this branch and hopefully replicate the results Travis has.\r\n\r\nEdit: managed to recreate on a different machine. Although, oddly enough, that has 2 failing instead of one.",
"The Travis CI passes fo... |
https://api.github.com/repos/psf/requests/issues/5171 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5171/labels{/name} | https://api.github.com/repos/psf/requests/issues/5171/comments | https://api.github.com/repos/psf/requests/issues/5171/events | https://github.com/psf/requests/pull/5171 | 482,987,609 | MDExOlB1bGxSZXF1ZXN0MzA5MTUzNTg0 | 5,171 | Fix typo | {
"avatar_url": "https://avatars.githubusercontent.com/u/11958253?v=4",
"events_url": "https://api.github.com/users/MFStapert/events{/privacy}",
"followers_url": "https://api.github.com/users/MFStapert/followers",
"following_url": "https://api.github.com/users/MFStapert/following{/other_user}",
"gists_url": "https://api.github.com/users/MFStapert/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/MFStapert",
"id": 11958253,
"login": "MFStapert",
"node_id": "MDQ6VXNlcjExOTU4MjUz",
"organizations_url": "https://api.github.com/users/MFStapert/orgs",
"received_events_url": "https://api.github.com/users/MFStapert/received_events",
"repos_url": "https://api.github.com/users/MFStapert/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/MFStapert/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/MFStapert/subscriptions",
"type": "User",
"url": "https://api.github.com/users/MFStapert",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2019-08-20T17:26:24Z | 2021-08-30T00:06:43Z | 2019-08-20T17:28:49Z | NONE | resolved | No more organicly grass fed requests :< ? | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5171/reactions"
} | https://api.github.com/repos/psf/requests/issues/5171/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5171.diff",
"html_url": "https://github.com/psf/requests/pull/5171",
"merged_at": "2019-08-20T17:28:49Z",
"patch_url": "https://github.com/psf/requests/pull/5171.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5171"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/5170 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5170/labels{/name} | https://api.github.com/repos/psf/requests/issues/5170/comments | https://api.github.com/repos/psf/requests/issues/5170/events | https://github.com/psf/requests/issues/5170 | 482,732,606 | MDU6SXNzdWU0ODI3MzI2MDY= | 5,170 | How to parse blank to %20, not + ? | {
"avatar_url": "https://avatars.githubusercontent.com/u/22906174?v=4",
"events_url": "https://api.github.com/users/JFRabbit/events{/privacy}",
"followers_url": "https://api.github.com/users/JFRabbit/followers",
"following_url": "https://api.github.com/users/JFRabbit/following{/other_user}",
"gists_url": "https://api.github.com/users/JFRabbit/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/JFRabbit",
"id": 22906174,
"login": "JFRabbit",
"node_id": "MDQ6VXNlcjIyOTA2MTc0",
"organizations_url": "https://api.github.com/users/JFRabbit/orgs",
"received_events_url": "https://api.github.com/users/JFRabbit/received_events",
"repos_url": "https://api.github.com/users/JFRabbit/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/JFRabbit/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JFRabbit/subscriptions",
"type": "User",
"url": "https://api.github.com/users/JFRabbit",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 7 | 2019-08-20T08:58:17Z | 2021-10-12T01:23:05Z | 2021-07-14T00:26:59Z | NONE | resolved | If http param contains blank, how to parse blank to %20, not + ?
```
import requests
param = {
"sql": "project = 'foo' and name = 'bar'"
}
res = requests.get(
url='http://xxxx',
params=param
)
print(res.url)
# actual http://xxxx/?sql=project+%3D+%27foo%27+and+name+%3D+%27bar%27
# expect http://xxxx/?sql=project%20%3D%20%27foo%27%20and%20name%20%3D%20%27bar%27
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 1,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/5170/reactions"
} | https://api.github.com/repos/psf/requests/issues/5170/timeline | null | completed | null | null | false | [
"A quick dirty way to achieve that :\r\n```\r\nfor x in param:\r\n param[x] = param[x].replace(\" \",\"%20\")\r\n```\r\n\r\n'+' or '%20', It shouldn't be an issue for you anyways\r\n",
"As far as I can work out, requests uses [urllib.parse.urlencode](https://docs.python.org/3/library/urllib.parse.html#urllib.... |
https://api.github.com/repos/psf/requests/issues/5169 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5169/labels{/name} | https://api.github.com/repos/psf/requests/issues/5169/comments | https://api.github.com/repos/psf/requests/issues/5169/events | https://github.com/psf/requests/issues/5169 | 482,650,850 | MDU6SXNzdWU0ODI2NTA4NTA= | 5,169 | SSL error ~5 times, then success ... any idea why? | {
"avatar_url": "https://avatars.githubusercontent.com/u/9354539?v=4",
"events_url": "https://api.github.com/users/acu192/events{/privacy}",
"followers_url": "https://api.github.com/users/acu192/followers",
"following_url": "https://api.github.com/users/acu192/following{/other_user}",
"gists_url": "https://api.github.com/users/acu192/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/acu192",
"id": 9354539,
"login": "acu192",
"node_id": "MDQ6VXNlcjkzNTQ1Mzk=",
"organizations_url": "https://api.github.com/users/acu192/orgs",
"received_events_url": "https://api.github.com/users/acu192/received_events",
"repos_url": "https://api.github.com/users/acu192/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/acu192/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/acu192/subscriptions",
"type": "User",
"url": "https://api.github.com/users/acu192",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 6 | 2019-08-20T05:26:36Z | 2022-03-29T19:00:32Z | 2021-12-29T18:12:39Z | NONE | resolved | Using requests 2.19.1; python 3.6; running on raspberry pi
I have a script to run on-boot and connect to my HTTPS server (certificate is Let's Encrypt). My script will continually attempt to connect until it is successful.
I often see several CERTIFICATE_VERIFY_FAILED in the logs before, suddenly, it connects just fine!
Any ideas why those CERTIFICATE_VERIFY_FAILED are thrown several times (like 3-10 times, attempts are made once every ~2 seconds), until finally it connects just fine? | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5169/reactions"
} | https://api.github.com/repos/psf/requests/issues/5169/timeline | null | completed | null | null | false | [
"Just a wild guess, maybe certificate store is made available in later boot stages?",
"Yeah I was looking for certificate caches, but I never found any. The `requests` library doesn't seem to cache them, and neither does `urllib3` as far as I could find.\r\n\r\nRaspbian/Debian stores root certificates in `/etc/ss... |
https://api.github.com/repos/psf/requests/issues/5168 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5168/labels{/name} | https://api.github.com/repos/psf/requests/issues/5168/comments | https://api.github.com/repos/psf/requests/issues/5168/events | https://github.com/psf/requests/issues/5168 | 482,452,117 | MDU6SXNzdWU0ODI0NTIxMTc= | 5,168 | urllib3.connection.VerifiedHTTPSConnection - not able to authenticate the company webpage | {
"avatar_url": "https://avatars.githubusercontent.com/u/6632016?v=4",
"events_url": "https://api.github.com/users/goldi28/events{/privacy}",
"followers_url": "https://api.github.com/users/goldi28/followers",
"following_url": "https://api.github.com/users/goldi28/following{/other_user}",
"gists_url": "https://api.github.com/users/goldi28/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/goldi28",
"id": 6632016,
"login": "goldi28",
"node_id": "MDQ6VXNlcjY2MzIwMTY=",
"organizations_url": "https://api.github.com/users/goldi28/orgs",
"received_events_url": "https://api.github.com/users/goldi28/received_events",
"repos_url": "https://api.github.com/users/goldi28/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/goldi28/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/goldi28/subscriptions",
"type": "User",
"url": "https://api.github.com/users/goldi28",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2019-08-19T18:06:55Z | 2021-09-02T00:07:30Z | 2020-02-01T01:53:46Z | NONE | resolved | I am trying to do a basic authentication using the code
import requests
from requests.auth import HTTPBasicAuth
import csv
import urllib3
urllib3.disable_warnings()
r = requests.get('https://partnermarketplace-qa-adm.dmzmo.xyz.corp/export/Orders_Entries.csv',stream = True , verify = False ,auth=('bwp', '00k'))
But I am getting the below error:

The same code works on my friend's anaconda but I am getting the issue - not sure if it has something to do with proxy.
Please help
| {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5168/reactions"
} | https://api.github.com/repos/psf/requests/issues/5168/timeline | null | completed | null | null | false | [
"Hi @goldi28, \r\n\r\nThis appears to be a request for help with your network and DNS configurations. This issue tracker is intended for reporting defects in Requests. Please open a question on Stackoverflow if you need further assistance. Thanks!"
] |
https://api.github.com/repos/psf/requests/issues/5167 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5167/labels{/name} | https://api.github.com/repos/psf/requests/issues/5167/comments | https://api.github.com/repos/psf/requests/issues/5167/events | https://github.com/psf/requests/pull/5167 | 482,416,861 | MDExOlB1bGxSZXF1ZXN0MzA4Njk0NTU2 | 5,167 | [IMPROVEMENT] Update monthly download count | {
"avatar_url": "https://avatars.githubusercontent.com/u/27063113?v=4",
"events_url": "https://api.github.com/users/aadibajpai/events{/privacy}",
"followers_url": "https://api.github.com/users/aadibajpai/followers",
"following_url": "https://api.github.com/users/aadibajpai/following{/other_user}",
"gists_url": "https://api.github.com/users/aadibajpai/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/aadibajpai",
"id": 27063113,
"login": "aadibajpai",
"node_id": "MDQ6VXNlcjI3MDYzMTEz",
"organizations_url": "https://api.github.com/users/aadibajpai/orgs",
"received_events_url": "https://api.github.com/users/aadibajpai/received_events",
"repos_url": "https://api.github.com/users/aadibajpai/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/aadibajpai/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/aadibajpai/subscriptions",
"type": "User",
"url": "https://api.github.com/users/aadibajpai",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2019-08-19T16:45:59Z | 2021-08-30T00:06:46Z | 2019-08-19T17:54:32Z | NONE | resolved | Requests pulls over 50+ million downloads per month while the old figure is at 11.
https://pepy.tech/project/requests | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5167/reactions"
} | https://api.github.com/repos/psf/requests/issues/5167/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5167.diff",
"html_url": "https://github.com/psf/requests/pull/5167",
"merged_at": "2019-08-19T17:54:32Z",
"patch_url": "https://github.com/psf/requests/pull/5167.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5167"
} | true | [
"> Hi @aadibajpai, thanks for the update :)\r\n\r\nno problem, what do you think about a badge in the README too?\r\n\r\nLike this [](https://pepy.tech/project/requests).",
"@aadibajpai i love that!",
"@kennethreitz great!"
] |
https://api.github.com/repos/psf/requests/issues/5166 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5166/labels{/name} | https://api.github.com/repos/psf/requests/issues/5166/comments | https://api.github.com/repos/psf/requests/issues/5166/events | https://github.com/psf/requests/issues/5166 | 482,264,376 | MDU6SXNzdWU0ODIyNjQzNzY= | 5,166 | SSLError when accessing *.dm5cdn.com | {
"avatar_url": "https://avatars.githubusercontent.com/u/1324510?v=4",
"events_url": "https://api.github.com/users/eight04/events{/privacy}",
"followers_url": "https://api.github.com/users/eight04/followers",
"following_url": "https://api.github.com/users/eight04/following{/other_user}",
"gists_url": "https://api.github.com/users/eight04/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/eight04",
"id": 1324510,
"login": "eight04",
"node_id": "MDQ6VXNlcjEzMjQ1MTA=",
"organizations_url": "https://api.github.com/users/eight04/orgs",
"received_events_url": "https://api.github.com/users/eight04/received_events",
"repos_url": "https://api.github.com/users/eight04/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/eight04/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/eight04/subscriptions",
"type": "User",
"url": "https://api.github.com/users/eight04",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2019-08-19T11:46:25Z | 2021-09-02T00:07:26Z | 2020-02-10T06:06:27Z | NONE | resolved | I got an `SSLError` when accessing `*.dm5cdn.com` while it works fine with `urllib.request.urlopen`. Here is an example:
```py
URL = "https://manhua1033-104-250-150-12.cdndm5.com/"
import urllib.request
try:
urllib.request.urlopen(URL)
except Exception as err:
print(err)
import requests
try:
requests.get(URL)
except Exception as err:
print(err)
```
## Expected Result
They should produce the same result.
## Actual Result
```
HTTP Error 403: Forbidden
HTTPSConnectionPool(host='manhua1033-104-250-150-12.cdndm5.com', port=443): Max
retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, '[S
SL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local is
suer certificate (_ssl.c:1076)')))
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.7.4"
},
"platform": {
"release": "7",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1010103f"
},
"urllib3": {
"version": "1.25.3"
},
"using_pyopenssl": false
}
```
After some searching, I found that [this solution](https://stackoverflow.com/questions/42981429/ssl-failure-on-windows-using-python-requests) works for me, but I still wonder why it failed. Does it mean that `certifi` needs to be updated? I do not know how SSL works.
Python x64 v3.7.4
certifi 2019.6.16 | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5166/reactions"
} | https://api.github.com/repos/psf/requests/issues/5166/timeline | null | completed | null | null | false | [
"The server in question is issuing an unverifiable local cert which is why we're raising an exception. The reason urllib works is because it isn't do any checks to validate the connection is secure."
] |
https://api.github.com/repos/psf/requests/issues/5165 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5165/labels{/name} | https://api.github.com/repos/psf/requests/issues/5165/comments | https://api.github.com/repos/psf/requests/issues/5165/events | https://github.com/psf/requests/issues/5165 | 481,857,213 | MDU6SXNzdWU0ODE4NTcyMTM= | 5,165 | Missing `?` and extra `&` in the `response.url` when getting from a url of double http | {
"avatar_url": "https://avatars.githubusercontent.com/u/7480279?v=4",
"events_url": "https://api.github.com/users/KenTsui/events{/privacy}",
"followers_url": "https://api.github.com/users/KenTsui/followers",
"following_url": "https://api.github.com/users/KenTsui/following{/other_user}",
"gists_url": "https://api.github.com/users/KenTsui/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/KenTsui",
"id": 7480279,
"login": "KenTsui",
"node_id": "MDQ6VXNlcjc0ODAyNzk=",
"organizations_url": "https://api.github.com/users/KenTsui/orgs",
"received_events_url": "https://api.github.com/users/KenTsui/received_events",
"repos_url": "https://api.github.com/users/KenTsui/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/KenTsui/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/KenTsui/subscriptions",
"type": "User",
"url": "https://api.github.com/users/KenTsui",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2019-08-17T07:07:49Z | 2021-09-04T00:06:17Z | 2019-08-19T15:55:52Z | NONE | resolved | The url of the following response is wrong.
```
baseurl = "http://www.google.com/?https//www.helloworld.com/query"
r = requests.get(url, params = {'abc':"1"})
print(r.url)
```
## Expected Result
'http://www.google.com/?https//www.helloworld.com/query?abc=1'
## Actual Result
Missing `?` behind the string `query` and extra `&` behind the string `query`
'http://www.google.com/?https//www.helloworld.com/query&abc=1'
## Reproduction Steps
```python
import requests
baseurl = "http://www.google.com/?https//www.helloworld.com/query"
r = requests.get(url, params = {'abc':"1"})
print(r.url)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.7.4"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1010103f"
},
"urllib3": {
"version": "1.25.3"
},
"using_pyopenssl": false
}
``` | {
"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/5165/reactions"
} | https://api.github.com/repos/psf/requests/issues/5165/timeline | null | completed | null | null | false | [
"i believe this is expected behavior. thanks for the writeup, though!",
"> i believe this is expected behavior. thanks for the writeup, though!\r\n\r\nwhy is it an expected behavior? I am not familiar with web and html. Can you provide me some resources to read on this topic? Thanks."
] |
https://api.github.com/repos/psf/requests/issues/5164 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5164/labels{/name} | https://api.github.com/repos/psf/requests/issues/5164/comments | https://api.github.com/repos/psf/requests/issues/5164/events | https://github.com/psf/requests/pull/5164 | 481,405,827 | MDExOlB1bGxSZXF1ZXN0MzA3OTEyNDQ0 | 5,164 | fix codecov logo in readme | {
"avatar_url": "https://avatars.githubusercontent.com/u/1004789?v=4",
"events_url": "https://api.github.com/users/dschaller/events{/privacy}",
"followers_url": "https://api.github.com/users/dschaller/followers",
"following_url": "https://api.github.com/users/dschaller/following{/other_user}",
"gists_url": "https://api.github.com/users/dschaller/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dschaller",
"id": 1004789,
"login": "dschaller",
"node_id": "MDQ6VXNlcjEwMDQ3ODk=",
"organizations_url": "https://api.github.com/users/dschaller/orgs",
"received_events_url": "https://api.github.com/users/dschaller/received_events",
"repos_url": "https://api.github.com/users/dschaller/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dschaller/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dschaller/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dschaller",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2019-08-16T01:45:56Z | 2021-08-31T00:07:07Z | 2019-08-19T17:55:41Z | CONTRIBUTOR | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5164/reactions"
} | https://api.github.com/repos/psf/requests/issues/5164/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5164.diff",
"html_url": "https://github.com/psf/requests/pull/5164",
"merged_at": "2019-08-19T17:55:41Z",
"patch_url": "https://github.com/psf/requests/pull/5164.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5164"
} | true | [] | |
https://api.github.com/repos/psf/requests/issues/5163 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5163/labels{/name} | https://api.github.com/repos/psf/requests/issues/5163/comments | https://api.github.com/repos/psf/requests/issues/5163/events | https://github.com/psf/requests/issues/5163 | 480,746,986 | MDU6SXNzdWU0ODA3NDY5ODY= | 5,163 | Meta: website bugs - sidebar links to https://python-requests.org and http://www.git-legit.org/ broken | {
"avatar_url": "https://avatars.githubusercontent.com/u/46443882?v=4",
"events_url": "https://api.github.com/users/stephen-dexda/events{/privacy}",
"followers_url": "https://api.github.com/users/stephen-dexda/followers",
"following_url": "https://api.github.com/users/stephen-dexda/following{/other_user}",
"gists_url": "https://api.github.com/users/stephen-dexda/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/stephen-dexda",
"id": 46443882,
"login": "stephen-dexda",
"node_id": "MDQ6VXNlcjQ2NDQzODgy",
"organizations_url": "https://api.github.com/users/stephen-dexda/orgs",
"received_events_url": "https://api.github.com/users/stephen-dexda/received_events",
"repos_url": "https://api.github.com/users/stephen-dexda/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/stephen-dexda/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/stephen-dexda/subscriptions",
"type": "User",
"url": "https://api.github.com/users/stephen-dexda",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2019-08-14T15:31:21Z | 2021-09-04T00:06:19Z | 2019-08-20T04:40:04Z | NONE | resolved | The following pages all link to http://www.git-legit.org/, which at the time of reporting returns a Turkish gambling spam page:
* https://html.python-requests.org
* https://2.python-requests.org
* https://3.python-requests.org
Additionally, https://html.python-requests.org links to https://python-requests.org (note HTTPS), which returns an `SSL_ERROR_INTERNAL_ERROR_ALERT` error page in Firefox, and `curl: (35) error:14004438:SSL routines:CONNECT_CR_SRVR_HELLO:tlsv1 alert internal error` via cURL. See also https://github.com/psf/requests/issues/5138, where the Firefox error was mentioned. | {
"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/5163/reactions"
} | https://api.github.com/repos/psf/requests/issues/5163/timeline | null | completed | null | null | false | [
"send a PR!",
"The absence of a PR doesn't make this an invalid or fixed bug - please re-open."
] |
https://api.github.com/repos/psf/requests/issues/5162 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5162/labels{/name} | https://api.github.com/repos/psf/requests/issues/5162/comments | https://api.github.com/repos/psf/requests/issues/5162/events | https://github.com/psf/requests/issues/5162 | 480,694,119 | MDU6SXNzdWU0ODA2OTQxMTk= | 5,162 | requests.ConnectionError inherits only from OSError | {
"avatar_url": "https://avatars.githubusercontent.com/u/25378062?v=4",
"events_url": "https://api.github.com/users/Q-back/events{/privacy}",
"followers_url": "https://api.github.com/users/Q-back/followers",
"following_url": "https://api.github.com/users/Q-back/following{/other_user}",
"gists_url": "https://api.github.com/users/Q-back/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Q-back",
"id": 25378062,
"login": "Q-back",
"node_id": "MDQ6VXNlcjI1Mzc4MDYy",
"organizations_url": "https://api.github.com/users/Q-back/orgs",
"received_events_url": "https://api.github.com/users/Q-back/received_events",
"repos_url": "https://api.github.com/users/Q-back/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Q-back/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Q-back/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Q-back",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 0 | 2019-08-14T13:56:16Z | 2019-08-14T13:56:16Z | null | NONE | null | `requests.ConnectionError` doesn't inherit from ConnectionError from std, which is confusing.
## Expected Result
```
(Pdb++) inspect.getmro(ConnectionError)
(<class 'requests.exceptions.ConnectionError'>, <class 'requests.exceptions.RequestException'>, <class 'ConnectionError'>, <class 'OSError'>, <class 'Exception'>, <class 'BaseException'>, <class 'object'>)
```
## Actual Result
```
(Pdb++) inspect.getmro(ConnectionError)
(<class 'requests.exceptions.ConnectionError'>, <class 'requests.exceptions.RequestException'>, <class 'OSError'>, <class 'Exception'>, <class 'BaseException'>, <class 'object'>)
```
## Reproduction Steps
```python
import requests
inspect.getmro(requests.ConnectionError)
issubclass(requests.ConnectionError, ConnectionError)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.7.2"
},
"platform": {
"release": "18.2.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1000212f"
},
"urllib3": {
"version": "1.25.3"
},
"using_pyopenssl": false
}
``` | null | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5162/reactions"
} | https://api.github.com/repos/psf/requests/issues/5162/timeline | null | null | null | null | false | [] |
https://api.github.com/repos/psf/requests/issues/5161 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5161/labels{/name} | https://api.github.com/repos/psf/requests/issues/5161/comments | https://api.github.com/repos/psf/requests/issues/5161/events | https://github.com/psf/requests/issues/5161 | 480,500,956 | MDU6SXNzdWU0ODA1MDA5NTY= | 5,161 | can not use html charset decoding | {
"avatar_url": "https://avatars.githubusercontent.com/u/18223385?v=4",
"events_url": "https://api.github.com/users/hktalent/events{/privacy}",
"followers_url": "https://api.github.com/users/hktalent/followers",
"following_url": "https://api.github.com/users/hktalent/following{/other_user}",
"gists_url": "https://api.github.com/users/hktalent/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hktalent",
"id": 18223385,
"login": "hktalent",
"node_id": "MDQ6VXNlcjE4MjIzMzg1",
"organizations_url": "https://api.github.com/users/hktalent/orgs",
"received_events_url": "https://api.github.com/users/hktalent/received_events",
"repos_url": "https://api.github.com/users/hktalent/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hktalent/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hktalent/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hktalent",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2019-08-14T06:19:58Z | 2021-11-10T08:00:29Z | 2021-08-12T07:11:05Z | NONE | resolved | ### response header:
'Content-Type': 'text/html'
no charset, but in html have:
```
print(r.encoding)
ISO-8859-1
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
```
### code
```
import requests # pip install requests
r = requests.get(url)
unicode_str = r.text # may use `chardet` to auto-detect encoding
display:
'title': 'ÉÂÎ÷Ê¡ÈËÁ¦×ÊÔ´ºÍÉç»á±£ÕÏÌü',
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5161/reactions"
} | https://api.github.com/repos/psf/requests/issues/5161/timeline | null | completed | null | null | false | [
"Requests doesn't parse HTML or the contents of the body. If the information isn't specified in the Content-Type, we'll default back to ISO-8859-1. You are free to update the encoding as needed by setting `r.encoding` before calling text, you may also be interested in the util function `get_encodings_from_content`.... |
https://api.github.com/repos/psf/requests/issues/5160 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5160/labels{/name} | https://api.github.com/repos/psf/requests/issues/5160/comments | https://api.github.com/repos/psf/requests/issues/5160/events | https://github.com/psf/requests/pull/5160 | 480,389,696 | MDExOlB1bGxSZXF1ZXN0MzA3MDk2Mjc3 | 5,160 | Updated references to previous requests/requests GitHub path | {
"avatar_url": "https://avatars.githubusercontent.com/u/18350092?v=4",
"events_url": "https://api.github.com/users/nihaals/events{/privacy}",
"followers_url": "https://api.github.com/users/nihaals/followers",
"following_url": "https://api.github.com/users/nihaals/following{/other_user}",
"gists_url": "https://api.github.com/users/nihaals/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nihaals",
"id": 18350092,
"login": "nihaals",
"node_id": "MDQ6VXNlcjE4MzUwMDky",
"organizations_url": "https://api.github.com/users/nihaals/orgs",
"received_events_url": "https://api.github.com/users/nihaals/received_events",
"repos_url": "https://api.github.com/users/nihaals/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nihaals/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nihaals/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nihaals",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2019-08-13T22:00:51Z | 2021-08-31T00:07:06Z | 2019-08-19T22:57:16Z | CONTRIBUTOR | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5160/reactions"
} | https://api.github.com/repos/psf/requests/issues/5160/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5160.diff",
"html_url": "https://github.com/psf/requests/pull/5160",
"merged_at": "2019-08-19T22:57:16Z",
"patch_url": "https://github.com/psf/requests/pull/5160.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5160"
} | true | [
"Would you mind rebasing your changes onto the current branch?",
"Done",
"Thanks again!"
] | |
https://api.github.com/repos/psf/requests/issues/5159 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5159/labels{/name} | https://api.github.com/repos/psf/requests/issues/5159/comments | https://api.github.com/repos/psf/requests/issues/5159/events | https://github.com/psf/requests/issues/5159 | 479,984,241 | MDU6SXNzdWU0Nzk5ODQyNDE= | 5,159 | how decode gzip response chunk stream | {
"avatar_url": "https://avatars.githubusercontent.com/u/18223385?v=4",
"events_url": "https://api.github.com/users/hktalent/events{/privacy}",
"followers_url": "https://api.github.com/users/hktalent/followers",
"following_url": "https://api.github.com/users/hktalent/following{/other_user}",
"gists_url": "https://api.github.com/users/hktalent/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hktalent",
"id": 18223385,
"login": "hktalent",
"node_id": "MDQ6VXNlcjE4MjIzMzg1",
"organizations_url": "https://api.github.com/users/hktalent/orgs",
"received_events_url": "https://api.github.com/users/hktalent/received_events",
"repos_url": "https://api.github.com/users/hktalent/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hktalent/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hktalent/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hktalent",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2019-08-13T06:39:28Z | 2021-09-04T00:06:23Z | 2019-08-13T08:31:59Z | NONE | resolved | how decode gzip response chunk stream | {
"avatar_url": "https://avatars.githubusercontent.com/u/18223385?v=4",
"events_url": "https://api.github.com/users/hktalent/events{/privacy}",
"followers_url": "https://api.github.com/users/hktalent/followers",
"following_url": "https://api.github.com/users/hktalent/following{/other_user}",
"gists_url": "https://api.github.com/users/hktalent/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hktalent",
"id": 18223385,
"login": "hktalent",
"node_id": "MDQ6VXNlcjE4MjIzMzg1",
"organizations_url": "https://api.github.com/users/hktalent/orgs",
"received_events_url": "https://api.github.com/users/hktalent/received_events",
"repos_url": "https://api.github.com/users/hktalent/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hktalent/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hktalent/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hktalent",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5159/reactions"
} | https://api.github.com/repos/psf/requests/issues/5159/timeline | null | completed | null | null | false | [
"https://github.com/psf/requests/issues/2446#issuecomment-74340713"
] |
https://api.github.com/repos/psf/requests/issues/5158 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5158/labels{/name} | https://api.github.com/repos/psf/requests/issues/5158/comments | https://api.github.com/repos/psf/requests/issues/5158/events | https://github.com/psf/requests/issues/5158 | 479,289,207 | MDU6SXNzdWU0NzkyODkyMDc= | 5,158 | Authentication errors on MacOS | {
"avatar_url": "https://avatars.githubusercontent.com/u/132108?v=4",
"events_url": "https://api.github.com/users/retorquere/events{/privacy}",
"followers_url": "https://api.github.com/users/retorquere/followers",
"following_url": "https://api.github.com/users/retorquere/following{/other_user}",
"gists_url": "https://api.github.com/users/retorquere/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/retorquere",
"id": 132108,
"login": "retorquere",
"node_id": "MDQ6VXNlcjEzMjEwOA==",
"organizations_url": "https://api.github.com/users/retorquere/orgs",
"received_events_url": "https://api.github.com/users/retorquere/received_events",
"repos_url": "https://api.github.com/users/retorquere/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/retorquere/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/retorquere/subscriptions",
"type": "User",
"url": "https://api.github.com/users/retorquere",
"user_view_type": "public"
} | [
{
"color": "f7c6c7",
"default": false,
"description": null,
"id": 167537670,
"name": "Propose Close",
"node_id": "MDU6TGFiZWwxNjc1Mzc2NzA=",
"url": "https://api.github.com/repos/psf/requests/labels/Propose%20Close"
},
{
"color": "fef2c0",
"default": false,
"description": ... | closed | true | null | [] | null | 7 | 2019-08-10T17:27:27Z | 2021-12-04T23:00:31Z | 2021-09-05T22:03:35Z | NONE | resolved | Summary.
## Expected Result
When running this script:
```
import os
api_key = os.environ['ZOTERO_API_KEY']
user_id = os.environ['ZOTERO_USER_ID']
url = f'https://api.zotero.org/users/{user_id}/items/top?limit=5&format=json'
headers = {'User-Agent': 'Pyzotero/1.4.4', 'Zotero-API-Version': '3', 'Authorization': f'Bearer {api_key}' }
# this gets a 403 response
import requests
request = requests.get(
url=url,
headers=headers
)
print(request)
# this gets a 200 response
import urllib.request
req = urllib.request.Request(url)
for k, v in headers.items():
req.add_header(k, v)
r = urllib.request.urlopen(req)
print(r.getcode())
```
I had expected both requests to yield a `200` result
## Actual Result
On Ubuntu 19.04, I do get two `200` responses, but on MacOS Mojave, I get a `403` response for the `requests` request.
## System Information
$ python3 -m requests.help # ran on Ubuntu
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.6.1"
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.7.1"
},
"platform": {
"release": "5.0.0-20-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010102f",
"version": "18.0.0"
},
"requests": {
"version": "2.21.0"
},
"system_ssl": {
"version": "1010101f"
},
"urllib3": {
"version": "1.24.1"
},
"using_pyopenssl": true
}
```
$ python3 -m requests.help # ran on MacOS
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.7"
},
"implementation": {
"name": "CPython",
"version": "3.7.3"
},
"platform": {
"release": "18.7.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.20.1"
},
"system_ssl": {
"version": "1000213f"
},
"urllib3": {
"version": "1.23"
},
"using_pyopenssl": false
}
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4",
"events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}",
"followers_url": "https://api.github.com/users/sigmavirus24/followers",
"following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}",
"gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sigmavirus24",
"id": 240830,
"login": "sigmavirus24",
"node_id": "MDQ6VXNlcjI0MDgzMA==",
"organizations_url": "https://api.github.com/users/sigmavirus24/orgs",
"received_events_url": "https://api.github.com/users/sigmavirus24/received_events",
"repos_url": "https://api.github.com/users/sigmavirus24/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sigmavirus24",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5158/reactions"
} | https://api.github.com/repos/psf/requests/issues/5158/timeline | null | completed | null | null | false | [
"I've upgraded my packages on MacOS but I'm getting the same results:\r\n\r\n```\r\n{\r\n \"chardet\": {\r\n \"version\": \"3.0.4\"\r\n },\r\n \"cryptography\": {\r\n \"version\": \"\"\r\n },\r\n \"idna\": {\r\n \"version\": \"2.7\"\r\n },\r\n \"implementation\": {\r\n \"name\": \"CPython\",\r\n ... |
https://api.github.com/repos/psf/requests/issues/5157 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5157/labels{/name} | https://api.github.com/repos/psf/requests/issues/5157/comments | https://api.github.com/repos/psf/requests/issues/5157/events | https://github.com/psf/requests/issues/5157 | 478,549,963 | MDU6SXNzdWU0Nzg1NDk5NjM= | 5,157 | syntax error with last version of requests | {
"avatar_url": "https://avatars.githubusercontent.com/u/46350465?v=4",
"events_url": "https://api.github.com/users/pilot1981/events{/privacy}",
"followers_url": "https://api.github.com/users/pilot1981/followers",
"following_url": "https://api.github.com/users/pilot1981/following{/other_user}",
"gists_url": "https://api.github.com/users/pilot1981/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/pilot1981",
"id": 46350465,
"login": "pilot1981",
"node_id": "MDQ6VXNlcjQ2MzUwNDY1",
"organizations_url": "https://api.github.com/users/pilot1981/orgs",
"received_events_url": "https://api.github.com/users/pilot1981/received_events",
"repos_url": "https://api.github.com/users/pilot1981/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/pilot1981/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/pilot1981/subscriptions",
"type": "User",
"url": "https://api.github.com/users/pilot1981",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2019-08-08T15:42:46Z | 2021-09-04T00:06:23Z | 2019-08-08T16:01:08Z | NONE | resolved | Hi,
from HASSIO installation with python 3.7.3 I'm trying to launch this request:
python3 -c "import requests; print(requests.get(‘http://192.168.1.107/?action=command&command=value_temperature').text)"
but I obtain this error:
Command executed: python3 -c "import requests; print(requests.get(‘http://192.168.1.107/?action=command&command=value_temperature').text)": 1
File "<string>", line 1
import requests; print(requests.get(‘http://192.168.1.107/?action=command&command=value_temperature').text)
^
SyntaxError: invalid character in identifier
with previous versions all worked fine...
Anyone can help me? syntax is changed? | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5157/reactions"
} | https://api.github.com/repos/psf/requests/issues/5157/timeline | null | completed | null | null | false | [
"Hi @pilot1981, you have a `‘` at the beginning of your string. In the future please direct usage questions to Stackoverflow. That helps us triage bugs more easily and reduces noise to the people monitoring this list for bugs. Thanks!",
"Hi,\r\nthanks for reply.\r\n\r\nI have to post here?\r\n\r\nhttps://stackove... |
https://api.github.com/repos/psf/requests/issues/5156 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5156/labels{/name} | https://api.github.com/repos/psf/requests/issues/5156/comments | https://api.github.com/repos/psf/requests/issues/5156/events | https://github.com/psf/requests/issues/5156 | 477,969,955 | MDU6SXNzdWU0Nzc5Njk5NTU= | 5,156 | Incorrect Content-Type Returned from Head | {
"avatar_url": "https://avatars.githubusercontent.com/u/17158629?v=4",
"events_url": "https://api.github.com/users/Kerl1310/events{/privacy}",
"followers_url": "https://api.github.com/users/Kerl1310/followers",
"following_url": "https://api.github.com/users/Kerl1310/following{/other_user}",
"gists_url": "https://api.github.com/users/Kerl1310/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Kerl1310",
"id": 17158629,
"login": "Kerl1310",
"node_id": "MDQ6VXNlcjE3MTU4NjI5",
"organizations_url": "https://api.github.com/users/Kerl1310/orgs",
"received_events_url": "https://api.github.com/users/Kerl1310/received_events",
"repos_url": "https://api.github.com/users/Kerl1310/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Kerl1310/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Kerl1310/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Kerl1310",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2019-08-07T14:38:29Z | 2021-09-04T00:06:24Z | 2019-08-08T09:12:53Z | NONE | resolved | ## Summary
When requesting the headers and then outputting the content-type for [this](https://www.arl.army.mil/arlreports/1999/ARL-CR-441.pdf) url, text/html; charset=utf-8 is output as the content-type, but running `curl -I https://www.arl.army.mil/arlreports/1999/ARL-CR-441.pdf` returns application/pdf
## Expected Result
application/pdf
## Actual Result
text/html; charset=utf-8
## Reproduction Steps
```python
import requests
url = 'https://www.arl.army.mil/arlreports/1999/ARL-CR-441.pdf'
headers = requests.head(url).headers
content_type = headers['Content-Type']
print(content_type)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.7"
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.7.3"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "1010103f",
"version": "17.2.0"
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "101000af"
},
"urllib3": {
"version": "1.25.3"
},
"using_pyopenssl": true
}
``` | {
"avatar_url": "https://avatars.githubusercontent.com/u/17158629?v=4",
"events_url": "https://api.github.com/users/Kerl1310/events{/privacy}",
"followers_url": "https://api.github.com/users/Kerl1310/followers",
"following_url": "https://api.github.com/users/Kerl1310/following{/other_user}",
"gists_url": "https://api.github.com/users/Kerl1310/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Kerl1310",
"id": 17158629,
"login": "Kerl1310",
"node_id": "MDQ6VXNlcjE3MTU4NjI5",
"organizations_url": "https://api.github.com/users/Kerl1310/orgs",
"received_events_url": "https://api.github.com/users/Kerl1310/received_events",
"repos_url": "https://api.github.com/users/Kerl1310/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Kerl1310/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Kerl1310/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Kerl1310",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5156/reactions"
} | https://api.github.com/repos/psf/requests/issues/5156/timeline | null | completed | null | null | false | [
"The provided url (https://www.arl.army.mil/arlreports/1999/ARL-CR-441.pdf ) is not working properly.\r\n",
"@SatyajeetMahato Fixed the issue - seems the page blocks based on User Agent. Changing from the default resulted in \"application/pdf\" being returned as the content type"
] |
https://api.github.com/repos/psf/requests/issues/5155 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5155/labels{/name} | https://api.github.com/repos/psf/requests/issues/5155/comments | https://api.github.com/repos/psf/requests/issues/5155/events | https://github.com/psf/requests/issues/5155 | 477,739,024 | MDU6SXNzdWU0Nzc3MzkwMjQ= | 5,155 | Bug - Error "Connection aborted BadStatusLine" under proxy network | {
"avatar_url": "https://avatars.githubusercontent.com/u/14316290?v=4",
"events_url": "https://api.github.com/users/Kenith/events{/privacy}",
"followers_url": "https://api.github.com/users/Kenith/followers",
"following_url": "https://api.github.com/users/Kenith/following{/other_user}",
"gists_url": "https://api.github.com/users/Kenith/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Kenith",
"id": 14316290,
"login": "Kenith",
"node_id": "MDQ6VXNlcjE0MzE2Mjkw",
"organizations_url": "https://api.github.com/users/Kenith/orgs",
"received_events_url": "https://api.github.com/users/Kenith/received_events",
"repos_url": "https://api.github.com/users/Kenith/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Kenith/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Kenith/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Kenith",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2019-08-07T06:51:00Z | 2021-09-04T00:06:24Z | 2019-08-08T16:06:51Z | NONE | resolved | Hello All,
Our company network is under proxy, and not trust all the certificates.
We have a url need to check the status: https://www.anz.com/anzwealthinsights/default.asp
The url is redirected 2 times:
https://www.anz.com/anzwealthinsights/default.asp
-> redirect-1: http://www.anzwealthinsights.anz.com/?cid=anz:private
-> redirect-2: https://www.anzwealthinsights.anz.com/?cid=anz:private
When we trying to request the url, the error `ConnectionError: ('Connection aborted.', BadStatusLine("''",))` happens. And I can confirm that it happens at redirect-2.
Note: If we don't under company network, and request the url, all fine.
Would you please fix the issue?
Here is the info you need:
Python: 2.7
Requests: 2.22.0
Network: Under proxy, and not trust any certificate
Code:
```
headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 6.0; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0' }
requests.get('https://www.anz.com/anzwealthinsights/default.asp', verify=False, proxies={'http': '127.0.0.1:3128', 'https': '127.0.0.1:3128'}, headers=headers)
/Library/Python/2.7/site-packages/urllib3/connectionpool.py:847: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/Library/Python/2.7/site-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/Library/Python/2.7/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/Library/Python/2.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/Library/Python/2.7/site-packages/requests/sessions.py", line 668, in send
history = [resp for resp in gen] if allow_redirects else []
File "/Library/Python/2.7/site-packages/requests/sessions.py", line 247, in resolve_redirects
**adapter_kwargs
File "/Library/Python/2.7/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/Library/Python/2.7/site-packages/requests/adapters.py", line 498, in send
raise ConnectionError(err, request=request)
ConnectionError: ('Connection aborted.', BadStatusLine("''",))
requests.get('https://www.anz.com/anzwealthinsights/default.asp', verify=False)
/Library/Python/2.7/site-packages/urllib3/connectionpool.py:847: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
/Library/Python/2.7/site-packages/urllib3/connectionpool.py:847: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
<Response [200]>
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5155/reactions"
} | https://api.github.com/repos/psf/requests/issues/5155/timeline | null | completed | null | null | false | [
"Hi @Kenith, given the situation you’re describing, this is an issue with the proxy. It’s either continuing to send data after we believe a Response is complete, or not returning a properly formatted http Response at all.\r\n\r\nIf you’re able to get this working correctly with curl, it *may* be an issue with urlli... |
https://api.github.com/repos/psf/requests/issues/5154 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5154/labels{/name} | https://api.github.com/repos/psf/requests/issues/5154/comments | https://api.github.com/repos/psf/requests/issues/5154/events | https://github.com/psf/requests/issues/5154 | 477,692,363 | MDU6SXNzdWU0Nzc2OTIzNjM= | 5,154 | something strange about cookie in requests.session. | {
"avatar_url": "https://avatars.githubusercontent.com/u/17063085?v=4",
"events_url": "https://api.github.com/users/C4o/events{/privacy}",
"followers_url": "https://api.github.com/users/C4o/followers",
"following_url": "https://api.github.com/users/C4o/following{/other_user}",
"gists_url": "https://api.github.com/users/C4o/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/C4o",
"id": 17063085,
"login": "C4o",
"node_id": "MDQ6VXNlcjE3MDYzMDg1",
"organizations_url": "https://api.github.com/users/C4o/orgs",
"received_events_url": "https://api.github.com/users/C4o/received_events",
"repos_url": "https://api.github.com/users/C4o/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/C4o/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/C4o/subscriptions",
"type": "User",
"url": "https://api.github.com/users/C4o",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2019-08-07T03:49:14Z | 2021-09-03T00:10:48Z | 2019-12-04T05:58:49Z | NONE | resolved | Summary.
## Expected Result
follow all 'set-cookie' actions from website.
## Actual Result
the website i request would set cookie for three or times to change a specific cookie or add a new cookie. and i found that first time the website set three cookies, that's ok, second time the website set another three cookies, and it failed, and third time the website tried to change three cookies, and it failed too.
i printed session.cookies each time, it' ok, but cookies in http packets that i captured did not match session.cookie, there were still the first three cookies.
by the way, my friend found that this situation also appear at other normal browser like Chrome and Firefox, but 'set-cookie' takes effect in Tor browser which is based on Firefox, maybe it's something new?
## Reproduction Steps
```python
import requests
session = requests.session()
session.get(url1)
session.get(url2)
session.get(url3)
```
## System Information
$ python -m requests.help
```
<paste here>
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
| {
"avatar_url": "https://avatars.githubusercontent.com/u/17063085?v=4",
"events_url": "https://api.github.com/users/C4o/events{/privacy}",
"followers_url": "https://api.github.com/users/C4o/followers",
"following_url": "https://api.github.com/users/C4o/following{/other_user}",
"gists_url": "https://api.github.com/users/C4o/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/C4o",
"id": 17063085,
"login": "C4o",
"node_id": "MDQ6VXNlcjE3MDYzMDg1",
"organizations_url": "https://api.github.com/users/C4o/orgs",
"received_events_url": "https://api.github.com/users/C4o/received_events",
"repos_url": "https://api.github.com/users/C4o/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/C4o/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/C4o/subscriptions",
"type": "User",
"url": "https://api.github.com/users/C4o",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5154/reactions"
} | https://api.github.com/repos/psf/requests/issues/5154/timeline | null | completed | null | null | false | [
"forget to say how i solve it temporarily..cause i found that 'session.cookies' is ok, but cookies in http packets that i captured did not match session.cookie, i tried to change cookieJar to a DICT and then change this DICT to cookieJar, and assign session.cookies with the new cookieJar before every http request.... |
https://api.github.com/repos/psf/requests/issues/5153 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5153/labels{/name} | https://api.github.com/repos/psf/requests/issues/5153/comments | https://api.github.com/repos/psf/requests/issues/5153/events | https://github.com/psf/requests/issues/5153 | 476,422,332 | MDU6SXNzdWU0NzY0MjIzMzI= | 5,153 | Add headers to connect when using proxies? | {
"avatar_url": "https://avatars.githubusercontent.com/u/45830421?v=4",
"events_url": "https://api.github.com/users/qwerty32123/events{/privacy}",
"followers_url": "https://api.github.com/users/qwerty32123/followers",
"following_url": "https://api.github.com/users/qwerty32123/following{/other_user}",
"gists_url": "https://api.github.com/users/qwerty32123/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/qwerty32123",
"id": 45830421,
"login": "qwerty32123",
"node_id": "MDQ6VXNlcjQ1ODMwNDIx",
"organizations_url": "https://api.github.com/users/qwerty32123/orgs",
"received_events_url": "https://api.github.com/users/qwerty32123/received_events",
"repos_url": "https://api.github.com/users/qwerty32123/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/qwerty32123/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/qwerty32123/subscriptions",
"type": "User",
"url": "https://api.github.com/users/qwerty32123",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 2 | 2019-08-03T06:40:09Z | 2019-08-22T14:06:21Z | null | NONE | null | Its possible with requests to add headers to connect? I need to add 2 headers
Host and proxy connection. But default connection when using proxy is witouth 2 those so i need to know if its in some way possible to add them.
| null | {
"+1": 3,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 3,
"url": "https://api.github.com/repos/psf/requests/issues/5153/reactions"
} | https://api.github.com/repos/psf/requests/issues/5153/timeline | null | null | null | null | false | [
"This is causing us some heartburn, too.",
"This isn't a great solution, but it could be helpful for diagnostics:\r\n\r\nhttps://github.com/psf/requests/issues/2708\r\n\r\nBeing relatively new to python, this critical library seems very inconsistent. Requests work one way if you call them directly, another way i... |
https://api.github.com/repos/psf/requests/issues/5152 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5152/labels{/name} | https://api.github.com/repos/psf/requests/issues/5152/comments | https://api.github.com/repos/psf/requests/issues/5152/events | https://github.com/psf/requests/issues/5152 | 476,315,884 | MDU6SXNzdWU0NzYzMTU4ODQ= | 5,152 | Add a parameter so that URL encoding does not occur when sending URLs | {
"avatar_url": "https://avatars.githubusercontent.com/u/29516567?v=4",
"events_url": "https://api.github.com/users/jiushill/events{/privacy}",
"followers_url": "https://api.github.com/users/jiushill/followers",
"following_url": "https://api.github.com/users/jiushill/following{/other_user}",
"gists_url": "https://api.github.com/users/jiushill/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jiushill",
"id": 29516567,
"login": "jiushill",
"node_id": "MDQ6VXNlcjI5NTE2NTY3",
"organizations_url": "https://api.github.com/users/jiushill/orgs",
"received_events_url": "https://api.github.com/users/jiushill/received_events",
"repos_url": "https://api.github.com/users/jiushill/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jiushill/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jiushill/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jiushill",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2019-08-02T19:02:39Z | 2021-09-02T00:07:26Z | 2020-02-10T06:10:02Z | NONE | resolved | URL encoding is not required when encountering special situations. So consider adding a URL that controls whether the URL sent is url-coded or not. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5152/reactions"
} | https://api.github.com/repos/psf/requests/issues/5152/timeline | null | completed | null | null | false | [
"Use a connection adapter. :)\n\nSent from my iPhone\n\n> On Aug 2, 2019, at 3:02 PM, 九世 <notifications@github.com> wrote:\n> \n> URL encoding is not required when encountering special situations. So consider adding a URL that controls whether the URL sent is url-coded or not.\n> \n> —\n> You are receiving this bec... |
https://api.github.com/repos/psf/requests/issues/5151 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5151/labels{/name} | https://api.github.com/repos/psf/requests/issues/5151/comments | https://api.github.com/repos/psf/requests/issues/5151/events | https://github.com/psf/requests/issues/5151 | 475,545,252 | MDU6SXNzdWU0NzU1NDUyNTI= | 5,151 | how wrapper requests, to bypass WAF | {
"avatar_url": "https://avatars.githubusercontent.com/u/18223385?v=4",
"events_url": "https://api.github.com/users/hktalent/events{/privacy}",
"followers_url": "https://api.github.com/users/hktalent/followers",
"following_url": "https://api.github.com/users/hktalent/following{/other_user}",
"gists_url": "https://api.github.com/users/hktalent/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hktalent",
"id": 18223385,
"login": "hktalent",
"node_id": "MDQ6VXNlcjE4MjIzMzg1",
"organizations_url": "https://api.github.com/users/hktalent/orgs",
"received_events_url": "https://api.github.com/users/hktalent/received_events",
"repos_url": "https://api.github.com/users/hktalent/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hktalent/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hktalent/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hktalent",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2019-08-01T08:26:13Z | 2021-09-04T00:06:25Z | 2019-08-04T12:31:46Z | NONE | resolved | how wrapper requests, to bypass WAF | {
"avatar_url": "https://avatars.githubusercontent.com/u/18223385?v=4",
"events_url": "https://api.github.com/users/hktalent/events{/privacy}",
"followers_url": "https://api.github.com/users/hktalent/followers",
"following_url": "https://api.github.com/users/hktalent/following{/other_user}",
"gists_url": "https://api.github.com/users/hktalent/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hktalent",
"id": 18223385,
"login": "hktalent",
"node_id": "MDQ6VXNlcjE4MjIzMzg1",
"organizations_url": "https://api.github.com/users/hktalent/orgs",
"received_events_url": "https://api.github.com/users/hktalent/received_events",
"repos_url": "https://api.github.com/users/hktalent/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hktalent/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hktalent/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hktalent",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5151/reactions"
} | https://api.github.com/repos/psf/requests/issues/5151/timeline | null | completed | null | null | false | [
"WAF's incorporate a wide range of technologies which are usually highly customized for the application they are designed to protect.\r\n\r\nIt's impossible to answer your question as it involves a multitude of disparate technologies which are likely to employ very different forms of protection and traffic analysis... |
https://api.github.com/repos/psf/requests/issues/5150 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5150/labels{/name} | https://api.github.com/repos/psf/requests/issues/5150/comments | https://api.github.com/repos/psf/requests/issues/5150/events | https://github.com/psf/requests/issues/5150 | 474,887,586 | MDU6SXNzdWU0NzQ4ODc1ODY= | 5,150 | SSL - Connection error | {
"avatar_url": "https://avatars.githubusercontent.com/u/22968539?v=4",
"events_url": "https://api.github.com/users/felix4webscience/events{/privacy}",
"followers_url": "https://api.github.com/users/felix4webscience/followers",
"following_url": "https://api.github.com/users/felix4webscience/following{/other_user}",
"gists_url": "https://api.github.com/users/felix4webscience/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/felix4webscience",
"id": 22968539,
"login": "felix4webscience",
"node_id": "MDQ6VXNlcjIyOTY4NTM5",
"organizations_url": "https://api.github.com/users/felix4webscience/orgs",
"received_events_url": "https://api.github.com/users/felix4webscience/received_events",
"repos_url": "https://api.github.com/users/felix4webscience/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/felix4webscience/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/felix4webscience/subscriptions",
"type": "User",
"url": "https://api.github.com/users/felix4webscience",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2019-07-31T01:08:55Z | 2021-09-02T00:07:26Z | 2020-02-10T06:17:42Z | NONE | resolved | Please refer to our [Stack Overflow tag](https://stackoverflow.com/questions/tagged/python-requests) for guidance.
Hi,
I am writing about this Issue , as all solutions I found so far, did not help to solve my Problem.
The suggested solutions I tried include:
1. `https://2.python-requests.org//en/latest/user/advanced/#ssl-cert-verification`
Edit: the sample url: https://requestb.in raises a 404 error actually, probably does not exist even more (?)
2. `https://stackoverflow.com/questions/10667960/python-requests-throwing-sslerror`
3. `https://stackoverflow.com/questions/10667960/python-requests-throwing-sslerror/44543047#44543047`
Nevertheless, most answers have been given at a time, when user used primarly python 2.7 and I am wondering if this is the main problem.
However. I try to achieve the following goal:
1. reading different urls through a list or a csv file
2. requesting the url, status_code, history, parsed_url.scheme
3. if parsed_url_scheme is http://, than the program should write the url into a csv file, else it should ignore the url.
Expected outcome: A csv file with only those URLs of the Alexa-Top-100 with http://
My Code so far:
`import requests
from requests.utils import urlparse
```
urls = ['http://www.example.com',
'http://www.bloomberg.com',
'https://requestbin.fullcontact.com/'
'http://www.github.com']
with open('G:\\Request_HEADER_Suite/dummy/http.csv', 'w') as f:
for url in urls:
r = requests.get(url, stream=True)
parsed_url = urlparse(r.url)
print("URL: ", url)
print("Redirected to: ", r.url)
print("Status Code: ", r.status_code)
print("Scheme: ", parsed_url.scheme)
if parsed_url.scheme == 'http':
f.write(url + '\n')`
```
The example above will work fine and as expected. But when I am adding more and more urls for example 20 more URLS at some point I get the following Error:
```
`Traceback (most recent call last):
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\urllib3\connection.py", line 160, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw)
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\urllib3\util\connection.py", line 57, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "...\AppData\Local\Programs\Python\Python37\lib\socket.py", line 748, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11001] getaddrinfo failed
```
```
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\urllib3\connectionpool.py", line 603, in urlopen
chunked=chunked)
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\urllib3\connectionpool.py", line 355, in _make_request
conn.request(method, url, **httplib_request_kw)
File "...\AppData\Local\Programs\Python\Python37\lib\http\client.py", line 1229, in request
self._send_request(method, url, body, headers, encode_chunked)
File "...\AppData\Local\Programs\Python\Python37\lib\http\client.py", line 1275, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "...\AppData\Local\Programs\Python\Python37\lib\http\client.py", line 1224, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "...\AppData\Local\Programs\Python\Python37\lib\http\client.py", line 1016, in _send_output
self.send(msg)
File "...\AppData\Local\Programs\Python\Python37\lib\http\client.py", line 956, in send
self.connect()
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\urllib3\connection.py", line 183, in connect
conn = self._new_conn()
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\urllib3\connection.py", line 169, in _new_conn
self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x0000023EFC0BBC88>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\requests\adapters.py", line 449, in send
timeout=timeout
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\urllib3\connectionpool.py", line 641, in urlopen
_stacktrace=sys.exc_info()[2])
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\urllib3\util\retry.py", line 399, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='17ok.com', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000023EFC0BBC88>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\urllib3\connection.py", line 160, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw)
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\urllib3\util\connection.py", line 57, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "...\AppData\Local\Programs\Python\Python37\lib\socket.py", line 748, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11001] getaddrinfo failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\urllib3\connectionpool.py", line 603, in urlopen
chunked=chunked)
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\urllib3\connectionpool.py", line 355, in _make_request
conn.request(method, url, **httplib_request_kw)
File "...\AppData\Local\Programs\Python\Python37\lib\http\client.py", line 1229, in request
self._send_request(method, url, body, headers, encode_chunked)
File "...\AppData\Local\Programs\Python\Python37\lib\http\client.py", line 1275, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "...\AppData\Local\Programs\Python\Python37\lib\http\client.py", line 1224, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "...\AppData\Local\Programs\Python\Python37\lib\http\client.py", line 1016, in _send_output
self.send(msg)
File "...\AppData\Local\Programs\Python\Python37\lib\http\client.py", line 956, in send
self.connect()
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\urllib3\connection.py", line 183, in connect
conn = self._new_conn()
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\urllib3\connection.py", line 169, in _new_conn
self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x0000023EFC0BBC88>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\requests\adapters.py", line 449, in send
timeout=timeout
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\urllib3\connectionpool.py", line 641, in urlopen
_stacktrace=sys.exc_info()[2])
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\urllib3\util\retry.py", line 399, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='17ok.com', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000023EFC0BBC88>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ".../Request_HEADER_Suite/dummy/dummy-04.py", line 35, in <module>
r = requests.get(url, stream=True)
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\requests\api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\requests\api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\requests\sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\requests\sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\requests\adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='17ok.com', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000023EFC0BBC88>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))
```
Process finished with exit code 1
```
And when I am trying to execute the code with the Domains by the Alexa Top-1- Million, I immediately will get an SSL-Error like this:
```
```
Traceback (most recent call last):
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\urllib3\connectionpool.py", line 603, in urlopen
chunked=chunked)
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\urllib3\connectionpool.py", line 344, in _make_request
self._validate_conn(conn)
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\urllib3\connectionpool.py", line 843, in _validate_conn
conn.connect()
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\urllib3\connection.py", line 370, in connect
ssl_context=context)
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\urllib3\util\ssl_.py", line 355, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "...\AppData\Local\Programs\Python\Python37\lib\ssl.py", line 412, in wrap_socket
session=session
File "...\AppData\Local\Programs\Python\Python37\lib\ssl.py", line 853, in _create
self.do_handshake()
File "...\AppData\Local\Programs\Python\Python37\lib\ssl.py", line 1117, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1056)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\requests\adapters.py", line 449, in send
timeout=timeout
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\urllib3\connectionpool.py", line 641, in urlopen
_stacktrace=sys.exc_info()[2])
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\urllib3\util\retry.py", line 399, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='123movieshub.to', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, '[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1056)')))
```
```
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ".../Request_HEADER_Suite/dummy/diversifier_http.py", line 506, in <module>
r = requests.get(url, stream=True)
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\requests\api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\requests\api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\requests\sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\requests\sessions.py", line 668, in send
history = [resp for resp in gen] if allow_redirects else []
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\requests\sessions.py", line 668, in <listcomp>
history = [resp for resp in gen] if allow_redirects else []
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\requests\sessions.py", line 247, in resolve_redirects
**adapter_kwargs
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\requests\sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "...\AppData\Local\Programs\Python\Python37\lib\site-packages\requests\adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='123movieshub.to', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, '[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1056)')))
Process finished with exit code 1
```
So, what is the recommended way in 2019 to handle SSL Errors and Connection errors?
Where can I find the most recent solution, as You guys probably have already solved it?
Do you have any demo.py in common for a crawl where you request a list of urls which has either http or https?
I really would appreciate any hints.
Greetings Felix
---
Env.:
- Win10 and Oracle VIrtual Box - Ubuntu 16.04
- PyCharm Professional 2019
| {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5150/reactions"
} | https://api.github.com/repos/psf/requests/issues/5150/timeline | null | completed | null | null | false | [
"Just for discussing.\r\nFrom the document, I found this,\r\n> If you set stream to True when making a request, Requests cannot release the connection back to the pool unless you consume all the data or call Response.close. This can lead to inefficiency with connections. If you find yourself partially reading reque... |
https://api.github.com/repos/psf/requests/issues/5149 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5149/labels{/name} | https://api.github.com/repos/psf/requests/issues/5149/comments | https://api.github.com/repos/psf/requests/issues/5149/events | https://github.com/psf/requests/issues/5149 | 474,655,921 | MDU6SXNzdWU0NzQ2NTU5MjE= | 5,149 | Project maintainence | {
"avatar_url": "https://avatars.githubusercontent.com/u/647359?v=4",
"events_url": "https://api.github.com/users/tomchristie/events{/privacy}",
"followers_url": "https://api.github.com/users/tomchristie/followers",
"following_url": "https://api.github.com/users/tomchristie/following{/other_user}",
"gists_url": "https://api.github.com/users/tomchristie/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tomchristie",
"id": 647359,
"login": "tomchristie",
"node_id": "MDQ6VXNlcjY0NzM1OQ==",
"organizations_url": "https://api.github.com/users/tomchristie/orgs",
"received_events_url": "https://api.github.com/users/tomchristie/received_events",
"repos_url": "https://api.github.com/users/tomchristie/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tomchristie/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tomchristie/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tomchristie",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 15 | 2019-07-30T15:32:06Z | 2021-09-03T00:10:51Z | 2019-11-14T10:31:05Z | CONTRIBUTOR | resolved | Given that `requests` has now moved under @psf ownership (❤️), it'd be good to have some clarification around the project maintenance.
On the assumption that Kenneth is fully handing over management for the project, something that needs addressing is ensuring that whoever is on the maintenance team is empowered to take on the missing leadership role. I'd assume @nateprewitt is stepping into this (which would be great) but it's a bit ambiguous from the outside.
* Who is the maintenance team for `requests` now? I guess the "Keepers of the Crystals" docs need updating?
* I think the sidebar Twitter links and "Other Projects" can probably get dropped now that this is a PSF project?
* The carbon ads, footer ads, and donate button probably aren't the right thing to have anymore? I'd love to see a requests sponsorship program, with sidebar ads helping fund the PSF, who could then in turn potentially handle a part-time maintenance contracts against requests. Probably needs a bit of thinking about. I'd be happy to be involved in helping setup the technical side of this, if required.
* It's not clear what should happen to the "Requests III" call-out. The *substantive* work on supporting both async+sync in the same codebase, and of adding HTTP/2 support have all been in other projects. The `httpx` project is now a good chunk of the way towards meeting the design criteria of "Requests III". For the meantime I think it'd probably be reasonable for the callout to simply drop down to "Requests 2.x is officially in maintenance-mode only. This means we only respond to CVE-level tickets."?
* I guess the footer could now read "A Kenneth Reitz Project, maintained by Python Software Foundation" or something similar?
* Is there anything else the PSF / the maintenance team needs to provide guidance on at this point in time? | {
"avatar_url": "https://avatars.githubusercontent.com/u/647359?v=4",
"events_url": "https://api.github.com/users/tomchristie/events{/privacy}",
"followers_url": "https://api.github.com/users/tomchristie/followers",
"following_url": "https://api.github.com/users/tomchristie/following{/other_user}",
"gists_url": "https://api.github.com/users/tomchristie/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tomchristie",
"id": 647359,
"login": "tomchristie",
"node_id": "MDQ6VXNlcjY0NzM1OQ==",
"organizations_url": "https://api.github.com/users/tomchristie/orgs",
"received_events_url": "https://api.github.com/users/tomchristie/received_events",
"repos_url": "https://api.github.com/users/tomchristie/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tomchristie/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tomchristie/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tomchristie",
"user_view_type": "public"
} | {
"+1": 10,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 10,
"url": "https://api.github.com/repos/psf/requests/issues/5149/reactions"
} | https://api.github.com/repos/psf/requests/issues/5149/timeline | null | completed | null | null | false | [
"> On the assumption that Kenneth is fully handing over management for the project, something that needs addressing is ensuring that whoever is on the maintenance team is empowered to take on the missing leadership role. I'd assume @nateprewitt is stepping into this (which would be great) but it's a bit ambiguous f... |
https://api.github.com/repos/psf/requests/issues/5148 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5148/labels{/name} | https://api.github.com/repos/psf/requests/issues/5148/comments | https://api.github.com/repos/psf/requests/issues/5148/events | https://github.com/psf/requests/issues/5148 | 474,498,343 | MDU6SXNzdWU0NzQ0OTgzNDM= | 5,148 | monkey patch requests.utils.requote_uri failed | {
"avatar_url": "https://avatars.githubusercontent.com/u/18695984?v=4",
"events_url": "https://api.github.com/users/boy-hack/events{/privacy}",
"followers_url": "https://api.github.com/users/boy-hack/followers",
"following_url": "https://api.github.com/users/boy-hack/following{/other_user}",
"gists_url": "https://api.github.com/users/boy-hack/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/boy-hack",
"id": 18695984,
"login": "boy-hack",
"node_id": "MDQ6VXNlcjE4Njk1OTg0",
"organizations_url": "https://api.github.com/users/boy-hack/orgs",
"received_events_url": "https://api.github.com/users/boy-hack/received_events",
"repos_url": "https://api.github.com/users/boy-hack/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/boy-hack/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/boy-hack/subscriptions",
"type": "User",
"url": "https://api.github.com/users/boy-hack",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2019-07-30T10:16:00Z | 2021-09-01T00:11:22Z | 2020-02-10T06:18:15Z | NONE | resolved | I want to escape the {} symbol, but requests default to escaping the parameters of the url. I looked at the source code and the problem appears in the requote_uri of requests.utils , so I tried hooking this function.
```python
from urllib.parse import quote
import requests
def hook2(uri):
print(11111111)
safe_with_percent = "!#$%&'()*+,/:;=?@[]~{}^"
return quote(uri, safe=safe_with_percent)
requests.utils.requote_uri = hook2
requests.get("http://127.0.0.1:8000", params='a=111&b=222!@$%^&({}')
```
But why did it fail? | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5148/reactions"
} | https://api.github.com/repos/psf/requests/issues/5148/timeline | null | completed | null | null | false | [
"@boy-hack this issue tracker is specifically for defects in Requests. Please direct questions to StackOverflow.com, thanks!",
"@boy-hack ive run into the same issue, did you get anywhere with monkey patching **requote_uri**"
] |
https://api.github.com/repos/psf/requests/issues/5147 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5147/labels{/name} | https://api.github.com/repos/psf/requests/issues/5147/comments | https://api.github.com/repos/psf/requests/issues/5147/events | https://github.com/psf/requests/pull/5147 | 473,783,708 | MDExOlB1bGxSZXF1ZXN0MzAxODU4NTk1 | 5,147 | Remove break-line | {
"avatar_url": "https://avatars.githubusercontent.com/u/43068450?v=4",
"events_url": "https://api.github.com/users/myslak71/events{/privacy}",
"followers_url": "https://api.github.com/users/myslak71/followers",
"following_url": "https://api.github.com/users/myslak71/following{/other_user}",
"gists_url": "https://api.github.com/users/myslak71/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/myslak71",
"id": 43068450,
"login": "myslak71",
"node_id": "MDQ6VXNlcjQzMDY4NDUw",
"organizations_url": "https://api.github.com/users/myslak71/orgs",
"received_events_url": "https://api.github.com/users/myslak71/received_events",
"repos_url": "https://api.github.com/users/myslak71/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/myslak71/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/myslak71/subscriptions",
"type": "User",
"url": "https://api.github.com/users/myslak71",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2019-07-28T20:38:05Z | 2021-08-31T00:07:07Z | 2019-07-29T16:11:39Z | NONE | resolved | Remove unnecessary break-line - it just looks better now :) | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5147/reactions"
} | https://api.github.com/repos/psf/requests/issues/5147/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5147.diff",
"html_url": "https://github.com/psf/requests/pull/5147",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5147.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5147"
} | true | [
"Hi @myslak71, thanks for contributing to Requests! Unfortunately, we don’t typically accept PRs with stylistic/formatting changes. We’re working on getting linting set back up which should catch these in bulk going forward."
] |
https://api.github.com/repos/psf/requests/issues/5146 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5146/labels{/name} | https://api.github.com/repos/psf/requests/issues/5146/comments | https://api.github.com/repos/psf/requests/issues/5146/events | https://github.com/psf/requests/pull/5146 | 473,753,695 | MDExOlB1bGxSZXF1ZXN0MzAxODM4MjI3 | 5,146 | Fix typo in api.requests() docstring formatting | {
"avatar_url": "https://avatars.githubusercontent.com/u/4450708?v=4",
"events_url": "https://api.github.com/users/dharmab/events{/privacy}",
"followers_url": "https://api.github.com/users/dharmab/followers",
"following_url": "https://api.github.com/users/dharmab/following{/other_user}",
"gists_url": "https://api.github.com/users/dharmab/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dharmab",
"id": 4450708,
"login": "dharmab",
"node_id": "MDQ6VXNlcjQ0NTA3MDg=",
"organizations_url": "https://api.github.com/users/dharmab/orgs",
"received_events_url": "https://api.github.com/users/dharmab/received_events",
"repos_url": "https://api.github.com/users/dharmab/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dharmab/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dharmab/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dharmab",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2019-07-28T15:06:26Z | 2021-08-31T00:07:08Z | 2019-07-28T15:07:02Z | NONE | resolved | Fix a formatting typo which caused the documentation for `api.request()`'s `method` arg to be corrupted when rendered:

| {
"avatar_url": "https://avatars.githubusercontent.com/u/4450708?v=4",
"events_url": "https://api.github.com/users/dharmab/events{/privacy}",
"followers_url": "https://api.github.com/users/dharmab/followers",
"following_url": "https://api.github.com/users/dharmab/following{/other_user}",
"gists_url": "https://api.github.com/users/dharmab/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dharmab",
"id": 4450708,
"login": "dharmab",
"node_id": "MDQ6VXNlcjQ0NTA3MDg=",
"organizations_url": "https://api.github.com/users/dharmab/orgs",
"received_events_url": "https://api.github.com/users/dharmab/received_events",
"repos_url": "https://api.github.com/users/dharmab/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dharmab/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dharmab/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dharmab",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5146/reactions"
} | https://api.github.com/repos/psf/requests/issues/5146/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5146.diff",
"html_url": "https://github.com/psf/requests/pull/5146",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5146.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5146"
} | true | [
"Looks like this is a dupe of #5145 "
] |
https://api.github.com/repos/psf/requests/issues/5145 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5145/labels{/name} | https://api.github.com/repos/psf/requests/issues/5145/comments | https://api.github.com/repos/psf/requests/issues/5145/events | https://github.com/psf/requests/pull/5145 | 472,635,074 | MDExOlB1bGxSZXF1ZXN0MzAwOTU5Mjk2 | 5,145 | Add missing backtick | {
"avatar_url": "https://avatars.githubusercontent.com/u/47706471?v=4",
"events_url": "https://api.github.com/users/dullbananas/events{/privacy}",
"followers_url": "https://api.github.com/users/dullbananas/followers",
"following_url": "https://api.github.com/users/dullbananas/following{/other_user}",
"gists_url": "https://api.github.com/users/dullbananas/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dullbananas",
"id": 47706471,
"login": "dullbananas",
"node_id": "MDQ6VXNlcjQ3NzA2NDcx",
"organizations_url": "https://api.github.com/users/dullbananas/orgs",
"received_events_url": "https://api.github.com/users/dullbananas/received_events",
"repos_url": "https://api.github.com/users/dullbananas/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dullbananas/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dullbananas/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dullbananas",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2019-07-25T02:36:00Z | 2021-08-31T00:07:08Z | 2019-07-29T16:06:12Z | CONTRIBUTOR | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 1,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/5145/reactions"
} | https://api.github.com/repos/psf/requests/issues/5145/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5145.diff",
"html_url": "https://github.com/psf/requests/pull/5145",
"merged_at": "2019-07-29T16:06:12Z",
"patch_url": "https://github.com/psf/requests/pull/5145.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5145"
} | true | [
"Thanks @dullbananas!"
] | |
https://api.github.com/repos/psf/requests/issues/5144 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5144/labels{/name} | https://api.github.com/repos/psf/requests/issues/5144/comments | https://api.github.com/repos/psf/requests/issues/5144/events | https://github.com/psf/requests/issues/5144 | 472,623,032 | MDU6SXNzdWU0NzI2MjMwMzI= | 5,144 | 414 Request-URI Too Long | {
"avatar_url": "https://avatars.githubusercontent.com/u/11496215?v=4",
"events_url": "https://api.github.com/users/EinSoldiatGott/events{/privacy}",
"followers_url": "https://api.github.com/users/EinSoldiatGott/followers",
"following_url": "https://api.github.com/users/EinSoldiatGott/following{/other_user}",
"gists_url": "https://api.github.com/users/EinSoldiatGott/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/EinSoldiatGott",
"id": 11496215,
"login": "EinSoldiatGott",
"node_id": "MDQ6VXNlcjExNDk2MjE1",
"organizations_url": "https://api.github.com/users/EinSoldiatGott/orgs",
"received_events_url": "https://api.github.com/users/EinSoldiatGott/received_events",
"repos_url": "https://api.github.com/users/EinSoldiatGott/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/EinSoldiatGott/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/EinSoldiatGott/subscriptions",
"type": "User",
"url": "https://api.github.com/users/EinSoldiatGott",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2019-07-25T01:37:31Z | 2021-09-04T00:06:27Z | 2019-07-25T18:29:20Z | NONE | resolved | Using Python 3, and request, I'm able to POST some registers of measurements to my server, something like 20 records, everything works ok, but when I try to upload more registers the URL becomes too long and I have this response on my python linux terminal:
```
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>414 Request-URI Too Long</title>
</head><body>
<h1>Request-URI Too Long</h1>
<p>The requested URL's length exceeds the capacity
limit for this server.<br />
</p>
<hr>
<address>Apache/2.4.25 (Debian) Server at api.rookmotion.com Port 443</address>
</body></html>
```
The URL that I'm trying to post currently has a length of 333 char long.
```
r = requests.post(url, headers=headers, params = data)
print(len(r.text))
print(r.text)
```
But if I use the printed json on POSTMAN with the corresponding headers, POSTMAN works ok, so I don't know what should I configure additionally on my python request.
```
headers = {'user': self.user, 'key': self.password, 'content-type': 'application/x-www-form-urlencoded; charset=utf-8'}
url = "https://api.rookmotion.com/v1.0/..."
```
Thanks! | {
"avatar_url": "https://avatars.githubusercontent.com/u/11496215?v=4",
"events_url": "https://api.github.com/users/EinSoldiatGott/events{/privacy}",
"followers_url": "https://api.github.com/users/EinSoldiatGott/followers",
"following_url": "https://api.github.com/users/EinSoldiatGott/following{/other_user}",
"gists_url": "https://api.github.com/users/EinSoldiatGott/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/EinSoldiatGott",
"id": 11496215,
"login": "EinSoldiatGott",
"node_id": "MDQ6VXNlcjExNDk2MjE1",
"organizations_url": "https://api.github.com/users/EinSoldiatGott/orgs",
"received_events_url": "https://api.github.com/users/EinSoldiatGott/received_events",
"repos_url": "https://api.github.com/users/EinSoldiatGott/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/EinSoldiatGott/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/EinSoldiatGott/subscriptions",
"type": "User",
"url": "https://api.github.com/users/EinSoldiatGott",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5144/reactions"
} | https://api.github.com/repos/psf/requests/issues/5144/timeline | null | completed | null | null | false | [
"Why are you using a POST request and sending the data as params? Does the API specify this? If not, wouldn't you want to use `data=` to send the data rather than `params=`? Can you double-check which one Postman uses?",
"You're right params works ok but makes the URI so it works with few data only while sending ... |
https://api.github.com/repos/psf/requests/issues/5143 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5143/labels{/name} | https://api.github.com/repos/psf/requests/issues/5143/comments | https://api.github.com/repos/psf/requests/issues/5143/events | https://github.com/psf/requests/issues/5143 | 472,210,732 | MDU6SXNzdWU0NzIyMTA3MzI= | 5,143 | Change The Project Logo | {
"avatar_url": "https://avatars.githubusercontent.com/u/47358913?v=4",
"events_url": "https://api.github.com/users/isidentical/events{/privacy}",
"followers_url": "https://api.github.com/users/isidentical/followers",
"following_url": "https://api.github.com/users/isidentical/following{/other_user}",
"gists_url": "https://api.github.com/users/isidentical/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/isidentical",
"id": 47358913,
"login": "isidentical",
"node_id": "MDQ6VXNlcjQ3MzU4OTEz",
"organizations_url": "https://api.github.com/users/isidentical/orgs",
"received_events_url": "https://api.github.com/users/isidentical/received_events",
"repos_url": "https://api.github.com/users/isidentical/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/isidentical/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/isidentical/subscriptions",
"type": "User",
"url": "https://api.github.com/users/isidentical",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2019-07-24T10:42:51Z | 2021-09-04T00:06:26Z | 2019-07-25T15:16:12Z | NONE | resolved | The logo reminds us kenneth reitz and what he did, IMO it is better to remove the logo or replace it with something that is not specific to a person. | {
"avatar_url": "https://avatars.githubusercontent.com/u/47358913?v=4",
"events_url": "https://api.github.com/users/isidentical/events{/privacy}",
"followers_url": "https://api.github.com/users/isidentical/followers",
"following_url": "https://api.github.com/users/isidentical/following{/other_user}",
"gists_url": "https://api.github.com/users/isidentical/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/isidentical",
"id": 47358913,
"login": "isidentical",
"node_id": "MDQ6VXNlcjQ3MzU4OTEz",
"organizations_url": "https://api.github.com/users/isidentical/orgs",
"received_events_url": "https://api.github.com/users/isidentical/received_events",
"repos_url": "https://api.github.com/users/isidentical/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/isidentical/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/isidentical/subscriptions",
"type": "User",
"url": "https://api.github.com/users/isidentical",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 5,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 5,
"url": "https://api.github.com/repos/psf/requests/issues/5143/reactions"
} | https://api.github.com/repos/psf/requests/issues/5143/timeline | null | completed | null | null | false | [
"That would make me sad.",
"> That would make me sad\r\n\r\nOkey, then we can close? IMO you dont think this is serious but it is. \r\n\r\nI didn't think a `collaborator` will troll my issue but if that is the case, then i dont want to discuss it further. Lets rename the repo as `kenneth-reitzs-request` and close... |
https://api.github.com/repos/psf/requests/issues/5142 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5142/labels{/name} | https://api.github.com/repos/psf/requests/issues/5142/comments | https://api.github.com/repos/psf/requests/issues/5142/events | https://github.com/psf/requests/pull/5142 | 470,720,808 | MDExOlB1bGxSZXF1ZXN0Mjk5NTk1MTY5 | 5,142 | Improve docs | {
"avatar_url": "https://avatars.githubusercontent.com/u/47706471?v=4",
"events_url": "https://api.github.com/users/dullbananas/events{/privacy}",
"followers_url": "https://api.github.com/users/dullbananas/followers",
"following_url": "https://api.github.com/users/dullbananas/following{/other_user}",
"gists_url": "https://api.github.com/users/dullbananas/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dullbananas",
"id": 47706471,
"login": "dullbananas",
"node_id": "MDQ6VXNlcjQ3NzA2NDcx",
"organizations_url": "https://api.github.com/users/dullbananas/orgs",
"received_events_url": "https://api.github.com/users/dullbananas/received_events",
"repos_url": "https://api.github.com/users/dullbananas/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dullbananas/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dullbananas/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dullbananas",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2019-07-20T22:35:03Z | 2021-08-31T00:07:09Z | 2019-07-21T03:57:01Z | 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/5142/reactions"
} | https://api.github.com/repos/psf/requests/issues/5142/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5142.diff",
"html_url": "https://github.com/psf/requests/pull/5142",
"merged_at": "2019-07-21T03:57:01Z",
"patch_url": "https://github.com/psf/requests/pull/5142.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5142"
} | true | [] | |
https://api.github.com/repos/psf/requests/issues/5141 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5141/labels{/name} | https://api.github.com/repos/psf/requests/issues/5141/comments | https://api.github.com/repos/psf/requests/issues/5141/events | https://github.com/psf/requests/pull/5141 | 470,395,068 | MDExOlB1bGxSZXF1ZXN0Mjk5Mzg4MzYw | 5,141 | Fix typos | {
"avatar_url": "https://avatars.githubusercontent.com/u/15278512?v=4",
"events_url": "https://api.github.com/users/minho42/events{/privacy}",
"followers_url": "https://api.github.com/users/minho42/followers",
"following_url": "https://api.github.com/users/minho42/following{/other_user}",
"gists_url": "https://api.github.com/users/minho42/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/minho42",
"id": 15278512,
"login": "minho42",
"node_id": "MDQ6VXNlcjE1Mjc4NTEy",
"organizations_url": "https://api.github.com/users/minho42/orgs",
"received_events_url": "https://api.github.com/users/minho42/received_events",
"repos_url": "https://api.github.com/users/minho42/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/minho42/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/minho42/subscriptions",
"type": "User",
"url": "https://api.github.com/users/minho42",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2019-07-19T15:46:51Z | 2021-08-31T00:07:09Z | 2019-07-23T16:53:22Z | 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/5141/reactions"
} | https://api.github.com/repos/psf/requests/issues/5141/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5141.diff",
"html_url": "https://github.com/psf/requests/pull/5141",
"merged_at": "2019-07-23T16:53:22Z",
"patch_url": "https://github.com/psf/requests/pull/5141.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5141"
} | true | [] | |
https://api.github.com/repos/psf/requests/issues/5140 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5140/labels{/name} | https://api.github.com/repos/psf/requests/issues/5140/comments | https://api.github.com/repos/psf/requests/issues/5140/events | https://github.com/psf/requests/issues/5140 | 469,878,823 | MDU6SXNzdWU0Njk4Nzg4MjM= | 5,140 | Client Side Certs with session | {
"avatar_url": "https://avatars.githubusercontent.com/u/3720126?v=4",
"events_url": "https://api.github.com/users/CMLL/events{/privacy}",
"followers_url": "https://api.github.com/users/CMLL/followers",
"following_url": "https://api.github.com/users/CMLL/following{/other_user}",
"gists_url": "https://api.github.com/users/CMLL/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/CMLL",
"id": 3720126,
"login": "CMLL",
"node_id": "MDQ6VXNlcjM3MjAxMjY=",
"organizations_url": "https://api.github.com/users/CMLL/orgs",
"received_events_url": "https://api.github.com/users/CMLL/received_events",
"repos_url": "https://api.github.com/users/CMLL/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/CMLL/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/CMLL/subscriptions",
"type": "User",
"url": "https://api.github.com/users/CMLL",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 1 | 2019-07-18T16:51:09Z | 2019-10-01T20:23:47Z | null | NONE | null | Summary.
Trying to get client side certificates to work with session but I'm seeing a difference between the results when making the call with a session and the helper get method.
## Expected Result
Calling get with a Session returns the same result as calling `requests.get`.
## Actual Result
Request fails as if the certificate was not passed.
## Reproduction Steps

## System Information
$ python -m requests.help
```
(panopta_env) ➜ ~ python -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "2.7.16"
},
"platform": {
"release": "18.6.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1000212f"
},
"urllib3": {
"version": "1.25.3"
},
"using_pyopenssl": false
}
```
| null | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5140/reactions"
} | https://api.github.com/repos/psf/requests/issues/5140/timeline | null | null | null | null | false | [
"Looks like this is related to #4325."
] |
https://api.github.com/repos/psf/requests/issues/5139 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5139/labels{/name} | https://api.github.com/repos/psf/requests/issues/5139/comments | https://api.github.com/repos/psf/requests/issues/5139/events | https://github.com/psf/requests/issues/5139 | 468,249,703 | MDU6SXNzdWU0NjgyNDk3MDM= | 5,139 | Requests3 Docs: Add migration path for api from Requests2 | {
"avatar_url": "https://avatars.githubusercontent.com/u/85395?v=4",
"events_url": "https://api.github.com/users/AnneTheAgile/events{/privacy}",
"followers_url": "https://api.github.com/users/AnneTheAgile/followers",
"following_url": "https://api.github.com/users/AnneTheAgile/following{/other_user}",
"gists_url": "https://api.github.com/users/AnneTheAgile/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/AnneTheAgile",
"id": 85395,
"login": "AnneTheAgile",
"node_id": "MDQ6VXNlcjg1Mzk1",
"organizations_url": "https://api.github.com/users/AnneTheAgile/orgs",
"received_events_url": "https://api.github.com/users/AnneTheAgile/received_events",
"repos_url": "https://api.github.com/users/AnneTheAgile/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/AnneTheAgile/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/AnneTheAgile/subscriptions",
"type": "User",
"url": "https://api.github.com/users/AnneTheAgile",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2019-07-15T17:35:43Z | 2021-09-02T00:07:25Z | 2020-02-10T06:20:33Z | NONE | resolved | Summary.
## Expected Result
Docs page which has migration for 1-2 also has for 2-3 ;
https://github.com/kennethreitz/requests3/blob/master/docs/api.rst
## Actual Result
Only 1-2 is still on docs/api.rst, even on repo requests3 (which has no issues only PR's)
## Reproduction Steps
browse ^^
## System Information
This is for dev docs
| {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5139/reactions"
} | https://api.github.com/repos/psf/requests/issues/5139/timeline | null | completed | null | null | false | [
"If right now everything is fully back compatible, I am happy to give a PR for that.\r\nThe only note then would be to ensure you are not using python 2, because Requests3 only supports python3.6+ per the readme.",
"Hi @AnneTheAgile, this reply is a bit later than it should have been. This project doesn't have a... |
https://api.github.com/repos/psf/requests/issues/5138 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5138/labels{/name} | https://api.github.com/repos/psf/requests/issues/5138/comments | https://api.github.com/repos/psf/requests/issues/5138/events | https://github.com/psf/requests/issues/5138 | 467,999,098 | MDU6SXNzdWU0Njc5OTkwOTg= | 5,138 | python-requests.org looks down | {
"avatar_url": "https://avatars.githubusercontent.com/u/9987241?v=4",
"events_url": "https://api.github.com/users/mhow2/events{/privacy}",
"followers_url": "https://api.github.com/users/mhow2/followers",
"following_url": "https://api.github.com/users/mhow2/following{/other_user}",
"gists_url": "https://api.github.com/users/mhow2/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mhow2",
"id": 9987241,
"login": "mhow2",
"node_id": "MDQ6VXNlcjk5ODcyNDE=",
"organizations_url": "https://api.github.com/users/mhow2/orgs",
"received_events_url": "https://api.github.com/users/mhow2/received_events",
"repos_url": "https://api.github.com/users/mhow2/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mhow2/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mhow2/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mhow2",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 5 | 2019-07-15T08:25:10Z | 2021-09-04T00:06:26Z | 2019-07-16T15:07:47Z | NONE | resolved | I saw #5079 but to me it is still down, even the domain itself doesn't resolve to an IP address. | {
"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": 8,
"-1": 0,
"confused": 1,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 9,
"url": "https://api.github.com/repos/psf/requests/issues/5138/reactions"
} | https://api.github.com/repos/psf/requests/issues/5138/timeline | null | completed | null | null | false | [
"Seems to be back.",
"Hi ! Thanks.\r\n\r\nhttp://python-requests.org now redirects to https://2.python-requests.org/en/master/ and the content is ok\r\n\r\nHowever notice that https://python-requests.org/ raise an `SSL_ERROR_INTERNAL_ERROR_ALERT` in my firefox browser.",
"@kennethreitz : I don't understand why... |
https://api.github.com/repos/psf/requests/issues/5137 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5137/labels{/name} | https://api.github.com/repos/psf/requests/issues/5137/comments | https://api.github.com/repos/psf/requests/issues/5137/events | https://github.com/psf/requests/issues/5137 | 467,235,902 | MDU6SXNzdWU0NjcyMzU5MDI= | 5,137 | Is it possible to manually set the ecdh curve? | {
"avatar_url": "https://avatars.githubusercontent.com/u/441148?v=4",
"events_url": "https://api.github.com/users/michaelrice/events{/privacy}",
"followers_url": "https://api.github.com/users/michaelrice/followers",
"following_url": "https://api.github.com/users/michaelrice/following{/other_user}",
"gists_url": "https://api.github.com/users/michaelrice/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/michaelrice",
"id": 441148,
"login": "michaelrice",
"node_id": "MDQ6VXNlcjQ0MTE0OA==",
"organizations_url": "https://api.github.com/users/michaelrice/orgs",
"received_events_url": "https://api.github.com/users/michaelrice/received_events",
"repos_url": "https://api.github.com/users/michaelrice/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/michaelrice/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/michaelrice/subscriptions",
"type": "User",
"url": "https://api.github.com/users/michaelrice",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2019-07-12T05:59:16Z | 2022-02-26T06:00:26Z | 2021-11-28T05:23:26Z | NONE | resolved | I am on ubuntu 18.04 and there seems to be a problem with the openssl version it ships with such that I cant successfully connect to our API unless I manually set the `set_ecdh_curve("secp384r1")`. Right now Im having to just use urllib and do something like:
```python
ctx = ssl.create_default_context()
ctx.set_ecdh_curve("secp384r1")
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
```
I would like to switch from urllib to requests for my project but am unsure how to set this with requests. Is it possible, and if so how do I do it?
| {
"avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4",
"events_url": "https://api.github.com/users/sethmlarson/events{/privacy}",
"followers_url": "https://api.github.com/users/sethmlarson/followers",
"following_url": "https://api.github.com/users/sethmlarson/following{/other_user}",
"gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sethmlarson",
"id": 18519037,
"login": "sethmlarson",
"node_id": "MDQ6VXNlcjE4NTE5MDM3",
"organizations_url": "https://api.github.com/users/sethmlarson/orgs",
"received_events_url": "https://api.github.com/users/sethmlarson/received_events",
"repos_url": "https://api.github.com/users/sethmlarson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sethmlarson",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5137/reactions"
} | https://api.github.com/repos/psf/requests/issues/5137/timeline | null | completed | null | null | false | [
"Thanks for opening this. This likely won't be implemented as a direct option as it's so low-level and already covered by `SSLContext`."
] |
https://api.github.com/repos/psf/requests/issues/5136 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5136/labels{/name} | https://api.github.com/repos/psf/requests/issues/5136/comments | https://api.github.com/repos/psf/requests/issues/5136/events | https://github.com/psf/requests/issues/5136 | 466,210,052 | MDU6SXNzdWU0NjYyMTAwNTI= | 5,136 | Blocking POST request during nested exceptions raising | {
"avatar_url": "https://avatars.githubusercontent.com/u/10978115?v=4",
"events_url": "https://api.github.com/users/jdemaria/events{/privacy}",
"followers_url": "https://api.github.com/users/jdemaria/followers",
"following_url": "https://api.github.com/users/jdemaria/following{/other_user}",
"gists_url": "https://api.github.com/users/jdemaria/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jdemaria",
"id": 10978115,
"login": "jdemaria",
"node_id": "MDQ6VXNlcjEwOTc4MTE1",
"organizations_url": "https://api.github.com/users/jdemaria/orgs",
"received_events_url": "https://api.github.com/users/jdemaria/received_events",
"repos_url": "https://api.github.com/users/jdemaria/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jdemaria/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jdemaria/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jdemaria",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 5 | 2019-07-10T09:45:30Z | 2019-07-23T12:59:41Z | null | NONE | null | My script seems (infinitely, more than 12 hours) blocked in a POST request. When I kill it, I get all the nested exceptions below and my feeling it that there is something wrong inside Python requests, do you confirm the problem?
Note that I think I can use GET instead POST but I don't know if it will block too (I'm not sure if POST or GET is more logical for my case).
Thanks in advance!
## Expected Result
Requests should raise an exception instead of infinitely block.
## Actual Result
The POST infinitely block and I get these exceptions after killing the script:
```
2019-07-09 19:05:03,546 [ERROR] Unexpected error when searching new products
Traceback (most recent call last):
File "/mount/internal/work-st/apps/download_scripts/miniconda3/lib/python3.7/site-packages/urllib3/connection.py", line 159, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw)
File "/mount/internal/work-st/apps/download_scripts/miniconda3/lib/python3.7/site-packages/urllib3/util/connection.py", line 80, in create_connection
raise err
File "/mount/internal/work-st/apps/download_scripts/miniconda3/lib/python3.7/site-packages/urllib3/util/connection.py", line 70, in create_connection
sock.connect(sa)
OSError: [Errno 101] Network is unreachable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/mount/internal/work-st/apps/download_scripts/miniconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/mount/internal/work-st/apps/download_scripts/miniconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 343, in _make_request
self._validate_conn(conn)
File "/mount/internal/work-st/apps/download_scripts/miniconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 839, in _validate_conn
conn.connect()
File "/mount/internal/work-st/apps/download_scripts/miniconda3/lib/python3.7/site-packages/urllib3/connection.py", line 301, in connect
conn = self._new_conn()
File "/mount/internal/work-st/apps/download_scripts/miniconda3/lib/python3.7/site-packages/urllib3/connection.py", line 168, in _new_conn
self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f34e5df2cc0>: Failed to establish a new connection: [Errno 101] Network is unreachable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/mount/internal/work-st/apps/download_scripts/miniconda3/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/mount/internal/work-st/apps/download_scripts/miniconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File "/mount/internal/work-st/apps/download_scripts/miniconda3/lib/python3.7/site-packages/urllib3/util/retry.py", line 398, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='oceandata.sci.gsfc.nasa.gov', port=443): Max retries exceeded with url: /api/file_search (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f34e5df2cc0>: Failed to establish a new connection: [Errno 101] Network is unreachable'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/mount/internal/work-st/apps/download_scripts/nasa-oc-download/nasa_oc_download.py", line 38, in download_products
checksums_file)
File "/mount/internal/work-st/apps/download_scripts/nasa-oc-download/nasa_oc_download.py", line 104, in search_new_products
cur_df = nasa_oc_file_search.search(post_data, split_by_month=True)
File "/mount/internal/work-st/apps/download_scripts/nasa-oc-download/nasa_oc_file_search.py", line 28, in search
return split_search(post_data)
File "/mount/internal/work-st/apps/download_scripts/nasa-oc-download/nasa_oc_file_search.py", line 77, in split_search
cur_df = simple_search(post_data)
File "/mount/internal/work-st/apps/download_scripts/nasa-oc-download/nasa_oc_file_search.py", line 35, in simple_search
data=post_data)
File "/mount/internal/work-st/apps/download_scripts/nasa-oc-download/throttle.py", line 26, in wrapper
return fn(*args, **kwargs)
File "/mount/internal/work-st/apps/download_scripts/nasa-oc-download/nasa_oc_file_search.py", line 49, in nasa_oc_url_request
response = requests.request(method, url, data=data)
File "/mount/internal/work-st/apps/download_scripts/miniconda3/lib/python3.7/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/mount/internal/work-st/apps/download_scripts/miniconda3/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/mount/internal/work-st/apps/download_scripts/miniconda3/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/mount/internal/work-st/apps/download_scripts/miniconda3/lib/python3.7/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='oceandata.sci.gsfc.nasa.gov', port=443): Max retries exceeded with url: /api/file_search (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f34e5df2cc0>: Failed to establish a new connection: [Errno 101] Network is unreachable'))
```
## Reproduction Steps
Not easily reproducible because this happens when the target URL does not respond, but the code is like that (I can give an exemple of <post_data> if needed):
```python
import requests
try:
response = requests.request('POST', 'https://oceandata.sci.gsfc.nasa.gov/api/file_search', data=<post_data>)
response.raise_for_status()
except:
logging.exception('Unexpected error when searching new products')
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.6.1"
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.7.3"
},
"platform": {
"release": "3.16.0-30-generic",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010102f",
"version": "19.0.0"
},
"requests": {
"version": "2.21.0"
},
"system_ssl": {
"version": "1010102f"
},
"urllib3": {
"version": "1.24.1"
},
"using_pyopenssl": true
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
| null | {
"+1": 1,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/5136/reactions"
} | https://api.github.com/repos/psf/requests/issues/5136/timeline | null | null | null | null | false | [
"I don't think this problem is with requests, but a problem with the endpoint. I've tried to make GET and POST requests, neither succeeds. Looking through Google searches, there was a forum post about whether or not it still exists. It might be worth to send an email to NASA to find out if that endpoint still exist... |
https://api.github.com/repos/psf/requests/issues/5135 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5135/labels{/name} | https://api.github.com/repos/psf/requests/issues/5135/comments | https://api.github.com/repos/psf/requests/issues/5135/events | https://github.com/psf/requests/pull/5135 | 466,084,306 | MDExOlB1bGxSZXF1ZXN0Mjk1OTk1ODUy | 5,135 | Workaround for ipv4 address validation | {
"avatar_url": "https://avatars.githubusercontent.com/u/31266487?v=4",
"events_url": "https://api.github.com/users/HJones82493/events{/privacy}",
"followers_url": "https://api.github.com/users/HJones82493/followers",
"following_url": "https://api.github.com/users/HJones82493/following{/other_user}",
"gists_url": "https://api.github.com/users/HJones82493/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/HJones82493",
"id": 31266487,
"login": "HJones82493",
"node_id": "MDQ6VXNlcjMxMjY2NDg3",
"organizations_url": "https://api.github.com/users/HJones82493/orgs",
"received_events_url": "https://api.github.com/users/HJones82493/received_events",
"repos_url": "https://api.github.com/users/HJones82493/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/HJones82493/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/HJones82493/subscriptions",
"type": "User",
"url": "https://api.github.com/users/HJones82493",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2019-07-10T03:52:00Z | 2023-05-12T00:03:09Z | 2022-05-11T00:50:54Z | NONE | resolved | This fixes the is_ipv4_address function. Initially intended to be a workaround for Issue #5131 it is now a removal of an external dependency. Since the check is a simple one, there is no need to rely on external sources. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5135/reactions"
} | https://api.github.com/repos/psf/requests/issues/5135/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5135.diff",
"html_url": "https://github.com/psf/requests/pull/5135",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5135.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5135"
} | true | [
"Just for a reference, the `socket.inet_aton` issue is being discussed on Python's bug tracker: https://bugs.python.org/issue37495",
"Now that we've dropped support for Python 2.7-3.6, I think we're more likely to rely on `ipaddress` than try to maintain this ourselves. I'm going to close this out in favor of tha... |
https://api.github.com/repos/psf/requests/issues/5134 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5134/labels{/name} | https://api.github.com/repos/psf/requests/issues/5134/comments | https://api.github.com/repos/psf/requests/issues/5134/events | https://github.com/psf/requests/issues/5134 | 465,205,352 | MDU6SXNzdWU0NjUyMDUzNTI= | 5,134 | Need to send xlsx file and json data in a single POST requests | {
"avatar_url": "https://avatars.githubusercontent.com/u/29625387?v=4",
"events_url": "https://api.github.com/users/Sanjay9889/events{/privacy}",
"followers_url": "https://api.github.com/users/Sanjay9889/followers",
"following_url": "https://api.github.com/users/Sanjay9889/following{/other_user}",
"gists_url": "https://api.github.com/users/Sanjay9889/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Sanjay9889",
"id": 29625387,
"login": "Sanjay9889",
"node_id": "MDQ6VXNlcjI5NjI1Mzg3",
"organizations_url": "https://api.github.com/users/Sanjay9889/orgs",
"received_events_url": "https://api.github.com/users/Sanjay9889/received_events",
"repos_url": "https://api.github.com/users/Sanjay9889/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Sanjay9889/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Sanjay9889/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Sanjay9889",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2019-07-08T11:32:22Z | 2021-09-02T00:07:25Z | 2020-02-10T06:22:39Z | NONE | resolved | Please refer to our [Stack Overflow tag](https://stackoverflow.com/questions/tagged/python-requests) for guidance.
Trying following code.
Error :- ValueError: Data must not be a string.
data = open('migration_template.xlsx', 'rb')
files = {"Migration_Template_File ": data}
headers = {
'accept': 'application/json',
'Content-Type': 'multipart/form-data'
}
request_json = {
"operationName": "LTE SRAN - Add BTS to NetAct DNS (optional)",
"operationAlias": "Add the MRBTS FQDN and the BTSMED IP to the DNS in Netact",
"operationAttributes": {
"xlsxFileChooser": "Migration_Template_File"
}
}
json_data = json.dumps(request_json)
response = requests.post(base_url, auth=(username, password), verify=False,
data= json_data,
files= files,
headers=headers
)
print(response.status_code)
print(response.content)
| {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5134/reactions"
} | https://api.github.com/repos/psf/requests/issues/5134/timeline | null | completed | null | null | false | [
"Are you sure you're running the most recent version of requests? I ran this with some dummy data and couldn't reproduce the error. If you don't want to mess with versioning, perhaps replace `data=json_data` with `data=request_json`. The data parameter is looking for a dictionary and `json.dumps` returns a JSON for... |
https://api.github.com/repos/psf/requests/issues/5133 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5133/labels{/name} | https://api.github.com/repos/psf/requests/issues/5133/comments | https://api.github.com/repos/psf/requests/issues/5133/events | https://github.com/psf/requests/issues/5133 | 464,981,134 | MDU6SXNzdWU0NjQ5ODExMzQ= | 5,133 | [Question] Can we add cookies to the prepared request cookie jar when extending AuthBase? | {
"avatar_url": "https://avatars.githubusercontent.com/u/17887843?v=4",
"events_url": "https://api.github.com/users/symonk/events{/privacy}",
"followers_url": "https://api.github.com/users/symonk/followers",
"following_url": "https://api.github.com/users/symonk/following{/other_user}",
"gists_url": "https://api.github.com/users/symonk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/symonk",
"id": 17887843,
"login": "symonk",
"node_id": "MDQ6VXNlcjE3ODg3ODQz",
"organizations_url": "https://api.github.com/users/symonk/orgs",
"received_events_url": "https://api.github.com/users/symonk/received_events",
"repos_url": "https://api.github.com/users/symonk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/symonk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/symonk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/symonk",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2019-07-07T18:47:05Z | 2021-09-04T00:06:30Z | 2019-07-10T14:15:58Z | NONE | resolved | Hi just a quick question, I have implemented a custom auth for our api which uses custom headers (user/password) by extending AuthBase, however I have another scenario where I want to auth (without those headers, but instead using cookies that I have derived from the browser upon logging in).
Can i add the cookies in the AuthBase __call__()?
a trivial example:
```python
class CookieAuth(AuthBase):
"""
Custom auth using cookies from a selenium driver browser
"""
def __init__(self, csrf_token, cookies):
self.csrf_token = csrf_token
self.cookies = cookies
def __call__(self, r):
r.headers['X-csrf-token'] = self.csrf_token
# can i addcookies here to the prepared request?
def __repr__(self):
return "Authenticated using cookie auth"
```
_cookies is private and an instance of CookieJar? is it ok to add my cookies this way? or can it even be done by just adding them in?
n.b I don't want to just pass them into request using cookies=cookies because the wrapper to my api is like so:
myapi.v1.endpoint(CookieAuth(csrf_token='foo', cookies='bar').get_something() | {
"avatar_url": "https://avatars.githubusercontent.com/u/17887843?v=4",
"events_url": "https://api.github.com/users/symonk/events{/privacy}",
"followers_url": "https://api.github.com/users/symonk/followers",
"following_url": "https://api.github.com/users/symonk/following{/other_user}",
"gists_url": "https://api.github.com/users/symonk/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/symonk",
"id": 17887843,
"login": "symonk",
"node_id": "MDQ6VXNlcjE3ODg3ODQz",
"organizations_url": "https://api.github.com/users/symonk/orgs",
"received_events_url": "https://api.github.com/users/symonk/received_events",
"repos_url": "https://api.github.com/users/symonk/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/symonk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/symonk/subscriptions",
"type": "User",
"url": "https://api.github.com/users/symonk",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5133/reactions"
} | https://api.github.com/repos/psf/requests/issues/5133/timeline | null | completed | null | null | false | [] |
https://api.github.com/repos/psf/requests/issues/5132 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5132/labels{/name} | https://api.github.com/repos/psf/requests/issues/5132/comments | https://api.github.com/repos/psf/requests/issues/5132/events | https://github.com/psf/requests/issues/5132 | 464,604,001 | MDU6SXNzdWU0NjQ2MDQwMDE= | 5,132 | requests.get stream keyword argument | {
"avatar_url": "https://avatars.githubusercontent.com/u/29889683?v=4",
"events_url": "https://api.github.com/users/orihomie/events{/privacy}",
"followers_url": "https://api.github.com/users/orihomie/followers",
"following_url": "https://api.github.com/users/orihomie/following{/other_user}",
"gists_url": "https://api.github.com/users/orihomie/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/orihomie",
"id": 29889683,
"login": "orihomie",
"node_id": "MDQ6VXNlcjI5ODg5Njgz",
"organizations_url": "https://api.github.com/users/orihomie/orgs",
"received_events_url": "https://api.github.com/users/orihomie/received_events",
"repos_url": "https://api.github.com/users/orihomie/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/orihomie/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/orihomie/subscriptions",
"type": "User",
"url": "https://api.github.com/users/orihomie",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2019-07-05T11:49:02Z | 2021-09-04T00:06:27Z | 2019-07-24T14:30:03Z | NONE | resolved | Hi, I'm trying to launch my python daemon inside of docker container and getting error:
> 'Connection broken: IncompleteRead(0 bytes read)'
- it happens when get requests performed inside of daemon (async, loading about 20k data, totally ~40k get-requests)
As I googled I've find out that users advise to set "stream" value to false - I did it, but nothing changed and then I just went deep into your code and find out that actually this variable does nothing (below is the final destination where this variable is being used):
```py
def add_headers(self, request, **kwargs):
"""Add any headers needed by the connection. As of v2.0 this does
nothing by default, but is left for overriding by users that subclass
the :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.
This should not be called from user code, and is only exposed for use
when subclassing the
:class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.
:param request: The :class:`PreparedRequest <PreparedRequest>` to add headers to.
:param kwargs: The keyword arguments from the call to send().
"""
pass
```
So, could you provide me some info / help - how should I use requests lib to force it to download data on get requests immediately? | {
"avatar_url": "https://avatars.githubusercontent.com/u/29889683?v=4",
"events_url": "https://api.github.com/users/orihomie/events{/privacy}",
"followers_url": "https://api.github.com/users/orihomie/followers",
"following_url": "https://api.github.com/users/orihomie/following{/other_user}",
"gists_url": "https://api.github.com/users/orihomie/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/orihomie",
"id": 29889683,
"login": "orihomie",
"node_id": "MDQ6VXNlcjI5ODg5Njgz",
"organizations_url": "https://api.github.com/users/orihomie/orgs",
"received_events_url": "https://api.github.com/users/orihomie/received_events",
"repos_url": "https://api.github.com/users/orihomie/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/orihomie/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/orihomie/subscriptions",
"type": "User",
"url": "https://api.github.com/users/orihomie",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5132/reactions"
} | https://api.github.com/repos/psf/requests/issues/5132/timeline | null | completed | null | null | false | [
"It actually gets used here in the codebase: https://github.com/kennethreitz/requests/blob/0b6c110a5cd65685c42702b27e2872ad9c234ab8/requests/sessions.py#L685\r\n\r\nYou can try simulating what the internal code is doing by doing something like `requests.get(\"...\").content` in your script\r\n\r\nWhen accessing the... |
https://api.github.com/repos/psf/requests/issues/5131 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5131/labels{/name} | https://api.github.com/repos/psf/requests/issues/5131/comments | https://api.github.com/repos/psf/requests/issues/5131/events | https://github.com/psf/requests/issues/5131 | 463,974,765 | MDU6SXNzdWU0NjM5NzQ3NjU= | 5,131 | requests.utils function accepts invalid ip/cidr input | {
"avatar_url": "https://avatars.githubusercontent.com/u/10009354?v=4",
"events_url": "https://api.github.com/users/disconnect3d/events{/privacy}",
"followers_url": "https://api.github.com/users/disconnect3d/followers",
"following_url": "https://api.github.com/users/disconnect3d/following{/other_user}",
"gists_url": "https://api.github.com/users/disconnect3d/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/disconnect3d",
"id": 10009354,
"login": "disconnect3d",
"node_id": "MDQ6VXNlcjEwMDA5MzU0",
"organizations_url": "https://api.github.com/users/disconnect3d/orgs",
"received_events_url": "https://api.github.com/users/disconnect3d/received_events",
"repos_url": "https://api.github.com/users/disconnect3d/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/disconnect3d/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/disconnect3d/subscriptions",
"type": "User",
"url": "https://api.github.com/users/disconnect3d",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 9 | 2019-07-03T22:11:14Z | 2024-03-28T01:43:03Z | null | NONE | null | TLDR: On some libc implementations (e.g. glibc) the `socket.inet_aton` function parses IP strings trailed with whitespace and garbage, and this function is used by requests utility functions which if used externally, may cause bugs or/and security vulnerabilities.
An example of the issue can be seen below:

I have written a more detailed description of the `socket.inet_aton`'s underlying problem on [Python's bugtracker issue 37495](https://bugs.python.org/issue37495). It is yet to be decided if this is going to be fixed in Python.
## Expected Result
The `requests.utils` functions `address_in_network`, `is_ipv4_address` and `is_valid_cidr` should fail with invalid input.
## Actual Result
Incorrect IP strings do not return an error and instead return as if the trailing garbage did not exist in the IP string.
## Reproduction Steps
```python
import requests
print(requests.utils.address_in_network('1.1.1.1 wtf', '1.1.1.1/24'))
print(requests.utils.is_ipv4_address('1.1.1.1 disconnect3d was here...'))
print(requests.utils.is_valid_cidr('1.1.1.1 obviously not but yes/24'))
```
## System Information
The issue is related to libc implementation and has been tested on glibc 2.27 and 2.29.
It also occurs on MacOS which I am not sure if it is based on glibc. | null | {
"+1": 1,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/5131/reactions"
} | https://api.github.com/repos/psf/requests/issues/5131/timeline | null | null | null | null | false | [
"PR #5135 \r\nI feel as though the call to the socket library is actually unnecessary here.",
"Ping @kennethreitz @Lukasa @sigmavirus24 @nateprewitt @slingamn can we finally get some love here and get this fixed?\r\n\r\nThis could probably also be marked as a security issue since if someone uses this in a securit... |
https://api.github.com/repos/psf/requests/issues/5130 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5130/labels{/name} | https://api.github.com/repos/psf/requests/issues/5130/comments | https://api.github.com/repos/psf/requests/issues/5130/events | https://github.com/psf/requests/issues/5130 | 463,771,555 | MDU6SXNzdWU0NjM3NzE1NTU= | 5,130 | proxies argument option: handles bytes literals in dict differently from other argument options | {
"avatar_url": "https://avatars.githubusercontent.com/u/8715697?v=4",
"events_url": "https://api.github.com/users/Sekin/events{/privacy}",
"followers_url": "https://api.github.com/users/Sekin/followers",
"following_url": "https://api.github.com/users/Sekin/following{/other_user}",
"gists_url": "https://api.github.com/users/Sekin/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Sekin",
"id": 8715697,
"login": "Sekin",
"node_id": "MDQ6VXNlcjg3MTU2OTc=",
"organizations_url": "https://api.github.com/users/Sekin/orgs",
"received_events_url": "https://api.github.com/users/Sekin/received_events",
"repos_url": "https://api.github.com/users/Sekin/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Sekin/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Sekin/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Sekin",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 2 | 2019-07-03T14:02:34Z | 2020-06-29T15:46:27Z | null | NONE | null | ```python
https_proxy = b'http://localhost:8080'
http_proxy = b'http://localhost:8080'
proxy_dict = {b'https' : https_proxy, b'http' : http_proxy}
r = requests.request(url, proxies=proxy_dict, verify=False)
```
## Expected Result
The *proxies argument option* accepts bytes literals as arguments, and proxies are being used.
## Actual Result
The *proxies argument option* accepts bytes literals as arguments, but seems to disregard them internally: Proxies have no effect. However, no exception is raised either.
## Problem
The *proxies argument option* handles bytes literals differently compared to the other argument options, e.g.. *parameters* or *data*. The *proxies argument option* only works with ```str```:
```python
https_proxy = 'http://localhost:8080'
http_proxy = 'http://localhost:8080'
proxy_dict = {'https' : https_proxy, 'http' : http_proxy}
```
Exceptions are ignored. Using bytes literals does not raise an exception.
| 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/5130/reactions"
} | https://api.github.com/repos/psf/requests/issues/5130/timeline | null | null | null | null | false | [
"Going to check this out",
"I think we need to establish why byte literals should be accepted. I don't believe you can pass a bytes literal as a URL to requests."
] |
https://api.github.com/repos/psf/requests/issues/5129 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5129/labels{/name} | https://api.github.com/repos/psf/requests/issues/5129/comments | https://api.github.com/repos/psf/requests/issues/5129/events | https://github.com/psf/requests/issues/5129 | 463,679,614 | MDU6SXNzdWU0NjM2Nzk2MTQ= | 5,129 | update urllib3 raise proxy error | {
"avatar_url": "https://avatars.githubusercontent.com/u/16145271?v=4",
"events_url": "https://api.github.com/users/returnWOW/events{/privacy}",
"followers_url": "https://api.github.com/users/returnWOW/followers",
"following_url": "https://api.github.com/users/returnWOW/following{/other_user}",
"gists_url": "https://api.github.com/users/returnWOW/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/returnWOW",
"id": 16145271,
"login": "returnWOW",
"node_id": "MDQ6VXNlcjE2MTQ1Mjcx",
"organizations_url": "https://api.github.com/users/returnWOW/orgs",
"received_events_url": "https://api.github.com/users/returnWOW/received_events",
"repos_url": "https://api.github.com/users/returnWOW/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/returnWOW/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/returnWOW/subscriptions",
"type": "User",
"url": "https://api.github.com/users/returnWOW",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2019-07-03T10:43:27Z | 2021-09-04T00:06:31Z | 2019-07-03T15:48:53Z | NONE | resolved | Summary.
Set requests on proxies, from urllib3(version 1.25.3) raise urllib3.exceptions.LocationParseError: Failed to parse: http://user:pass@xxx.xxx error
What you expected.
From urllib3 1.24.1 proxy set is work fine. urllib3 version 1.25.3 update url.py raise this error.
What happened instead.
```python
import requests
proxies = {
'http': 'http://user:pass@127.0.0.1:1080',
'https': 'http://user:pass@127.0.0.1:1080'
}
requests.get("http://www.bing.com", proxies=proxies)
```
## System Information
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.7"
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.7.2"
},
"platform": {
"release": "7",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "1010103f",
"version": "19.0.0"
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "101000af"
},
"urllib3": {
"version": "1.25.3"
},
"using_pyopenssl": true
}
```
Sorry for my bad English. Now I restore urllib3 to 1.24.1. | {
"avatar_url": "https://avatars.githubusercontent.com/u/16145271?v=4",
"events_url": "https://api.github.com/users/returnWOW/events{/privacy}",
"followers_url": "https://api.github.com/users/returnWOW/followers",
"following_url": "https://api.github.com/users/returnWOW/following{/other_user}",
"gists_url": "https://api.github.com/users/returnWOW/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/returnWOW",
"id": 16145271,
"login": "returnWOW",
"node_id": "MDQ6VXNlcjE2MTQ1Mjcx",
"organizations_url": "https://api.github.com/users/returnWOW/orgs",
"received_events_url": "https://api.github.com/users/returnWOW/received_events",
"repos_url": "https://api.github.com/users/returnWOW/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/returnWOW/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/returnWOW/subscriptions",
"type": "User",
"url": "https://api.github.com/users/returnWOW",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5129/reactions"
} | https://api.github.com/repos/psf/requests/issues/5129/timeline | null | completed | null | null | false | [
"I'm not receiving your error:\r\n\r\n```python\r\nfrom urllib3.util import parse_url\r\n\r\nparse_url(\"http://user:pass@127.0.0.1:1080\")\r\nUrl(scheme=\"http\", auth=\"user:pass\", host=\"127.0.0.1\", port=1080, path=None, query=None, fragment=None)\r\n```\r\n\r\nIs your `user:pass` example different from what y... |
https://api.github.com/repos/psf/requests/issues/5128 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5128/labels{/name} | https://api.github.com/repos/psf/requests/issues/5128/comments | https://api.github.com/repos/psf/requests/issues/5128/events | https://github.com/psf/requests/pull/5128 | 463,142,697 | MDExOlB1bGxSZXF1ZXN0MjkzNjc5Mjc0 | 5,128 | Use urllib for chunked requests | {
"avatar_url": "https://avatars.githubusercontent.com/u/15229879?v=4",
"events_url": "https://api.github.com/users/lmvlmv/events{/privacy}",
"followers_url": "https://api.github.com/users/lmvlmv/followers",
"following_url": "https://api.github.com/users/lmvlmv/following{/other_user}",
"gists_url": "https://api.github.com/users/lmvlmv/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/lmvlmv",
"id": 15229879,
"login": "lmvlmv",
"node_id": "MDQ6VXNlcjE1MjI5ODc5",
"organizations_url": "https://api.github.com/users/lmvlmv/orgs",
"received_events_url": "https://api.github.com/users/lmvlmv/received_events",
"repos_url": "https://api.github.com/users/lmvlmv/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/lmvlmv/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lmvlmv/subscriptions",
"type": "User",
"url": "https://api.github.com/users/lmvlmv",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 6 | 2019-07-02T10:13:18Z | 2021-08-28T00:06:14Z | 2019-08-20T04:15:45Z | CONTRIBUTOR | resolved | Resubmit of [https://github.com/kennethreitz/requests/pull/4958](https://github.com/kennethreitz/requests/pull/4958 ) with up to date merge. Also addresses https://github.com/kennethreitz/requests/pull/4179.
Specifically, in my use case, chunked requests when a proxy is in use results in failure to evaluate the proxy configuration and the request being sent direct. It appears that urllib3 supports chunking as an option so this fork to lower level urllib3 code seems to no longer be required. | {
"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/5128/reactions"
} | https://api.github.com/repos/psf/requests/issues/5128/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5128.diff",
"html_url": "https://github.com/psf/requests/pull/5128",
"merged_at": "2019-08-20T04:15:45Z",
"patch_url": "https://github.com/psf/requests/pull/5128.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5128"
} | true | [
"Addresses [https://github.com/kennethreitz/requests/issues/3844](https://github.com/kennethreitz/requests/issues/3844)",
"fantastic. This was 100% my least favorite part of the codebase, and what I ended up doing in Requests III as well!",
"Hi @nateprewitt ,\r\n\r\nI understand that this PR was reverted for 2.... |
https://api.github.com/repos/psf/requests/issues/5127 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5127/labels{/name} | https://api.github.com/repos/psf/requests/issues/5127/comments | https://api.github.com/repos/psf/requests/issues/5127/events | https://github.com/psf/requests/pull/5127 | 462,878,885 | MDExOlB1bGxSZXF1ZXN0MjkzNDcyNjQ5 | 5,127 | Document that `request.head` defaults `allow_redirects` to `False` | {
"avatar_url": "https://avatars.githubusercontent.com/u/128330?v=4",
"events_url": "https://api.github.com/users/Unit03/events{/privacy}",
"followers_url": "https://api.github.com/users/Unit03/followers",
"following_url": "https://api.github.com/users/Unit03/following{/other_user}",
"gists_url": "https://api.github.com/users/Unit03/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Unit03",
"id": 128330,
"login": "Unit03",
"node_id": "MDQ6VXNlcjEyODMzMA==",
"organizations_url": "https://api.github.com/users/Unit03/orgs",
"received_events_url": "https://api.github.com/users/Unit03/received_events",
"repos_url": "https://api.github.com/users/Unit03/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Unit03/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Unit03/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Unit03",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2019-07-01T19:42:01Z | 2021-08-31T00:07:10Z | 2019-07-12T00:18:43Z | CONTRIBUTOR | resolved | Related: kennethreitz/requests#4274 | {
"avatar_url": "https://avatars.githubusercontent.com/u/8712070?v=4",
"events_url": "https://api.github.com/users/kobayashi/events{/privacy}",
"followers_url": "https://api.github.com/users/kobayashi/followers",
"following_url": "https://api.github.com/users/kobayashi/following{/other_user}",
"gists_url": "https://api.github.com/users/kobayashi/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kobayashi",
"id": 8712070,
"login": "kobayashi",
"node_id": "MDQ6VXNlcjg3MTIwNzA=",
"organizations_url": "https://api.github.com/users/kobayashi/orgs",
"received_events_url": "https://api.github.com/users/kobayashi/received_events",
"repos_url": "https://api.github.com/users/kobayashi/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kobayashi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kobayashi/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kobayashi",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5127/reactions"
} | https://api.github.com/repos/psf/requests/issues/5127/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5127.diff",
"html_url": "https://github.com/psf/requests/pull/5127",
"merged_at": "2019-07-12T00:18:43Z",
"patch_url": "https://github.com/psf/requests/pull/5127.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5127"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/5126 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5126/labels{/name} | https://api.github.com/repos/psf/requests/issues/5126/comments | https://api.github.com/repos/psf/requests/issues/5126/events | https://github.com/psf/requests/issues/5126 | 462,056,652 | MDU6SXNzdWU0NjIwNTY2NTI= | 5,126 | Can't connect to IPv6 addresses with zone ID | {
"avatar_url": "https://avatars.githubusercontent.com/u/49982580?v=4",
"events_url": "https://api.github.com/users/alex-fu27/events{/privacy}",
"followers_url": "https://api.github.com/users/alex-fu27/followers",
"following_url": "https://api.github.com/users/alex-fu27/following{/other_user}",
"gists_url": "https://api.github.com/users/alex-fu27/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alex-fu27",
"id": 49982580,
"login": "alex-fu27",
"node_id": "MDQ6VXNlcjQ5OTgyNTgw",
"organizations_url": "https://api.github.com/users/alex-fu27/orgs",
"received_events_url": "https://api.github.com/users/alex-fu27/received_events",
"repos_url": "https://api.github.com/users/alex-fu27/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alex-fu27/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alex-fu27/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alex-fu27",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2019-06-28T14:16:29Z | 2021-09-05T00:06:47Z | 2019-06-28T17:50:34Z | NONE | resolved | Requests fails on IPv6 URLs that contain a zone identifier when used with the current urllib3 (1.25).
## Expected Result
Prior to urllib3 v1.25, I could do this:
```python
import requests
requests.get("http://[fe80::145e:58ff:fec3:4698%enp0s20u1]:8080/")
```
And it worked as intended.
## Actual Result
Since I upgraded to urllib 1.25 and requests 2.22, this fails with `[Errno -2] Name or service not known`, because requests is escaping the % character and trying to access `[fe80::145e:58ff:fec3:4698`**%25**`enp0s20u1]` instead.
## Reproduction Steps
Install requests 2.22 or 2.21 and urllib 1.25 and try the two lines from "Expected Result", replacing the IP, zone ID and port. It might be a little tricky to reproduce if you do not have a device with a link-local address at hand.
## System Information
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.7.3"
},
"platform": {
"release": "5.1.14-arch1-1-ARCH",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1010103f"
},
"urllib3": {
"version": "1.25.3"
},
"using_pyopenssl": false
}
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/49982580?v=4",
"events_url": "https://api.github.com/users/alex-fu27/events{/privacy}",
"followers_url": "https://api.github.com/users/alex-fu27/followers",
"following_url": "https://api.github.com/users/alex-fu27/following{/other_user}",
"gists_url": "https://api.github.com/users/alex-fu27/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alex-fu27",
"id": 49982580,
"login": "alex-fu27",
"node_id": "MDQ6VXNlcjQ5OTgyNTgw",
"organizations_url": "https://api.github.com/users/alex-fu27/orgs",
"received_events_url": "https://api.github.com/users/alex-fu27/received_events",
"repos_url": "https://api.github.com/users/alex-fu27/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alex-fu27/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alex-fu27/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alex-fu27",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5126/reactions"
} | https://api.github.com/repos/psf/requests/issues/5126/timeline | null | completed | null | null | false | [
"This is actually an issue with urllib3. I'm going to reopen this issue and update this one. :)",
"I've opened urllib3/urllib3#1641. This issue can be closed if you'd like."
] |
https://api.github.com/repos/psf/requests/issues/5125 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5125/labels{/name} | https://api.github.com/repos/psf/requests/issues/5125/comments | https://api.github.com/repos/psf/requests/issues/5125/events | https://github.com/psf/requests/issues/5125 | 461,854,248 | MDU6SXNzdWU0NjE4NTQyNDg= | 5,125 | upload file with tavern using content-type multipart/form-data | {
"avatar_url": "https://avatars.githubusercontent.com/u/43543576?v=4",
"events_url": "https://api.github.com/users/i4ali999/events{/privacy}",
"followers_url": "https://api.github.com/users/i4ali999/followers",
"following_url": "https://api.github.com/users/i4ali999/following{/other_user}",
"gists_url": "https://api.github.com/users/i4ali999/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/i4ali999",
"id": 43543576,
"login": "i4ali999",
"node_id": "MDQ6VXNlcjQzNTQzNTc2",
"organizations_url": "https://api.github.com/users/i4ali999/orgs",
"received_events_url": "https://api.github.com/users/i4ali999/received_events",
"repos_url": "https://api.github.com/users/i4ali999/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/i4ali999/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/i4ali999/subscriptions",
"type": "User",
"url": "https://api.github.com/users/i4ali999",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2019-06-28T04:48:54Z | 2021-09-04T00:06:15Z | 2019-08-30T17:16:00Z | NONE | resolved | I am trying to use tavern for uploading file. Heres what my postman request looks like
[![enter image description here][1]][1]
using tavern heres what I have tried
name: add data
request:
url: "server/runs/cube/64409f3e-d78c-4788-909e-e50518b48d8a/well/c4a1e3e9-c7f7-461a-a5aa-d10d09153bfd/data"
method: POST
data:
type: TOPS
file: data/test.csv
response:
status_code: 200
But I get a 500 internal server error. The request through postman works just fine. What am I missing?
[1]: https://i.stack.imgur.com/MgMbk.jpg
[2]: https://i.stack.imgur.com/VOwxn.jpg | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5125/reactions"
} | https://api.github.com/repos/psf/requests/issues/5125/timeline | null | completed | null | null | false | [
"I found tavern does not support in multipart/form-data format.\r\nhttps://github.com/taverntesting/tavern/issues/233#issuecomment-453829482",
"Hi i4ali999@, this is an issue with Tavern and not requests. I’m going to resolve since there’s no additional steps to take here."
] |
https://api.github.com/repos/psf/requests/issues/5124 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5124/labels{/name} | https://api.github.com/repos/psf/requests/issues/5124/comments | https://api.github.com/repos/psf/requests/issues/5124/events | https://github.com/psf/requests/issues/5124 | 461,739,862 | MDU6SXNzdWU0NjE3Mzk4NjI= | 5,124 | Incomplete read but requests did not raise an error | {
"avatar_url": "https://avatars.githubusercontent.com/u/12819087?v=4",
"events_url": "https://api.github.com/users/koshy1123/events{/privacy}",
"followers_url": "https://api.github.com/users/koshy1123/followers",
"following_url": "https://api.github.com/users/koshy1123/following{/other_user}",
"gists_url": "https://api.github.com/users/koshy1123/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/koshy1123",
"id": 12819087,
"login": "koshy1123",
"node_id": "MDQ6VXNlcjEyODE5MDg3",
"organizations_url": "https://api.github.com/users/koshy1123/orgs",
"received_events_url": "https://api.github.com/users/koshy1123/received_events",
"repos_url": "https://api.github.com/users/koshy1123/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/koshy1123/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/koshy1123/subscriptions",
"type": "User",
"url": "https://api.github.com/users/koshy1123",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2019-06-27T20:42:48Z | 2021-11-26T04:00:32Z | 2021-08-28T03:45:20Z | NONE | resolved | First, let me preface that this issue might be because of some misspecification on the server side, but I'm curious if anyone has any ideas here. This [URL](https://hazards.fema.gov/femaportal/NFHL/Download/ProductsDownLoadServlet?DFIRMID=10001C&state=DELAWARE&county=KENT%20COUNTY&fileName=10001C_20190130.zip) points to a zip file I'd like to download. If I paste the URL in a browser window or `wget`, I successfully manage to download the zip file but I'm unable to download the zip file using `requests` or more accurately, `requests` only downloads a portion of the file and does not raise an error.
## Expected Result
Wanting to do this in python, I used `requests` and I had logic to stream the content and `iter_content` from the response and write to a file. I expected to write to and create a ~67 MB zipfile, or raise an incomplete read error.
## Actual Result
The response content is only `2583` bytes but it did successfully redirect to the right URL.
## Reproduction Steps
Simple code with outputs to replicate:
```
>>> import requests
>>> url = 'https://hazards.fema.gov/femaportal/NFHL/Download/ProductsDownLoadServlet?DFIRMID=10001C&state=DELAWARE&county=KENT%20COUNTY&fileName=10001C_20190130.zip'
>>> resp = requests.get(url)
>>> len(resp.content)
2583
>>> resp.headers['content-length']
'66892906'
>>> resp.url
'https://hazards.fema.gov/nfhlv2/output/County/10001C_20190130.zip'
```
Anecdotally, I used a relatively old [`wget`](https://pypi.org/project/wget/) package (which it looks like is just using `urllib`) and it gave me an incomplete read error.
```
>>> wget.download('https://hazards.fema.gov/nfhlv2/output/County/10001C_20190130.zip')
0% [ ] 8192 / 66892906Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.7/site-packages/wget.py", line 526, in download
(tmpfile, headers) = ulib.urlretrieve(binurl, tmpfile, callback)
File "/usr/local/lib/python3.7/urllib/request.py", line 288, in urlretrieve
% (read, size), result)
urllib.error.ContentTooShortError: <urlopen error retrieval incomplete: got only 2583 out of 66892906 bytes>
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.6.1"
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.7.3"
},
"platform": {
"release": "4.9.125-linuxkit",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010102f",
"version": "19.0.0"
},
"requests": {
"version": "2.21.0"
},
"system_ssl": {
"version": "101000af"
},
"urllib3": {
"version": "1.24.3"
},
"using_pyopenssl": true
}
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5124/reactions"
} | https://api.github.com/repos/psf/requests/issues/5124/timeline | null | completed | null | null | false | [
"**Update**: This might be related to the fact that I was running this in a `docker` container. When I run it outside of a `docker` container, it works as expected:\r\n```\r\nPython 3.7.3 (default, May 10 2019, 15:15:13)\r\n[Clang 10.0.1 (clang-1001.0.46.3)] on darwin\r\nType \"help\", \"copyright\", \"credits\" or... |
https://api.github.com/repos/psf/requests/issues/5123 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5123/labels{/name} | https://api.github.com/repos/psf/requests/issues/5123/comments | https://api.github.com/repos/psf/requests/issues/5123/events | https://github.com/psf/requests/issues/5123 | 461,415,974 | MDU6SXNzdWU0NjE0MTU5NzQ= | 5,123 | How to cite you? | {
"avatar_url": "https://avatars.githubusercontent.com/u/25004109?v=4",
"events_url": "https://api.github.com/users/121eddie/events{/privacy}",
"followers_url": "https://api.github.com/users/121eddie/followers",
"following_url": "https://api.github.com/users/121eddie/following{/other_user}",
"gists_url": "https://api.github.com/users/121eddie/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/121eddie",
"id": 25004109,
"login": "121eddie",
"node_id": "MDQ6VXNlcjI1MDA0MTA5",
"organizations_url": "https://api.github.com/users/121eddie/orgs",
"received_events_url": "https://api.github.com/users/121eddie/received_events",
"repos_url": "https://api.github.com/users/121eddie/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/121eddie/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/121eddie/subscriptions",
"type": "User",
"url": "https://api.github.com/users/121eddie",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2019-06-27T09:20:22Z | 2021-09-04T00:06:20Z | 2019-08-19T15:59:03Z | NONE | resolved | Great project! How should I quote you in academic papers? | {
"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/5123/reactions"
} | https://api.github.com/repos/psf/requests/issues/5123/timeline | null | completed | null | null | false | [
"I'd ask your advisor :)\r\n\r\nFeel free to reference me, if a person is needed."
] |
https://api.github.com/repos/psf/requests/issues/5122 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5122/labels{/name} | https://api.github.com/repos/psf/requests/issues/5122/comments | https://api.github.com/repos/psf/requests/issues/5122/events | https://github.com/psf/requests/pull/5122 | 461,139,773 | MDExOlB1bGxSZXF1ZXN0MjkyMTI1Mzcz | 5,122 | Add non-3XX redirects | {
"avatar_url": "https://avatars.githubusercontent.com/u/1873994?v=4",
"events_url": "https://api.github.com/users/alanyee/events{/privacy}",
"followers_url": "https://api.github.com/users/alanyee/followers",
"following_url": "https://api.github.com/users/alanyee/following{/other_user}",
"gists_url": "https://api.github.com/users/alanyee/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alanyee",
"id": 1873994,
"login": "alanyee",
"node_id": "MDQ6VXNlcjE4NzM5OTQ=",
"organizations_url": "https://api.github.com/users/alanyee/orgs",
"received_events_url": "https://api.github.com/users/alanyee/received_events",
"repos_url": "https://api.github.com/users/alanyee/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alanyee/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alanyee/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alanyee",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2019-06-26T19:21:19Z | 2021-08-30T00:06:44Z | 2019-07-29T16:19:28Z | CONTRIBUTOR | resolved | Looking for early feedback.
`requests` should have a native solution to dealing with non-3XX redirects i.e. https://stackoverflow.com/questions/56366175/how-to-handle-redirects-that-do-not-use-3xx-status-codes. But should such a new feature be tied to a preexisting flag `allow_redirects`, or should there be a new flag such as `allow_meta_redirects`? I understand the use case between not allowing redirects and allowing redirects, but I am not sure if there is a use case where you want to handle 2XX redirects but do not want to handle 3XX redirects or vice versa. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5122/reactions"
} | https://api.github.com/repos/psf/requests/issues/5122/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5122.diff",
"html_url": "https://github.com/psf/requests/pull/5122",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5122.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5122"
} | true | [
"Hi @alanyee, thanks for reaching out about the issue you’re seeing. To clarify from the stackoverflow question, therre isn’t anything in the http spec regarding “non-3XX” redirects. The functionality you’re experiencing is a JavaScript redirect.\r\n\r\nRequests is an http client, not a browser, so it’s outside of ... |
https://api.github.com/repos/psf/requests/issues/5121 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5121/labels{/name} | https://api.github.com/repos/psf/requests/issues/5121/comments | https://api.github.com/repos/psf/requests/issues/5121/events | https://github.com/psf/requests/issues/5121 | 460,469,064 | MDU6SXNzdWU0NjA0NjkwNjQ= | 5,121 | how to set SIO_KEEPALIVE_VALS or call socket.ioctl in general? | {
"avatar_url": "https://avatars.githubusercontent.com/u/870236?v=4",
"events_url": "https://api.github.com/users/SSE4/events{/privacy}",
"followers_url": "https://api.github.com/users/SSE4/followers",
"following_url": "https://api.github.com/users/SSE4/following{/other_user}",
"gists_url": "https://api.github.com/users/SSE4/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/SSE4",
"id": 870236,
"login": "SSE4",
"node_id": "MDQ6VXNlcjg3MDIzNg==",
"organizations_url": "https://api.github.com/users/SSE4/orgs",
"received_events_url": "https://api.github.com/users/SSE4/received_events",
"repos_url": "https://api.github.com/users/SSE4/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/SSE4/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/SSE4/subscriptions",
"type": "User",
"url": "https://api.github.com/users/SSE4",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2019-06-25T14:44:43Z | 2022-02-26T04:00:36Z | 2021-11-28T03:20:27Z | NONE | resolved | related to the https://github.com/conan-io/conan/issues/5398
I need to set [SIO_KEEPALIVE_VALS](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/dd877220(v%3Dvs.85)) on socket in order to use python.requests in Azure Cloud where Azure Load Balancer closes connections after 4 minutes of inactivity (https://github.com/uglide/azure-content/blob/master/includes/guidance-tcp-session-timeout-include.md).
I have found some code to set socket options, however, I can't find relevant code to call `socket.ioctl` for underlying socket which request's session uses. could you help me with that?
Please refer to our [Stack Overflow tag](https://stackoverflow.com/questions/tagged/python-requests) for guidance.
| {
"avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4",
"events_url": "https://api.github.com/users/sethmlarson/events{/privacy}",
"followers_url": "https://api.github.com/users/sethmlarson/followers",
"following_url": "https://api.github.com/users/sethmlarson/following{/other_user}",
"gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sethmlarson",
"id": 18519037,
"login": "sethmlarson",
"node_id": "MDQ6VXNlcjE4NTE5MDM3",
"organizations_url": "https://api.github.com/users/sethmlarson/orgs",
"received_events_url": "https://api.github.com/users/sethmlarson/received_events",
"repos_url": "https://api.github.com/users/sethmlarson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sethmlarson",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5121/reactions"
} | https://api.github.com/repos/psf/requests/issues/5121/timeline | null | completed | null | null | false | [
"related: https://github.com/requests/toolbelt/issues/98",
"You'll likely have to use a lower-level library like urllib3 and implement your own custom HTTPAdapter. Closing as nothing is actionable here by the Requests team."
] |
https://api.github.com/repos/psf/requests/issues/5120 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5120/labels{/name} | https://api.github.com/repos/psf/requests/issues/5120/comments | https://api.github.com/repos/psf/requests/issues/5120/events | https://github.com/psf/requests/issues/5120 | 460,190,216 | MDU6SXNzdWU0NjAxOTAyMTY= | 5,120 | requests About headers message sorting | {
"avatar_url": "https://avatars.githubusercontent.com/u/40908362?v=4",
"events_url": "https://api.github.com/users/HC-miss/events{/privacy}",
"followers_url": "https://api.github.com/users/HC-miss/followers",
"following_url": "https://api.github.com/users/HC-miss/following{/other_user}",
"gists_url": "https://api.github.com/users/HC-miss/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/HC-miss",
"id": 40908362,
"login": "HC-miss",
"node_id": "MDQ6VXNlcjQwOTA4MzYy",
"organizations_url": "https://api.github.com/users/HC-miss/orgs",
"received_events_url": "https://api.github.com/users/HC-miss/received_events",
"repos_url": "https://api.github.com/users/HC-miss/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/HC-miss/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/HC-miss/subscriptions",
"type": "User",
"url": "https://api.github.com/users/HC-miss",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2019-06-25T03:28:48Z | 2021-08-28T00:05:59Z | 2021-01-04T04:16:50Z | NONE | resolved |
session.py
```python
def merge_setting(request_setting, session_setting, dict_class=OrderedDict):
"""Determines appropriate setting for a given request, taking into account
the explicit setting on that request, and the setting in the session. If a
setting is a dictionary, they will be merged together using `dict_class`
"""
if session_setting is None:
return request_setting
if request_setting is None:
return session_setting
# Bypass if not a dictionary (e.g. verify)
if not (
isinstance(session_setting, Mapping) and
isinstance(request_setting, Mapping)
):
return request_setting
merged_setting = dict_class(to_key_val_list(session_setting))
merged_setting.update(to_key_val_list(request_setting))
# Remove keys that are set to None. Extract keys first to avoid altering
# the dictionary during iteration.
none_keys = [k for (k, v) in merged_setting.items() if v is None]
for key in none_keys:
del merged_setting[key]
return merged_setting
```
## Expected Result
Host: www.example.com
Referer: http://httpbin.org/get
User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
`
## Actual Result
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36
Accept-Encoding: gzip, deflate
Accept: */*
Host: www.example.com
Referer: http://httpbin.org/get
Connection: keep-alive
## Reproduction Steps
```python
import requests
headers = {
'Host': 'www.example.com',
'Referer': 'http://httpbin.org/get',
'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36',
'Accept-Encoding': 'gzip, deflate',
'Accept': '/'
}
proxies = {
'http': 'http://192.168.1.100:8888',
'https': 'https://192.168.1.100:8888'
}
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.4.2"
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.7.1"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "101000af",
"version": "18.0.0"
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1010009f"
},
"urllib3": {
"version": "1.24.1"
},
"using_pyopenssl": true
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
| {
"avatar_url": "https://avatars.githubusercontent.com/u/40908362?v=4",
"events_url": "https://api.github.com/users/HC-miss/events{/privacy}",
"followers_url": "https://api.github.com/users/HC-miss/followers",
"following_url": "https://api.github.com/users/HC-miss/following{/other_user}",
"gists_url": "https://api.github.com/users/HC-miss/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/HC-miss",
"id": 40908362,
"login": "HC-miss",
"node_id": "MDQ6VXNlcjQwOTA4MzYy",
"organizations_url": "https://api.github.com/users/HC-miss/orgs",
"received_events_url": "https://api.github.com/users/HC-miss/received_events",
"repos_url": "https://api.github.com/users/HC-miss/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/HC-miss/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/HC-miss/subscriptions",
"type": "User",
"url": "https://api.github.com/users/HC-miss",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5120/reactions"
} | https://api.github.com/repos/psf/requests/issues/5120/timeline | null | completed | null | null | false | [
"@HC-miss most of us are aware of this \"bug\" use __OrderedDict__ from __collections__ on the headers attribute to get around it.\r\n\r\n```python\r\n from collections import OrderedDict\r\n import requests\r\n \r\n headers = OrderedDict(\r\n (\r\n ('Host', 'www.example.com'),\r\n ... |
https://api.github.com/repos/psf/requests/issues/5119 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5119/labels{/name} | https://api.github.com/repos/psf/requests/issues/5119/comments | https://api.github.com/repos/psf/requests/issues/5119/events | https://github.com/psf/requests/pull/5119 | 460,003,040 | MDExOlB1bGxSZXF1ZXN0MjkxMjIyNTEy | 5,119 | Update sessions.py | {
"avatar_url": "https://avatars.githubusercontent.com/u/1873994?v=4",
"events_url": "https://api.github.com/users/alanyee/events{/privacy}",
"followers_url": "https://api.github.com/users/alanyee/followers",
"following_url": "https://api.github.com/users/alanyee/following{/other_user}",
"gists_url": "https://api.github.com/users/alanyee/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alanyee",
"id": 1873994,
"login": "alanyee",
"node_id": "MDQ6VXNlcjE4NzM5OTQ=",
"organizations_url": "https://api.github.com/users/alanyee/orgs",
"received_events_url": "https://api.github.com/users/alanyee/received_events",
"repos_url": "https://api.github.com/users/alanyee/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alanyee/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alanyee/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alanyee",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2019-06-24T17:13:07Z | 2021-08-30T00:06:43Z | 2019-08-20T04:11:23Z | CONTRIBUTOR | resolved | Use `.format()` over `%` given PEP 3101 | {
"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/5119/reactions"
} | https://api.github.com/repos/psf/requests/issues/5119/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5119.diff",
"html_url": "https://github.com/psf/requests/pull/5119",
"merged_at": "2019-08-20T04:11:23Z",
"patch_url": "https://github.com/psf/requests/pull/5119.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5119"
} | true | [
"This is great for python3. @kenneth-reitz, I just want to make sure [requests](https://github.com/kennethreitz/requests) is continuing to spport python2.7. right? ",
"`.format()` should work for Python 2.7.",
"interesting fact: % is much faster (at least in my tests, years ago) than `.format`. I don't think we... |
https://api.github.com/repos/psf/requests/issues/5118 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5118/labels{/name} | https://api.github.com/repos/psf/requests/issues/5118/comments | https://api.github.com/repos/psf/requests/issues/5118/events | https://github.com/psf/requests/issues/5118 | 459,754,970 | MDU6SXNzdWU0NTk3NTQ5NzA= | 5,118 | Subsequent, identical requests always fail | {
"avatar_url": "https://avatars.githubusercontent.com/u/715626?v=4",
"events_url": "https://api.github.com/users/dsoprea/events{/privacy}",
"followers_url": "https://api.github.com/users/dsoprea/followers",
"following_url": "https://api.github.com/users/dsoprea/following{/other_user}",
"gists_url": "https://api.github.com/users/dsoprea/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dsoprea",
"id": 715626,
"login": "dsoprea",
"node_id": "MDQ6VXNlcjcxNTYyNg==",
"organizations_url": "https://api.github.com/users/dsoprea/orgs",
"received_events_url": "https://api.github.com/users/dsoprea/received_events",
"repos_url": "https://api.github.com/users/dsoprea/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dsoprea/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dsoprea/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dsoprea",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2019-06-24T08:20:36Z | 2021-09-04T00:06:29Z | 2019-07-17T03:35:21Z | CONTRIBUTOR | resolved | I'm having a strange issue where I try to hit either the same server or different servers twice, and the second one always gets a name-resolution failure. This *does not* happen when I use _urllib3_. This is specific to Requests, which is queer as Requests uses _urllib3_.
- This only happens on my build systems. It works as expected locally. Both local and remote are on Requests 2.9.1 .
- It happens in both Python 2.7 and Python 3.
- It happens even when I request SSL from these servers and then get a SSL failure (because these servers aren't configured for it). Even though there is an SSL-related protocol breakdown, the first request fails properly, and the second fails due to no connection.
- Specifically, it's the `socket.getaddrinfo` call. I tested it directly.. after I due a `requests.get()`, I do a `socket.getaddrinfo()` and it fails.
- I've tried with and without using Requests' sessions functionality.
- I've tried requests with and without a "Connection: close" header.
The results are always identical.
```python
_LOGGER.info("SENDING REQUEST 1")
try:
r = requests.get(url)
r.raise_for_status()
except:
_LOGGER.exception("There was a problem.")
else:
raw_response = r.text
_LOGGER.info("Response:\n=====\n{}\n=====".format(raw_response))
_LOGGER.info("SENDING REQUEST 2")
try:
r = requests.get(url)
r.raise_for_status()
except:
_LOGGER.exception("There was a problem.")
else:
raw_response = r.text
_LOGGER.info("Response:\n=====\n{}\n=====".format(raw_response))
```
Output:
```
04:00:58 INFO:__main__:SENDING REQUEST 1
04:00:58 INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): sanitized.url
04:00:58 DEBUG:requests.packages.urllib3.connectionpool:"GET /CiTriggerService/Notify HTTP/1.1" 405 1741
04:00:58 ERROR:__main__:There was a problem.
04:00:58 Traceback (most recent call last):
04:00:58 File "/tmp/jenkins7232109961798303504.sh", line 36, in <module>
04:00:58 r.raise_for_status()
04:00:58 File "/usr/lib/python3/dist-packages/requests/models.py", line 840, in raise_for_status
04:00:58 raise HTTPError(http_error_msg, response=self)
04:00:58 requests.exceptions.HTTPError: 405 Client Error: Method Not Allowed for url: http://sanitized.url:9091/CiTriggerService/Notify
04:00:58 INFO:__main__:SENDING REQUEST 2
04:00:58 INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): sanitized.url
04:00:58 ERROR:__main__:There was a problem.
04:00:58 Traceback (most recent call last):
04:00:58 File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 137, in _new_conn
04:00:58 (self.host, self.port), self.timeout, **extra_kw)
04:00:58 File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 67, in create_connection
04:00:58 for res in socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM):
04:00:58 File "/usr/lib/python3.5/socket.py", line 732, in getaddrinfo
04:00:58 for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
04:00:58 socket.gaierror: [Errno -2] Name or service not known
```
Yet, _urllib3_ works fine:
```python
import urllib3
http = urllib3.PoolManager()
print('')
print("Request 1:")
print('')
r = http.request('GET', 'http://sanitized.url:9091/CiTriggerService/Notify')
print(r.status)
print(r.data)
http = urllib3.PoolManager()
print('')
print("Request 2:")
print('')
r = http.request('GET', 'http://sanitized.url:9091/CiTriggerService/Notify')
print(r.status)
print(r.data)
```
Output:
```
04:12:52
04:12:52 Request 1:
04:12:52
04:12:52 405
04:12:52 b'\xef\xbb\xbf<?xml version="1.0" encoding="utf-8"?>\r\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
...
04:12:52
04:12:52 Request 2:
04:12:52
04:12:52 405
04:12:52 b'\xef\xbb\xbf<?xml version="1.0" encoding="utf-8"?>\r\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
...
```
I realize that the version that we're running on is quite a bit behind, but, given that it works perfectly fine on my local system at the same version, I doubt that an update would not make a difference and I can't blindly move forward on tweaking our provisioning process without a reason. | {
"avatar_url": "https://avatars.githubusercontent.com/u/715626?v=4",
"events_url": "https://api.github.com/users/dsoprea/events{/privacy}",
"followers_url": "https://api.github.com/users/dsoprea/followers",
"following_url": "https://api.github.com/users/dsoprea/following{/other_user}",
"gists_url": "https://api.github.com/users/dsoprea/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dsoprea",
"id": 715626,
"login": "dsoprea",
"node_id": "MDQ6VXNlcjcxNTYyNg==",
"organizations_url": "https://api.github.com/users/dsoprea/orgs",
"received_events_url": "https://api.github.com/users/dsoprea/received_events",
"repos_url": "https://api.github.com/users/dsoprea/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dsoprea/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dsoprea/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dsoprea",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5118/reactions"
} | https://api.github.com/repos/psf/requests/issues/5118/timeline | null | completed | null | null | false | [
"Closing this. Since there's no way to publicly debug this and the parameters and issue, in general are irrational and nonsensical, I'm not expecting anyone to be able to [effectively] help."
] |
https://api.github.com/repos/psf/requests/issues/5117 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5117/labels{/name} | https://api.github.com/repos/psf/requests/issues/5117/comments | https://api.github.com/repos/psf/requests/issues/5117/events | https://github.com/psf/requests/issues/5117 | 456,605,808 | MDU6SXNzdWU0NTY2MDU4MDg= | 5,117 | How to define HTTP version? | {
"avatar_url": "https://avatars.githubusercontent.com/u/16077616?v=4",
"events_url": "https://api.github.com/users/wtlwang/events{/privacy}",
"followers_url": "https://api.github.com/users/wtlwang/followers",
"following_url": "https://api.github.com/users/wtlwang/following{/other_user}",
"gists_url": "https://api.github.com/users/wtlwang/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/wtlwang",
"id": 16077616,
"login": "wtlwang",
"node_id": "MDQ6VXNlcjE2MDc3NjE2",
"organizations_url": "https://api.github.com/users/wtlwang/orgs",
"received_events_url": "https://api.github.com/users/wtlwang/received_events",
"repos_url": "https://api.github.com/users/wtlwang/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/wtlwang/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/wtlwang/subscriptions",
"type": "User",
"url": "https://api.github.com/users/wtlwang",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2019-06-16T05:57:30Z | 2021-09-08T22:00:41Z | 2021-06-10T21:46:02Z | NONE | resolved | Please refer to our [Stack Overflow tag](https://stackoverflow.com/questions/tagged/python-requests) for guidance.
how can i define HTTP verison in requests? like this:
GET /index.html HTTP/2.0 | {
"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/5117/reactions"
} | https://api.github.com/repos/psf/requests/issues/5117/timeline | null | completed | null | null | false | [
"requests doesn't support HTTP/2.0 (yet?!)",
"Requests allows you to send organic, grass-fed HTTP/1.1 requests, without the need for manual labor. There’s no need to manually add query strings to your URLs, or to form-encode your POST data. Keep-alive and HTTP connection pooling are 100% automatic, thanks to urll... |
https://api.github.com/repos/psf/requests/issues/5116 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5116/labels{/name} | https://api.github.com/repos/psf/requests/issues/5116/comments | https://api.github.com/repos/psf/requests/issues/5116/events | https://github.com/psf/requests/issues/5116 | 453,975,653 | MDU6SXNzdWU0NTM5NzU2NTM= | 5,116 | cookies.get behavior | {
"avatar_url": "https://avatars.githubusercontent.com/u/2137404?v=4",
"events_url": "https://api.github.com/users/bkdotcom/events{/privacy}",
"followers_url": "https://api.github.com/users/bkdotcom/followers",
"following_url": "https://api.github.com/users/bkdotcom/following{/other_user}",
"gists_url": "https://api.github.com/users/bkdotcom/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bkdotcom",
"id": 2137404,
"login": "bkdotcom",
"node_id": "MDQ6VXNlcjIxMzc0MDQ=",
"organizations_url": "https://api.github.com/users/bkdotcom/orgs",
"received_events_url": "https://api.github.com/users/bkdotcom/received_events",
"repos_url": "https://api.github.com/users/bkdotcom/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bkdotcom/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bkdotcom/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bkdotcom",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 0 | 2019-06-10T02:45:09Z | 2022-10-11T17:05:37Z | null | NONE | null | Pardon me... I'm not proficient in python... This library appears to be the de-facto reference for http clients in other programming languages as well..
it seems like many http get clients return raw cookie values. and require raw cookie names... because... that's what this library does
The subtitle for this project is "http for humans"....
This human isn't interested in the transport-layer encoding.. I want the human value
With all that said... why :
----
## Expected Result
I would expect `response.cookies.get()` to
a) expect a decoded name as a parameter and
b) return a decoded (human) value
## Actual Result
Encoded value returned
if name was encoded for http transport... I must pass encoded name to get value
response headers:
```
Set-Cookie: dingus=foo%3Bbar; path=/
Set-Cookie: a%3Bb=foo%3Bbar; path=/
```
```python
[nav] In [1]: import requests
[ins] In [2]: r = requests.get('http://localhost/cookietest')
[ins] In [3]: r.cookies.get('dingus')
Out[3]: 'foo%3Bbar'
[ins] In [4]: r.cookies.get('a;b')
[ins] In [5]: r.cookies.get('a%3Bb')
Out[5]: 'foo%3Bbar'
```
| 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/5116/reactions"
} | https://api.github.com/repos/psf/requests/issues/5116/timeline | null | null | null | null | false | [] |
https://api.github.com/repos/psf/requests/issues/5115 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5115/labels{/name} | https://api.github.com/repos/psf/requests/issues/5115/comments | https://api.github.com/repos/psf/requests/issues/5115/events | https://github.com/psf/requests/issues/5115 | 453,721,850 | MDU6SXNzdWU0NTM3MjE4NTA= | 5,115 | Python requests NOT Throwing an Exception When Using Session with HTTPAdapter | {
"avatar_url": "https://avatars.githubusercontent.com/u/11792538?v=4",
"events_url": "https://api.github.com/users/own3mall/events{/privacy}",
"followers_url": "https://api.github.com/users/own3mall/followers",
"following_url": "https://api.github.com/users/own3mall/following{/other_user}",
"gists_url": "https://api.github.com/users/own3mall/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/own3mall",
"id": 11792538,
"login": "own3mall",
"node_id": "MDQ6VXNlcjExNzkyNTM4",
"organizations_url": "https://api.github.com/users/own3mall/orgs",
"received_events_url": "https://api.github.com/users/own3mall/received_events",
"repos_url": "https://api.github.com/users/own3mall/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/own3mall/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/own3mall/subscriptions",
"type": "User",
"url": "https://api.github.com/users/own3mall",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2019-06-07T22:58:06Z | 2022-03-29T19:00:33Z | 2021-12-29T18:08:31Z | NONE | resolved | Anyone know how I can better handle this situation? I can't have the script freezing indefinitely. I appreciate any help.
https://stackoverflow.com/questions/56482980/python-requests-not-throwing-an-exception-when-using-session-with-httpadapter | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5115/reactions"
} | https://api.github.com/repos/psf/requests/issues/5115/timeline | null | completed | null | null | false | [
"If you set the total property in the Retry object to `False`, an exception is thrown, and the script no longer runs indefinitely. So why does it not terminate unless `total` is set to `False`?",
"This issue appears to be specific to your environment configuration since both the responders on Stackoverflow and I... |
https://api.github.com/repos/psf/requests/issues/5114 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5114/labels{/name} | https://api.github.com/repos/psf/requests/issues/5114/comments | https://api.github.com/repos/psf/requests/issues/5114/events | https://github.com/psf/requests/pull/5114 | 452,756,215 | MDExOlB1bGxSZXF1ZXN0Mjg1NTgzMDcx | 5,114 | bug fix 5113 by update to utils.py | {
"avatar_url": "https://avatars.githubusercontent.com/u/43765015?v=4",
"events_url": "https://api.github.com/users/bainiwaj/events{/privacy}",
"followers_url": "https://api.github.com/users/bainiwaj/followers",
"following_url": "https://api.github.com/users/bainiwaj/following{/other_user}",
"gists_url": "https://api.github.com/users/bainiwaj/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bainiwaj",
"id": 43765015,
"login": "bainiwaj",
"node_id": "MDQ6VXNlcjQzNzY1MDE1",
"organizations_url": "https://api.github.com/users/bainiwaj/orgs",
"received_events_url": "https://api.github.com/users/bainiwaj/received_events",
"repos_url": "https://api.github.com/users/bainiwaj/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bainiwaj/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bainiwaj/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bainiwaj",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2019-06-05T23:08:45Z | 2021-08-31T00:07:06Z | 2019-08-20T04:14:01Z | NONE | resolved | fix to bug #5113 | {
"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/5114/reactions"
} | https://api.github.com/repos/psf/requests/issues/5114/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5114.diff",
"html_url": "https://github.com/psf/requests/pull/5114",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5114.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5114"
} | true | [
"this is not the appropriate solution. change your code to accommodate, please. we are honoring RFCs here, and honoring expected behavior."
] |
https://api.github.com/repos/psf/requests/issues/5113 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5113/labels{/name} | https://api.github.com/repos/psf/requests/issues/5113/comments | https://api.github.com/repos/psf/requests/issues/5113/events | https://github.com/psf/requests/issues/5113 | 452,755,015 | MDU6SXNzdWU0NTI3NTUwMTU= | 5,113 | get_encoding_from_headers methods return value | {
"avatar_url": "https://avatars.githubusercontent.com/u/43765015?v=4",
"events_url": "https://api.github.com/users/bainiwaj/events{/privacy}",
"followers_url": "https://api.github.com/users/bainiwaj/followers",
"following_url": "https://api.github.com/users/bainiwaj/following{/other_user}",
"gists_url": "https://api.github.com/users/bainiwaj/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bainiwaj",
"id": 43765015,
"login": "bainiwaj",
"node_id": "MDQ6VXNlcjQzNzY1MDE1",
"organizations_url": "https://api.github.com/users/bainiwaj/orgs",
"received_events_url": "https://api.github.com/users/bainiwaj/received_events",
"repos_url": "https://api.github.com/users/bainiwaj/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bainiwaj/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bainiwaj/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bainiwaj",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2019-06-05T23:03:56Z | 2021-09-02T00:07:25Z | 2020-02-10T06:27:44Z | NONE | resolved | Summary.
The problem with this method is that for certain languages the ISO-8859 does not work.
## Expected Result
I would like all HTTP header text to be returned for any language and not just english.
What you expected.
Certain languages such as french http header text does not work.
## Actual Result
Encoding error with non english
What happened instead.
encoding error
## Reproduction Steps
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
| {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5113/reactions"
} | https://api.github.com/repos/psf/requests/issues/5113/timeline | null | completed | null | null | false | [
"I'm going to resolve this with the same reasoning Kenneth used on the PR. This is currently the best interpretation we have over the available RFCs and reference clients. You can always set `encoding` on the Response object yourself before trying to read its contents, and it should work as expected. That would be ... |
https://api.github.com/repos/psf/requests/issues/5112 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5112/labels{/name} | https://api.github.com/repos/psf/requests/issues/5112/comments | https://api.github.com/repos/psf/requests/issues/5112/events | https://github.com/psf/requests/pull/5112 | 452,744,549 | MDExOlB1bGxSZXF1ZXN0Mjg1NTczNDA4 | 5,112 | update utils.py | {
"avatar_url": "https://avatars.githubusercontent.com/u/43765015?v=4",
"events_url": "https://api.github.com/users/bainiwaj/events{/privacy}",
"followers_url": "https://api.github.com/users/bainiwaj/followers",
"following_url": "https://api.github.com/users/bainiwaj/following{/other_user}",
"gists_url": "https://api.github.com/users/bainiwaj/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bainiwaj",
"id": 43765015,
"login": "bainiwaj",
"node_id": "MDQ6VXNlcjQzNzY1MDE1",
"organizations_url": "https://api.github.com/users/bainiwaj/orgs",
"received_events_url": "https://api.github.com/users/bainiwaj/received_events",
"repos_url": "https://api.github.com/users/bainiwaj/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bainiwaj/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bainiwaj/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bainiwaj",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2019-06-05T22:25:07Z | 2021-08-31T00:07:12Z | 2019-06-05T22:47:19Z | NONE | resolved | fixed issue with get_encoding_from_headers | {
"avatar_url": "https://avatars.githubusercontent.com/u/43765015?v=4",
"events_url": "https://api.github.com/users/bainiwaj/events{/privacy}",
"followers_url": "https://api.github.com/users/bainiwaj/followers",
"following_url": "https://api.github.com/users/bainiwaj/following{/other_user}",
"gists_url": "https://api.github.com/users/bainiwaj/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bainiwaj",
"id": 43765015,
"login": "bainiwaj",
"node_id": "MDQ6VXNlcjQzNzY1MDE1",
"organizations_url": "https://api.github.com/users/bainiwaj/orgs",
"received_events_url": "https://api.github.com/users/bainiwaj/received_events",
"repos_url": "https://api.github.com/users/bainiwaj/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bainiwaj/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bainiwaj/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bainiwaj",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5112/reactions"
} | https://api.github.com/repos/psf/requests/issues/5112/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5112.diff",
"html_url": "https://github.com/psf/requests/pull/5112",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5112.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5112"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/5111 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5111/labels{/name} | https://api.github.com/repos/psf/requests/issues/5111/comments | https://api.github.com/repos/psf/requests/issues/5111/events | https://github.com/psf/requests/pull/5111 | 452,740,023 | MDExOlB1bGxSZXF1ZXN0Mjg1NTY5NjQy | 5,111 | Update utils.py | {
"avatar_url": "https://avatars.githubusercontent.com/u/43765015?v=4",
"events_url": "https://api.github.com/users/bainiwaj/events{/privacy}",
"followers_url": "https://api.github.com/users/bainiwaj/followers",
"following_url": "https://api.github.com/users/bainiwaj/following{/other_user}",
"gists_url": "https://api.github.com/users/bainiwaj/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bainiwaj",
"id": 43765015,
"login": "bainiwaj",
"node_id": "MDQ6VXNlcjQzNzY1MDE1",
"organizations_url": "https://api.github.com/users/bainiwaj/orgs",
"received_events_url": "https://api.github.com/users/bainiwaj/received_events",
"repos_url": "https://api.github.com/users/bainiwaj/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bainiwaj/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bainiwaj/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bainiwaj",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2019-06-05T22:10:41Z | 2021-08-31T00:07:12Z | 2019-06-05T22:22:28Z | NONE | resolved | Fixed bug #5084 partially | {
"avatar_url": "https://avatars.githubusercontent.com/u/43765015?v=4",
"events_url": "https://api.github.com/users/bainiwaj/events{/privacy}",
"followers_url": "https://api.github.com/users/bainiwaj/followers",
"following_url": "https://api.github.com/users/bainiwaj/following{/other_user}",
"gists_url": "https://api.github.com/users/bainiwaj/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bainiwaj",
"id": 43765015,
"login": "bainiwaj",
"node_id": "MDQ6VXNlcjQzNzY1MDE1",
"organizations_url": "https://api.github.com/users/bainiwaj/orgs",
"received_events_url": "https://api.github.com/users/bainiwaj/received_events",
"repos_url": "https://api.github.com/users/bainiwaj/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bainiwaj/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bainiwaj/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bainiwaj",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5111/reactions"
} | https://api.github.com/repos/psf/requests/issues/5111/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5111.diff",
"html_url": "https://github.com/psf/requests/pull/5111",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5111.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5111"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/5110 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5110/labels{/name} | https://api.github.com/repos/psf/requests/issues/5110/comments | https://api.github.com/repos/psf/requests/issues/5110/events | https://github.com/psf/requests/pull/5110 | 452,182,887 | MDExOlB1bGxSZXF1ZXN0Mjg1MTIzNzA3 | 5,110 | Remove an obsolete attribute from Session.__attrs__ | {
"avatar_url": "https://avatars.githubusercontent.com/u/23789?v=4",
"events_url": "https://api.github.com/users/nedbat/events{/privacy}",
"followers_url": "https://api.github.com/users/nedbat/followers",
"following_url": "https://api.github.com/users/nedbat/following{/other_user}",
"gists_url": "https://api.github.com/users/nedbat/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nedbat",
"id": 23789,
"login": "nedbat",
"node_id": "MDQ6VXNlcjIzNzg5",
"organizations_url": "https://api.github.com/users/nedbat/orgs",
"received_events_url": "https://api.github.com/users/nedbat/received_events",
"repos_url": "https://api.github.com/users/nedbat/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nedbat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nedbat/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nedbat",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2019-06-04T20:05:37Z | 2021-08-29T00:07:05Z | 2020-02-18T17:17:22Z | CONTRIBUTOR | resolved | The extra attribute in `Session.__attrs__` makes an unpickled session have one more attribute than the original. Removing it makes the original and the unpickled be identical. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5110/reactions"
} | https://api.github.com/repos/psf/requests/issues/5110/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5110.diff",
"html_url": "https://github.com/psf/requests/pull/5110",
"merged_at": "2020-02-18T17:17:22Z",
"patch_url": "https://github.com/psf/requests/pull/5110.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5110"
} | true | [
"Great catch, @nedbat! That's only been lingering for 8 years . Would you mind rebasing if you get a moment?",
"Rebased, thanks!",
"Hmm, rebasing and force-pushing apparently also \"dismisses stale review\"? That certainly wasn't my intent....!"
] |
https://api.github.com/repos/psf/requests/issues/5109 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5109/labels{/name} | https://api.github.com/repos/psf/requests/issues/5109/comments | https://api.github.com/repos/psf/requests/issues/5109/events | https://github.com/psf/requests/issues/5109 | 451,755,537 | MDU6SXNzdWU0NTE3NTU1Mzc= | 5,109 | chardet version error | {
"avatar_url": "https://avatars.githubusercontent.com/u/11982084?v=4",
"events_url": "https://api.github.com/users/tannaalok/events{/privacy}",
"followers_url": "https://api.github.com/users/tannaalok/followers",
"following_url": "https://api.github.com/users/tannaalok/following{/other_user}",
"gists_url": "https://api.github.com/users/tannaalok/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/tannaalok",
"id": 11982084,
"login": "tannaalok",
"node_id": "MDQ6VXNlcjExOTgyMDg0",
"organizations_url": "https://api.github.com/users/tannaalok/orgs",
"received_events_url": "https://api.github.com/users/tannaalok/received_events",
"repos_url": "https://api.github.com/users/tannaalok/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/tannaalok/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tannaalok/subscriptions",
"type": "User",
"url": "https://api.github.com/users/tannaalok",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2019-06-04T01:26:58Z | 2021-09-02T00:07:24Z | 2020-02-10T06:28:19Z | NONE | resolved | Please refer to our [Stack Overflow tag](https://stackoverflow.com/questions/tagged/python-requests) for guidance.

Need help installing request offline mode python version 2.7.5
| {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5109/reactions"
} | https://api.github.com/repos/psf/requests/issues/5109/timeline | null | completed | null | null | false | [
"Installed chardet version 2.2.1"
] |
https://api.github.com/repos/psf/requests/issues/5108 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5108/labels{/name} | https://api.github.com/repos/psf/requests/issues/5108/comments | https://api.github.com/repos/psf/requests/issues/5108/events | https://github.com/psf/requests/pull/5108 | 451,317,931 | MDExOlB1bGxSZXF1ZXN0Mjg0NDMyODQz | 5,108 | Removed py34 from tox.ini. | {
"avatar_url": "https://avatars.githubusercontent.com/u/6141390?v=4",
"events_url": "https://api.github.com/users/atombrella/events{/privacy}",
"followers_url": "https://api.github.com/users/atombrella/followers",
"following_url": "https://api.github.com/users/atombrella/following{/other_user}",
"gists_url": "https://api.github.com/users/atombrella/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/atombrella",
"id": 6141390,
"login": "atombrella",
"node_id": "MDQ6VXNlcjYxNDEzOTA=",
"organizations_url": "https://api.github.com/users/atombrella/orgs",
"received_events_url": "https://api.github.com/users/atombrella/received_events",
"repos_url": "https://api.github.com/users/atombrella/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/atombrella/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/atombrella/subscriptions",
"type": "User",
"url": "https://api.github.com/users/atombrella",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2019-06-03T06:46:22Z | 2021-08-31T00:07:13Z | 2019-06-03T14:01:03Z | CONTRIBUTOR | resolved | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5108/reactions"
} | https://api.github.com/repos/psf/requests/issues/5108/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5108.diff",
"html_url": "https://github.com/psf/requests/pull/5108",
"merged_at": "2019-06-03T14:01:03Z",
"patch_url": "https://github.com/psf/requests/pull/5108.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5108"
} | true | [] | |
https://api.github.com/repos/psf/requests/issues/5107 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5107/labels{/name} | https://api.github.com/repos/psf/requests/issues/5107/comments | https://api.github.com/repos/psf/requests/issues/5107/events | https://github.com/psf/requests/issues/5107 | 451,225,022 | MDU6SXNzdWU0NTEyMjUwMjI= | 5,107 | Response contains empty strings | {
"avatar_url": "https://avatars.githubusercontent.com/u/8513482?v=4",
"events_url": "https://api.github.com/users/ahmedrazi/events{/privacy}",
"followers_url": "https://api.github.com/users/ahmedrazi/followers",
"following_url": "https://api.github.com/users/ahmedrazi/following{/other_user}",
"gists_url": "https://api.github.com/users/ahmedrazi/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/ahmedrazi",
"id": 8513482,
"login": "ahmedrazi",
"node_id": "MDQ6VXNlcjg1MTM0ODI=",
"organizations_url": "https://api.github.com/users/ahmedrazi/orgs",
"received_events_url": "https://api.github.com/users/ahmedrazi/received_events",
"repos_url": "https://api.github.com/users/ahmedrazi/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/ahmedrazi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ahmedrazi/subscriptions",
"type": "User",
"url": "https://api.github.com/users/ahmedrazi",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2019-06-02T19:20:48Z | 2021-09-02T00:07:24Z | 2020-02-10T06:29:41Z | NONE | resolved |
I am sending a request with URL and three query parameters with one parameter is getting its value on command line but it is not populating the values for "vendorDetails dictionary.
import requests
import sys
from collections import OrderedDict
url = "https://api.macaddress.io/v1"
mac= str(sys.argv[1])
print(mac)
qs=OrderedDict()
qs = {"apiKey":"xxxxxxxxxxx","output":"json","search":sys.argv[1]}
for key, value in qs.items():
print(key, value)
response= requests.get(url,params=qs)
print(response.url)
print(response.text)
I am getting the below response but all the values are empty after a query for the below mac address. So If I hard code the mac value in the query string it works but when I use it as a command line argument then it is returning the response without any value
$ python web2.py 4:38:39:ff:ef:57
4:38:39:ff:ef:57
('output', 'json')
('search', '4:38:39:ff:ef:57')
('apiKey', 'xxxx')
https://api.macaddress.io/v1?output=json&search=4%3A38%3A39%3Aff%3Aef%3A57&apiKey=at_o45w16Yxa6RDxXNSV7lAZkY4DMax2
https://api.macaddress.io/v1?output=json&search=4%3A38%3A39%3Aff%3Aef%3A57&apiKey=xxxxxxxxx
{"vendorDetails":{"oui":"","isPrivate":false,"companyName":"","companyAddress":"","countryCode":""},"blockDetails":{"blockFound":false,"borderLeft":"","borderRight":"","blockSize":0,"assignmentBlockSize":"","dateCreated":"","dateUpdated":""},"macAddressDetails":{"searchTerm":"4:38:39:ff:ef:57","isValid":false,"virtualMachine":"Not detected","applications":[],"transmissionType":"multicast","administrationType":"LAA","wiresharkNotes":"No details","comment":""}}
I am
| {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5107/reactions"
} | https://api.github.com/repos/psf/requests/issues/5107/timeline | null | completed | null | null | false | [
"Initially I thought that this didn't look like an issue related to requests. But I ran your code out of curiosity. I was unable to reproduce the problem. I received the correct response even when inputting the mac address via parameter.",
"This doesn't appear to be a defect with Requests. I'm going to resolve th... |
https://api.github.com/repos/psf/requests/issues/5106 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5106/labels{/name} | https://api.github.com/repos/psf/requests/issues/5106/comments | https://api.github.com/repos/psf/requests/issues/5106/events | https://github.com/psf/requests/issues/5106 | 450,224,348 | MDU6SXNzdWU0NTAyMjQzNDg= | 5,106 | How to send a encrypted json string with requests | {
"avatar_url": "https://avatars.githubusercontent.com/u/9718565?v=4",
"events_url": "https://api.github.com/users/sunmoondeer/events{/privacy}",
"followers_url": "https://api.github.com/users/sunmoondeer/followers",
"following_url": "https://api.github.com/users/sunmoondeer/following{/other_user}",
"gists_url": "https://api.github.com/users/sunmoondeer/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sunmoondeer",
"id": 9718565,
"login": "sunmoondeer",
"node_id": "MDQ6VXNlcjk3MTg1NjU=",
"organizations_url": "https://api.github.com/users/sunmoondeer/orgs",
"received_events_url": "https://api.github.com/users/sunmoondeer/received_events",
"repos_url": "https://api.github.com/users/sunmoondeer/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sunmoondeer/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sunmoondeer/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sunmoondeer",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2019-05-30T09:53:40Z | 2021-09-02T00:07:24Z | 2020-02-10T06:30:52Z | NONE | resolved | Hi, I need to send a json string with post type, but in my project, i need to encrypt it before send. After encrypt, the string like "h5QkXuq8mY4n73YX4mv/Ug\u003d\u003d", I can not find a way to send data like this, I can do this with jmeter easily, just put the encrypted string in request body. How should I do with requests? | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5106/reactions"
} | https://api.github.com/repos/psf/requests/issues/5106/timeline | null | completed | null | null | false | [
"Looks like binary base64 encoded payload in unicode to me, u'\\u003d' is b'=' ",
"This would be a better question on usage for StackOverflow. Resolving since it's not a defect in Requests. Thanks for the suggestion, VeNoMouS."
] |
https://api.github.com/repos/psf/requests/issues/5105 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5105/labels{/name} | https://api.github.com/repos/psf/requests/issues/5105/comments | https://api.github.com/repos/psf/requests/issues/5105/events | https://github.com/psf/requests/pull/5105 | 449,965,905 | MDExOlB1bGxSZXF1ZXN0MjgzMzg3MjAy | 5,105 | Update sessions.py | {
"avatar_url": "https://avatars.githubusercontent.com/u/1873994?v=4",
"events_url": "https://api.github.com/users/alanyee/events{/privacy}",
"followers_url": "https://api.github.com/users/alanyee/followers",
"following_url": "https://api.github.com/users/alanyee/following{/other_user}",
"gists_url": "https://api.github.com/users/alanyee/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/alanyee",
"id": 1873994,
"login": "alanyee",
"node_id": "MDQ6VXNlcjE4NzM5OTQ=",
"organizations_url": "https://api.github.com/users/alanyee/orgs",
"received_events_url": "https://api.github.com/users/alanyee/received_events",
"repos_url": "https://api.github.com/users/alanyee/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/alanyee/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alanyee/subscriptions",
"type": "User",
"url": "https://api.github.com/users/alanyee",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2019-05-29T18:49:53Z | 2021-08-31T00:07:05Z | 2019-08-20T04:14:37Z | CONTRIBUTOR | resolved | -Made removing a key-value pair more modular
-Remove unneeeded return 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/5105/reactions"
} | https://api.github.com/repos/psf/requests/issues/5105/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5105.diff",
"html_url": "https://github.com/psf/requests/pull/5105",
"merged_at": "2019-08-20T04:14:37Z",
"patch_url": "https://github.com/psf/requests/pull/5105.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5105"
} | true | [
"great improvement, thanks!"
] |
https://api.github.com/repos/psf/requests/issues/5104 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5104/labels{/name} | https://api.github.com/repos/psf/requests/issues/5104/comments | https://api.github.com/repos/psf/requests/issues/5104/events | https://github.com/psf/requests/pull/5104 | 449,678,955 | MDExOlB1bGxSZXF1ZXN0MjgzMTU2ODYz | 5,104 | [models] Fix '_encode_params'/'_encode_files' | {
"avatar_url": "https://avatars.githubusercontent.com/u/4213483?v=4",
"events_url": "https://api.github.com/users/wy-z/events{/privacy}",
"followers_url": "https://api.github.com/users/wy-z/followers",
"following_url": "https://api.github.com/users/wy-z/following{/other_user}",
"gists_url": "https://api.github.com/users/wy-z/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/wy-z",
"id": 4213483,
"login": "wy-z",
"node_id": "MDQ6VXNlcjQyMTM0ODM=",
"organizations_url": "https://api.github.com/users/wy-z/orgs",
"received_events_url": "https://api.github.com/users/wy-z/received_events",
"repos_url": "https://api.github.com/users/wy-z/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/wy-z/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/wy-z/subscriptions",
"type": "User",
"url": "https://api.github.com/users/wy-z",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2019-05-29T08:52:34Z | 2023-10-16T00:03:18Z | 2022-10-15T07:32:04Z | NONE | resolved | Look at https://github.com/kennethreitz/requests/blob/master/requests/models.py#L100 or
https://github.com/kennethreitz/requests/blob/master/requests/models.py#L131
```
for v in vs:
if v is not None:
...
```
When the type of `vs` is `dict`, `v` will be the field key, but not field value, the body of the request will be puzzling.
It would be better to prevent it.
Signed-off-by: weiyang <weiyang.ones@gmail.com> | {
"avatar_url": "https://avatars.githubusercontent.com/u/4213483?v=4",
"events_url": "https://api.github.com/users/wy-z/events{/privacy}",
"followers_url": "https://api.github.com/users/wy-z/followers",
"following_url": "https://api.github.com/users/wy-z/following{/other_user}",
"gists_url": "https://api.github.com/users/wy-z/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/wy-z",
"id": 4213483,
"login": "wy-z",
"node_id": "MDQ6VXNlcjQyMTM0ODM=",
"organizations_url": "https://api.github.com/users/wy-z/orgs",
"received_events_url": "https://api.github.com/users/wy-z/received_events",
"repos_url": "https://api.github.com/users/wy-z/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/wy-z/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/wy-z/subscriptions",
"type": "User",
"url": "https://api.github.com/users/wy-z",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5104/reactions"
} | https://api.github.com/repos/psf/requests/issues/5104/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5104.diff",
"html_url": "https://github.com/psf/requests/pull/5104",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5104.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5104"
} | true | [
"https://github.com/kennethreitz/requests/issues/5058",
"Why was this PR deleted? This was a good fix imo.",
"I'll reopen this if necessary. @martimlobao "
] |
https://api.github.com/repos/psf/requests/issues/5103 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5103/labels{/name} | https://api.github.com/repos/psf/requests/issues/5103/comments | https://api.github.com/repos/psf/requests/issues/5103/events | https://github.com/psf/requests/issues/5103 | 449,473,763 | MDU6SXNzdWU0NDk0NzM3NjM= | 5,103 | Client certificates AND self-signed | {
"avatar_url": "https://avatars.githubusercontent.com/u/20154036?v=4",
"events_url": "https://api.github.com/users/Rourke101/events{/privacy}",
"followers_url": "https://api.github.com/users/Rourke101/followers",
"following_url": "https://api.github.com/users/Rourke101/following{/other_user}",
"gists_url": "https://api.github.com/users/Rourke101/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/Rourke101",
"id": 20154036,
"login": "Rourke101",
"node_id": "MDQ6VXNlcjIwMTU0MDM2",
"organizations_url": "https://api.github.com/users/Rourke101/orgs",
"received_events_url": "https://api.github.com/users/Rourke101/received_events",
"repos_url": "https://api.github.com/users/Rourke101/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/Rourke101/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Rourke101/subscriptions",
"type": "User",
"url": "https://api.github.com/users/Rourke101",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 0 | 2019-05-28T20:56:51Z | 2019-05-28T20:56:51Z | null | NONE | null | I have read many posts about the issues separately, and the only ones that work are the ones setting the verification as "False".
Is it possible to use both verify and cert?
This raises error
session.verify = 'server.pem'
session.cert = ('public.pem', 'private.pem')
Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_read_bytes', 'sslv3 alert certificate unknown')])")))
Whereas this works:
session.verify = False
session.cert = ('public.pem', 'private.pem')
And this works:
session.verify = 'server.pem'
#session.cert = ('public.pem', 'private.pem')
| null | {
"+1": 3,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 3,
"url": "https://api.github.com/repos/psf/requests/issues/5103/reactions"
} | https://api.github.com/repos/psf/requests/issues/5103/timeline | null | null | null | null | false | [] |
https://api.github.com/repos/psf/requests/issues/5102 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5102/labels{/name} | https://api.github.com/repos/psf/requests/issues/5102/comments | https://api.github.com/repos/psf/requests/issues/5102/events | https://github.com/psf/requests/issues/5102 | 446,773,461 | MDU6SXNzdWU0NDY3NzM0NjE= | 5,102 | Having problem trying to use module repeteadly | {
"avatar_url": "https://avatars.githubusercontent.com/u/40010687?v=4",
"events_url": "https://api.github.com/users/dagerob/events{/privacy}",
"followers_url": "https://api.github.com/users/dagerob/followers",
"following_url": "https://api.github.com/users/dagerob/following{/other_user}",
"gists_url": "https://api.github.com/users/dagerob/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/dagerob",
"id": 40010687,
"login": "dagerob",
"node_id": "MDQ6VXNlcjQwMDEwNjg3",
"organizations_url": "https://api.github.com/users/dagerob/orgs",
"received_events_url": "https://api.github.com/users/dagerob/received_events",
"repos_url": "https://api.github.com/users/dagerob/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/dagerob/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dagerob/subscriptions",
"type": "User",
"url": "https://api.github.com/users/dagerob",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2019-05-21T18:56:31Z | 2021-09-02T00:07:23Z | 2020-02-10T06:31:20Z | NONE | resolved | Hi!
I am trying to use this module to connect to a server. The system has to make a request repeatedly (every few minutes). I made a sub thread that makes the request. The issue is that the requests sometimes work and sometimes throw an exception even though I'm using the same url and methods.
The error I get is: Failed to establish a new connection [Errno -3] Temporary failure in name resolution.
the part that doesn't work is this:
{'passkey':passkey}
r = requests.get( url, params=pyload, headers={'Connection':'close'})
I have investigated an I realized I was not closing the previous connections, however the error occurs still | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5102/reactions"
} | https://api.github.com/repos/psf/requests/issues/5102/timeline | null | completed | null | null | false | [
"I was trying and found that when there is no internet connection this is the error occuring. So maybe that was the problem\r\n",
"I see you found the issue! 🥇 However, this reminds me that for the use case you describe (connecting very often) I recommend that you look into using sessions.",
"Ok thanks, will ... |
https://api.github.com/repos/psf/requests/issues/5101 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5101/labels{/name} | https://api.github.com/repos/psf/requests/issues/5101/comments | https://api.github.com/repos/psf/requests/issues/5101/events | https://github.com/psf/requests/issues/5101 | 446,736,414 | MDU6SXNzdWU0NDY3MzY0MTQ= | 5,101 | clarification of some items related to contributing | {
"avatar_url": "https://avatars.githubusercontent.com/u/29842143?v=4",
"events_url": "https://api.github.com/users/moffetma/events{/privacy}",
"followers_url": "https://api.github.com/users/moffetma/followers",
"following_url": "https://api.github.com/users/moffetma/following{/other_user}",
"gists_url": "https://api.github.com/users/moffetma/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/moffetma",
"id": 29842143,
"login": "moffetma",
"node_id": "MDQ6VXNlcjI5ODQyMTQz",
"organizations_url": "https://api.github.com/users/moffetma/orgs",
"received_events_url": "https://api.github.com/users/moffetma/received_events",
"repos_url": "https://api.github.com/users/moffetma/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/moffetma/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/moffetma/subscriptions",
"type": "User",
"url": "https://api.github.com/users/moffetma",
"user_view_type": "public"
} | [
{
"color": "02e10c",
"default": false,
"description": null,
"id": 76800,
"name": "Feature Request",
"node_id": "MDU6TGFiZWw3NjgwMA==",
"url": "https://api.github.com/repos/psf/requests/labels/Feature%20Request"
},
{
"color": "0b02e1",
"default": false,
"description": null... | closed | false | null | [] | null | 5 | 2019-05-21T17:23:52Z | 2024-05-20T14:40:28Z | 2024-05-20T14:40:17Z | NONE | null | It could help potential new contributors if the "How to Contribute" section included the content or a link to the "Good Bug Reports" section of the contributing.md and a link to some simple example tests in step 4 | {
"avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4",
"events_url": "https://api.github.com/users/sethmlarson/events{/privacy}",
"followers_url": "https://api.github.com/users/sethmlarson/followers",
"following_url": "https://api.github.com/users/sethmlarson/following{/other_user}",
"gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/sethmlarson",
"id": 18519037,
"login": "sethmlarson",
"node_id": "MDQ6VXNlcjE4NTE5MDM3",
"organizations_url": "https://api.github.com/users/sethmlarson/orgs",
"received_events_url": "https://api.github.com/users/sethmlarson/received_events",
"repos_url": "https://api.github.com/users/sethmlarson/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions",
"type": "User",
"url": "https://api.github.com/users/sethmlarson",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5101/reactions"
} | https://api.github.com/repos/psf/requests/issues/5101/timeline | null | completed | null | null | false | [
"Great idea! Is it possible for you to submit PR for this?",
"I can work on CONTRIBUTING.md file.",
"@Glyphack any update on the CONTRIBUTING.md file? I am wondering how I should get started",
"Hi, I did not receive any response on this so I did not start it. I don't know should I start a PR and work on it or... |
https://api.github.com/repos/psf/requests/issues/5100 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5100/labels{/name} | https://api.github.com/repos/psf/requests/issues/5100/comments | https://api.github.com/repos/psf/requests/issues/5100/events | https://github.com/psf/requests/issues/5100 | 446,133,316 | MDU6SXNzdWU0NDYxMzMzMTY= | 5,100 | allow creating a read-only session object | {
"avatar_url": "https://avatars.githubusercontent.com/u/3637559?v=4",
"events_url": "https://api.github.com/users/stardust85/events{/privacy}",
"followers_url": "https://api.github.com/users/stardust85/followers",
"following_url": "https://api.github.com/users/stardust85/following{/other_user}",
"gists_url": "https://api.github.com/users/stardust85/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/stardust85",
"id": 3637559,
"login": "stardust85",
"node_id": "MDQ6VXNlcjM2Mzc1NTk=",
"organizations_url": "https://api.github.com/users/stardust85/orgs",
"received_events_url": "https://api.github.com/users/stardust85/received_events",
"repos_url": "https://api.github.com/users/stardust85/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/stardust85/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/stardust85/subscriptions",
"type": "User",
"url": "https://api.github.com/users/stardust85",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2019-05-20T13:58:05Z | 2021-09-02T00:07:23Z | 2020-02-10T06:33:09Z | NONE | resolved | that will allow only read methods (GET, OPTIONS). It should block POST and PUT (=raise an error). It wold make it simple to enforce that the session users only read :) But maybe using a use with read-only permissions is better. So you can probably forget it. Adding it here only for reference if someone goes this same dead end way. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5100/reactions"
} | https://api.github.com/repos/psf/requests/issues/5100/timeline | null | completed | null | null | false | [
"GET requests can certainly be used to change things on the server, so they're not really read-only. Besides, these things are usually implemented on the server, not on the client. If you really need it, create a subclass of the existing object.",
"Hi @stardust85, thanks for the suggestion! I don't believe this i... |
https://api.github.com/repos/psf/requests/issues/5099 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5099/labels{/name} | https://api.github.com/repos/psf/requests/issues/5099/comments | https://api.github.com/repos/psf/requests/issues/5099/events | https://github.com/psf/requests/pull/5099 | 445,952,428 | MDExOlB1bGxSZXF1ZXN0MjgwMjYyMjc0 | 5,099 | Print the type of the password instead of the password itself | {
"avatar_url": "https://avatars.githubusercontent.com/u/20043863?v=4",
"events_url": "https://api.github.com/users/petar-iv/events{/privacy}",
"followers_url": "https://api.github.com/users/petar-iv/followers",
"following_url": "https://api.github.com/users/petar-iv/following{/other_user}",
"gists_url": "https://api.github.com/users/petar-iv/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/petar-iv",
"id": 20043863,
"login": "petar-iv",
"node_id": "MDQ6VXNlcjIwMDQzODYz",
"organizations_url": "https://api.github.com/users/petar-iv/orgs",
"received_events_url": "https://api.github.com/users/petar-iv/received_events",
"repos_url": "https://api.github.com/users/petar-iv/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/petar-iv/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/petar-iv/subscriptions",
"type": "User",
"url": "https://api.github.com/users/petar-iv",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2019-05-20T07:00:57Z | 2021-08-31T00:07:13Z | 2019-05-20T15:35:42Z | CONTRIBUTOR | resolved | Hello,
Although providing a non-string password would be very rear, it would be better the value of the password (even if it is incorrectly set) to not take part in the warning message.
Regards | {
"avatar_url": "https://avatars.githubusercontent.com/u/8844753?v=4",
"events_url": "https://api.github.com/users/bisguzar/events{/privacy}",
"followers_url": "https://api.github.com/users/bisguzar/followers",
"following_url": "https://api.github.com/users/bisguzar/following{/other_user}",
"gists_url": "https://api.github.com/users/bisguzar/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/bisguzar",
"id": 8844753,
"login": "bisguzar",
"node_id": "MDQ6VXNlcjg4NDQ3NTM=",
"organizations_url": "https://api.github.com/users/bisguzar/orgs",
"received_events_url": "https://api.github.com/users/bisguzar/received_events",
"repos_url": "https://api.github.com/users/bisguzar/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/bisguzar/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bisguzar/subscriptions",
"type": "User",
"url": "https://api.github.com/users/bisguzar",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5099/reactions"
} | https://api.github.com/repos/psf/requests/issues/5099/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5099.diff",
"html_url": "https://github.com/psf/requests/pull/5099",
"merged_at": "2019-05-20T15:35:41Z",
"patch_url": "https://github.com/psf/requests/pull/5099.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5099"
} | true | [] |
https://api.github.com/repos/psf/requests/issues/5098 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5098/labels{/name} | https://api.github.com/repos/psf/requests/issues/5098/comments | https://api.github.com/repos/psf/requests/issues/5098/events | https://github.com/psf/requests/issues/5098 | 445,814,743 | MDU6SXNzdWU0NDU4MTQ3NDM= | 5,098 | Why stopped Python 3.4 support? | {
"avatar_url": "https://avatars.githubusercontent.com/u/6760674?v=4",
"events_url": "https://api.github.com/users/jerrymakesjelly/events{/privacy}",
"followers_url": "https://api.github.com/users/jerrymakesjelly/followers",
"following_url": "https://api.github.com/users/jerrymakesjelly/following{/other_user}",
"gists_url": "https://api.github.com/users/jerrymakesjelly/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jerrymakesjelly",
"id": 6760674,
"login": "jerrymakesjelly",
"node_id": "MDQ6VXNlcjY3NjA2NzQ=",
"organizations_url": "https://api.github.com/users/jerrymakesjelly/orgs",
"received_events_url": "https://api.github.com/users/jerrymakesjelly/received_events",
"repos_url": "https://api.github.com/users/jerrymakesjelly/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jerrymakesjelly/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jerrymakesjelly/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jerrymakesjelly",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2019-05-19T12:34:21Z | 2021-09-05T00:06:51Z | 2019-05-19T15:40:55Z | NONE | resolved | I found that PR #5092 has stopped support for Python 3.4, but I couldn't find the reasons
Can someone tell me why? | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5098/reactions"
} | https://api.github.com/repos/psf/requests/issues/5098/timeline | null | completed | null | null | false | [
"Hi @jerrymakesjelly, we discontinued support for 3.4 due to it [reaching end of life](https://www.python.org/dev/peps/pep-0429/#release-schedule) and no longer receiving updates. Many of our upstream dependencies have dropped support including some of our testing infrastructure.\r\n\r\nThanks for checking in on th... |
https://api.github.com/repos/psf/requests/issues/5097 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5097/labels{/name} | https://api.github.com/repos/psf/requests/issues/5097/comments | https://api.github.com/repos/psf/requests/issues/5097/events | https://github.com/psf/requests/issues/5097 | 445,617,699 | MDU6SXNzdWU0NDU2MTc2OTk= | 5,097 | Quote in proxy string causes InvalidURL: Failed to parse. | {
"avatar_url": "https://avatars.githubusercontent.com/u/2407519?v=4",
"events_url": "https://api.github.com/users/hwstovall/events{/privacy}",
"followers_url": "https://api.github.com/users/hwstovall/followers",
"following_url": "https://api.github.com/users/hwstovall/following{/other_user}",
"gists_url": "https://api.github.com/users/hwstovall/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/hwstovall",
"id": 2407519,
"login": "hwstovall",
"node_id": "MDQ6VXNlcjI0MDc1MTk=",
"organizations_url": "https://api.github.com/users/hwstovall/orgs",
"received_events_url": "https://api.github.com/users/hwstovall/received_events",
"repos_url": "https://api.github.com/users/hwstovall/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/hwstovall/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hwstovall/subscriptions",
"type": "User",
"url": "https://api.github.com/users/hwstovall",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 14 | 2019-05-17T21:05:41Z | 2021-11-05T03:00:26Z | 2021-08-07T02:51:02Z | NONE | resolved | When attempting to make a request through a proxy configured with a basic username and password, an `InvalidURL` exception is raised if the proxy string contains a quote.
This appears to be new in the `2.22.0` release. We downgraded to `2.21.0` and are experiencing no issues.
## Expected Result
Expected quote to be allowed in proxy string and for the proxy connection to succeed.
## Actual Result
Got the following error:
`InvalidURL: Failed to parse: http://user:pass"with"quote@example.org:3128/`
Here's the full stacktrace:
```
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 412, in send
conn = self.get_connection(request.url, proxies)
File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 305, in get_connection
proxy_url = parse_url(proxy)
File "/usr/local/lib/python3.6/site-packages/urllib3/util/url.py", line 234, in parse_url
raise LocationParseError(url)
urllib3.exceptions.LocationParseError: Failed to parse: http://user:pass"with"quote@example.org:3128/
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 414, in send
raise InvalidURL(e, request=request)
requests.exceptions.InvalidURL: Failed to parse: http://user:pass"with"quote@example.org:3128/
```
## Reproduction Steps
```python
import requests
proxies = {'http': 'http://user:pass"with"quote@example.org:3128/'}
requests.get('http://example.org', proxies=proxies)
```
## System Information
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.6.6"
},
"platform": {
"release": "4.9.125-linuxkit",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.22.0"
},
"system_ssl": {
"version": "1010006f"
},
"urllib3": {
"version": "1.25.2"
},
"using_pyopenssl": false
}
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5097/reactions"
} | https://api.github.com/repos/psf/requests/issues/5097/timeline | null | completed | null | null | false | [
"@hwstovall Have you tried replacing any quote with %22?\r\n\r\nA little research seems to indicate this may be a problem with one of the urllib methods. Perhaps somebody more familiar with the code base could confirm.",
"also if you try to use user with @ example superuser80@gmail.com will raise InvalidURL",
"... |
https://api.github.com/repos/psf/requests/issues/5096 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5096/labels{/name} | https://api.github.com/repos/psf/requests/issues/5096/comments | https://api.github.com/repos/psf/requests/issues/5096/events | https://github.com/psf/requests/issues/5096 | 445,149,331 | MDU6SXNzdWU0NDUxNDkzMzE= | 5,096 | Why are cookies private on PreparedRequests objects? | {
"avatar_url": "https://avatars.githubusercontent.com/u/22352286?v=4",
"events_url": "https://api.github.com/users/mctwynne/events{/privacy}",
"followers_url": "https://api.github.com/users/mctwynne/followers",
"following_url": "https://api.github.com/users/mctwynne/following{/other_user}",
"gists_url": "https://api.github.com/users/mctwynne/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mctwynne",
"id": 22352286,
"login": "mctwynne",
"node_id": "MDQ6VXNlcjIyMzUyMjg2",
"organizations_url": "https://api.github.com/users/mctwynne/orgs",
"received_events_url": "https://api.github.com/users/mctwynne/received_events",
"repos_url": "https://api.github.com/users/mctwynne/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mctwynne/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mctwynne/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mctwynne",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 3 | 2019-05-16T20:39:02Z | 2021-11-05T02:11:38Z | 2021-08-07T02:08:34Z | NONE | resolved | I was hoping to check the state of cookies that were present on a `PreparedRequest` object but found that the cookies member is private. Is there a specific reason for this? | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5096/reactions"
} | https://api.github.com/repos/psf/requests/issues/5096/timeline | null | completed | null | null | false | [
"Could you let us know the use case of checking the state of cookies with `PreparedRequest`?",
"@kobayashi I was actually just using pdb to verify which cookies were being sent for a handful of requests as part of a test I was writing. I think I was just expecting it to have been a public member like it is on the... |
https://api.github.com/repos/psf/requests/issues/5095 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5095/labels{/name} | https://api.github.com/repos/psf/requests/issues/5095/comments | https://api.github.com/repos/psf/requests/issues/5095/events | https://github.com/psf/requests/issues/5095 | 445,060,555 | MDU6SXNzdWU0NDUwNjA1NTU= | 5,095 | windows proxy settings taken only partly | {
"avatar_url": "https://avatars.githubusercontent.com/u/32643724?v=4",
"events_url": "https://api.github.com/users/elschman/events{/privacy}",
"followers_url": "https://api.github.com/users/elschman/followers",
"following_url": "https://api.github.com/users/elschman/following{/other_user}",
"gists_url": "https://api.github.com/users/elschman/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/elschman",
"id": 32643724,
"login": "elschman",
"node_id": "MDQ6VXNlcjMyNjQzNzI0",
"organizations_url": "https://api.github.com/users/elschman/orgs",
"received_events_url": "https://api.github.com/users/elschman/received_events",
"repos_url": "https://api.github.com/users/elschman/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/elschman/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/elschman/subscriptions",
"type": "User",
"url": "https://api.github.com/users/elschman",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 0 | 2019-05-16T16:52:46Z | 2019-05-16T16:52:46Z | null | NONE | null | do run python 2.7/3.7 on a windows 7 host.
This host is AD managed. As part of the group policy the internet settings are set to automatically proxy configuration with an wpad.dat file at the AD server.
The configuration works. cos IE and Chrome can reach external and internal hosts. Some of the internal are excluded from proxy via no proxy rules inside the dat file.
But on python with requests im not able to reach the internal addresses which are excluded via the proxy file rules. Python always tries to get the data from the proxy.
The only solution was an extra environmental variable NO_PROXY with the ips not to be reached via the proxy.
These excluded IPs are common IPs and not private ! (90.0.0.0/8) is part of the wpad.dat exclusion
## Expected Result
either no proxy or all proxy settings should taken into account.
## Actual Result
every requests traffic is placed on the proxy
urllib3 works as expected
## Reproduction Steps
```python
import requests
import urllib3
http1 = urllib3.PoolManager()
r1 = http.request('GET', 'http://90.0.11.253:43001/')
r1.status
r2 = requests.get('http://90.0.11.253:43001/')
r2.status_code
r1==r2 must be true but isnt
```
## System Information
$ python -m requests.help
```
C:\Users\iwetzel\AppData\Local\Programs\Python\Python37-32>python -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": ""
},
"idna": {
"version": "2.8"
},
"implementation": {
"name": "CPython",
"version": "3.7.1"
},
"platform": {
"release": "7",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.21.0"
},
"system_ssl": {
"version": "1010009f"
},
"urllib3": {
"version": "1.24.3"
},
"using_pyopenssl": false
}
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
| 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/5095/reactions"
} | https://api.github.com/repos/psf/requests/issues/5095/timeline | null | null | null | null | false | [] |
https://api.github.com/repos/psf/requests/issues/5094 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5094/labels{/name} | https://api.github.com/repos/psf/requests/issues/5094/comments | https://api.github.com/repos/psf/requests/issues/5094/events | https://github.com/psf/requests/issues/5094 | 445,033,365 | MDU6SXNzdWU0NDUwMzMzNjU= | 5,094 | When i try install pygame i get error | {
"avatar_url": "https://avatars.githubusercontent.com/u/45826998?v=4",
"events_url": "https://api.github.com/users/omurkaya/events{/privacy}",
"followers_url": "https://api.github.com/users/omurkaya/followers",
"following_url": "https://api.github.com/users/omurkaya/following{/other_user}",
"gists_url": "https://api.github.com/users/omurkaya/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/omurkaya",
"id": 45826998,
"login": "omurkaya",
"node_id": "MDQ6VXNlcjQ1ODI2OTk4",
"organizations_url": "https://api.github.com/users/omurkaya/orgs",
"received_events_url": "https://api.github.com/users/omurkaya/received_events",
"repos_url": "https://api.github.com/users/omurkaya/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/omurkaya/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/omurkaya/subscriptions",
"type": "User",
"url": "https://api.github.com/users/omurkaya",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 4 | 2019-05-16T15:51:46Z | 2021-09-04T00:06:10Z | 2019-09-20T18:03:27Z | NONE | resolved | When i try install py game terminal give me error
Windows 10
Python 3.7.3
`
Exception:
Traceback (most recent call last):
File "C:\Users\KAYA\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip\_internal\cli\base_command.py", line 179, in main
status = self.run(options, args)
File "C:\Users\KAYA\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip\_internal\commands\install.py", line 315, in run
resolver.resolve(requirement_set)
File "C:\Users\KAYA\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip\_internal\resolve.py", line 131, in resolve
self._resolve_one(requirement_set, req)
File "C:\Users\KAYA\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip\_internal\resolve.py", line 294, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "C:\Users\KAYA\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip\_internal\resolve.py", line 242, in _get_abstract_dist_for
self.require_hashes
File "C:\Users\KAYA\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip\_internal\operations\prepare.py", line 269, in prepare_linked_requirement
req.populate_link(finder, upgrade_allowed, require_hashes)
File "C:\Users\KAYA\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip\_internal\req\req_install.py", line 196, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "C:\Users\KAYA\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip\_internal\index.py", line 639, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "C:\Users\KAYA\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip\_internal\index.py", line 610, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "C:\Users\KAYA\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip\_internal\index.py", line 743, in _get_pages
page = _get_html_page(location, session=self.session)
File "C:\Users\KAYA\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip\_internal\index.py", line 229, in _get_html_page
resp = _get_html_response(url, session=session)
File "C:\Users\KAYA\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip\_internal\index.py", line 177, in _get_html_response
"Cache-Control": "max-age=0",
File "C:\Users\KAYA\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip\_vendor\requests\sessions.py", line 546, in get
return self.request('GET', url, **kwargs)
File "C:\Users\KAYA\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip\_internal\download.py", line 403, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "C:\Users\KAYA\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip\_vendor\requests\sessions.py", line 524, in request
prep.url, proxies, stream, verify, cert
File "C:\Users\KAYA\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip\_vendor\requests\sessions.py", line 700, in merge_environment_settings
env_proxies = get_environ_proxies(url, no_proxy=no_proxy)
File "C:\Users\KAYA\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip\_vendor\requests\utils.py", line 761, in get_environ_proxies
if should_bypass_proxies(url, no_proxy=no_proxy):
File "C:\Users\KAYA\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip\_vendor\requests\utils.py", line 745, in should_bypass_proxies
bypass = proxy_bypass(parsed.hostname)
File "C:\Users\KAYA\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip\_vendor\requests\utils.py", line 95, in proxy_bypass
return proxy_bypass_registry(host)
File "C:\Users\KAYA\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip\_vendor\requests\utils.py", line 61, in proxy_bypass_registry
'ProxyEnable')[0])
ValueError: invalid literal for int() with base 10: '0.0.0.0:0000'` | {
"avatar_url": "https://avatars.githubusercontent.com/u/45826998?v=4",
"events_url": "https://api.github.com/users/omurkaya/events{/privacy}",
"followers_url": "https://api.github.com/users/omurkaya/followers",
"following_url": "https://api.github.com/users/omurkaya/following{/other_user}",
"gists_url": "https://api.github.com/users/omurkaya/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/omurkaya",
"id": 45826998,
"login": "omurkaya",
"node_id": "MDQ6VXNlcjQ1ODI2OTk4",
"organizations_url": "https://api.github.com/users/omurkaya/orgs",
"received_events_url": "https://api.github.com/users/omurkaya/received_events",
"repos_url": "https://api.github.com/users/omurkaya/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/omurkaya/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/omurkaya/subscriptions",
"type": "User",
"url": "https://api.github.com/users/omurkaya",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5094/reactions"
} | https://api.github.com/repos/psf/requests/issues/5094/timeline | null | completed | null | null | false | [
"#up",
"@omurkaya It'd be easier if you used ` ``` ` instead of just the single `. It makes the block of \"code\" more readable.",
"I reinstall windows its fixed xD",
"Could you close this PR then @omurkaya?"
] |
https://api.github.com/repos/psf/requests/issues/5093 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5093/labels{/name} | https://api.github.com/repos/psf/requests/issues/5093/comments | https://api.github.com/repos/psf/requests/issues/5093/events | https://github.com/psf/requests/issues/5093 | 444,826,383 | MDU6SXNzdWU0NDQ4MjYzODM= | 5,093 | Upload file to wunderlist through API | {
"avatar_url": "https://avatars.githubusercontent.com/u/43709360?v=4",
"events_url": "https://api.github.com/users/mohammedgameel/events{/privacy}",
"followers_url": "https://api.github.com/users/mohammedgameel/followers",
"following_url": "https://api.github.com/users/mohammedgameel/following{/other_user}",
"gists_url": "https://api.github.com/users/mohammedgameel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mohammedgameel",
"id": 43709360,
"login": "mohammedgameel",
"node_id": "MDQ6VXNlcjQzNzA5MzYw",
"organizations_url": "https://api.github.com/users/mohammedgameel/orgs",
"received_events_url": "https://api.github.com/users/mohammedgameel/received_events",
"repos_url": "https://api.github.com/users/mohammedgameel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mohammedgameel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mohammedgameel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mohammedgameel",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 0 | 2019-05-16T08:40:25Z | 2021-09-05T00:06:50Z | 2019-05-21T01:56:07Z | NONE | resolved |
I am trying to upload a file to wunderlist through their API
According to their documentation:
https://developer.wunderlist.com/documentation/endpoints/upload
**I have succeeded in the first step which is to create the upload as follows:**
(I am using python requests library)
headers = {'X-Access-Token': access_token, 'X-Client-ID': client_id, 'Content-Type': 'application/json'}
params = {'content_type':'application/json' , 'file_name': 'abc.txt','file_size':18}
params = json.dumps(params)
uploaded_r= requests.post('https://a.wunderlist.com/api/v1/uploads', headers=headers, data=params)
and got the response with the authorization of the first part of upload
'{"id":243803653,"user_id":84497133,"state":"new","type":"upload","expires_at":"2019-05-16T08:18:02.331Z","part":{"url":"https://upload.wunderlist.io/592d3140-59e0-0137-6b42-22000a5207ef-1557994382-276676?partNumber=1&uploadId=dzmW8CIfAN0v2dUWPNYcL9QOhaCRMpYDm4Wgho2zhxOz91Z946vWraJIYkdg4ivV8kpazt08X5ubU2ddaySy3ObrorqsbTNNg01rj3GqTOzzz39gTJc9AymGyxSu2vEW","date":"Thu, 16 May 2019 08:18:02 UTC +00:00","authorization":"AWS AKIAJEN6W4AO3LJODOAA:E1h8SD6kstwOX3ID2RHs6jyHvGY="}}'
**The problem is:**
I am trying to use the authorization and date to upload the file but I keep getting (SignatureDoesNotMatch) error
upload_url = ast.literal_eval(uploaded_r.text)['part']['url']
auth = ast.literal_eval(uploaded_r.text)['part']['authorization']
x_date = ast.literal_eval(uploaded_r.text)['part']['date']
upload_id = ast.literal_eval(uploaded_r.text)['id']
**I have tried the following:**
headers = {'Content-Type': '','Authorization': auth,'x-amz-date':x_date}
final_upload= requests.post(upload_url, data =open('abc.txt','rb') ,headers=headers)
headers = {'Content-Type': '','Authorization': auth,'x-amz-date':x_date}
files = {'file':open('abc.txt','rb').read()}
final_upload= requests.post(upload_url, files=files ,headers=headers)
headers = {'Content-Type': 'application/octet-stream','Authorization': auth,'x-amz-date':x_date}
files = {'file':open('abc.txt','rb').read()}
final_upload= requests.post(upload_url, files =open('abc.txt','rb') ,headers=headers)
**I have tried also the put command:**
headers = {'Content-Type': '','Authorization': auth,'x-amz-date':x_date}
files = {'file':open('abc.txt','rb').read()}
final_upload= requests.put(upload_url, data =open('abc.txt','rb') ,headers=headers)
but I get empty response and the next step which is mark the upload as finished returns (bad request) error
| {
"avatar_url": "https://avatars.githubusercontent.com/u/43709360?v=4",
"events_url": "https://api.github.com/users/mohammedgameel/events{/privacy}",
"followers_url": "https://api.github.com/users/mohammedgameel/followers",
"following_url": "https://api.github.com/users/mohammedgameel/following{/other_user}",
"gists_url": "https://api.github.com/users/mohammedgameel/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mohammedgameel",
"id": 43709360,
"login": "mohammedgameel",
"node_id": "MDQ6VXNlcjQzNzA5MzYw",
"organizations_url": "https://api.github.com/users/mohammedgameel/orgs",
"received_events_url": "https://api.github.com/users/mohammedgameel/received_events",
"repos_url": "https://api.github.com/users/mohammedgameel/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mohammedgameel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mohammedgameel/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mohammedgameel",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5093/reactions"
} | https://api.github.com/repos/psf/requests/issues/5093/timeline | null | completed | null | null | false | [] |
https://api.github.com/repos/psf/requests/issues/5092 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5092/labels{/name} | https://api.github.com/repos/psf/requests/issues/5092/comments | https://api.github.com/repos/psf/requests/issues/5092/events | https://github.com/psf/requests/pull/5092 | 444,613,656 | MDExOlB1bGxSZXF1ZXN0Mjc5MjM4NDM0 | 5,092 | v2.22.0 | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | [] | 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}... | null | 3 | 2019-05-15T19:47:07Z | 2021-08-31T00:07:14Z | 2019-05-16T05:12:48Z | MEMBER | resolved | 2.22.0 (2019-05-15)
-------------------
**Dependencies**
- Requests now supports urllib3 v1.25.2.
(note: 1.25.0 and 1.25.1 are incompatible)
**Deprecations**
- Requests has officially stopped support for Python 3.4. | {
"avatar_url": "https://avatars.githubusercontent.com/u/16336606?v=4",
"events_url": "https://api.github.com/users/frostming/events{/privacy}",
"followers_url": "https://api.github.com/users/frostming/followers",
"following_url": "https://api.github.com/users/frostming/following{/other_user}",
"gists_url": "https://api.github.com/users/frostming/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/frostming",
"id": 16336606,
"login": "frostming",
"node_id": "MDQ6VXNlcjE2MzM2NjA2",
"organizations_url": "https://api.github.com/users/frostming/orgs",
"received_events_url": "https://api.github.com/users/frostming/received_events",
"repos_url": "https://api.github.com/users/frostming/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/frostming/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/frostming/subscriptions",
"type": "User",
"url": "https://api.github.com/users/frostming",
"user_view_type": "public"
} | {
"+1": 1,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 3,
"laugh": 0,
"rocket": 2,
"total_count": 6,
"url": "https://api.github.com/repos/psf/requests/issues/5092/reactions"
} | https://api.github.com/repos/psf/requests/issues/5092/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5092.diff",
"html_url": "https://github.com/psf/requests/pull/5092",
"merged_at": "2019-05-16T05:12:48Z",
"patch_url": "https://github.com/psf/requests/pull/5092.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5092"
} | true | [
"This should address #5065, #5067, #5085.",
"It looks like I've been locked out of partial control on the repository when it was pulled out the Requests org. Only @kenneth-reitz can merge at this point. Once this is merged I can cut a new release to PyPI.",
"@nateprewitt It is weird but members of the ORG have ... |
https://api.github.com/repos/psf/requests/issues/5091 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5091/labels{/name} | https://api.github.com/repos/psf/requests/issues/5091/comments | https://api.github.com/repos/psf/requests/issues/5091/events | https://github.com/psf/requests/issues/5091 | 444,518,517 | MDU6SXNzdWU0NDQ1MTg1MTc= | 5,091 | Request instalation using conda | {
"avatar_url": "https://avatars.githubusercontent.com/u/26392211?v=4",
"events_url": "https://api.github.com/users/mohseniaref-InSAR/events{/privacy}",
"followers_url": "https://api.github.com/users/mohseniaref-InSAR/followers",
"following_url": "https://api.github.com/users/mohseniaref-InSAR/following{/other_user}",
"gists_url": "https://api.github.com/users/mohseniaref-InSAR/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/mohseniaref-InSAR",
"id": 26392211,
"login": "mohseniaref-InSAR",
"node_id": "MDQ6VXNlcjI2MzkyMjEx",
"organizations_url": "https://api.github.com/users/mohseniaref-InSAR/orgs",
"received_events_url": "https://api.github.com/users/mohseniaref-InSAR/received_events",
"repos_url": "https://api.github.com/users/mohseniaref-InSAR/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/mohseniaref-InSAR/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mohseniaref-InSAR/subscriptions",
"type": "User",
"url": "https://api.github.com/users/mohseniaref-InSAR",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2019-05-15T15:55:55Z | 2021-09-02T00:07:23Z | 2020-02-10T06:34:29Z | NONE | resolved | Summary.
I couldn't install request using conda as you see in the following message
conda install -c conda-forge/label/cf201901 requests
Solving environment: failed
CondaHTTPError: HTTP 404 NOT FOUND for url <https://conda.anaconda.org/py27h453aca2_1/noarch/repodata.json>
Elapsed: 00:00.501324
CF-RAY: 4d7647510c20d121-TXL
The remote server could not find the noarch directory for the
requested channel with url: https://conda.anaconda.org/py27h453aca2_1
As of conda 4.3, a valid channel must contain a `noarch/repodata.json` and
associated `noarch/repodata.json.bz2` file, even if `noarch/repodata.json` is
empty. please request that the channel administrator create
`noarch/repodata.json` and associated `noarch/repodata.json.bz2` files.
$ mkdir noarch
$ echo '{}' > noarch/repodata.json
$ bzip2 -k noarch/repodata.json
You will need to adjust your conda configuration to proceed.
Use `conda config --show channels` to view your configuration's current state.
Further configuration help can be found at <https://conda.io/docs/config.html>.
## Expected Result
What you expected.
## Actual Result
What happened instead.
## Reproduction Steps
```python
import requests
```
## System Information
$ python -m requests.help
```
<paste here>
```
This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).
| {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5091/reactions"
} | https://api.github.com/repos/psf/requests/issues/5091/timeline | null | completed | null | null | false | [
"This appears to be an issue with Conda infrastructure or your networking setup. I'd suggest reaching out to them if you're still experiencing issues."
] |
https://api.github.com/repos/psf/requests/issues/5090 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5090/labels{/name} | https://api.github.com/repos/psf/requests/issues/5090/comments | https://api.github.com/repos/psf/requests/issues/5090/events | https://github.com/psf/requests/pull/5090 | 444,481,584 | MDExOlB1bGxSZXF1ZXN0Mjc5MTMyNDI5 | 5,090 | http://pipenv.org > https://github.com/pypa/pipenv | {
"avatar_url": "https://avatars.githubusercontent.com/u/8227782?v=4",
"events_url": "https://api.github.com/users/jb-reefer/events{/privacy}",
"followers_url": "https://api.github.com/users/jb-reefer/followers",
"following_url": "https://api.github.com/users/jb-reefer/following{/other_user}",
"gists_url": "https://api.github.com/users/jb-reefer/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jb-reefer",
"id": 8227782,
"login": "jb-reefer",
"node_id": "MDQ6VXNlcjgyMjc3ODI=",
"organizations_url": "https://api.github.com/users/jb-reefer/orgs",
"received_events_url": "https://api.github.com/users/jb-reefer/received_events",
"repos_url": "https://api.github.com/users/jb-reefer/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jb-reefer/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jb-reefer/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jb-reefer",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2019-05-15T14:46:21Z | 2021-08-29T00:07:09Z | 2019-08-20T04:12:22Z | NONE | resolved | It looks like a few of the resources on https://docs.pipenv.org/en/latest/ are broken, like the gif under "A short animation of pipenv at work" and the installation instructions are a bit behind what's on the GitHub repo. Maybe we should link to the repo directly?
First time contributing, feel free to reject this! | {
"avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4",
"events_url": "https://api.github.com/users/kennethreitz/events{/privacy}",
"followers_url": "https://api.github.com/users/kennethreitz/followers",
"following_url": "https://api.github.com/users/kennethreitz/following{/other_user}",
"gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/kennethreitz",
"id": 119893,
"login": "kennethreitz",
"node_id": "MDQ6VXNlcjExOTg5Mw==",
"organizations_url": "https://api.github.com/users/kennethreitz/orgs",
"received_events_url": "https://api.github.com/users/kennethreitz/received_events",
"repos_url": "https://api.github.com/users/kennethreitz/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions",
"type": "User",
"url": "https://api.github.com/users/kennethreitz",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5090/reactions"
} | https://api.github.com/repos/psf/requests/issues/5090/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5090.diff",
"html_url": "https://github.com/psf/requests/pull/5090",
"merged_at": null,
"patch_url": "https://github.com/psf/requests/pull/5090.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5090"
} | true | [
"let's fix pipenv.org instead :)\r\n\r\nthe website can't be a one man operation! ;D",
"`pipenv.org` seems dead, so the link goes into Nirvana now. Can this be reopened?"
] |
https://api.github.com/repos/psf/requests/issues/5089 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5089/labels{/name} | https://api.github.com/repos/psf/requests/issues/5089/comments | https://api.github.com/repos/psf/requests/issues/5089/events | https://github.com/psf/requests/issues/5089 | 444,181,978 | MDU6SXNzdWU0NDQxODE5Nzg= | 5,089 | HTTPDigestAuth fails on non-latin credentials | {
"avatar_url": "https://avatars.githubusercontent.com/u/30702968?v=4",
"events_url": "https://api.github.com/users/serega-icon/events{/privacy}",
"followers_url": "https://api.github.com/users/serega-icon/followers",
"following_url": "https://api.github.com/users/serega-icon/following{/other_user}",
"gists_url": "https://api.github.com/users/serega-icon/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/serega-icon",
"id": 30702968,
"login": "serega-icon",
"node_id": "MDQ6VXNlcjMwNzAyOTY4",
"organizations_url": "https://api.github.com/users/serega-icon/orgs",
"received_events_url": "https://api.github.com/users/serega-icon/received_events",
"repos_url": "https://api.github.com/users/serega-icon/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/serega-icon/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/serega-icon/subscriptions",
"type": "User",
"url": "https://api.github.com/users/serega-icon",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2019-05-15T00:22:52Z | 2021-11-05T02:11:38Z | 2021-08-07T02:10:14Z | NONE | resolved | Hello everyone.
I'm trying to login with digest auth with russian-characted login and it fails.
I was trying to find any information about solving this issue for a whole night but unsuccessfully. Please help
Unfortunately I can't view the whole file due to confidentiality.
If you need any information I didn't include in this issue please report.
> self.session below is instance of requests.Session()
```
>>> page = self.session.get(main_url, auth=requests.auth.HTTPDigestAuth("Сергей_Ласточкин", '1234'))
Traceback (most recent call last):
File "<pyshell#378>", line 1, in <module>
page = self.session.get(main_url, auth=requests.auth.HTTPDigestAuth("Сергей_Ласточкин", '1234'))
File "C:\Python\Python36\lib\site-packages\requests\sessions.py", line 521, in get
return self.request('GET', url, **kwargs)
File "C:\Python\Python36\lib\site-packages\requests\sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "C:\Python\Python36\lib\site-packages\requests\sessions.py", line 625, in send
r = dispatch_hook('response', hooks, r, **kwargs)
File "C:\Python\Python36\lib\site-packages\requests\hooks.py", line 31, in dispatch_hook
_hook_data = hook(hook_data, **kwargs)
File "C:\Python\Python36\lib\site-packages\requests\auth.py", line 257, in handle_401
_r = r.connection.send(prep, **kwargs)
File "C:\Python\Python36\lib\site-packages\requests\adapters.py", line 440, in send
timeout=timeout
File "C:\Python\Python36\lib\site-packages\urllib3\connectionpool.py", line 601, in urlopen
chunked=chunked)
File "C:\Python\Python36\lib\site-packages\urllib3\connectionpool.py", line 357, in _make_request
conn.request(method, url, **httplib_request_kw)
File "C:\Python\Python36\lib\http\client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\Python\Python36\lib\http\client.py", line 1280, in _send_request
self.putheader(hdr, value)
File "C:\Python\Python36\lib\http\client.py", line 1212, in putheader
values[i] = one_value.encode('latin-1')
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 17-22: ordinal not in range(256)
```
## System Information
$ python -m requests.help
```
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.2.2"
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.6.5"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "1010008f",
"version": "17.5.0"
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "100020bf"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": true
}
```
| {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5089/reactions"
} | https://api.github.com/repos/psf/requests/issues/5089/timeline | null | completed | null | null | false | [
"https://github.com/psf/requests/blob/4f6c0187150af09d085c03096504934eb91c7a9e/requests/auth.py#L59-L63\r\n\r\nDon't pass unicode strings in the arguments, but use UTF8 bytes instead.\r\n```\r\nself.session.get(main_url, auth=requests.auth.HTTPDigestAuth(\"Сергей_Ласточкин\".encode('UTF-8'), '1234'))\r\n```"
] |
https://api.github.com/repos/psf/requests/issues/5088 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5088/labels{/name} | https://api.github.com/repos/psf/requests/issues/5088/comments | https://api.github.com/repos/psf/requests/issues/5088/events | https://github.com/psf/requests/pull/5088 | 444,064,291 | MDExOlB1bGxSZXF1ZXN0Mjc4ODAyODEx | 5,088 | Linked a GitHub tutorial regarding pull requests in README | {
"avatar_url": "https://avatars.githubusercontent.com/u/40577023?v=4",
"events_url": "https://api.github.com/users/zurbrugc/events{/privacy}",
"followers_url": "https://api.github.com/users/zurbrugc/followers",
"following_url": "https://api.github.com/users/zurbrugc/following{/other_user}",
"gists_url": "https://api.github.com/users/zurbrugc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/zurbrugc",
"id": 40577023,
"login": "zurbrugc",
"node_id": "MDQ6VXNlcjQwNTc3MDIz",
"organizations_url": "https://api.github.com/users/zurbrugc/orgs",
"received_events_url": "https://api.github.com/users/zurbrugc/received_events",
"repos_url": "https://api.github.com/users/zurbrugc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/zurbrugc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zurbrugc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/zurbrugc",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2019-05-14T18:36:16Z | 2021-08-31T00:07:14Z | 2019-05-16T05:20:46Z | CONTRIBUTOR | resolved | This is a quick fix that will make it a little easier for potential contributors who are new to GitHub to learn how the site works. | {
"avatar_url": "https://avatars.githubusercontent.com/u/16336606?v=4",
"events_url": "https://api.github.com/users/frostming/events{/privacy}",
"followers_url": "https://api.github.com/users/frostming/followers",
"following_url": "https://api.github.com/users/frostming/following{/other_user}",
"gists_url": "https://api.github.com/users/frostming/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/frostming",
"id": 16336606,
"login": "frostming",
"node_id": "MDQ6VXNlcjE2MzM2NjA2",
"organizations_url": "https://api.github.com/users/frostming/orgs",
"received_events_url": "https://api.github.com/users/frostming/received_events",
"repos_url": "https://api.github.com/users/frostming/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/frostming/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/frostming/subscriptions",
"type": "User",
"url": "https://api.github.com/users/frostming",
"user_view_type": "public"
} | {
"+1": 1,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"url": "https://api.github.com/repos/psf/requests/issues/5088/reactions"
} | https://api.github.com/repos/psf/requests/issues/5088/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5088.diff",
"html_url": "https://github.com/psf/requests/pull/5088",
"merged_at": "2019-05-16T05:20:46Z",
"patch_url": "https://github.com/psf/requests/pull/5088.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5088"
} | true | [
"Thanks for that"
] |
https://api.github.com/repos/psf/requests/issues/5087 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5087/labels{/name} | https://api.github.com/repos/psf/requests/issues/5087/comments | https://api.github.com/repos/psf/requests/issues/5087/events | https://github.com/psf/requests/pull/5087 | 443,802,738 | MDExOlB1bGxSZXF1ZXN0Mjc4NTkyMDc5 | 5,087 | #4965 Fix | {
"avatar_url": "https://avatars.githubusercontent.com/u/41421345?v=4",
"events_url": "https://api.github.com/users/luckydenis/events{/privacy}",
"followers_url": "https://api.github.com/users/luckydenis/followers",
"following_url": "https://api.github.com/users/luckydenis/following{/other_user}",
"gists_url": "https://api.github.com/users/luckydenis/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/luckydenis",
"id": 41421345,
"login": "luckydenis",
"node_id": "MDQ6VXNlcjQxNDIxMzQ1",
"organizations_url": "https://api.github.com/users/luckydenis/orgs",
"received_events_url": "https://api.github.com/users/luckydenis/received_events",
"repos_url": "https://api.github.com/users/luckydenis/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/luckydenis/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/luckydenis/subscriptions",
"type": "User",
"url": "https://api.github.com/users/luckydenis",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2019-05-14T09:18:13Z | 2021-08-31T00:07:05Z | 2019-08-20T04:16:35Z | CONTRIBUTOR | resolved | #4965 Issue: Accessing response.content twice removes forgets read error.
Added variable to save errors, and added a check that returns a re-error when accessed. | {
"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/5087/reactions"
} | https://api.github.com/repos/psf/requests/issues/5087/timeline | null | null | false | {
"diff_url": "https://github.com/psf/requests/pull/5087.diff",
"html_url": "https://github.com/psf/requests/pull/5087",
"merged_at": "2019-08-20T04:16:35Z",
"patch_url": "https://github.com/psf/requests/pull/5087.patch",
"url": "https://api.github.com/repos/psf/requests/pulls/5087"
} | true | [
"good improvement!"
] |
https://api.github.com/repos/psf/requests/issues/5086 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5086/labels{/name} | https://api.github.com/repos/psf/requests/issues/5086/comments | https://api.github.com/repos/psf/requests/issues/5086/events | https://github.com/psf/requests/issues/5086 | 443,610,502 | MDU6SXNzdWU0NDM2MTA1MDI= | 5,086 | The vast majority of issues in the database do not have labels | {
"avatar_url": "https://avatars.githubusercontent.com/u/40577023?v=4",
"events_url": "https://api.github.com/users/zurbrugc/events{/privacy}",
"followers_url": "https://api.github.com/users/zurbrugc/followers",
"following_url": "https://api.github.com/users/zurbrugc/following{/other_user}",
"gists_url": "https://api.github.com/users/zurbrugc/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/zurbrugc",
"id": 40577023,
"login": "zurbrugc",
"node_id": "MDQ6VXNlcjQwNTc3MDIz",
"organizations_url": "https://api.github.com/users/zurbrugc/orgs",
"received_events_url": "https://api.github.com/users/zurbrugc/received_events",
"repos_url": "https://api.github.com/users/zurbrugc/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/zurbrugc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zurbrugc/subscriptions",
"type": "User",
"url": "https://api.github.com/users/zurbrugc",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 1 | 2019-05-13T21:29:27Z | 2021-11-26T04:00:32Z | 2021-08-28T03:46:49Z | CONTRIBUTOR | resolved | The majority of the issues in the database are missing labels. Especially notable is the sparseness of issues with the "Contributor Friendly" label. When a potential contributor clicks the link in the second step of the README, they see five old issues:

It would be quite helpful for contributors--especially new contributors--if more issues were given tags. | {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 6,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 6,
"url": "https://api.github.com/repos/psf/requests/issues/5086/reactions"
} | https://api.github.com/repos/psf/requests/issues/5086/timeline | null | completed | null | null | false | [
"Thank you for the feedback. We allocate resources to issue triage when they're available."
] |
https://api.github.com/repos/psf/requests/issues/5085 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5085/labels{/name} | https://api.github.com/repos/psf/requests/issues/5085/comments | https://api.github.com/repos/psf/requests/issues/5085/events | https://github.com/psf/requests/issues/5085 | 443,355,079 | MDU6SXNzdWU0NDMzNTUwNzk= | 5,085 | Need to upgrade urllib3 to latest version | {
"avatar_url": "https://avatars.githubusercontent.com/u/24490498?v=4",
"events_url": "https://api.github.com/users/SrividhyaGuru/events{/privacy}",
"followers_url": "https://api.github.com/users/SrividhyaGuru/followers",
"following_url": "https://api.github.com/users/SrividhyaGuru/following{/other_user}",
"gists_url": "https://api.github.com/users/SrividhyaGuru/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/SrividhyaGuru",
"id": 24490498,
"login": "SrividhyaGuru",
"node_id": "MDQ6VXNlcjI0NDkwNDk4",
"organizations_url": "https://api.github.com/users/SrividhyaGuru/orgs",
"received_events_url": "https://api.github.com/users/SrividhyaGuru/received_events",
"repos_url": "https://api.github.com/users/SrividhyaGuru/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/SrividhyaGuru/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/SrividhyaGuru/subscriptions",
"type": "User",
"url": "https://api.github.com/users/SrividhyaGuru",
"user_view_type": "public"
} | [] | closed | true | null | [] | null | 2 | 2019-05-13T11:49:07Z | 2021-09-05T00:06:51Z | 2019-05-16T15:08:57Z | NONE | resolved | We are using piprot in our security build. recently our build is getting failed because of the following risk given by piprot.
```
python-piprot medium urllib3 Module is one or more minor versions out of date Upgrade to v1.25.2 (Current: v1.24.2)
```
could you please let us know whether there is version upgrade possible in any time soon
Thanks in advance
| {
"avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4",
"events_url": "https://api.github.com/users/nateprewitt/events{/privacy}",
"followers_url": "https://api.github.com/users/nateprewitt/followers",
"following_url": "https://api.github.com/users/nateprewitt/following{/other_user}",
"gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/nateprewitt",
"id": 5271761,
"login": "nateprewitt",
"node_id": "MDQ6VXNlcjUyNzE3NjE=",
"organizations_url": "https://api.github.com/users/nateprewitt/orgs",
"received_events_url": "https://api.github.com/users/nateprewitt/received_events",
"repos_url": "https://api.github.com/users/nateprewitt/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions",
"type": "User",
"url": "https://api.github.com/users/nateprewitt",
"user_view_type": "public"
} | {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 0,
"url": "https://api.github.com/repos/psf/requests/issues/5085/reactions"
} | https://api.github.com/repos/psf/requests/issues/5085/timeline | null | completed | null | null | false | [
"duplicate of #5067 ",
"Resolving as duplicate. Issue is fixed in #5092."
] |
https://api.github.com/repos/psf/requests/issues/5084 | https://api.github.com/repos/psf/requests | https://api.github.com/repos/psf/requests/issues/5084/labels{/name} | https://api.github.com/repos/psf/requests/issues/5084/comments | https://api.github.com/repos/psf/requests/issues/5084/events | https://github.com/psf/requests/issues/5084 | 442,846,687 | MDU6SXNzdWU0NDI4NDY2ODc= | 5,084 | replace `get_encoding_from_headers` default with `None` | {
"avatar_url": "https://avatars.githubusercontent.com/u/204779?v=4",
"events_url": "https://api.github.com/users/jvanasco/events{/privacy}",
"followers_url": "https://api.github.com/users/jvanasco/followers",
"following_url": "https://api.github.com/users/jvanasco/following{/other_user}",
"gists_url": "https://api.github.com/users/jvanasco/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/jvanasco",
"id": 204779,
"login": "jvanasco",
"node_id": "MDQ6VXNlcjIwNDc3OQ==",
"organizations_url": "https://api.github.com/users/jvanasco/orgs",
"received_events_url": "https://api.github.com/users/jvanasco/received_events",
"repos_url": "https://api.github.com/users/jvanasco/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/jvanasco/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jvanasco/subscriptions",
"type": "User",
"url": "https://api.github.com/users/jvanasco",
"user_view_type": "public"
} | [] | open | false | null | [] | null | 0 | 2019-05-10T18:39:29Z | 2024-07-01T09:28:08Z | null | CONTRIBUTOR | null | This issue a suggestion for handling partial elements of issues #1737 and #2086 (#1774 and others too). I'm bringing this up in a separate ticket because it is a specific fix for multiple tickets and I am willing to write a PR for it in requests3 and requests2. (i would have just gone and generated a PR, but I can't figure out what the actual master for requests3 actually is)
my proposal is to do the following (some of which have already been discussed as possibilities):
alter `get_encoding_from_headers()`
---
replace the default value of `get_encoding_from_headers` with `None` when "text" is in the content_type header. currently this is "ISO-8859-1"
https://github.com/kennethreitz/requests/blob/c501ec986daa4961cd9dee370b5d45ff2e524b37/requests/utils.py#L492-L493
add `Response.detected_encoding` attribute
---
extend `build_response` and `Response` to additionally stash the header decoding in `response.detected_encoding`. this will allow the detected value to remain on the response object if `response.encoding` is changed by the consumer.
add `Response.text_encoding` property
---
add a `text_encoding` property to `Response` , which offloads some of the logic now in `text`, and will return "ISO-8859-1"
https://github.com/kennethreitz/requests/blob/c501ec986daa4961cd9dee370b5d45ff2e524b37/requests/models.py#L835-L858
alter `Response.text` to use the new `.text_encoding` attribute
---
update the `text` property to use the new `.text_encoding` attribute. this just ties together all the above.
Goals
---
The goal of these changes is to positively identify situations where no response encoding was declared by the server. The backwards incompatibility is that `None` will now be returned when inspecting `response.encoding` when there is no encoding for the response - however the effective encoding used to generate `.text` will be available in `response.text_encoding` .
This still maintains compliance with RFC 2616, because `.text` will still interpret the lack of a declared encoding as having the required default charset of `ISO-8859-1`. This simply allows developers to know when `ISO-8859-1` is being used in a default or explicit manner.
This approach doesn't address all aspects of those issues or close those tickets, but it offers a solution to many of the needs and concerns with some minor changes. | null | {
"+1": 2,
"-1": 0,
"confused": 0,
"eyes": 0,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 2,
"url": "https://api.github.com/repos/psf/requests/issues/5084/reactions"
} | https://api.github.com/repos/psf/requests/issues/5084/timeline | null | null | null | null | false | [] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.