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/4461
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4461/labels{/name}
https://api.github.com/repos/psf/requests/issues/4461/comments
https://api.github.com/repos/psf/requests/issues/4461/events
https://github.com/psf/requests/issues/4461
287,815,865
MDU6SXNzdWUyODc4MTU4NjU=
4,461
couldn't access iter_contents()
{ "avatar_url": "https://avatars.githubusercontent.com/u/9799869?v=4", "events_url": "https://api.github.com/users/kpputhiyattil/events{/privacy}", "followers_url": "https://api.github.com/users/kpputhiyattil/followers", "following_url": "https://api.github.com/users/kpputhiyattil/following{/other_user}", "gists_url": "https://api.github.com/users/kpputhiyattil/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kpputhiyattil", "id": 9799869, "login": "kpputhiyattil", "node_id": "MDQ6VXNlcjk3OTk4Njk=", "organizations_url": "https://api.github.com/users/kpputhiyattil/orgs", "received_events_url": "https://api.github.com/users/kpputhiyattil/received_events", "repos_url": "https://api.github.com/users/kpputhiyattil/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kpputhiyattil/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kpputhiyattil/subscriptions", "type": "User", "url": "https://api.github.com/users/kpputhiyattil", "user_view_type": "public" }
[]
closed
true
null
[]
null
15
2018-01-11T15:00:55Z
2021-09-08T04:00:52Z
2018-01-12T05:40:43Z
NONE
resolved
Summary. ## Expected Result What you expected. Need to download the file ## Actual Result What happened instead. AttributeError: 'None Tye' object has no attribute 'Read' ## Reproduction Steps ```python import requests import requests.models #url to login url = 'xxxx.com' payload = {'loginName': 'userName', 'password': '123456'} r = requests.post(url, data=payload) print r.headers print r.cookies url_dwnload="#download url" payload = {'fileId': 2028, 'blockSize':1024} resp_obj = requests.get(url_dwnload, cookies=r.cookies, params=payload, stream=True) for c in resp_obj.cookies: if c.name == 'DOWNLOAD_STATUS': if c.value == 'SUCCESS': with open( r'C:\Users\test\AppData\Local\SmartDocs\agent220.smartdocsonline.com\ruby.paul\tempfolder\6\New Text Document - Copy.txt.gz', 'wb') as f: for chunk in resp_obj.iter_content( chunk_size=1024): if chunk: # print('###') f.write(chunk) ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "2.7.10" }, "platform": { "release": "8", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.18.4" }, "system_ssl": { "version": "1000201f" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": false } ``` This command is only available on Requests v2.16.4 and greater. Otherwise, please provide some basic information about your system (Python version, operating system, &c).
{ "avatar_url": "https://avatars.githubusercontent.com/u/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/4461/reactions" }
https://api.github.com/repos/psf/requests/issues/4461/timeline
null
completed
null
null
false
[ "I couldn't access iter_content() after importing requests when i called from visual studio professional 2015, but can be accessed if called from pycharm.", "The feature template is there to make sure we get the information we need to help you. Could you fill out the entire template?", "```py\r\nimport requests...
https://api.github.com/repos/psf/requests/issues/4460
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4460/labels{/name}
https://api.github.com/repos/psf/requests/issues/4460/comments
https://api.github.com/repos/psf/requests/issues/4460/events
https://github.com/psf/requests/pull/4460
287,644,948
MDExOlB1bGxSZXF1ZXN0MTYyMjgwMTM0
4,460
Remove unsupported Python 3.3 from tox.ini
{ "avatar_url": "https://avatars.githubusercontent.com/u/347634?v=4", "events_url": "https://api.github.com/users/jdufresne/events{/privacy}", "followers_url": "https://api.github.com/users/jdufresne/followers", "following_url": "https://api.github.com/users/jdufresne/following{/other_user}", "gists_url": "https://api.github.com/users/jdufresne/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jdufresne", "id": 347634, "login": "jdufresne", "node_id": "MDQ6VXNlcjM0NzYzNA==", "organizations_url": "https://api.github.com/users/jdufresne/orgs", "received_events_url": "https://api.github.com/users/jdufresne/received_events", "repos_url": "https://api.github.com/users/jdufresne/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jdufresne/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jdufresne/subscriptions", "type": "User", "url": "https://api.github.com/users/jdufresne", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2018-01-11T02:38:08Z
2021-09-03T00:11:12Z
2018-01-11T14:41:08Z
CONTRIBUTOR
resolved
Python 3.3 is not a supported version so don't test it.
{ "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4460/reactions" }
https://api.github.com/repos/psf/requests/issues/4460/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4460.diff", "html_url": "https://github.com/psf/requests/pull/4460", "merged_at": "2018-01-11T14:41:08Z", "patch_url": "https://github.com/psf/requests/pull/4460.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4460" }
true
[ "# [Codecov](https://codecov.io/gh/requests/requests/pull/4460?src=pr&el=h1) Report\n> Merging [#4460](https://codecov.io/gh/requests/requests/pull/4460?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/c98e30b5cb812a5efe0f6c9c40861009069932b7?src=pr&el=desc) will **not change** coverage....
https://api.github.com/repos/psf/requests/issues/4459
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4459/labels{/name}
https://api.github.com/repos/psf/requests/issues/4459/comments
https://api.github.com/repos/psf/requests/issues/4459/events
https://github.com/psf/requests/pull/4459
287,644,321
MDExOlB1bGxSZXF1ZXN0MTYyMjc5NzEz
4,459
Pass python_requires argument to setuptools
{ "avatar_url": "https://avatars.githubusercontent.com/u/347634?v=4", "events_url": "https://api.github.com/users/jdufresne/events{/privacy}", "followers_url": "https://api.github.com/users/jdufresne/followers", "following_url": "https://api.github.com/users/jdufresne/following{/other_user}", "gists_url": "https://api.github.com/users/jdufresne/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jdufresne", "id": 347634, "login": "jdufresne", "node_id": "MDQ6VXNlcjM0NzYzNA==", "organizations_url": "https://api.github.com/users/jdufresne/orgs", "received_events_url": "https://api.github.com/users/jdufresne/received_events", "repos_url": "https://api.github.com/users/jdufresne/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jdufresne/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jdufresne/subscriptions", "type": "User", "url": "https://api.github.com/users/jdufresne", "user_view_type": "public" }
[]
closed
true
null
[]
null
6
2018-01-11T02:34:04Z
2021-09-03T00:11:11Z
2018-01-13T04:06:59Z
CONTRIBUTOR
resolved
Helps pip decide what version of the library to install. https://packaging.python.org/tutorials/distributing-packages/#python-requires > If your project only runs on certain Python versions, setting the > python_requires argument to the appropriate PEP 440 version specifier > string will prevent pip from installing the project on other Python > versions. https://setuptools.readthedocs.io/en/latest/setuptools.html#new-and-changed-setup-keywords > python_requires > > A string corresponding to a version specifier (as defined in PEP 440) > for the Python version, used to specify the Requires-Python defined in > PEP 345.
{ "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/4459/reactions" }
https://api.github.com/repos/psf/requests/issues/4459/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4459.diff", "html_url": "https://github.com/psf/requests/pull/4459", "merged_at": "2018-01-13T04:06:59Z", "patch_url": "https://github.com/psf/requests/pull/4459.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4459" }
true
[ "# [Codecov](https://codecov.io/gh/requests/requests/pull/4459?src=pr&el=h1) Report\n> Merging [#4459](https://codecov.io/gh/requests/requests/pull/4459?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/b9d8e00cbc74d847e2b700b0ab26128b85a4344f?src=pr&el=desc) will **not change** coverage....
https://api.github.com/repos/psf/requests/issues/4458
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4458/labels{/name}
https://api.github.com/repos/psf/requests/issues/4458/comments
https://api.github.com/repos/psf/requests/issues/4458/events
https://github.com/psf/requests/issues/4458
287,632,421
MDU6SXNzdWUyODc2MzI0MjE=
4,458
SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')) for older French website
{ "avatar_url": "https://avatars.githubusercontent.com/u/270476?v=4", "events_url": "https://api.github.com/users/autumnjolitz/events{/privacy}", "followers_url": "https://api.github.com/users/autumnjolitz/followers", "following_url": "https://api.github.com/users/autumnjolitz/following{/other_user}", "gists_url": "https://api.github.com/users/autumnjolitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/autumnjolitz", "id": 270476, "login": "autumnjolitz", "node_id": "MDQ6VXNlcjI3MDQ3Ng==", "organizations_url": "https://api.github.com/users/autumnjolitz/orgs", "received_events_url": "https://api.github.com/users/autumnjolitz/received_events", "repos_url": "https://api.github.com/users/autumnjolitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/autumnjolitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/autumnjolitz/subscriptions", "type": "User", "url": "https://api.github.com/users/autumnjolitz", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2018-01-11T01:17:17Z
2021-09-08T04:00:54Z
2018-01-11T03:00:33Z
NONE
resolved
Hi, I encountered this issue while filing scrapy/scrapy#3065 regarding `https://agences.creditfoncier.fr/credit-immobilier/toutes-nos-agences`. Like the other bugs, `curl` magically works but Python installations crap out. `uname -a`: ``` Darwin BTJ-GT.local 16.7.0 Darwin Kernel Version 16.7.0: Mon Nov 13 21:56:25 PST 2017; root:xnu-3789.72.11~1/RELEASE_X86_64 x86_64 ``` `python --version`: ``` Python 3.6.2 ``` `pip freeze | grep -iE 'requests|ssl|cryptography'`: ``` cryptography==2.1.4 pyOpenSSL==17.5.0 requests==2.18.4 requests-cache==0.4.13 requests-oauthlib==0.8.0 requests-toolbelt==0.7.1 ``` Checking the OpenSSL version reveals we are using 1.0.2n: ``` (cpython36) BenJolitz-Laptop:~/software$ python -c 'import _ssl;print(_ssl.__file__)' /Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/lib-dynload/_ssl.cpython-36m-darwin.so (cpython36) BenJolitz-Laptop:~/software$ otool -L /Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/lib-dynload/_ssl.cpython-36m-darwin.so /Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/lib-dynload/_ssl.cpython-36m-darwin.so: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.50.2) (cpython36) BenJolitz-Laptop:~/software$ brew info --json=v1 openssl | python -m json.tool | jq .[].installed[].version "1.0.2l" "1.0.2n" (cpython36) BenJolitz-Laptop:~/software$ ls -lt /usr/local/opt/openssl lrwxr-xr-x 1 BenJolitz admin 24 Jan 9 17:51 /usr/local/opt/openssl -> ../Cellar/openssl/1.0.2n (cpython36) BenJolitz-Laptop:~/software$ ``` Yes, OpenSSL 1.0.2n it looks like... ## Expected Result ``` >>> import requests >>> fh = requests.get('https://agences.creditfoncier.fr/credit-immobilier/toutes-nos-agences') >>> fh.code == 200 True ``` ## Actual Result If you have pyOpenSSL==17.5.0 installed: ``` (cpython36) BenJolitz-Laptop:~/software$ python Python 3.6.2 (default, Jul 17 2017, 16:44:45) [GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import requests >>> fh = requests.get('https://agences.creditfoncier.fr/credit-immobilier/toutes-nos-agences') Traceback (most recent call last): File "/Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/site-packages/urllib3/contrib/pyopenssl.py", line 441, in wrap_socket cnx.do_handshake() File "/Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/site-packages/OpenSSL/SSL.py", line 1806, in do_handshake self._raise_ssl_error(self._ssl, result) File "/Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/site-packages/OpenSSL/SSL.py", line 1539, in _raise_ssl_error raise SysCallError(-1, "Unexpected EOF") OpenSSL.SSL.SysCallError: (-1, 'Unexpected EOF') During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen chunked=chunked) File "/Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/site-packages/urllib3/connectionpool.py", line 346, in _make_request self._validate_conn(conn) File "/Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/site-packages/urllib3/connectionpool.py", line 850, in _validate_conn conn.connect() File "/Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/site-packages/urllib3/connection.py", line 326, in connect ssl_context=context) File "/Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/site-packages/urllib3/util/ssl_.py", line 329, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File "/Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/site-packages/urllib3/contrib/pyopenssl.py", line 448, in wrap_socket raise ssl.SSLError('bad handshake: %r' % e) ssl.SSLError: ("bad handshake: SysCallError(-1, 'Unexpected EOF')",) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/site-packages/requests/adapters.py", line 440, in send timeout=timeout File "/Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen _stacktrace=sys.exc_info()[2]) File "/Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/site-packages/urllib3/util/retry.py", line 388, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='agences.creditfoncier.fr', port=443): Max retries exceeded with url: /credit-immobilier/toutes-nos-agences (Caused by SSLError(SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')",),)) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/site-packages/requests/api.py", line 72, in get return request('get', url, params=params, **kwargs) File "/Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/site-packages/requests/api.py", line 58, in request return session.request(method=method, url=url, **kwargs) File "/Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/site-packages/requests/sessions.py", line 508, in request resp = self.send(prep, **send_kwargs) File "/Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/site-packages/requests/sessions.py", line 618, in send r = adapter.send(request, **kwargs) File "/Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/site-packages/requests/adapters.py", line 506, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='agences.creditfoncier.fr', port=443): Max retries exceeded with url: /credit-immobilier/toutes-nos-agences (Caused by SSLError(SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')",),)) >>> ``` If pyOpenSSL==17.5.0 is NOT INSTALLED: ``` >>> requests.get('https://agences.creditfoncier.fr/credit-immobilier/toutes-nos-agences') Traceback (most recent call last): File "/Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen chunked=chunked) File "/Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/site-packages/urllib3/connectionpool.py", line 346, in _make_request self._validate_conn(conn) File "/Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/site-packages/urllib3/connectionpool.py", line 850, in _validate_conn conn.connect() File "/Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/site-packages/urllib3/connection.py", line 326, in connect ssl_context=context) File "/Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/site-packages/urllib3/util/ssl_.py", line 329, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 401, in wrap_socket _context=self, _session=session) File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 808, in __init__ self.do_handshake() File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 1061, in do_handshake self._sslobj.do_handshake() File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 683, in do_handshake self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:748) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/site-packages/requests/adapters.py", line 440, in send timeout=timeout File "/Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen _stacktrace=sys.exc_info()[2]) File "/Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/site-packages/urllib3/util/retry.py", line 388, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='agences.creditfoncier.fr', port=443): Max retries exceeded with url: /credit-immobilier/toutes-nos-agences (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:748)'),)) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/site-packages/requests/api.py", line 72, in get return request('get', url, params=params, **kwargs) File "/Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/site-packages/requests/api.py", line 58, in request return session.request(method=method, url=url, **kwargs) File "/Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/site-packages/requests/sessions.py", line 508, in request resp = self.send(prep, **send_kwargs) File "/Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/site-packages/requests/sessions.py", line 618, in send r = adapter.send(request, **kwargs) File "/Users/BenJolitz/.virtualenvs/cpython36/lib/python3.6/site-packages/requests/adapters.py", line 506, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='agences.creditfoncier.fr', port=443): Max retries exceeded with url: /credit-immobilier/toutes-nos-agences (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:748)'),)) >>> >>> ``` ## Reproduction Steps ```python import requests requests.get('https://agences.creditfoncier.fr/credit-immobilier/toutes-nos-agences') ``` ## System Information $ python -m requests.help ``` (cpython36) BenJolitz-Laptop:~/software$ python -m requests.help { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.1.4" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "3.6.2" }, "platform": { "release": "16.7.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "1010007f", "version": "17.5.0" }, "requests": { "version": "2.18.4" }, "system_ssl": { "version": "100020ef" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": true } (cpython36) BenJolitz-Laptop:~/software$ ```
{ "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/4458/reactions" }
https://api.github.com/repos/psf/requests/issues/4458/timeline
null
completed
null
null
false
[ "The problem is not us but your server. If you do `openssl s_client -connect agences.creditfoncier.fr:443` You should see output that includes:\r\n\r\n```\r\nSSL-Session:\r\n Protocol : TLSv1\r\n Cipher : DES-CBC3-SHA\r\n```\r\n\r\nThe way that urllib3 and Requests in Python negotiate TLS (which is far mo...
https://api.github.com/repos/psf/requests/issues/4457
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4457/labels{/name}
https://api.github.com/repos/psf/requests/issues/4457/comments
https://api.github.com/repos/psf/requests/issues/4457/events
https://github.com/psf/requests/pull/4457
287,590,680
MDExOlB1bGxSZXF1ZXN0MTYyMjQwMDAw
4,457
Fixing max_retries to accept Retry instance
{ "avatar_url": "https://avatars.githubusercontent.com/u/1305135?v=4", "events_url": "https://api.github.com/users/phreakmonkey/events{/privacy}", "followers_url": "https://api.github.com/users/phreakmonkey/followers", "following_url": "https://api.github.com/users/phreakmonkey/following{/other_user}", "gists_url": "https://api.github.com/users/phreakmonkey/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/phreakmonkey", "id": 1305135, "login": "phreakmonkey", "node_id": "MDQ6VXNlcjEzMDUxMzU=", "organizations_url": "https://api.github.com/users/phreakmonkey/orgs", "received_events_url": "https://api.github.com/users/phreakmonkey/received_events", "repos_url": "https://api.github.com/users/phreakmonkey/repos", "site_admin": false, "starred_url": "https://api.github.com/users/phreakmonkey/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/phreakmonkey/subscriptions", "type": "User", "url": "https://api.github.com/users/phreakmonkey", "user_view_type": "public" }
[]
closed
true
null
[]
null
6
2018-01-10T21:54:44Z
2021-09-04T00:06:34Z
2018-01-10T22:46:19Z
NONE
resolved
adapters. HTTPAdapter max_retries parameter specifies that you can pass an instance of the Retry class directly to it. > :param max_retries: The maximum number of retries each connection > should attempt. Note, this applies only to failed DNS lookups, socket > connections and connection timeouts, never to requests where data has > made it to the server. By default, Requests does not retry failed > connections. If you need granular control over the conditions under > which we retry a request, import urllib3's ``Retry`` class and pass > that instead. However, lines 114-116 of the code will instead put instance of the Retry class into a parameter of the Retry.from_int() function. The result is, once invoked during a retry, this error chain occurs: > File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 469, in get > return self.request('GET', url, **kwargs) > File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 457, in request > resp = self.send(prep, **send_kwargs) > File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 569, in send > r = adapter.send(request, **kwargs) > File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 362, in send > timeout=timeout > File "/usr/lib/python2.7/dist-packages/urllib3/connectionpool.py", line 559, in urlopen > _pool=self, _stacktrace=stacktrace) > File "/usr/lib/python2.7/dist-packages/urllib3/util/retry.py", line 227, in increment > total -= 1 > TypeError: unsupported operand type(s) for -=: 'Retry' and 'int' This patch checks to see if max_retries is an int before passing it to Retry.from_int(). That way, if max_retries is already an instance of Retry, it will be left intact and function as documented. Some cursory searches for the above TypeError indicate that this has been an undiagnosed problem across the net for quite a while. Cheers!
{ "avatar_url": "https://avatars.githubusercontent.com/u/1305135?v=4", "events_url": "https://api.github.com/users/phreakmonkey/events{/privacy}", "followers_url": "https://api.github.com/users/phreakmonkey/followers", "following_url": "https://api.github.com/users/phreakmonkey/following{/other_user}", "gists_url": "https://api.github.com/users/phreakmonkey/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/phreakmonkey", "id": 1305135, "login": "phreakmonkey", "node_id": "MDQ6VXNlcjEzMDUxMzU=", "organizations_url": "https://api.github.com/users/phreakmonkey/orgs", "received_events_url": "https://api.github.com/users/phreakmonkey/received_events", "repos_url": "https://api.github.com/users/phreakmonkey/repos", "site_admin": false, "starred_url": "https://api.github.com/users/phreakmonkey/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/phreakmonkey/subscriptions", "type": "User", "url": "https://api.github.com/users/phreakmonkey", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4457/reactions" }
https://api.github.com/repos/psf/requests/issues/4457/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4457.diff", "html_url": "https://github.com/psf/requests/pull/4457", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/4457.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4457" }
true
[ "Thanks for this! Can we get a test for this so it won't be regressed. :)", "Strangely, test_requests.py already has a test for this. I can't figure out why it was passing:\r\n\r\n```\r\ndef test_urllib3_retries(httpbin):\r\n from urllib3.util import Retry\r\n s = requests.Session()\r\n s.mount('http://...
https://api.github.com/repos/psf/requests/issues/4456
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4456/labels{/name}
https://api.github.com/repos/psf/requests/issues/4456/comments
https://api.github.com/repos/psf/requests/issues/4456/events
https://github.com/psf/requests/pull/4456
287,555,279
MDExOlB1bGxSZXF1ZXN0MTYyMjEzNjk5
4,456
an idea on persisting redirect history when exceptions are encountered
{ "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" }
[ { "color": "e11d21", "default": false, "description": null, "id": 78002701, "name": "Do Not Merge", "node_id": "MDU6TGFiZWw3ODAwMjcwMQ==", "url": "https://api.github.com/repos/psf/requests/labels/Do%20Not%20Merge" } ]
closed
false
null
[]
{ "closed_at": null, "closed_issues": 29, "created_at": "2024-05-19T18:29:04Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4", "events_url": "https://api.github.com/users/sethmlarson/events{/privacy}", "followers_url": "https://api.github.com/users/sethmlarson/followers", "following_url": "https://api.github.com/users/sethmlarson/following{/other_user}", "gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sethmlarson", "id": 18519037, "login": "sethmlarson", "node_id": "MDQ6VXNlcjE4NTE5MDM3", "organizations_url": "https://api.github.com/users/sethmlarson/orgs", "received_events_url": "https://api.github.com/users/sethmlarson/received_events", "repos_url": "https://api.github.com/users/sethmlarson/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions", "type": "User", "url": "https://api.github.com/users/sethmlarson", "user_view_type": "public" }, "description": "", "due_on": null, "html_url": "https://github.com/psf/requests/milestone/34", "id": 11073254, "labels_url": "https://api.github.com/repos/psf/requests/milestones/34/labels", "node_id": "MI_kwDOABTKOs4AqPbm", "number": 34, "open_issues": 0, "state": "open", "title": "Bankruptcy", "updated_at": "2024-05-20T14:37:16Z", "url": "https://api.github.com/repos/psf/requests/milestones/34" }
2
2018-01-10T19:47:10Z
2024-05-20T14:35:44Z
2024-05-20T14:35:43Z
CONTRIBUTOR
null
this is a quick idea on an approach to address #4455 within `resolve_redirects` exceptions raised by`Session.send` are caught. If they match a given set of tests (currently just the base `ConnectionError` class), the `resp` is replaced with an instance of an exception class used to hold bad response data. Then a new exception is raised. This makes handling these types of errors similar to handling items without redirects for most users (i did not consider the legacy ways of using requests) The immediate ideas/concerns I have on this: 1. It might make sense to have a global "NotARealResponse" object that stands in for a `Response` object and can contain connection/history info when there is no immediate response. I'm not sure this is the only use-case for this. 2. I thought about extending the current exception with request/response data, but this seemed more appropriate. Just to be clear, this is only submitted for discussion/illustration of the other ticket. This is not a PR for merging.
{ "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/4456/reactions" }
https://api.github.com/repos/psf/requests/issues/4456/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4456.diff", "html_url": "https://github.com/psf/requests/pull/4456", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/4456.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4456" }
true
[ "# [Codecov](https://codecov.io/gh/requests/requests/pull/4456?src=pr&el=h1) Report\n> Merging [#4456](https://codecov.io/gh/requests/requests/pull/4456?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/c98e30b5cb812a5efe0f6c9c40861009069932b7?src=pr&el=desc) will **decrease** coverage by...
https://api.github.com/repos/psf/requests/issues/4455
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4455/labels{/name}
https://api.github.com/repos/psf/requests/issues/4455/comments
https://api.github.com/repos/psf/requests/issues/4455/events
https://github.com/psf/requests/issues/4455
287,220,555
MDU6SXNzdWUyODcyMjA1NTU=
4,455
no response object captured in error of endless redirect chain and confusing message
{ "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
2
2018-01-09T20:29:36Z
2018-01-10T18:12:47Z
null
CONTRIBUTOR
null
I found an incredibly bad URL that causes a handful of issues. the url below jumps between a bunch of SocialFlow (trib.al) and Bitly url shorteners for tracking, then ends up on a connection timeout that also looks like a max retries exceeded (which makes no sense to me) The exception that is raised under Py2 and Py3 does not have a response object, although one should exist – there are a long history of redirects that gets lost and makes this difficult to debug the url's problem. HTTPSConnectionPool(host='this.cm', port=443): Max retries exceeded with url: /slate/follow (Caused by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x1021788d0>, 'Connection to this.cm timed out. (connect timeout=2)')) ```python import requests try: url = 'http://slate.me/1KDocND' r = requests.get(url, timeout=2) print("success") print(r.response) except Exception as error: print("error") print(error) print(type(error.response)) ```
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/4455/reactions" }
https://api.github.com/repos/psf/requests/issues/4455/timeline
null
null
null
null
false
[ "The `max retries exceeded with url` is due entirely to the fact that Requests uses a subset of urllib3 at this point. Requests' usage of retries were wholly limited to the API that urllib3 provided prior to creating the Retry object. It's been updated little since. As a result, we don't allow urllib3 to perform it...
https://api.github.com/repos/psf/requests/issues/4454
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4454/labels{/name}
https://api.github.com/repos/psf/requests/issues/4454/comments
https://api.github.com/repos/psf/requests/issues/4454/events
https://github.com/psf/requests/issues/4454
286,913,596
MDU6SXNzdWUyODY5MTM1OTY=
4,454
response.json() fails when while(1); is in response body
{ "avatar_url": "https://avatars.githubusercontent.com/u/7034670?v=4", "events_url": "https://api.github.com/users/jessemcbride/events{/privacy}", "followers_url": "https://api.github.com/users/jessemcbride/followers", "following_url": "https://api.github.com/users/jessemcbride/following{/other_user}", "gists_url": "https://api.github.com/users/jessemcbride/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jessemcbride", "id": 7034670, "login": "jessemcbride", "node_id": "MDQ6VXNlcjcwMzQ2NzA=", "organizations_url": "https://api.github.com/users/jessemcbride/orgs", "received_events_url": "https://api.github.com/users/jessemcbride/received_events", "repos_url": "https://api.github.com/users/jessemcbride/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jessemcbride/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jessemcbride/subscriptions", "type": "User", "url": "https://api.github.com/users/jessemcbride", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2018-01-08T22:46:54Z
2021-09-08T05:00:36Z
2018-01-09T05:11:43Z
NONE
resolved
In an effort to prevent [JSON hijacking](https://haacked.com/archive/2009/06/25/json-hijacking.aspx/), some providers append `while(1);` before their JSON response. This doesn't appear to be filtered out by requests automatically, and the end result is a `ValueError`. ## Expected Result A JSON response of this form: ``` while(1);{"some": "json"} ``` should properly translate to a Python dictionary when calling `response.json()`: ``` { "some": "json" } ``` ## Actual Result `response.json()` results in an exception: ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/site-packages/requests/models.py", line 892, in json return complexjson.loads(self.text, **kwargs) File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 339, in loads return _default_decoder.decode(s) File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 364, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 382, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded ``` ## Reproduction Steps ```python import requests broken = requests.get('https://gist.githubusercontent.com/jessemcbride/3306f72e92f08deff1e32c3df5c7b7c8/raw/621e5e94040486004b3b8e22157f2fb5d73a3686/test') broken.json() # throws an exception working = requests.get('https://gist.githubusercontent.com/jessemcbride/cc091ea99560b9b5c13632d19fefaa75/raw/1fc92d404c6f9113d83d6fdee00e4a59410a7032/test2') working.json() # renders properly ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "2.7.13" }, "platform": { "release": "16.7.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.18.4" }, "system_ssl": { "version": "100020ef" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": false } ``` FWIW, I'm not totally convinced that requests should be responsible for fixing this. I'd like to open that up for discussion, though, as we were surprised by the behavior.
{ "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/4454/reactions" }
https://api.github.com/repos/psf/requests/issues/4454/timeline
null
completed
null
null
false
[ "There's a lot of different anti-hijacking methods for instance I've heard of `for(;;)` being used as well.", "Hey @jessemcbride, thanks for starting the conversation on this. I was under the impression we’d discussed something along these lines before but can’t find a ticket for reference. My general thoughts ar...
https://api.github.com/repos/psf/requests/issues/4453
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4453/labels{/name}
https://api.github.com/repos/psf/requests/issues/4453/comments
https://api.github.com/repos/psf/requests/issues/4453/events
https://github.com/psf/requests/issues/4453
286,905,279
MDU6SXNzdWUyODY5MDUyNzk=
4,453
Max retries exceeded with url
{ "avatar_url": "https://avatars.githubusercontent.com/u/22315428?v=4", "events_url": "https://api.github.com/users/phanindravarma38/events{/privacy}", "followers_url": "https://api.github.com/users/phanindravarma38/followers", "following_url": "https://api.github.com/users/phanindravarma38/following{/other_user}", "gists_url": "https://api.github.com/users/phanindravarma38/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/phanindravarma38", "id": 22315428, "login": "phanindravarma38", "node_id": "MDQ6VXNlcjIyMzE1NDI4", "organizations_url": "https://api.github.com/users/phanindravarma38/orgs", "received_events_url": "https://api.github.com/users/phanindravarma38/received_events", "repos_url": "https://api.github.com/users/phanindravarma38/repos", "site_admin": false, "starred_url": "https://api.github.com/users/phanindravarma38/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/phanindravarma38/subscriptions", "type": "User", "url": "https://api.github.com/users/phanindravarma38", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2018-01-08T22:12:28Z
2021-09-08T04:00:55Z
2018-01-09T14:05:40Z
NONE
resolved
Summary. I am trying to hit a third party API, such as api.ipify.org, which gives IP addresses and read the results. ## Expected Result JSON Response From URL i.e. ip address. What you expected. ## Actual Result requests.exceptions.ConnectionError: HTTPSConnectionPool(host=hostname, port=443): Max retries exceeded with url: /myurl (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x10a857610>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',)) What happened instead. ## Reproduction Steps ```python import time page = '' while page == '': try: page = requests.get("https://api.ipify.org/") except: print("Connection refused by the server..") print("Let me sleep for 5 seconds") print("ZZzzzz...") time.sleep(100) print("Was a nice sleep, now let me continue...") continue ```
{ "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/4453/reactions" }
https://api.github.com/repos/psf/requests/issues/4453/timeline
null
completed
null
null
false
[ "Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here.\r\n\r\nAs an aside `nodename nor servname provided, or ...
https://api.github.com/repos/psf/requests/issues/4452
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4452/labels{/name}
https://api.github.com/repos/psf/requests/issues/4452/comments
https://api.github.com/repos/psf/requests/issues/4452/events
https://github.com/psf/requests/pull/4452
286,600,835
MDExOlB1bGxSZXF1ZXN0MTYxNTM5ODQw
4,452
append previous url fragment on redirect
{ "avatar_url": "https://avatars.githubusercontent.com/u/5271761?v=4", "events_url": "https://api.github.com/users/nateprewitt/events{/privacy}", "followers_url": "https://api.github.com/users/nateprewitt/followers", "following_url": "https://api.github.com/users/nateprewitt/following{/other_user}", "gists_url": "https://api.github.com/users/nateprewitt/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nateprewitt", "id": 5271761, "login": "nateprewitt", "node_id": "MDQ6VXNlcjUyNzE3NjE=", "organizations_url": "https://api.github.com/users/nateprewitt/orgs", "received_events_url": "https://api.github.com/users/nateprewitt/received_events", "repos_url": "https://api.github.com/users/nateprewitt/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nateprewitt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nateprewitt/subscriptions", "type": "User", "url": "https://api.github.com/users/nateprewitt", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2018-01-07T21:28:31Z
2021-09-04T00:06:33Z
2018-01-21T18:41:47Z
MEMBER
resolved
This PR should address #4443 by appending the original request's fragment to subsequent redirects, unless a new fragment is provided in the Location header. This behaviour should bring us into compliance with [RFC 7230 § 7.1.2](https://tools.ietf.org/html/rfc7231#section-7.1.2). I also wrote a test to confirm we don't send fragment information to new servers, our underlying implementation strips that. One outstanding question I do have though is about chained redirects. ----- Let's say we make a request (`http://url#alice`) and get a 302 response (`http://new_url#bob`). We would leave `#bob` as the fragment for the second request. When we request `http://new_url#bob`, we get back another 301 to `http://final_url/`. Do we append `alice` or `bob` at this point? I went with the assumption that the "original" request is the first one in the chain. I could see an argument that all requests are stateless though, and that the `new_url#bob` is the only originating request in scope for the second redirect.
{ "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/4452/reactions" }
https://api.github.com/repos/psf/requests/issues/4452/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4452.diff", "html_url": "https://github.com/psf/requests/pull/4452", "merged_at": "2018-01-21T18:41:47Z", "patch_url": "https://github.com/psf/requests/pull/4452.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4452" }
true
[ "I went ahead and did [some testing](https://gist.github.com/nateprewitt/233301041bbd70cc53ef31a807d85bc7) to see how other user agents handle this. All of the major browsers except Safari will append `#bob`, so I've updated the logic and extended the tests to reflect that.\r\n\r\nI could see having the expected fr...
https://api.github.com/repos/psf/requests/issues/4451
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4451/labels{/name}
https://api.github.com/repos/psf/requests/issues/4451/comments
https://api.github.com/repos/psf/requests/issues/4451/events
https://github.com/psf/requests/pull/4451
286,511,628
MDExOlB1bGxSZXF1ZXN0MTYxNDkyNDkw
4,451
Prefer https over http for links in the documentation
{ "avatar_url": "https://avatars.githubusercontent.com/u/347634?v=4", "events_url": "https://api.github.com/users/jdufresne/events{/privacy}", "followers_url": "https://api.github.com/users/jdufresne/followers", "following_url": "https://api.github.com/users/jdufresne/following{/other_user}", "gists_url": "https://api.github.com/users/jdufresne/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jdufresne", "id": 347634, "login": "jdufresne", "node_id": "MDQ6VXNlcjM0NzYzNA==", "organizations_url": "https://api.github.com/users/jdufresne/orgs", "received_events_url": "https://api.github.com/users/jdufresne/received_events", "repos_url": "https://api.github.com/users/jdufresne/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jdufresne/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jdufresne/subscriptions", "type": "User", "url": "https://api.github.com/users/jdufresne", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2018-01-06T19:25:15Z
2021-09-03T00:11:11Z
2018-01-06T23:23:00Z
CONTRIBUTOR
resolved
- Fixed Read the Docs links - Fixed GitHub links - Fixed PyPI links
{ "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/4451/reactions" }
https://api.github.com/repos/psf/requests/issues/4451/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4451.diff", "html_url": "https://github.com/psf/requests/pull/4451", "merged_at": "2018-01-06T23:23:00Z", "patch_url": "https://github.com/psf/requests/pull/4451.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4451" }
true
[ "# [Codecov](https://codecov.io/gh/requests/requests/pull/4451?src=pr&el=h1) Report\n> Merging [#4451](https://codecov.io/gh/requests/requests/pull/4451?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/3dc84cde5b785a85cb20eb2f0d4530fd568a6af7?src=pr&el=desc) will **decrease** coverage by...
https://api.github.com/repos/psf/requests/issues/4450
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4450/labels{/name}
https://api.github.com/repos/psf/requests/issues/4450/comments
https://api.github.com/repos/psf/requests/issues/4450/events
https://github.com/psf/requests/issues/4450
286,488,639
MDU6SXNzdWUyODY0ODg2Mzk=
4,450
How about the error:Max retries exceeded with url
{ "avatar_url": "https://avatars.githubusercontent.com/u/34086198?v=4", "events_url": "https://api.github.com/users/lanhao945/events{/privacy}", "followers_url": "https://api.github.com/users/lanhao945/followers", "following_url": "https://api.github.com/users/lanhao945/following{/other_user}", "gists_url": "https://api.github.com/users/lanhao945/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lanhao945", "id": 34086198, "login": "lanhao945", "node_id": "MDQ6VXNlcjM0MDg2MTk4", "organizations_url": "https://api.github.com/users/lanhao945/orgs", "received_events_url": "https://api.github.com/users/lanhao945/received_events", "repos_url": "https://api.github.com/users/lanhao945/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lanhao945/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lanhao945/subscriptions", "type": "User", "url": "https://api.github.com/users/lanhao945", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2018-01-06T14:39:26Z
2021-09-08T05:00:36Z
2018-01-06T15:52:13Z
NONE
resolved
## error code ```python Traceback (most recent call last): File "F:/github/about_googlemap/about_googlemap/test_internet.py", line 12, in <module> url='https://www.google.com.hk/') File "F:\github\about_googlemap\venv\lib\site-packages\requests\api.py", line 72, in get return request('get', url, params=params, **kwargs) File "F:\github\about_googlemap\venv\lib\site-packages\requests\api.py", line 58, in request return session.request(method=method, url=url, **kwargs) File "F:\github\about_googlemap\venv\lib\site-packages\requests\sessions.py", line 523, in request resp = self.send(prep, **send_kwargs) File "F:\github\about_googlemap\venv\lib\site-packages\requests\sessions.py", line 643, in send r = adapter.send(request, **kwargs) File "F:\github\about_googlemap\venv\lib\site-packages\requests\adapters.py", line 504, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='www.google.com.hk', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x0000000005BFBEB8>: Failed to establish a new connection: [Errno 10060] ',)) ``` ## about the environment - windows 10 Home Edition - python 2.7+ 64 - requests 2.16.0 (I run the code in a virtualenv env) - the place : china. I use shadowsocks , and I can google search by Chrome ## python code ```python import requests response = requests.get( url='https://www.google.com.hk/') print response ``` ## process I try to use googlemaps , a python library, which may rely requests? And I over the wall by shadowsocks. I can view google and search by google with chrome. And I can direct get api json data by view 'https://maps.googleapis.com/maps/api/distancematrix/json?origins=Vancouver+BC|Seattle&destinations=San+Francisco|Victoria+BC&key=[my_project_key]' with chrome . But when I use requests library such as `requests.get()`, It shows the error above(ps: when I use googlemaps, error also come out, almost the same), I tried to find some solution from github, and I change the version of requests to 2.16.0, but error not go away. Also I see some setting should be in code,such as timeout? But it seems no use for me this time. En, the time, between I run the code and the error finally print out, about 20s. Also , my classmate, had no get the error, we do almost the same steps, but he tells me,he can print the response correctly. ## question - First I want to know , how does this error come? It comes from my setting or the internet outside? - Second, I want to solve the error, what may I do to keep error away? This is I expect. ## otherthings Did I put out more information to you ? If need, tell me please and I would try to give you more information. Thank you
{ "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/4450/reactions" }
https://api.github.com/repos/psf/requests/issues/4450/timeline
null
completed
null
null
false
[ "You might need to make requests aware of your proxy. I suggest reading and following the examples shown in [Advanced Usage - Proxies](http://docs.python-requests.org/en/master/user/advanced/#socks) section of our documentation.\r\n\r\nMake sure you have Socks support installed:\r\n`python -m pip install requests[s...
https://api.github.com/repos/psf/requests/issues/4449
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4449/labels{/name}
https://api.github.com/repos/psf/requests/issues/4449/comments
https://api.github.com/repos/psf/requests/issues/4449/events
https://github.com/psf/requests/issues/4449
286,424,609
MDU6SXNzdWUyODY0MjQ2MDk=
4,449
SSL certificate/key not working but same certificate/key works with curl
{ "avatar_url": "https://avatars.githubusercontent.com/u/11277946?v=4", "events_url": "https://api.github.com/users/sheilacheng/events{/privacy}", "followers_url": "https://api.github.com/users/sheilacheng/followers", "following_url": "https://api.github.com/users/sheilacheng/following{/other_user}", "gists_url": "https://api.github.com/users/sheilacheng/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sheilacheng", "id": 11277946, "login": "sheilacheng", "node_id": "MDQ6VXNlcjExMjc3OTQ2", "organizations_url": "https://api.github.com/users/sheilacheng/orgs", "received_events_url": "https://api.github.com/users/sheilacheng/received_events", "repos_url": "https://api.github.com/users/sheilacheng/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sheilacheng/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sheilacheng/subscriptions", "type": "User", "url": "https://api.github.com/users/sheilacheng", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2018-01-05T22:36:39Z
2021-09-08T04:00:42Z
2018-01-06T16:03:53Z
NONE
resolved
Summary. SSL certificate/key not working but same certificate/key works with curl ## Expected Result certificate/key verifies properly ## Actual Result SSLError: HTTPSConnectionPool(host='app.domain.com', port=443): Max retries exceeded with url: /p1/p2/p3 (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)) ## Reproduction Steps This works: &nbsp;&nbsp;&nbsp; curl -X POST -v -s -k --key client.key --cert client.crt <blah blah ....> <br> This does not and gives the above error. &nbsp;&nbsp;&nbsp; cert_file_path = '/path-to-certfile/cert.pem' &nbsp;&nbsp;&nbsp; key_file_path = '/path-to-keyfile/key.pem' &nbsp;&nbsp;&nbsp; cert = (cert_file_path, key_file_path) &nbsp;&nbsp;&nbsp; requests.post(url, data=payload, cert=cert) <br> The client.key and client.crt are actually both in pem format (ascii readable). The server uses Nginx. I found some references about missing intermediate certificates but I'm not sure how to fix it on the server or add it to my client (just to see it work!). <br> ```python import requests ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.0.3" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "3.6.3" }, "platform": { "release": "16.7.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "100020cf", "version": "17.2.0" }, "requests": { "version": "2.18.4" }, "system_ssl": { "version": "100020cf" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": true } ``` This command is only available on Requests v2.16.4 and greater. Otherwise, please provide some basic information about your system (Python version, operating system, &c).
{ "avatar_url": "https://avatars.githubusercontent.com/u/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/4449/reactions" }
https://api.github.com/repos/psf/requests/issues/4449/timeline
null
completed
null
null
false
[ "Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here.\r\n\r\n`curl -k` (a.k.a, `curl --insecure`) means do no...
https://api.github.com/repos/psf/requests/issues/4448
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4448/labels{/name}
https://api.github.com/repos/psf/requests/issues/4448/comments
https://api.github.com/repos/psf/requests/issues/4448/events
https://github.com/psf/requests/issues/4448
286,230,719
MDU6SXNzdWUyODYyMzA3MTk=
4,448
sslv3 alert handshake failure
{ "avatar_url": "https://avatars.githubusercontent.com/u/18612720?v=4", "events_url": "https://api.github.com/users/gauttham/events{/privacy}", "followers_url": "https://api.github.com/users/gauttham/followers", "following_url": "https://api.github.com/users/gauttham/following{/other_user}", "gists_url": "https://api.github.com/users/gauttham/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/gauttham", "id": 18612720, "login": "gauttham", "node_id": "MDQ6VXNlcjE4NjEyNzIw", "organizations_url": "https://api.github.com/users/gauttham/orgs", "received_events_url": "https://api.github.com/users/gauttham/received_events", "repos_url": "https://api.github.com/users/gauttham/repos", "site_admin": false, "starred_url": "https://api.github.com/users/gauttham/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gauttham/subscriptions", "type": "User", "url": "https://api.github.com/users/gauttham", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2018-01-05T09:08:55Z
2021-09-08T05:00:37Z
2018-01-05T11:03:16Z
NONE
resolved
Summary: I am trying to hit an API from my MAC to a local server with verify=False Option. The below curl command works perfectly fine for my use case. However, the same thing when done via Python requests module, returns the following error: SSLError: ("bad handshake: Error([('SSL routines', 'ssl3_read_bytes', 'sslv3 alert handshake failure')],)",) Here is the Curl Command: curl -vX POST -H "Content-Type: application/json" -d '{"filters":{"cpcode":["ymdfile"]}}' '<URL>/api/v1/nkarkala/reports/mkttrafficedgebycpcode_D_t-cp_v1?start=2017-11-30T00:00:00Z&end=2017-11-30T01:00:00Z' def refreshARLHostnameInfo(): headers = { 'Content-Type': 'application/json', 'X-Source-Id': 'sshete', } params = ( ('start', '2017-11-30T00:00:00Z'), ('end', '2017-11-30T01:00:00Z'), ) data = '{"filters":{"cpcode":["ymdfile"]}}' print(requests.packages.urllib3.util.ssl_.DEFAULT_CIPHERS) response = requests.post( '<URL>/api/v1/nkarkala/reports/mkttrafficedgebycpcode_D_t-cp_v1', headers=headers, params=params, data=data,verify=daconstants.VERIFY) print (response) return response ## Expected Result What you expected. ## Actual Result Error Traceback (most recent call last) ~/projects/premium_env/lib/python3.5/site-packages/requests/packages/urllib3/contrib/pyopenssl.py in ssl_wrap_socket(sock, keyfile, certfile, cert_reqs, ca_certs, server_hostname, ssl_version, ca_cert_dir) 347 try: --> 348 cnx.do_handshake() 349 except OpenSSL.SSL.WantReadError: ~/projects/premium_env/lib/python3.5/site-packages/OpenSSL/SSL.py in do_handshake(self) 1805 result = _lib.SSL_do_handshake(self._ssl) -> 1806 self._raise_ssl_error(self._ssl, result) 1807 ~/projects/premium_env/lib/python3.5/site-packages/OpenSSL/SSL.py in _raise_ssl_error(self, ssl, result) 1545 else: -> 1546 _raise_current_error() 1547 ~/projects/premium_env/lib/python3.5/site-packages/OpenSSL/_util.py in exception_from_error_queue(exception_type) 53 ---> 54 raise exception_type(errors) 55 Error: [('SSL routines', 'ssl3_read_bytes', 'sslv3 alert handshake failure')] During handling of the above exception, another exception occurred: SSLError Traceback (most recent call last) ~/projects/premium_env/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, **response_kw) 594 body=body, headers=headers, --> 595 chunked=chunked) 596 ~/projects/premium_env/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw) 351 try: --> 352 self._validate_conn(conn) 353 except (SocketTimeout, BaseSSLError) as e: ~/projects/premium_env/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py in _validate_conn(self, conn) 830 if not getattr(conn, 'sock', None): # AppEngine might not have `.sock` --> 831 conn.connect() 832 ~/projects/premium_env/lib/python3.5/site-packages/requests/packages/urllib3/connection.py in connect(self) 288 server_hostname=hostname, --> 289 ssl_version=resolved_ssl_version) 290 ~/projects/premium_env/lib/python3.5/site-packages/requests/packages/urllib3/contrib/pyopenssl.py in ssl_wrap_socket(sock, keyfile, certfile, cert_reqs, ca_certs, server_hostname, ssl_version, ca_cert_dir) 354 except OpenSSL.SSL.Error as e: --> 355 raise ssl.SSLError('bad handshake: %r' % e) 356 break SSLError: ("bad handshake: Error([('SSL routines', 'ssl3_read_bytes', 'sslv3 alert handshake failure')],)",) During handling of the above exception, another exception occurred: SSLError Traceback (most recent call last) ~/projects/premium_env/lib/python3.5/site-packages/requests/adapters.py in send(self, request, stream, timeout, verify, cert, proxies) 422 retries=self.max_retries, --> 423 timeout=timeout 424 ) ~/projects/premium_env/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, **response_kw) 620 clean_exit = False --> 621 raise SSLError(e) 622 SSLError: ("bad handshake: Error([('SSL routines', 'ssl3_read_bytes', 'sslv3 alert handshake failure')],)",) During handling of the above exception, another exception occurred: SSLError Traceback (most recent call last) <ipython-input-2-2e5fc36de7bc> in <module>() ----> 1 response = vds_controllers.refreshARLHostnameInfo() ~/projects/premium_env/premium_healthcheck_platform/src/ab-www/premium_healthcheck_platform/storage/vds/vds_controllers.py in refreshARLHostnameInfo() 26 response = requests.post( 27 '<URL>/api/v1/nkarkala/reports/mkttrafficedgebycpcode_D_t-cp_v1', ---> 28 headers=headers, params=params, data=data,verify=daconstants.VERIFY) 29 30 ~/projects/premium_env/lib/python3.5/site-packages/requests/api.py in post(url, data, json, **kwargs) 108 """ 109 --> 110 return request('post', url, data=data, json=json, **kwargs) 111 112 ~/projects/premium_env/lib/python3.5/site-packages/requests/api.py in request(method, url, **kwargs) 54 # cases, and look like a memory leak in others. 55 with sessions.Session() as session: ---> 56 return session.request(method=method, url=url, **kwargs) 57 58 ~/projects/premium_env/lib/python3.5/site-packages/requests/sessions.py in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json) 473 } 474 send_kwargs.update(settings) --> 475 resp = self.send(prep, **send_kwargs) 476 477 return resp ~/projects/premium_env/lib/python3.5/site-packages/requests/sessions.py in send(self, request, **kwargs) 594 595 # Send the request --> 596 r = adapter.send(request, **kwargs) 597 598 # Total elapsed time of the request (approximately) ~/projects/premium_env/lib/python3.5/site-packages/requests/adapters.py in send(self, request, stream, timeout, verify, cert, proxies) 495 except (_SSLError, _HTTPError) as e: 496 if isinstance(e, _SSLError): --> 497 raise SSLError(e, request=request) 498 elif isinstance(e, ReadTimeoutError): 499 raise ReadTimeout(e, request=request) SSLError: ("bad handshake: Error([('SSL routines', 'ssl3_read_bytes', 'sslv3 alert handshake failure')],)",) ## Reproduction Steps Run the function PIP Freeze Output: aenum==2.0.8 appnope==0.1.0 asn1crypto==0.24.0 bleach==2.1.2 certifi==2017.11.5 cffi==1.11.2 chardet==3.0.4 config==0.3.9 coreapi==2.3.3 coreschema==0.0.4 cryptography==2.1.4 dbattery-python-api==1.2 decorator==4.1.2 Django==1.10.1 django-redis-cache==1.7.1 django-rest-swagger==2.1.2 djangorestframework==3.4.4 dnspython==1.15.0 entrypoints==0.2.3 html5lib==1.0.1 idna==2.6 ijson==2.3 ipdb==0.10.3 ipykernel==4.7.0 ipython==6.2.1 ipython-genutils==0.2.0 ipywidgets==7.0.5 itypes==1.1.0 jedi==0.11.0 Jinja2==2.10 jsonschema==2.6.0 jupyter==1.0.0 jupyter-client==5.1.0 jupyter-console==5.2.0 jupyter-core==4.4.0 MarkupSafe==1.0 mistune==0.8.3 nbconvert==5.3.1 nbformat==4.4.0 ndg-httpsclient==0.4.3 netstorageapi==1.2.8 notebook==5.2.2 openapi-codec==1.3.2 pandocfilters==1.4.2 parso==0.1.0 pexpect==4.3.0 pickleshare==0.7.4 prompt-toolkit==1.0.15 psycopg2==2.7.3.2 ptyprocess==0.5.2 pyasn1==0.4.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 pyOpenSSL==17.5.0 PyPika==0.9.4 python-dateutil==2.6.1 pytz==2017.3 pyzmq==16.0.3 qtconsole==4.3.1 redis==2.10.6 requests==2.11.1 simplegeneric==0.8.1 simplejson==3.13.2 six==1.11.0 terminado==0.8.1 testpath==0.3.1 tornado==4.5.2 traitlets==4.3.2 uncurl==0.0.8 uritemplate==3.0.0 urllib3==1.22 wcwidth==0.1.7 webencodings==0.5.1 widgetsnbextension==3.0.8 xerox==0.4.1 Regards, Gautam
{ "avatar_url": "https://avatars.githubusercontent.com/u/18612720?v=4", "events_url": "https://api.github.com/users/gauttham/events{/privacy}", "followers_url": "https://api.github.com/users/gauttham/followers", "following_url": "https://api.github.com/users/gauttham/following{/other_user}", "gists_url": "https://api.github.com/users/gauttham/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/gauttham", "id": 18612720, "login": "gauttham", "node_id": "MDQ6VXNlcjE4NjEyNzIw", "organizations_url": "https://api.github.com/users/gauttham/orgs", "received_events_url": "https://api.github.com/users/gauttham/received_events", "repos_url": "https://api.github.com/users/gauttham/repos", "site_admin": false, "starred_url": "https://api.github.com/users/gauttham/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gauttham/subscriptions", "type": "User", "url": "https://api.github.com/users/gauttham", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4448/reactions" }
https://api.github.com/repos/psf/requests/issues/4448/timeline
null
completed
null
null
false
[ "This was an issue with the wrong certs.. My Bad.. Closing this out." ]
https://api.github.com/repos/psf/requests/issues/4447
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4447/labels{/name}
https://api.github.com/repos/psf/requests/issues/4447/comments
https://api.github.com/repos/psf/requests/issues/4447/events
https://github.com/psf/requests/pull/4447
286,133,126
MDExOlB1bGxSZXF1ZXN0MTYxMjMxODI0
4,447
Enable early responses (like 404 errors) to be received for chunk-encoded requests
{ "avatar_url": "https://avatars.githubusercontent.com/u/3890535?v=4", "events_url": "https://api.github.com/users/rasjidw/events{/privacy}", "followers_url": "https://api.github.com/users/rasjidw/followers", "following_url": "https://api.github.com/users/rasjidw/following{/other_user}", "gists_url": "https://api.github.com/users/rasjidw/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/rasjidw", "id": 3890535, "login": "rasjidw", "node_id": "MDQ6VXNlcjM4OTA1MzU=", "organizations_url": "https://api.github.com/users/rasjidw/orgs", "received_events_url": "https://api.github.com/users/rasjidw/received_events", "repos_url": "https://api.github.com/users/rasjidw/repos", "site_admin": false, "starred_url": "https://api.github.com/users/rasjidw/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/rasjidw/subscriptions", "type": "User", "url": "https://api.github.com/users/rasjidw", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2018-01-04T22:29:10Z
2021-09-04T00:06:34Z
2018-01-11T03:12:35Z
NONE
resolved
Initial version of a fix for issue #4445.
{ "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/4447/reactions" }
https://api.github.com/repos/psf/requests/issues/4447/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4447.diff", "html_url": "https://github.com/psf/requests/pull/4447", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/4447.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4447" }
true
[ "When I get some time I'll look at reworking to avoid the use of threads.", "@rasjidw I'm going to close this in the meantime. Please open a new pull request once you've worked that out." ]
https://api.github.com/repos/psf/requests/issues/4446
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4446/labels{/name}
https://api.github.com/repos/psf/requests/issues/4446/comments
https://api.github.com/repos/psf/requests/issues/4446/events
https://github.com/psf/requests/issues/4446
285,945,233
MDU6SXNzdWUyODU5NDUyMzM=
4,446
Unable to request any webpage
{ "avatar_url": "https://avatars.githubusercontent.com/u/16529675?v=4", "events_url": "https://api.github.com/users/LarsaSolidor/events{/privacy}", "followers_url": "https://api.github.com/users/LarsaSolidor/followers", "following_url": "https://api.github.com/users/LarsaSolidor/following{/other_user}", "gists_url": "https://api.github.com/users/LarsaSolidor/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/LarsaSolidor", "id": 16529675, "login": "LarsaSolidor", "node_id": "MDQ6VXNlcjE2NTI5Njc1", "organizations_url": "https://api.github.com/users/LarsaSolidor/orgs", "received_events_url": "https://api.github.com/users/LarsaSolidor/received_events", "repos_url": "https://api.github.com/users/LarsaSolidor/repos", "site_admin": false, "starred_url": "https://api.github.com/users/LarsaSolidor/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/LarsaSolidor/subscriptions", "type": "User", "url": "https://api.github.com/users/LarsaSolidor", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2018-01-04T10:46:32Z
2021-09-08T05:00:37Z
2018-01-04T16:48:02Z
NONE
resolved
Unable to request any webpage on two Windows 10 64 bit machines with Python 3.6.3 64 bit and Python 3.6.3 64 bit installed. ## Expected Result I expected to receive a Response object with the website data. ## Actual Result Received the following error messages after a very long delay. ``` "C:\Program Files\Python36\python.exe" "C:/Users/user.name/Google Drive/Automation/RoHSWebScraper/main.py" Traceback (most recent call last): File "C:\Program Files\Python36\lib\site-packages\urllib3\contrib\pyopenssl.py", line 441, in wrap_socket cnx.do_handshake() File "C:\Program Files\Python36\lib\site-packages\OpenSSL\SSL.py", line 1716, in do_handshake self._raise_ssl_error(self._ssl, result) File "C:\Program Files\Python36\lib\site-packages\OpenSSL\SSL.py", line 1449, in _raise_ssl_error raise SysCallError(-1, "Unexpected EOF") OpenSSL.SSL.SysCallError: (-1, 'Unexpected EOF') During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Program Files\Python36\lib\site-packages\urllib3\connectionpool.py", line 601, in urlopen chunked=chunked) File "C:\Program Files\Python36\lib\site-packages\urllib3\connectionpool.py", line 346, in _make_request self._validate_conn(conn) File "C:\Program Files\Python36\lib\site-packages\urllib3\connectionpool.py", line 850, in _validate_conn conn.connect() File "C:\Program Files\Python36\lib\site-packages\urllib3\connection.py", line 326, in connect ssl_context=context) File "C:\Program Files\Python36\lib\site-packages\urllib3\util\ssl_.py", line 329, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File "C:\Program Files\Python36\lib\site-packages\urllib3\contrib\pyopenssl.py", line 448, in wrap_socket raise ssl.SSLError('bad handshake: %r' % e) ssl.SSLError: ("bad handshake: SysCallError(-1, 'Unexpected EOF')",) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Program Files\Python36\lib\site-packages\requests\adapters.py", line 440, in send timeout=timeout File "C:\Program Files\Python36\lib\site-packages\urllib3\connectionpool.py", line 639, in urlopen _stacktrace=sys.exc_info()[2]) File "C:\Program Files\Python36\lib\site-packages\urllib3\util\retry.py", line 388, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='automatetheboringstuff.com', port=443): Max retries exceeded with url: /files/rj.txt (Caused by SSLError(SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')",),)) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:/Users/user.name/Google Drive/Automation/RoHSWebScraper/main.py", line 3, in <module> res = requests.get('https://automatetheboringstuff.com/files/rj.txt', verify=False) File "C:\Program Files\Python36\lib\site-packages\requests\api.py", line 72, in get return request('get', url, params=params, **kwargs) File "C:\Program Files\Python36\lib\site-packages\requests\api.py", line 58, in request return session.request(method=method, url=url, **kwargs) File "C:\Program Files\Python36\lib\site-packages\requests\sessions.py", line 508, in request resp = self.send(prep, **send_kwargs) File "C:\Program Files\Python36\lib\site-packages\requests\sessions.py", line 618, in send r = adapter.send(request, **kwargs) File "C:\Program Files\Python36\lib\site-packages\requests\adapters.py", line 506, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='automatetheboringstuff.com', port=443): Max retries exceeded with url: /files/rj.txt (Caused by SSLError(SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')",),)) Process finished with exit code 1 ``` ## Reproduction Steps ```python import requests res = requests.get('https://automatetheboringstuff.com/files/rj.txt') type(res) res.raise_for_status() print(res) ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.1.4" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "3.6.3" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "1010007f", "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/4446/reactions" }
https://api.github.com/repos/psf/requests/issues/4446/timeline
null
completed
null
null
false
[ "Hey @LarsaSolidor, if you aren't able to request ANY webpages, then that suggests there is some kind of local network issue. Are you possibly behind a proxy or corporate firewall that may be intercepting your traffic? If you are, you likely need to add any additional required SSL certs with your requests.\r\n\r\nI...
https://api.github.com/repos/psf/requests/issues/4445
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4445/labels{/name}
https://api.github.com/repos/psf/requests/issues/4445/comments
https://api.github.com/repos/psf/requests/issues/4445/events
https://github.com/psf/requests/issues/4445
285,895,740
MDU6SXNzdWUyODU4OTU3NDA=
4,445
404 responses for chunk-encoded requests may not be received
{ "avatar_url": "https://avatars.githubusercontent.com/u/3890535?v=4", "events_url": "https://api.github.com/users/rasjidw/events{/privacy}", "followers_url": "https://api.github.com/users/rasjidw/followers", "following_url": "https://api.github.com/users/rasjidw/following{/other_user}", "gists_url": "https://api.github.com/users/rasjidw/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/rasjidw", "id": 3890535, "login": "rasjidw", "node_id": "MDQ6VXNlcjM4OTA1MzU=", "organizations_url": "https://api.github.com/users/rasjidw/orgs", "received_events_url": "https://api.github.com/users/rasjidw/received_events", "repos_url": "https://api.github.com/users/rasjidw/repos", "site_admin": false, "starred_url": "https://api.github.com/users/rasjidw/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/rasjidw/subscriptions", "type": "User", "url": "https://api.github.com/users/rasjidw", "user_view_type": "public" }
[]
closed
false
null
[]
null
3
2018-01-04T06:50:33Z
2024-05-19T19:02:58Z
2024-05-19T19:02:58Z
NONE
null
404 responses (or any response sent by the server prior to the entire request being sent) for chunk-encoded requests may not be received by the caller. This appears to happen if the server closes the connection (after sending the 404 response) prior to the completion of the chunked post / upload. ## Expected Result Posting a chunked encoded request to an invalid URL should return the 404 response. ## Actual Result A ```requests.exceptions.ConnectionError: [Errno 32] Broken pipe``` error is raised instead. ## Reproduction Steps A minimal server using flask is given below: ``` #!/usr/bin/env python3 import sys from flask import Flask, request app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello, World!' @app.route('/post_endpoint', methods=['POST']) def post_normal_response(): for line in request.stream: str_line = line.decode('utf-8') sys.stdout.write(str_line) sys.stdout.flush() return 'OK' if __name__ == '__main__': app.run() ``` Client code illustrating the problem is: ``` #!/usr/bin/env python3 from time import sleep import requests VALID_URL = 'http://127.0.0.1:5000/post_endpoint' INVALID_URL = 'http://127.0.0.1:5000/does_not_exist' LINES = ['Line {}\n'.format(x) for x in range(5)] DATA = ''.join(LINES).encode('utf-8') def chunked(): for line in LINES: sleep(1) yield line.encode('utf-8') def test_url(url): r = requests.post(url, data=DATA) print(r) r = requests.post(url, data=chunked()) print(r) if __name__ == '__main__': test_url(VALID_URL) print('-----') test_url(INVALID_URL) ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "3.5.2" }, "platform": { "release": "4.4.0-104-generic", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.18.4" }, "system_ssl": { "version": "1000207f" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": false } ``` ## Patch to address the issue [requests-patch.zip](https://github.com/requests/requests/files/1602607/requests-patch.zip)
{ "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/4445/reactions" }
https://api.github.com/repos/psf/requests/issues/4445/timeline
null
completed
null
null
false
[ "Thanks for this! Instead of submitting the patch as a zip, consider submitting a Pull Request and linking it to this issue. :)", "Pull request done. If the approach is okay I can look at adding tests etc.", "Chunked requests are now handled by urllib3." ]
https://api.github.com/repos/psf/requests/issues/4444
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4444/labels{/name}
https://api.github.com/repos/psf/requests/issues/4444/comments
https://api.github.com/repos/psf/requests/issues/4444/events
https://github.com/psf/requests/issues/4444
285,348,445
MDU6SXNzdWUyODUzNDg0NDU=
4,444
Download file with Chinese charactor, the Response headers filename is incorrect, not cn, but messy code.
{ "avatar_url": "https://avatars.githubusercontent.com/u/13959768?v=4", "events_url": "https://api.github.com/users/truelovesdu/events{/privacy}", "followers_url": "https://api.github.com/users/truelovesdu/followers", "following_url": "https://api.github.com/users/truelovesdu/following{/other_user}", "gists_url": "https://api.github.com/users/truelovesdu/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/truelovesdu", "id": 13959768, "login": "truelovesdu", "node_id": "MDQ6VXNlcjEzOTU5NzY4", "organizations_url": "https://api.github.com/users/truelovesdu/orgs", "received_events_url": "https://api.github.com/users/truelovesdu/received_events", "repos_url": "https://api.github.com/users/truelovesdu/repos", "site_admin": false, "starred_url": "https://api.github.com/users/truelovesdu/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/truelovesdu/subscriptions", "type": "User", "url": "https://api.github.com/users/truelovesdu", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2018-01-02T03:04:06Z
2021-09-08T05:00:38Z
2018-01-02T17:00:26Z
NONE
resolved
When I log infos, logging.debug("@@@###:%s" % response.headers) The output is as below: @@@###:{'Server': 'openresty', 'Date': 'Tue, 02 Jan 2018 03:02:52 GMT', 'Content-Type': 'application/octet-stream;charset=utf8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Content-Disposition': ';filename="æµ\x8bè¯\x95ç\x8e¯å¢\x83ä¿¡æ\x81¯.xlsx"', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'} U can see the filename is messy.
{ "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/4444/reactions" }
https://api.github.com/repos/psf/requests/issues/4444/timeline
null
completed
null
null
false
[ "Please provide us with the output of\r\n\r\n```\r\npython -m requests.help\r\n```\r\n\r\nIf that is unavailable on your version of Requests please provide some basic information about your system (Python version, operating system, etc)." ]
https://api.github.com/repos/psf/requests/issues/4443
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4443/labels{/name}
https://api.github.com/repos/psf/requests/issues/4443/comments
https://api.github.com/repos/psf/requests/issues/4443/events
https://github.com/psf/requests/issues/4443
285,308,691
MDU6SXNzdWUyODUzMDg2OTE=
4,443
fragment not append on redirect
{ "avatar_url": "https://avatars.githubusercontent.com/u/30517876?v=4", "events_url": "https://api.github.com/users/stcioc/events{/privacy}", "followers_url": "https://api.github.com/users/stcioc/followers", "following_url": "https://api.github.com/users/stcioc/following{/other_user}", "gists_url": "https://api.github.com/users/stcioc/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/stcioc", "id": 30517876, "login": "stcioc", "node_id": "MDQ6VXNlcjMwNTE3ODc2", "organizations_url": "https://api.github.com/users/stcioc/orgs", "received_events_url": "https://api.github.com/users/stcioc/received_events", "repos_url": "https://api.github.com/users/stcioc/repos", "site_admin": false, "starred_url": "https://api.github.com/users/stcioc/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/stcioc/subscriptions", "type": "User", "url": "https://api.github.com/users/stcioc", "user_view_type": "public" }
[ { "color": "e10c02", "default": false, "description": null, "id": 117744, "name": "Bug", "node_id": "MDU6TGFiZWwxMTc3NDQ=", "url": "https://api.github.com/repos/psf/requests/labels/Bug" } ]
closed
true
null
[]
null
5
2018-01-01T13:57:19Z
2021-09-08T04:00:47Z
2018-01-21T18:53:24Z
NONE
resolved
In the following case (see detailed explanation and test case at http://www.webdbg.com/test/redir/fragment/): - try to open a link that contains a fragment (say http://foo/#SomeInfo) - the server sends a 302 Redir to http://bar ## Expected Result The expected result is that requests library follows the redirection and appends the original fragment from the link (e.g. it redirects to http://bar/#SomeInfo) ## Actual Result The redirect link is followed without the fragment (e.g. requests tries to open http://bar) ## Reproduction Steps ```python import requests response = requests.get("https://www.bayden.com/test/redir/fragment/redir-1.asp#/HereIsSomeInfo") html = response.text print(response.url) ``` output is "http://www.enhanceie.com/test/redir/fragment/final.asp" output should be "http://www.enhanceie.com/test/redir/fragment/final.asp#HereIsSomeInfo" ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "3.6.2" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.18.4" }, "system_ssl": { "version": "100020bf" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": false } ``` This command is only available on Requests v2.16.4 and greater. Otherwise, please provide some basic information about your system (Python version, operating system, &c).
{ "avatar_url": "https://avatars.githubusercontent.com/u/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/4443/reactions" }
https://api.github.com/repos/psf/requests/issues/4443/timeline
null
completed
null
null
false
[ "This isn't how redirects work. The RFCs (3986, 7230, 7231, 7232, 7233, 7234, 7235) do not require or prescribe retaining the fragment. If you want us to retain the fragment you'll need to handle redirects yourself. The server is telling us what to redirect to and we're supposed to follow that.\r\n\r\nThanks for op...
https://api.github.com/repos/psf/requests/issues/4442
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4442/labels{/name}
https://api.github.com/repos/psf/requests/issues/4442/comments
https://api.github.com/repos/psf/requests/issues/4442/events
https://github.com/psf/requests/pull/4442
285,276,545
MDExOlB1bGxSZXF1ZXN0MTYwNjMwNTYz
4,442
Reduce overall memory usage by removing cgi dependency and writing a protected function
{ "avatar_url": "https://avatars.githubusercontent.com/u/18693326?v=4", "events_url": "https://api.github.com/users/DemetriosBairaktaris/events{/privacy}", "followers_url": "https://api.github.com/users/DemetriosBairaktaris/followers", "following_url": "https://api.github.com/users/DemetriosBairaktaris/following{/other_user}", "gists_url": "https://api.github.com/users/DemetriosBairaktaris/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/DemetriosBairaktaris", "id": 18693326, "login": "DemetriosBairaktaris", "node_id": "MDQ6VXNlcjE4NjkzMzI2", "organizations_url": "https://api.github.com/users/DemetriosBairaktaris/orgs", "received_events_url": "https://api.github.com/users/DemetriosBairaktaris/received_events", "repos_url": "https://api.github.com/users/DemetriosBairaktaris/repos", "site_admin": false, "starred_url": "https://api.github.com/users/DemetriosBairaktaris/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/DemetriosBairaktaris/subscriptions", "type": "User", "url": "https://api.github.com/users/DemetriosBairaktaris", "user_view_type": "public" }
[]
closed
true
null
[]
null
6
2017-12-31T21:15:20Z
2021-09-04T00:06:35Z
2018-01-04T22:32:40Z
CONTRIBUTOR
resolved
In response to issue #4313 , I removed the cgi module import and added a parse_header function nested inside get_encoding_from_headers in utils.py. I have run the tests both before and after making these changes. The test_util cases all passed before and they still do now. Please let me know about any suggestions to this code.
{ "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/4442/reactions" }
https://api.github.com/repos/psf/requests/issues/4442/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4442.diff", "html_url": "https://github.com/psf/requests/pull/4442", "merged_at": "2018-01-04T22:32:40Z", "patch_url": "https://github.com/psf/requests/pull/4442.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4442" }
true
[ "# [Codecov](https://codecov.io/gh/requests/requests/pull/4442?src=pr&el=h1) Report\n> Merging [#4442](https://codecov.io/gh/requests/requests/pull/4442?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/24092b11d74af0a766d9cc616622f38adb0044b9?src=pr&el=desc) will **increase** coverage by...
https://api.github.com/repos/psf/requests/issues/4441
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4441/labels{/name}
https://api.github.com/repos/psf/requests/issues/4441/comments
https://api.github.com/repos/psf/requests/issues/4441/events
https://github.com/psf/requests/issues/4441
285,262,801
MDU6SXNzdWUyODUyNjI4MDE=
4,441
README does not render properly on PyPI
{ "avatar_url": "https://avatars.githubusercontent.com/u/10340167?v=4", "events_url": "https://api.github.com/users/johnthagen/events{/privacy}", "followers_url": "https://api.github.com/users/johnthagen/followers", "following_url": "https://api.github.com/users/johnthagen/following{/other_user}", "gists_url": "https://api.github.com/users/johnthagen/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/johnthagen", "id": 10340167, "login": "johnthagen", "node_id": "MDQ6VXNlcjEwMzQwMTY3", "organizations_url": "https://api.github.com/users/johnthagen/orgs", "received_events_url": "https://api.github.com/users/johnthagen/received_events", "repos_url": "https://api.github.com/users/johnthagen/repos", "site_admin": false, "starred_url": "https://api.github.com/users/johnthagen/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/johnthagen/subscriptions", "type": "User", "url": "https://api.github.com/users/johnthagen", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2017-12-31T15:24:28Z
2021-09-08T03:00:33Z
2018-03-12T21:43:16Z
CONTRIBUTOR
resolved
# Summary Requests PyPI page does not render, making it much less useful. ## Expected Result Rendered RST to be shown on https://pypi.python.org/pypi/requests ## Actual Result Raw unrendered RST: ``` Requests: HTTP for Humans ========================= .. image:: https://img.shields.io/pypi/v/requests.svg :target: https://pypi.python.org/pypi/requests .. image:: https://img.shields.io/pypi/l/requests.svg :target: https://pypi.python.org/pypi/requests ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/119893?v=4", "events_url": "https://api.github.com/users/kennethreitz/events{/privacy}", "followers_url": "https://api.github.com/users/kennethreitz/followers", "following_url": "https://api.github.com/users/kennethreitz/following{/other_user}", "gists_url": "https://api.github.com/users/kennethreitz/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kennethreitz", "id": 119893, "login": "kennethreitz", "node_id": "MDQ6VXNlcjExOTg5Mw==", "organizations_url": "https://api.github.com/users/kennethreitz/orgs", "received_events_url": "https://api.github.com/users/kennethreitz/received_events", "repos_url": "https://api.github.com/users/kennethreitz/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kennethreitz/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kennethreitz/subscriptions", "type": "User", "url": "https://api.github.com/users/kennethreitz", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4441/reactions" }
https://api.github.com/repos/psf/requests/issues/4441/timeline
null
completed
null
null
false
[ "Could this be due to some invalid RST associated with line 110 of README.rst? I think it needs back-quotes, e.g.\r\n\r\n``.. _`Contributor Friendly`: https://github.com/requests/requests/issues?direction=desc&labels=Contributor+Friendly&page=1&sort=updated&state=open``\r\n\r\ninstead of the current:\r\n\r\n``.. _C...
https://api.github.com/repos/psf/requests/issues/4440
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4440/labels{/name}
https://api.github.com/repos/psf/requests/issues/4440/comments
https://api.github.com/repos/psf/requests/issues/4440/events
https://github.com/psf/requests/issues/4440
285,189,012
MDU6SXNzdWUyODUxODkwMTI=
4,440
Proxy doesn't work for https connections
{ "avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4", "events_url": "https://api.github.com/users/ghost/events{/privacy}", "followers_url": "https://api.github.com/users/ghost/followers", "following_url": "https://api.github.com/users/ghost/following{/other_user}", "gists_url": "https://api.github.com/users/ghost/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ghost", "id": 10137, "login": "ghost", "node_id": "MDQ6VXNlcjEwMTM3", "organizations_url": "https://api.github.com/users/ghost/orgs", "received_events_url": "https://api.github.com/users/ghost/received_events", "repos_url": "https://api.github.com/users/ghost/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ghost/subscriptions", "type": "User", "url": "https://api.github.com/users/ghost", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2017-12-30T07:22:53Z
2021-09-04T00:06:25Z
2017-12-30T07:39:41Z
NONE
resolved
Summary. The requests proxies do work for the **http** connections but not for **https** connections. I tried to find a solution to this problem but could not find any satisfied answer. Here is the sample test code: ```python import requests proxy = { 'http': 'http://user:pass@ip:http-port', 'https': 'http://user:pass@ip:https-port' } res = requests.get('https://somesite', proxies=proxy) print(res.text) ``` ## Expected Result It should return the page content by establishing a connection as it does in case of **http** request. ## Actual Result I got this error upon using https request: ```bash requests.exceptions.ProxyError: HTTPSConnectionPool(host='www.google.com', port= 443): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', error('Invalid response from tunnel request',))) ``` ## Reproduction Steps ```python import requests proxy = { 'http': 'http://user:pass@ip:http-port', 'https': 'http://user:pass@ip:https-port' } res = requests.get('https://somesite', proxies=proxy) print(res.text) ``` ## System Information I'm using this code on **Windows Operating System**.
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/4440/reactions" }
https://api.github.com/repos/psf/requests/issues/4440/timeline
null
completed
null
null
false
[ "It seems to work now, my bad !\r\nJust found the solution here [Socks Support](https://github.com/requests/requests/pull/478)", "+1 requests.exceptions.ProxyError: HTTPSConnectionPool(host='www.google.com', port=443): Max retries exceeded with url: /search?source=hp&ei=h45CXayCH_eVr7wPmoahuAU&q=inurl:id=1 (Cause...
https://api.github.com/repos/psf/requests/issues/4439
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4439/labels{/name}
https://api.github.com/repos/psf/requests/issues/4439/comments
https://api.github.com/repos/psf/requests/issues/4439/events
https://github.com/psf/requests/pull/4439
284,874,004
MDExOlB1bGxSZXF1ZXN0MTYwMzU3NTEz
4,439
Fix broken link to Certifi
{ "avatar_url": "https://avatars.githubusercontent.com/u/11088651?v=4", "events_url": "https://api.github.com/users/nkonin/events{/privacy}", "followers_url": "https://api.github.com/users/nkonin/followers", "following_url": "https://api.github.com/users/nkonin/following{/other_user}", "gists_url": "https://api.github.com/users/nkonin/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/nkonin", "id": 11088651, "login": "nkonin", "node_id": "MDQ6VXNlcjExMDg4NjUx", "organizations_url": "https://api.github.com/users/nkonin/orgs", "received_events_url": "https://api.github.com/users/nkonin/received_events", "repos_url": "https://api.github.com/users/nkonin/repos", "site_admin": false, "starred_url": "https://api.github.com/users/nkonin/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/nkonin/subscriptions", "type": "User", "url": "https://api.github.com/users/nkonin", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2017-12-28T09:17:44Z
2021-09-03T00:11:14Z
2018-01-21T14:36:32Z
CONTRIBUTOR
resolved
certifi.io doesn't available at least since 07.11.2017 (https://github.com/certifi/certifi.io/issues/16)
{ "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/4439/reactions" }
https://api.github.com/repos/psf/requests/issues/4439/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4439.diff", "html_url": "https://github.com/psf/requests/pull/4439", "merged_at": "2018-01-21T14:36:32Z", "patch_url": "https://github.com/psf/requests/pull/4439.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4439" }
true
[ "# [Codecov](https://codecov.io/gh/requests/requests/pull/4439?src=pr&el=h1) Report\n> Merging [#4439](https://codecov.io/gh/requests/requests/pull/4439?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/6a74c70a3ab00435281bf70f8be581a6f9e0419d?src=pr&el=desc) will **not change** coverage....
https://api.github.com/repos/psf/requests/issues/4438
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4438/labels{/name}
https://api.github.com/repos/psf/requests/issues/4438/comments
https://api.github.com/repos/psf/requests/issues/4438/events
https://github.com/psf/requests/issues/4438
284,508,727
MDU6SXNzdWUyODQ1MDg3Mjc=
4,438
requests Read timed out when handle two same header in http response
{ "avatar_url": "https://avatars.githubusercontent.com/u/7598892?v=4", "events_url": "https://api.github.com/users/beruhan/events{/privacy}", "followers_url": "https://api.github.com/users/beruhan/followers", "following_url": "https://api.github.com/users/beruhan/following{/other_user}", "gists_url": "https://api.github.com/users/beruhan/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/beruhan", "id": 7598892, "login": "beruhan", "node_id": "MDQ6VXNlcjc1OTg4OTI=", "organizations_url": "https://api.github.com/users/beruhan/orgs", "received_events_url": "https://api.github.com/users/beruhan/received_events", "repos_url": "https://api.github.com/users/beruhan/repos", "site_admin": false, "starred_url": "https://api.github.com/users/beruhan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/beruhan/subscriptions", "type": "User", "url": "https://api.github.com/users/beruhan", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2017-12-26T07:28:36Z
2021-09-08T05:00:39Z
2017-12-26T07:32:20Z
NONE
resolved
I use requests's get method to request a url,I found It always timeout,I use wireshark capture the response, the server has response the data,but why requests's get method timeout?,the response as flows ``` GET /onvif/device_service HTTP/1.1 Host: 50.250.78.211 Connection: keep-alive Accept-Encoding: gzip, deflate Accept: */* User-Agent: python-requests/2.18.4 HTTP/1.1 401 Unauthorized Date: Tue, 26 Dec 2017 03:24:12 GMT Server: DNVRS-Webs Cache-Control: no-cache Content-Type: text/html Connection: keep-alive Keep-Alive: timeout=60, max=99 WWW-Authenticate: Digest realm="DVRNVRDVS", domain="::", qop="auth", nonce="6f43ba833ff06ae8b7b36bd2dfb9704c:1514258652870", opaque="", algorithm="MD5", stale="FALSE" WWW-Authenticate: Basic realm="DVRNVRDVS" ``` test urls:http://50.250.78.211/onvif/device_service
{ "avatar_url": "https://avatars.githubusercontent.com/u/7598892?v=4", "events_url": "https://api.github.com/users/beruhan/events{/privacy}", "followers_url": "https://api.github.com/users/beruhan/followers", "following_url": "https://api.github.com/users/beruhan/following{/other_user}", "gists_url": "https://api.github.com/users/beruhan/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/beruhan", "id": 7598892, "login": "beruhan", "node_id": "MDQ6VXNlcjc1OTg4OTI=", "organizations_url": "https://api.github.com/users/beruhan/orgs", "received_events_url": "https://api.github.com/users/beruhan/received_events", "repos_url": "https://api.github.com/users/beruhan/repos", "site_admin": false, "starred_url": "https://api.github.com/users/beruhan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/beruhan/subscriptions", "type": "User", "url": "https://api.github.com/users/beruhan", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4438/reactions" }
https://api.github.com/repos/psf/requests/issues/4438/timeline
null
completed
null
null
false
[ "Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here.\r\n\r\n---\r\n\r\nI would point out that my browser and...
https://api.github.com/repos/psf/requests/issues/4437
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4437/labels{/name}
https://api.github.com/repos/psf/requests/issues/4437/comments
https://api.github.com/repos/psf/requests/issues/4437/events
https://github.com/psf/requests/issues/4437
284,206,838
MDU6SXNzdWUyODQyMDY4Mzg=
4,437
Add bearer token to requests.auth?
{ "avatar_url": "https://avatars.githubusercontent.com/u/5485798?v=4", "events_url": "https://api.github.com/users/richtier/events{/privacy}", "followers_url": "https://api.github.com/users/richtier/followers", "following_url": "https://api.github.com/users/richtier/following{/other_user}", "gists_url": "https://api.github.com/users/richtier/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/richtier", "id": 5485798, "login": "richtier", "node_id": "MDQ6VXNlcjU0ODU3OTg=", "organizations_url": "https://api.github.com/users/richtier/orgs", "received_events_url": "https://api.github.com/users/richtier/received_events", "repos_url": "https://api.github.com/users/richtier/repos", "site_admin": false, "starred_url": "https://api.github.com/users/richtier/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/richtier/subscriptions", "type": "User", "url": "https://api.github.com/users/richtier", "user_view_type": "public" }
[]
closed
true
null
[]
null
7
2017-12-22T16:49:08Z
2021-08-30T00:06:22Z
2018-03-27T19:53:26Z
NONE
resolved
in `request.auth` there is `HTTPBasicAuth` , `HTTPProxyAuth`, and `HTTPDigestAuth`, but no `HTTPBearerAuth` - for bearer authentication. It would look something like this: ``` class HTTPBearerAuth(requests.auth.AuthBase): def __init__(self, token): self.token = token def __eq__(self, other): return self.token == getattr(other, 'token', None) def __ne__(self, other): return not self == other def __call__(self, r): r.headers['Authorization'] = 'Bearer ' + self.token return r ``` Is there a reason to not add bearer auth to the codebase?
{ "avatar_url": "https://avatars.githubusercontent.com/u/5485798?v=4", "events_url": "https://api.github.com/users/richtier/events{/privacy}", "followers_url": "https://api.github.com/users/richtier/followers", "following_url": "https://api.github.com/users/richtier/following{/other_user}", "gists_url": "https://api.github.com/users/richtier/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/richtier", "id": 5485798, "login": "richtier", "node_id": "MDQ6VXNlcjU0ODU3OTg=", "organizations_url": "https://api.github.com/users/richtier/orgs", "received_events_url": "https://api.github.com/users/richtier/received_events", "repos_url": "https://api.github.com/users/richtier/repos", "site_admin": false, "starred_url": "https://api.github.com/users/richtier/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/richtier/subscriptions", "type": "User", "url": "https://api.github.com/users/richtier", "user_view_type": "public" }
{ "+1": 16, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 16, "url": "https://api.github.com/repos/psf/requests/issues/4437/reactions" }
https://api.github.com/repos/psf/requests/issues/4437/timeline
null
completed
null
null
false
[ "Hi @richtier thanks for opening this.\r\n\r\n> Is there a reason to not add bearer auth to the codebase?\r\n\r\nThe main reasons are the following:\r\n\r\n1. because Bearer authentication is so terribly simple that it can be implemented as above easily (or even more simply, really)\r\n2. because we're under a fair...
https://api.github.com/repos/psf/requests/issues/4436
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4436/labels{/name}
https://api.github.com/repos/psf/requests/issues/4436/comments
https://api.github.com/repos/psf/requests/issues/4436/events
https://github.com/psf/requests/issues/4436
283,844,573
MDU6SXNzdWUyODM4NDQ1NzM=
4,436
SSLError: HTTPSConnectionPool(host='www.recruit.com.hk', port=443): Max retries exceeded with url: /jobseeker/JobDetail.aspx?jobOrder=L04146652 (Caused by SSLError(SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')",),))
{ "avatar_url": "https://avatars.githubusercontent.com/u/8072787?v=4", "events_url": "https://api.github.com/users/cecilialee/events{/privacy}", "followers_url": "https://api.github.com/users/cecilialee/followers", "following_url": "https://api.github.com/users/cecilialee/following{/other_user}", "gists_url": "https://api.github.com/users/cecilialee/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/cecilialee", "id": 8072787, "login": "cecilialee", "node_id": "MDQ6VXNlcjgwNzI3ODc=", "organizations_url": "https://api.github.com/users/cecilialee/orgs", "received_events_url": "https://api.github.com/users/cecilialee/received_events", "repos_url": "https://api.github.com/users/cecilialee/repos", "site_admin": false, "starred_url": "https://api.github.com/users/cecilialee/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/cecilialee/subscriptions", "type": "User", "url": "https://api.github.com/users/cecilialee", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2017-12-21T10:54:11Z
2021-09-08T05:00:40Z
2017-12-25T12:13:21Z
NONE
resolved
I'm making a very simple `get()` request but it throws the SSL error. The error message is very long and after searching around, I can't find anything that's helpful. Please help :( ## Expected Result No exception. ## Actual Result ``` SSLError: HTTPSConnectionPool(host='www.recruit.com.hk', port=443): Max retries exceeded with url: /jobseeker/JobDetail.aspx?jobOrder=L04146652 (Caused by SSLError(SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')",),)) ``` ## Reproduction Steps The link that I'm requesting is a turnstile. It will jump immediately to another link, which is `https://www.recruit.com.hk/jobseeker/JobDetail.aspx?jobOrder=L04146652`. ```python import requests requests.get('https://www.indeed.hk/rc/clk?jk=ab794b2879313f04&fccid=a659206a7e1afa15') ``` ``` Traceback (most recent call last): File "<input>", line 1, in <module> File "/Users/cecilialee/anaconda/envs/py2/lib/python2.7/site-packages/requests/api.py", line 72, in get return request('get', url, params=params, **kwargs) File "/Users/cecilialee/anaconda/envs/py2/lib/python2.7/site-packages/requests/api.py", line 58, in request return session.request(method=method, url=url, **kwargs) File "/Users/cecilialee/anaconda/envs/py2/lib/python2.7/site-packages/requests/sessions.py", line 508, in request resp = self.send(prep, **send_kwargs) File "/Users/cecilialee/anaconda/envs/py2/lib/python2.7/site-packages/requests/sessions.py", line 640, in send history = [resp for resp in gen] if allow_redirects else [] File "/Users/cecilialee/anaconda/envs/py2/lib/python2.7/site-packages/requests/sessions.py", line 218, in resolve_redirects **adapter_kwargs File "/Users/cecilialee/anaconda/envs/py2/lib/python2.7/site-packages/requests/sessions.py", line 618, in send r = adapter.send(request, **kwargs) File "/Users/cecilialee/anaconda/envs/py2/lib/python2.7/site-packages/requests/adapters.py", line 506, in send raise SSLError(e, request=request) SSLError: HTTPSConnectionPool(host='www.recruit.com.hk', port=443): Max retries exceeded with url: /jobseeker/JobDetail.aspx?jobOrder=L04146652 (Caused by SSLError(SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')",),)) ``` ## System Information Python 2.7.14 $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "1.8.1" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "3.6.3" }, "platform": { "release": "16.0.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "100020bf", "version": "17.0.0" }, "requests": { "version": "2.18.4" }, "system_ssl": { "version": "100020cf" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": true } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4436/reactions" }
https://api.github.com/repos/psf/requests/issues/4436/timeline
null
completed
null
null
false
[ "Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here." ]
https://api.github.com/repos/psf/requests/issues/4435
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4435/labels{/name}
https://api.github.com/repos/psf/requests/issues/4435/comments
https://api.github.com/repos/psf/requests/issues/4435/events
https://github.com/psf/requests/issues/4435
283,787,171
MDU6SXNzdWUyODM3ODcxNzE=
4,435
request blocked when i try to request an offline server
{ "avatar_url": "https://avatars.githubusercontent.com/u/10654221?v=4", "events_url": "https://api.github.com/users/ignite-404/events{/privacy}", "followers_url": "https://api.github.com/users/ignite-404/followers", "following_url": "https://api.github.com/users/ignite-404/following{/other_user}", "gists_url": "https://api.github.com/users/ignite-404/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ignite-404", "id": 10654221, "login": "ignite-404", "node_id": "MDQ6VXNlcjEwNjU0MjIx", "organizations_url": "https://api.github.com/users/ignite-404/orgs", "received_events_url": "https://api.github.com/users/ignite-404/received_events", "repos_url": "https://api.github.com/users/ignite-404/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ignite-404/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ignite-404/subscriptions", "type": "User", "url": "https://api.github.com/users/ignite-404", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2017-12-21T06:42:48Z
2021-09-08T05:00:40Z
2017-12-25T12:11:23Z
NONE
resolved
i wrote a program with requests to wake up my site. when i deploy my site,the server can't response. then i saw the requests blocked forever , can't continue next requst again. i have no log,just an appearance
{ "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": 3, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 3, "url": "https://api.github.com/repos/psf/requests/issues/4435/reactions" }
https://api.github.com/repos/psf/requests/issues/4435/timeline
null
completed
null
null
false
[ "Please provide us with the output of\r\n\r\n```\r\npython -m requests.help\r\n```\r\n\r\nIf that is unavailable on your version of Requests please provide some basic information about your system (Python version, operating system, etc)." ]
https://api.github.com/repos/psf/requests/issues/4434
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4434/labels{/name}
https://api.github.com/repos/psf/requests/issues/4434/comments
https://api.github.com/repos/psf/requests/issues/4434/events
https://github.com/psf/requests/issues/4434
283,584,461
MDU6SXNzdWUyODM1ODQ0NjE=
4,434
iOS issue 'No child processes'
{ "avatar_url": "https://avatars.githubusercontent.com/u/13103826?v=4", "events_url": "https://api.github.com/users/mucke5/events{/privacy}", "followers_url": "https://api.github.com/users/mucke5/followers", "following_url": "https://api.github.com/users/mucke5/following{/other_user}", "gists_url": "https://api.github.com/users/mucke5/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mucke5", "id": 13103826, "login": "mucke5", "node_id": "MDQ6VXNlcjEzMTAzODI2", "organizations_url": "https://api.github.com/users/mucke5/orgs", "received_events_url": "https://api.github.com/users/mucke5/received_events", "repos_url": "https://api.github.com/users/mucke5/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mucke5/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mucke5/subscriptions", "type": "User", "url": "https://api.github.com/users/mucke5", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2017-12-20T14:41:42Z
2021-09-08T04:00:43Z
2018-01-30T13:54:14Z
NONE
resolved
I am using Kodi and got the following error. Could you advise me how to solve the issue? System: iOS 9.3.3 | Kodi 17.6 (arm64) File "/var/mobile/Library/Preferences/Kodi/addons/script.module.requests/lib/requests/__init__.py", line 97, in <module> from . import utils File "/var/mobile/Library/Preferences/Kodi/addons/script.module.requests/lib/requests/utils.py", line 42, in <module> if platform.system() == 'Windows': File "/Users/Shared/jenkins/workspace/IOS-ARM64/tools/depends/xbmc-depends/iphoneos8.1_arm64-target/lib/python2.7/platform.py", line 1263, in system File "/Users/Shared/jenkins/workspace/IOS-ARM64/tools/depends/xbmc-depends/iphoneos8.1_arm64-target/lib/python2.7/platform.py", line 1230, in uname File "/Users/Shared/jenkins/workspace/IOS-ARM64/tools/depends/xbmc-depends/iphoneos8.1_arm64-target/lib/python2.7/platform.py", line 965, in _syscmd_uname IOError: (10, 'No child processes')
{ "avatar_url": "https://avatars.githubusercontent.com/u/13103826?v=4", "events_url": "https://api.github.com/users/mucke5/events{/privacy}", "followers_url": "https://api.github.com/users/mucke5/followers", "following_url": "https://api.github.com/users/mucke5/following{/other_user}", "gists_url": "https://api.github.com/users/mucke5/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mucke5", "id": 13103826, "login": "mucke5", "node_id": "MDQ6VXNlcjEzMTAzODI2", "organizations_url": "https://api.github.com/users/mucke5/orgs", "received_events_url": "https://api.github.com/users/mucke5/received_events", "repos_url": "https://api.github.com/users/mucke5/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mucke5/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mucke5/subscriptions", "type": "User", "url": "https://api.github.com/users/mucke5", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4434/reactions" }
https://api.github.com/repos/psf/requests/issues/4434/timeline
null
completed
null
null
false
[ "This is an odd error. At the moment we're not compatible with iOS and that was never really a target that we defined as wanting to be compatible with. It seems that Kodi doesn't allow python to spawn subprocesses in order to determine the system name. As such, when we try to make decisions based on the Operating S...
https://api.github.com/repos/psf/requests/issues/4433
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4433/labels{/name}
https://api.github.com/repos/psf/requests/issues/4433/comments
https://api.github.com/repos/psf/requests/issues/4433/events
https://github.com/psf/requests/issues/4433
283,152,291
MDU6SXNzdWUyODMxNTIyOTE=
4,433
How to use this library and Android for picture transmission
{ "avatar_url": "https://avatars.githubusercontent.com/u/17872637?v=4", "events_url": "https://api.github.com/users/alanMachineLeraning/events{/privacy}", "followers_url": "https://api.github.com/users/alanMachineLeraning/followers", "following_url": "https://api.github.com/users/alanMachineLeraning/following{/other_user}", "gists_url": "https://api.github.com/users/alanMachineLeraning/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/alanMachineLeraning", "id": 17872637, "login": "alanMachineLeraning", "node_id": "MDQ6VXNlcjE3ODcyNjM3", "organizations_url": "https://api.github.com/users/alanMachineLeraning/orgs", "received_events_url": "https://api.github.com/users/alanMachineLeraning/received_events", "repos_url": "https://api.github.com/users/alanMachineLeraning/repos", "site_admin": false, "starred_url": "https://api.github.com/users/alanMachineLeraning/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/alanMachineLeraning/subscriptions", "type": "User", "url": "https://api.github.com/users/alanMachineLeraning", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2017-12-19T09:11:10Z
2021-09-08T05:00:42Z
2017-12-19T13:28:17Z
NONE
resolved
Summary. ## Expected Result What you expected. ## Actual Result What happened instead. ## Reproduction Steps ```python import requests ``` ## System Information $ python -m requests.help ``` <paste here> ``` This command is only available on Requests v2.16.4 and greater. Otherwise, please provide some basic information about your system (Python version, operating system, &c).
{ "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/4433/reactions" }
https://api.github.com/repos/psf/requests/issues/4433/timeline
null
completed
null
null
false
[ " What do you mean by 'picture transmission'?", "This is not a forum for questions and answers. The place to ask questions for technical help is [StackOverflow](https://stackoverflow.com). Please redirect your discussion there." ]
https://api.github.com/repos/psf/requests/issues/4432
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4432/labels{/name}
https://api.github.com/repos/psf/requests/issues/4432/comments
https://api.github.com/repos/psf/requests/issues/4432/events
https://github.com/psf/requests/issues/4432
282,964,791
MDU6SXNzdWUyODI5NjQ3OTE=
4,432
Just a question
{ "avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4", "events_url": "https://api.github.com/users/ghost/events{/privacy}", "followers_url": "https://api.github.com/users/ghost/followers", "following_url": "https://api.github.com/users/ghost/following{/other_user}", "gists_url": "https://api.github.com/users/ghost/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ghost", "id": 10137, "login": "ghost", "node_id": "MDQ6VXNlcjEwMTM3", "organizations_url": "https://api.github.com/users/ghost/orgs", "received_events_url": "https://api.github.com/users/ghost/received_events", "repos_url": "https://api.github.com/users/ghost/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ghost/subscriptions", "type": "User", "url": "https://api.github.com/users/ghost", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2017-12-18T17:45:53Z
2021-09-08T05:00:41Z
2017-12-19T13:28:23Z
NONE
resolved
How i can avoid url encoding into a post parameter? like: username=not encoded data&password=not encoded data&login=True i tried with: `config={'encode_uri': False}` but it doen't work anymore
{ "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/4432/reactions" }
https://api.github.com/repos/psf/requests/issues/4432/timeline
null
completed
null
null
false
[ "Why don't you want the parameter to be URL encoded? Every server should be able to decode this.", "This is not a forum for questions and answers. The place to ask questions for technical help is [StackOverflow](https://stackoverflow.com). Please redirect your discussion there." ]
https://api.github.com/repos/psf/requests/issues/4431
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4431/labels{/name}
https://api.github.com/repos/psf/requests/issues/4431/comments
https://api.github.com/repos/psf/requests/issues/4431/events
https://github.com/psf/requests/issues/4431
282,828,604
MDU6SXNzdWUyODI4Mjg2MDQ=
4,431
Requests shouldn't send IP Address as SNI.
{ "avatar_url": "https://avatars.githubusercontent.com/u/4143339?v=4", "events_url": "https://api.github.com/users/jicahoo/events{/privacy}", "followers_url": "https://api.github.com/users/jicahoo/followers", "following_url": "https://api.github.com/users/jicahoo/following{/other_user}", "gists_url": "https://api.github.com/users/jicahoo/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jicahoo", "id": 4143339, "login": "jicahoo", "node_id": "MDQ6VXNlcjQxNDMzMzk=", "organizations_url": "https://api.github.com/users/jicahoo/orgs", "received_events_url": "https://api.github.com/users/jicahoo/received_events", "repos_url": "https://api.github.com/users/jicahoo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jicahoo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jicahoo/subscriptions", "type": "User", "url": "https://api.github.com/users/jicahoo", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2017-12-18T10:22:25Z
2021-09-08T05:00:41Z
2017-12-20T07:05:59Z
NONE
resolved
Summary. According to RFC 6066, https://tools.ietf.org/html/rfc6066#section-3, ` Literal IPv4 and IPv6 addresses are not permitted in "HostName".` However, when I send requests like resp = s.get('https://192.168.1.140', verify=False), requests will put 192.168.1.140 in SNI. ## Expected Result Not send SNI when URL are based on literal IP address. ## Actual Result In wireshark, I saw the IP address was put in SNI. ## Reproduction Steps 1. Prepare a HTTPS server at port 4443. 2. Use tcpdump `sudo tcpdump -X -S -s 0 -i lo -w wireshark.log` to capture the packets. 4. Use below script ```python import requests s = requests.Session() resp = s.get('https://127.0.0.1:4443', verify=False) ``` 5. Load wireshare.log to wireshark. You will see the SNI is in SSL request. Please let me know if need more info. Thanks
{ "avatar_url": "https://avatars.githubusercontent.com/u/4143339?v=4", "events_url": "https://api.github.com/users/jicahoo/events{/privacy}", "followers_url": "https://api.github.com/users/jicahoo/followers", "following_url": "https://api.github.com/users/jicahoo/following{/other_user}", "gists_url": "https://api.github.com/users/jicahoo/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jicahoo", "id": 4143339, "login": "jicahoo", "node_id": "MDQ6VXNlcjQxNDMzMzk=", "organizations_url": "https://api.github.com/users/jicahoo/orgs", "received_events_url": "https://api.github.com/users/jicahoo/received_events", "repos_url": "https://api.github.com/users/jicahoo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jicahoo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jicahoo/subscriptions", "type": "User", "url": "https://api.github.com/users/jicahoo", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4431/reactions" }
https://api.github.com/repos/psf/requests/issues/4431/timeline
null
completed
null
null
false
[ "I am trying to build a test https server following the guide in https://anvileight.uk/blog/2016/03/20/simple-http-server-with-python/. For now, I haven't succeeded. ", "You can try to run below Python script and capture network packets using tcpdump.\r\nThe IP Address 140.211.11.105 is got from apache.org. I am ...
https://api.github.com/repos/psf/requests/issues/4430
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4430/labels{/name}
https://api.github.com/repos/psf/requests/issues/4430/comments
https://api.github.com/repos/psf/requests/issues/4430/events
https://github.com/psf/requests/issues/4430
282,547,293
MDU6SXNzdWUyODI1NDcyOTM=
4,430
Cookies lost during multiple redirects
{ "avatar_url": "https://avatars.githubusercontent.com/u/885164?v=4", "events_url": "https://api.github.com/users/batzel/events{/privacy}", "followers_url": "https://api.github.com/users/batzel/followers", "following_url": "https://api.github.com/users/batzel/following{/other_user}", "gists_url": "https://api.github.com/users/batzel/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/batzel", "id": 885164, "login": "batzel", "node_id": "MDQ6VXNlcjg4NTE2NA==", "organizations_url": "https://api.github.com/users/batzel/orgs", "received_events_url": "https://api.github.com/users/batzel/received_events", "repos_url": "https://api.github.com/users/batzel/repos", "site_admin": false, "starred_url": "https://api.github.com/users/batzel/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/batzel/subscriptions", "type": "User", "url": "https://api.github.com/users/batzel", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2017-12-15T21:04:02Z
2021-09-08T05:00:42Z
2017-12-16T07:45:20Z
NONE
resolved
Cookies are lost when set by sites returning redirects. Example: r=requests.get('http://hostA/url1') where url gives multiple redirects, possibly multiple sites. e.g. hostA/url1 -> 302 -> hostB/url2 -> 302 -> HostC/url3 Expectation: r.cookies would have all the cookies set by hostA, hostB, and hostC Actual Result: r.cookies contains only the cookies set by the hostC. The others are lost. Further example from real-world scenario: $ python3 Python 3.6.1 (v3.6.1:69c0db5050, Mar 21 2017, 01:21:04) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import requests >>> r=requests.get('redactedurl') >>> r.history [<Response [302]>, <Response [302]>, <Response [302]>, <Response [302]>] >>> len(r.cookies) 1 >>> ----- >>> r=requests.get('redactedurl', allow_redirects=False) >>> r.cookies <RequestsCookieJar[]> >>> c=r.cookies >>> r.status_code 302 >>> r=requests.get(r.headers.get('location'), allow_redirects=False, cookies=c) >>> r.status_code 302 >>> c.update(r.cookies) >>> r=requests.get(r.headers.get('location'), allow_redirects=False, cookies=c) ... >>> r.status_code 200 >>> c.update(r.cookies) >>> len(c) 3 ## System Information ``` $ python3 -m requests.help { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.1.4" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "3.6.1" }, "platform": { "release": "17.3.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "1010007f", "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/1382556?v=4", "events_url": "https://api.github.com/users/Lukasa/events{/privacy}", "followers_url": "https://api.github.com/users/Lukasa/followers", "following_url": "https://api.github.com/users/Lukasa/following{/other_user}", "gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Lukasa", "id": 1382556, "login": "Lukasa", "node_id": "MDQ6VXNlcjEzODI1NTY=", "organizations_url": "https://api.github.com/users/Lukasa/orgs", "received_events_url": "https://api.github.com/users/Lukasa/received_events", "repos_url": "https://api.github.com/users/Lukasa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions", "type": "User", "url": "https://api.github.com/users/Lukasa", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4430/reactions" }
https://api.github.com/repos/psf/requests/issues/4430/timeline
null
completed
null
null
false
[ "`r.cookies` contains only the cookies set by the most recent response. Use a `Session` and collect the cookies from `Session.cookies`." ]
https://api.github.com/repos/psf/requests/issues/4429
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4429/labels{/name}
https://api.github.com/repos/psf/requests/issues/4429/comments
https://api.github.com/repos/psf/requests/issues/4429/events
https://github.com/psf/requests/issues/4429
282,290,005
MDU6SXNzdWUyODIyOTAwMDU=
4,429
What's the meaning of the homepage image?
{ "avatar_url": "https://avatars.githubusercontent.com/u/16239566?v=4", "events_url": "https://api.github.com/users/lightning-zgc/events{/privacy}", "followers_url": "https://api.github.com/users/lightning-zgc/followers", "following_url": "https://api.github.com/users/lightning-zgc/following{/other_user}", "gists_url": "https://api.github.com/users/lightning-zgc/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lightning-zgc", "id": 16239566, "login": "lightning-zgc", "node_id": "MDQ6VXNlcjE2MjM5NTY2", "organizations_url": "https://api.github.com/users/lightning-zgc/orgs", "received_events_url": "https://api.github.com/users/lightning-zgc/received_events", "repos_url": "https://api.github.com/users/lightning-zgc/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lightning-zgc/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lightning-zgc/subscriptions", "type": "User", "url": "https://api.github.com/users/lightning-zgc", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2017-12-15T01:11:02Z
2021-09-08T05:00:37Z
2018-01-07T21:33:08Z
NONE
resolved
What's the meaning of this: ![68747470733a2f2f6661726d352e737461746963666c69636b722e636f6d2f343331372f33353139383338363337345f313933396166336465365f6b5f642e6a7067](https://user-images.githubusercontent.com/16239566/34022048-f8ea84be-e177-11e7-863b-c8ee5f79fab4.jpeg)
{ "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/4429/reactions" }
https://api.github.com/repos/psf/requests/issues/4429/timeline
null
completed
null
null
false
[ "A butterfly at the waterline?", "Hey @lightning-zgc, the photos you see throughout the Requests docs are taken by Kenneth Reitz. You'll find things like this in most of the documentation for projects he started, and it's mostly there for aesthetic purposes. Hopefully that helps answer your question!\r\n\r\nFor f...
https://api.github.com/repos/psf/requests/issues/4428
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4428/labels{/name}
https://api.github.com/repos/psf/requests/issues/4428/comments
https://api.github.com/repos/psf/requests/issues/4428/events
https://github.com/psf/requests/pull/4428
281,610,897
MDExOlB1bGxSZXF1ZXN0MTU3OTkzNjk4
4,428
Reuse session SSLContexts for same TLS settings
{ "avatar_url": "https://avatars.githubusercontent.com/u/34075110?v=4", "events_url": "https://api.github.com/users/jmcackles/events{/privacy}", "followers_url": "https://api.github.com/users/jmcackles/followers", "following_url": "https://api.github.com/users/jmcackles/following{/other_user}", "gists_url": "https://api.github.com/users/jmcackles/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jmcackles", "id": 34075110, "login": "jmcackles", "node_id": "MDQ6VXNlcjM0MDc1MTEw", "organizations_url": "https://api.github.com/users/jmcackles/orgs", "received_events_url": "https://api.github.com/users/jmcackles/received_events", "repos_url": "https://api.github.com/users/jmcackles/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jmcackles/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jmcackles/subscriptions", "type": "User", "url": "https://api.github.com/users/jmcackles", "user_view_type": "public" }
[]
closed
false
null
[]
{ "closed_at": null, "closed_issues": 29, "created_at": "2024-05-19T18:29:04Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4", "events_url": "https://api.github.com/users/sethmlarson/events{/privacy}", "followers_url": "https://api.github.com/users/sethmlarson/followers", "following_url": "https://api.github.com/users/sethmlarson/following{/other_user}", "gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sethmlarson", "id": 18519037, "login": "sethmlarson", "node_id": "MDQ6VXNlcjE4NTE5MDM3", "organizations_url": "https://api.github.com/users/sethmlarson/orgs", "received_events_url": "https://api.github.com/users/sethmlarson/received_events", "repos_url": "https://api.github.com/users/sethmlarson/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions", "type": "User", "url": "https://api.github.com/users/sethmlarson", "user_view_type": "public" }, "description": "", "due_on": null, "html_url": "https://github.com/psf/requests/milestone/34", "id": 11073254, "labels_url": "https://api.github.com/repos/psf/requests/milestones/34/labels", "node_id": "MI_kwDOABTKOs4AqPbm", "number": 34, "open_issues": 0, "state": "open", "title": "Bankruptcy", "updated_at": "2024-05-20T14:37:16Z", "url": "https://api.github.com/repos/psf/requests/milestones/34" }
4
2017-12-13T03:09:31Z
2024-05-20T14:35:40Z
2024-05-20T14:35:40Z
NONE
null
Creates SSLContext objects in HTTPAdapter and uses a single SSLContext for connections with the same TLS settings (ca_cert_dir, ca_certs, cert_file, and key_file). This is another try for https://github.com/requests/requests/issues/4322
{ "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/4428/reactions" }
https://api.github.com/repos/psf/requests/issues/4428/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4428.diff", "html_url": "https://github.com/psf/requests/pull/4428", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/4428.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4428" }
true
[ "My best guess is that the failure is related to https://bugs.python.org/issue9949, but I'm really not sure. The test is failing because using a relative path and absolute path to the same cert file creates 2 different SSLContexts in the windows tests. I'm not sure if this is an important case, but I had added a ...
https://api.github.com/repos/psf/requests/issues/4427
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4427/labels{/name}
https://api.github.com/repos/psf/requests/issues/4427/comments
https://api.github.com/repos/psf/requests/issues/4427/events
https://github.com/psf/requests/pull/4427
281,417,905
MDExOlB1bGxSZXF1ZXN0MTU3ODUyNzUx
4,427
Use hostname not netloc
{ "avatar_url": "https://avatars.githubusercontent.com/u/839885?v=4", "events_url": "https://api.github.com/users/ddormer/events{/privacy}", "followers_url": "https://api.github.com/users/ddormer/followers", "following_url": "https://api.github.com/users/ddormer/following{/other_user}", "gists_url": "https://api.github.com/users/ddormer/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ddormer", "id": 839885, "login": "ddormer", "node_id": "MDQ6VXNlcjgzOTg4NQ==", "organizations_url": "https://api.github.com/users/ddormer/orgs", "received_events_url": "https://api.github.com/users/ddormer/received_events", "repos_url": "https://api.github.com/users/ddormer/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ddormer/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ddormer/subscriptions", "type": "User", "url": "https://api.github.com/users/ddormer", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2017-12-12T15:08:10Z
2021-09-04T00:06:33Z
2018-01-16T14:07:27Z
CONTRIBUTOR
resolved
Fixes #4275 and fixes #4158 by passing only the hostname/IP to urllib's `proxy_bypass` function which was timing out further down in `socket.gethostbyname` when passed a hostname or IP that contained authentication credentials. While fixing the parameter passed to `proxy_bypass`, I also took the chance to replace other uses of `netloc` with `hostname` in the `should_bypass_function`.
{ "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/4427/reactions" }
https://api.github.com/repos/psf/requests/issues/4427/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4427.diff", "html_url": "https://github.com/psf/requests/pull/4427", "merged_at": "2018-01-16T14:07:26Z", "patch_url": "https://github.com/psf/requests/pull/4427.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4427" }
true
[ "# [Codecov](https://codecov.io/gh/requests/requests/pull/4427?src=pr&el=h1) Report\n> Merging [#4427](https://codecov.io/gh/requests/requests/pull/4427?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/020f96577f8f44d06acc1ab699a7638653d91bd0?src=pr&el=desc) will **not change** coverage....
https://api.github.com/repos/psf/requests/issues/4426
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4426/labels{/name}
https://api.github.com/repos/psf/requests/issues/4426/comments
https://api.github.com/repos/psf/requests/issues/4426/events
https://github.com/psf/requests/issues/4426
281,267,677
MDU6SXNzdWUyODEyNjc2Nzc=
4,426
Making a post to a server on localhost is slow
{ "avatar_url": "https://avatars.githubusercontent.com/u/191903?v=4", "events_url": "https://api.github.com/users/JesseAldridge/events{/privacy}", "followers_url": "https://api.github.com/users/JesseAldridge/followers", "following_url": "https://api.github.com/users/JesseAldridge/following{/other_user}", "gists_url": "https://api.github.com/users/JesseAldridge/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/JesseAldridge", "id": 191903, "login": "JesseAldridge", "node_id": "MDQ6VXNlcjE5MTkwMw==", "organizations_url": "https://api.github.com/users/JesseAldridge/orgs", "received_events_url": "https://api.github.com/users/JesseAldridge/received_events", "repos_url": "https://api.github.com/users/JesseAldridge/repos", "site_admin": false, "starred_url": "https://api.github.com/users/JesseAldridge/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/JesseAldridge/subscriptions", "type": "User", "url": "https://api.github.com/users/JesseAldridge", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2017-12-12T06:01:20Z
2021-09-08T05:00:41Z
2017-12-12T06:11:09Z
NONE
resolved
Question posted here: https://stackoverflow.com/questions/47766158/why-is-python-requests-to-localhost-slow Basically I have a trival server running locally. When I use requests to do a post to it it takes a few seconds to respond. ## Expected Result A sub-second response ## Actual Result A pause of a few seconds before a response ## Reproduction Steps See code shared on https://stackoverflow.com/questions/47766158/why-is-python-requests-to-localhost-slow ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "1.8.1" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "2.7.10" }, "platform": { "release": "17.2.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "1010005f", "version": "17.0.0" }, "requests": { "version": "2.18.4" }, "system_ssl": { "version": "20000000" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": true } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/191903?v=4", "events_url": "https://api.github.com/users/JesseAldridge/events{/privacy}", "followers_url": "https://api.github.com/users/JesseAldridge/followers", "following_url": "https://api.github.com/users/JesseAldridge/following{/other_user}", "gists_url": "https://api.github.com/users/JesseAldridge/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/JesseAldridge", "id": 191903, "login": "JesseAldridge", "node_id": "MDQ6VXNlcjE5MTkwMw==", "organizations_url": "https://api.github.com/users/JesseAldridge/orgs", "received_events_url": "https://api.github.com/users/JesseAldridge/received_events", "repos_url": "https://api.github.com/users/JesseAldridge/repos", "site_admin": false, "starred_url": "https://api.github.com/users/JesseAldridge/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/JesseAldridge/subscriptions", "type": "User", "url": "https://api.github.com/users/JesseAldridge", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4426/reactions" }
https://api.github.com/repos/psf/requests/issues/4426/timeline
null
completed
null
null
false
[ "Ah nevermind. Issue resolved instantly. Got to love Stackoverflow.", "I want to know why this happens.\r\nCan anyone help?\r\n\r\nI was able to make a **100x** speedup changing `\"localhost\"` to `\"127.0.0.1\"`.", "@cprogrammer1994 we use DNS in the case when we're not given an IP Address. localhost is plen...
https://api.github.com/repos/psf/requests/issues/4425
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4425/labels{/name}
https://api.github.com/repos/psf/requests/issues/4425/comments
https://api.github.com/repos/psf/requests/issues/4425/events
https://github.com/psf/requests/issues/4425
281,148,349
MDU6SXNzdWUyODExNDgzNDk=
4,425
Address deleting cookies when domain-less defaults are used.
{ "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
4
2017-12-11T20:00:10Z
2017-12-12T23:00:17Z
null
CONTRIBUTOR
null
I found a few variations of this "implementation detail" in other reports, but I believe this particular use case is worth addressing. If a URL is retrieved with either a dict or unqualified cookie jar, the deletions are ignored. # use a dict resp = requests.get(url, cookies={'cookie1': 'value'},) or # use a cookiejar session1 = requests.Session() session1.cookies = requests.cookies.RequestsCookieJar() session1.cookies.set('foo', 'bar') resp1 = requests.get(url) This can create endless redirect loops if the server's response to a resource/url combination is to set a "delete cookie", which requests can not handle. Aside from failing tests and puzzled developers, this can trigger abuse flags with 3rd party api services. ## Expected Result If the server sends a cookie deletion value, it should be respected and not sent to the server. ## Actual Result passing a 'cookies=" dict to `requests.get()` creates a wrapped session with the default cookiejar. the current implementation just deletes any matching cookie for the domain, which fails because the cookie was set as a default (not for that domain). ## Potential Way To Fix A potential fix is to extend the RequestsCookieJar to use a blacklist when domain-less defaults are provided. When a SetCookie deletion is encountered and the cookiejar contains domain-less cookies: * delete the domain cookie (if it exists) * and populate the blacklist. When a request is made, filter the defaults against active blacklist values. When a SetCookie update is made, remove it from the blacklist (or update the blacklist's to note it as invalid until the cookie's expiry date) ## Reproduction Steps ```python import requests # cookies not unset session1 = requests.Session() session1.cookies = requests.cookies.RequestsCookieJar() session1.cookies.set('foo', 'bar') r_set = session1.get("http://httpbin.org/cookies/set?bar=foo") print(r_set.json()) r_del = session1.get("http://httpbin.org/cookies/delete?foo=bar") print(r_del.json()) r_check = session1.get("http://httpbin.org/cookies") print(r_check.json()) # cookies unset because domain matches session2 = requests.Session() session2.cookies = requests.cookies.RequestsCookieJar() session2.cookies.set('foo', 'bar', domain='httpbin.org', path='/') rr_set = session2.get("http://httpbin.org/cookies/set?bar=foo") print(rr_set.json()) rr_del = session2.get("http://httpbin.org/cookies/delete?foo=bar") print(rr_del.json()) rr_check = session2.get("http://httpbin.org/cookies") print(rr_check.json()) ``` ## System Information "version": "2.18.4"
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/4425/reactions" }
https://api.github.com/repos/psf/requests/issues/4425/timeline
null
null
null
null
false
[ "Thanks for this @jvanasco \r\n\r\nI had started hacking on a branch that would make the domain and path required with our cookie jar and probably provide a better interface to all of this in general. Sadly, I think that got lost in the suffle and I'd forgotten it. The API design change needs to be made for v3.0 to...
https://api.github.com/repos/psf/requests/issues/4424
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4424/labels{/name}
https://api.github.com/repos/psf/requests/issues/4424/comments
https://api.github.com/repos/psf/requests/issues/4424/events
https://github.com/psf/requests/pull/4424
281,066,500
MDExOlB1bGxSZXF1ZXN0MTU3NTk5NDQx
4,424
Fix: Removed incorrect plural of 'status'
{ "avatar_url": "https://avatars.githubusercontent.com/u/8420509?v=4", "events_url": "https://api.github.com/users/SHSauler/events{/privacy}", "followers_url": "https://api.github.com/users/SHSauler/followers", "following_url": "https://api.github.com/users/SHSauler/following{/other_user}", "gists_url": "https://api.github.com/users/SHSauler/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/SHSauler", "id": 8420509, "login": "SHSauler", "node_id": "MDQ6VXNlcjg0MjA1MDk=", "organizations_url": "https://api.github.com/users/SHSauler/orgs", "received_events_url": "https://api.github.com/users/SHSauler/received_events", "repos_url": "https://api.github.com/users/SHSauler/repos", "site_admin": false, "starred_url": "https://api.github.com/users/SHSauler/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/SHSauler/subscriptions", "type": "User", "url": "https://api.github.com/users/SHSauler", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2017-12-11T15:51:45Z
2021-09-04T00:06:36Z
2017-12-12T13:03:17Z
NONE
resolved
The plural of `status` is `statuses` or `statūs`. Please disregard if it's here for a particular reason. https://en.wiktionary.org/wiki/status#English https://en.wiktionary.org/wiki/status#Etymology_2_2
{ "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/4424/reactions" }
https://api.github.com/repos/psf/requests/issues/4424/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4424.diff", "html_url": "https://github.com/psf/requests/pull/4424", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/4424.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4424" }
true
[ "# [Codecov](https://codecov.io/gh/requests/requests/pull/4424?src=pr&el=h1) Report\n> Merging [#4424](https://codecov.io/gh/requests/requests/pull/4424?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/24092b11d74af0a766d9cc616622f38adb0044b9?src=pr&el=desc) will **increase** coverage by...
https://api.github.com/repos/psf/requests/issues/4423
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4423/labels{/name}
https://api.github.com/repos/psf/requests/issues/4423/comments
https://api.github.com/repos/psf/requests/issues/4423/events
https://github.com/psf/requests/issues/4423
280,873,561
MDU6SXNzdWUyODA4NzM1NjE=
4,423
urllib3 Which file is in it ThankYou
{ "avatar_url": "https://avatars.githubusercontent.com/u/21980348?v=4", "events_url": "https://api.github.com/users/apple-han/events{/privacy}", "followers_url": "https://api.github.com/users/apple-han/followers", "following_url": "https://api.github.com/users/apple-han/following{/other_user}", "gists_url": "https://api.github.com/users/apple-han/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/apple-han", "id": 21980348, "login": "apple-han", "node_id": "MDQ6VXNlcjIxOTgwMzQ4", "organizations_url": "https://api.github.com/users/apple-han/orgs", "received_events_url": "https://api.github.com/users/apple-han/received_events", "repos_url": "https://api.github.com/users/apple-han/repos", "site_admin": false, "starred_url": "https://api.github.com/users/apple-han/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/apple-han/subscriptions", "type": "User", "url": "https://api.github.com/users/apple-han", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2017-12-11T02:12:02Z
2021-09-08T05:00:44Z
2017-12-11T13:09:43Z
NONE
resolved
Summary. ## Expected Result What you expected. ## Actual Result What happened instead. ## Reproduction Steps ```python import requests ``` ## System Information $ python -m requests.help ``` <paste here> ``` This command is only available on Requests v2.16.4 and greater. Otherwise, please provide some basic information about your system (Python version, operating system, &c).
{ "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/4423/reactions" }
https://api.github.com/repos/psf/requests/issues/4423/timeline
null
completed
null
null
false
[]
https://api.github.com/repos/psf/requests/issues/4422
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4422/labels{/name}
https://api.github.com/repos/psf/requests/issues/4422/comments
https://api.github.com/repos/psf/requests/issues/4422/events
https://github.com/psf/requests/issues/4422
280,870,542
MDU6SXNzdWUyODA4NzA1NDI=
4,422
python requests post to url query parameter requires special character
{ "avatar_url": "https://avatars.githubusercontent.com/u/4407747?v=4", "events_url": "https://api.github.com/users/methodmenon/events{/privacy}", "followers_url": "https://api.github.com/users/methodmenon/followers", "following_url": "https://api.github.com/users/methodmenon/following{/other_user}", "gists_url": "https://api.github.com/users/methodmenon/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/methodmenon", "id": 4407747, "login": "methodmenon", "node_id": "MDQ6VXNlcjQ0MDc3NDc=", "organizations_url": "https://api.github.com/users/methodmenon/orgs", "received_events_url": "https://api.github.com/users/methodmenon/received_events", "repos_url": "https://api.github.com/users/methodmenon/repos", "site_admin": false, "starred_url": "https://api.github.com/users/methodmenon/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/methodmenon/subscriptions", "type": "User", "url": "https://api.github.com/users/methodmenon", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2017-12-11T01:47:38Z
2021-09-08T05:00:43Z
2017-12-11T13:14:08Z
NONE
resolved
Summary. I am using python requests to submit a post request to a specific url. This url has a query parameter that contains the actual filepath of the file I am uplaoding, with the actual colon (':') and backslashes('\') (it will not accept %3A, or %5C). I have no idea what to do. Here is my code: ``` with requests.Session() as s: payload_10_vo_params = { 'hidInputControlValues': this_hidInputControlValues10, 'hidFormNames': this_hidFormNames10, 'hidToken': this_hidToken10, 'hidFileNm': r"C:\fakepath\{}".format(this_FileName), 'hidFileSourceId': '', 'ReUploadInd': '' } payload10_mpe_vo = MultipartEncoder( [ ('hidLoanTranSaveFlag', 'TRUE'), ('hidUpfrontMIPct', ''), ('radLeadRequestOptBtnImportRetNum', 'LUPL'), ('txtCorrCompId', ''), ('cboLeadRequestFileTypCd', 'DU32'), ('txtLeadRequestSelectFile', (this_FileName, open(this_FileName, 'rb'), 'application/octet-stream')), ('txaLoanTranComments', ''), ], boundary=ct_disp_bndry_10_final_str) headers10 = { "Accept": "application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, */*", "Accept-Language": "en-US", "User-Agent": "Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 6.1; Win64; x64; Trident/7.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; Tablet PC 2.0)", "UA-CPU": "AMD64", "Content-Type": "multipart/form-data; boundary={}".format(ct_disp_bndry_10_final_str), "Referer": "referer string", "Host": "host string"} resp10 = s.post(url10, headers=headers10, params=payload_10_vo_params, data=payload10_mpe_vo) ``` POST request from fiddler: ``` POST /SRVCorrBP/LeadMgmt/Application/Lead/LeadSubmitNew.jsp?hidInputControlValues=�DU32�Y�LUPL�C%3A%5CFAKEPATH%5CMAYRA%20CORTEZ.FNM�&hidFormNames=�frmLoanTran~TRUE~�&hidToken=1508961847871LSXG_EDTLeadSummary&hidFileNm=C:\fakepath\filename&hidFileSourceId=&ReUploadInd= ``` This is what I get instead: ``` /SRVCorrBP/LeadMgmt/Application/Lead/LeadSubmitNew.jsp?hidInputControlValues=%C2%A7DU32%C2%A7Y%C2%A7LUPL%C2%A7C%3A%5CFAKEPATH%5CBOPPPMVO.FNM%C2%A7&hidFormNames=%C2%A7frmLoanTran~TRUE~%C2%A7&hidToken=1512952710233LSXG_EDTLeadSummary&hidFileNm=C%3A%5Cfakepath%5Cfilename&hidFileSourceId=&ReUploadInd= ``` As you can see, the `hidFileNm` parameter is supposed to be `hidFileNm=hidFileNm=C:\fakepath\filename` But my request is posting as: `hidFileNm=C%3A%5Cfakepath%5Cfilename`
{ "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/4422/reactions" }
https://api.github.com/repos/psf/requests/issues/4422/timeline
null
completed
null
null
false
[ "Here's the problem, if your server won't accept a request that follows the RFC, there's little that we can actually do to fix this in Requests. Since Requests is doing the right thing here, I suggest you contact the server owner to fix their specification incompatible server. To get this working in the interim, I ...
https://api.github.com/repos/psf/requests/issues/4421
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4421/labels{/name}
https://api.github.com/repos/psf/requests/issues/4421/comments
https://api.github.com/repos/psf/requests/issues/4421/events
https://github.com/psf/requests/pull/4421
280,845,822
MDExOlB1bGxSZXF1ZXN0MTU3NDUwMzk5
4,421
Reuse session SSLContexts for same TLS settings
{ "avatar_url": "https://avatars.githubusercontent.com/u/34075110?v=4", "events_url": "https://api.github.com/users/jmcackles/events{/privacy}", "followers_url": "https://api.github.com/users/jmcackles/followers", "following_url": "https://api.github.com/users/jmcackles/following{/other_user}", "gists_url": "https://api.github.com/users/jmcackles/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jmcackles", "id": 34075110, "login": "jmcackles", "node_id": "MDQ6VXNlcjM0MDc1MTEw", "organizations_url": "https://api.github.com/users/jmcackles/orgs", "received_events_url": "https://api.github.com/users/jmcackles/received_events", "repos_url": "https://api.github.com/users/jmcackles/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jmcackles/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jmcackles/subscriptions", "type": "User", "url": "https://api.github.com/users/jmcackles", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2017-12-10T21:17:12Z
2021-09-04T00:06:37Z
2017-12-10T21:31:04Z
NONE
resolved
Creates SSLContext objects in HTTPAdapter and uses a single SSLContext for connections with the same TLS settings (ca_cert_dir, ca_certs, cert_file, and key_file). This is for https://github.com/requests/requests/issues/4322.
{ "avatar_url": "https://avatars.githubusercontent.com/u/34075110?v=4", "events_url": "https://api.github.com/users/jmcackles/events{/privacy}", "followers_url": "https://api.github.com/users/jmcackles/followers", "following_url": "https://api.github.com/users/jmcackles/following{/other_user}", "gists_url": "https://api.github.com/users/jmcackles/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jmcackles", "id": 34075110, "login": "jmcackles", "node_id": "MDQ6VXNlcjM0MDc1MTEw", "organizations_url": "https://api.github.com/users/jmcackles/orgs", "received_events_url": "https://api.github.com/users/jmcackles/received_events", "repos_url": "https://api.github.com/users/jmcackles/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jmcackles/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jmcackles/subscriptions", "type": "User", "url": "https://api.github.com/users/jmcackles", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4421/reactions" }
https://api.github.com/repos/psf/requests/issues/4421/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4421.diff", "html_url": "https://github.com/psf/requests/pull/4421", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/4421.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4421" }
true
[]
https://api.github.com/repos/psf/requests/issues/4420
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4420/labels{/name}
https://api.github.com/repos/psf/requests/issues/4420/comments
https://api.github.com/repos/psf/requests/issues/4420/events
https://github.com/psf/requests/issues/4420
280,738,054
MDU6SXNzdWUyODA3MzgwNTQ=
4,420
headers not retained when a custom authentication method is used with request.session
{ "avatar_url": "https://avatars.githubusercontent.com/u/5459596?v=4", "events_url": "https://api.github.com/users/johaven/events{/privacy}", "followers_url": "https://api.github.com/users/johaven/followers", "following_url": "https://api.github.com/users/johaven/following{/other_user}", "gists_url": "https://api.github.com/users/johaven/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/johaven", "id": 5459596, "login": "johaven", "node_id": "MDQ6VXNlcjU0NTk1OTY=", "organizations_url": "https://api.github.com/users/johaven/orgs", "received_events_url": "https://api.github.com/users/johaven/received_events", "repos_url": "https://api.github.com/users/johaven/repos", "site_admin": false, "starred_url": "https://api.github.com/users/johaven/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/johaven/subscriptions", "type": "User", "url": "https://api.github.com/users/johaven", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2017-12-09T17:36:24Z
2021-09-08T05:00:44Z
2017-12-09T19:01:07Z
NONE
resolved
## standard request ```python r = requests.post(url, auth=JWTAuth('token'), timeout=self.connect_timeout, verify=self.sslcheck, proxies=self.proxies) ``` ## standard request headers on server side ``` Host: 127.0.0.1:5000 Connection: keep-alive Accept-Encoding: gzip, deflate Accept: */* User-Agent: python-requests/2.18.4 Content-Length: 39 Content-Type: application/json ``` ## session request ```python self.session.auth = JWTAuth('token') r = self.session.post(url, json=json, allow_redirects=False, stream=False, timeout=(self.connect_timeout, read_timeout)) ``` ## session request headers on server side ``` Host: 127.0.0.1:5000 Accept-Encoding: identity Content-Length: 81 Authorization: Bearer .... ``` In this case no headers are kept ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "2.7.10" }, "platform": { "release": "16.7.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.18.4" }, "system_ssl": { "version": "9081df" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": false } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/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/4420/reactions" }
https://api.github.com/repos/psf/requests/issues/4420/timeline
null
completed
null
null
false
[ "After a little more digging ... \r\nWhen custom authentification is used with session, no headers is kept.\r\n```python\r\nclass JWTAuth(AuthBase):\r\n \"\"\"Attaches HTTP Pizza Authentication to the given Request object.\"\"\"\r\n def __init__(self, token):\r\n # setup any auth-related data here\r\n ...
https://api.github.com/repos/psf/requests/issues/4419
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4419/labels{/name}
https://api.github.com/repos/psf/requests/issues/4419/comments
https://api.github.com/repos/psf/requests/issues/4419/events
https://github.com/psf/requests/issues/4419
280,731,458
MDU6SXNzdWUyODA3MzE0NTg=
4,419
requests.exceptions.ProxyError: HTTPSConnectionPool: Failed to establish a new connection
{ "avatar_url": "https://avatars.githubusercontent.com/u/13938550?v=4", "events_url": "https://api.github.com/users/vThinkBeyondVM/events{/privacy}", "followers_url": "https://api.github.com/users/vThinkBeyondVM/followers", "following_url": "https://api.github.com/users/vThinkBeyondVM/following{/other_user}", "gists_url": "https://api.github.com/users/vThinkBeyondVM/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/vThinkBeyondVM", "id": 13938550, "login": "vThinkBeyondVM", "node_id": "MDQ6VXNlcjEzOTM4NTUw", "organizations_url": "https://api.github.com/users/vThinkBeyondVM/orgs", "received_events_url": "https://api.github.com/users/vThinkBeyondVM/received_events", "repos_url": "https://api.github.com/users/vThinkBeyondVM/repos", "site_admin": false, "starred_url": "https://api.github.com/users/vThinkBeyondVM/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/vThinkBeyondVM/subscriptions", "type": "User", "url": "https://api.github.com/users/vThinkBeyondVM", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2017-12-09T16:10:55Z
2021-09-05T00:06:55Z
2017-12-10T01:06:37Z
NONE
resolved
Last week I started exploring requests library for invoking REST APIs, it was working fine, I was able to make calls as expected but today when I run the same python script, it fails with below error. Please help. My OS: Ubuntu 16.04 Python: Python 2.7.12 requests library version: 2.18.1 Traceback (most recent call last): File "restfilters.py", line 15, in <module> vcsession = vcrest.get_vc_session(vcip,"Administrator","password") File "/home/vmware/vcrest.py", line 19, in get_vc_session s.post('https://'+vcip+'/rest/com/vmware/cis/session',auth=(username,password)) File "/home/vmware/.local/lib/python2.7/site-packages/requests/sessions.py", line 549, in post return self.request('POST', url, data=data, json=json, **kwargs) File "/home/vmware/.local/lib/python2.7/site-packages/requests/sessions.py", line 502, in request resp = self.send(prep, **send_kwargs) File "/home/vmware/.local/lib/python2.7/site-packages/requests/sessions.py", line 612, in send r = adapter.send(request, **kwargs) File "/home/vmware/.local/lib/python2.7/site-packages/requests/adapters.py", line 502, in send raise ProxyError(e, request=request) requests.exceptions.ProxyError: HTTPSConnectionPool(host='10.192.64.32', port=443): Max retries exceeded with url: /rest/com/vmware/cis/session (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fa16ac2c7d0>: Failed to establish a new connection: [Errno 113] No route to host',)))
{ "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/4419/reactions" }
https://api.github.com/repos/psf/requests/issues/4419/timeline
null
completed
null
null
false
[ "We literally cannot connect to the proxy you've configured. It's unreachable. This is a network configuration error, not a requests error.", "Ok @sigmavirus24 , I did check network connectivity between the server I am invoking the REST API and the VM from where I am running python script, it was pinging fine bu...
https://api.github.com/repos/psf/requests/issues/4418
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4418/labels{/name}
https://api.github.com/repos/psf/requests/issues/4418/comments
https://api.github.com/repos/psf/requests/issues/4418/events
https://github.com/psf/requests/issues/4418
279,351,136
MDU6SXNzdWUyNzkzNTExMzY=
4,418
Add a new argument to a request that allows people to always keep the same method after a redirect
{ "avatar_url": "https://avatars.githubusercontent.com/u/6144562?v=4", "events_url": "https://api.github.com/users/jakegt1/events{/privacy}", "followers_url": "https://api.github.com/users/jakegt1/followers", "following_url": "https://api.github.com/users/jakegt1/following{/other_user}", "gists_url": "https://api.github.com/users/jakegt1/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jakegt1", "id": 6144562, "login": "jakegt1", "node_id": "MDQ6VXNlcjYxNDQ1NjI=", "organizations_url": "https://api.github.com/users/jakegt1/orgs", "received_events_url": "https://api.github.com/users/jakegt1/received_events", "repos_url": "https://api.github.com/users/jakegt1/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jakegt1/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jakegt1/subscriptions", "type": "User", "url": "https://api.github.com/users/jakegt1", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2017-12-05T12:06:07Z
2021-09-08T05:00:45Z
2017-12-07T20:07:38Z
NONE
resolved
Hi, i'm sorry if this is written incorrectly - unsure if feature requests are really allowed, so if they're not just simply delete the issue. A small annoyance i've found which isn't a problem specifically with requests is when a webserver uses a 302/301 redirect when they should be using a 307 or a 308. This happens a lot with common webservers as more and more websites have http -> https redirects. This can be a problem when doing anything that isn't a GET request, as request's resolve_redirects code will change the request method when the webserver isn't using the correct http status code (or is trying to preserver backwards compatibility. My suggestion is to add an argument to a request that allows people to not rebuild the method in the case of redirects. I have written the code (and test) for it if anybody is interested to look at it.
{ "avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4", "events_url": "https://api.github.com/users/Lukasa/events{/privacy}", "followers_url": "https://api.github.com/users/Lukasa/followers", "following_url": "https://api.github.com/users/Lukasa/following{/other_user}", "gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Lukasa", "id": 1382556, "login": "Lukasa", "node_id": "MDQ6VXNlcjEzODI1NTY=", "organizations_url": "https://api.github.com/users/Lukasa/orgs", "received_events_url": "https://api.github.com/users/Lukasa/received_events", "repos_url": "https://api.github.com/users/Lukasa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions", "type": "User", "url": "https://api.github.com/users/Lukasa", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4418/reactions" }
https://api.github.com/repos/psf/requests/issues/4418/timeline
null
completed
null
null
false
[ "Thanks, but Requests isn’t accepting additional keyword arguments at this time. Disabling redirect resolution or overriding some of the methods on `Session` that handle redirects can get you what you want. ", "I do know it's fixable via disabling redirect resolution, it's just a bit of a pain to work with. \r\n\...
https://api.github.com/repos/psf/requests/issues/4417
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4417/labels{/name}
https://api.github.com/repos/psf/requests/issues/4417/comments
https://api.github.com/repos/psf/requests/issues/4417/events
https://github.com/psf/requests/issues/4417
279,346,734
MDU6SXNzdWUyNzkzNDY3MzQ=
4,417
chardet is licensed under LGPL
{ "avatar_url": "https://avatars.githubusercontent.com/u/3287067?v=4", "events_url": "https://api.github.com/users/asieira/events{/privacy}", "followers_url": "https://api.github.com/users/asieira/followers", "following_url": "https://api.github.com/users/asieira/following{/other_user}", "gists_url": "https://api.github.com/users/asieira/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/asieira", "id": 3287067, "login": "asieira", "node_id": "MDQ6VXNlcjMyODcwNjc=", "organizations_url": "https://api.github.com/users/asieira/orgs", "received_events_url": "https://api.github.com/users/asieira/received_events", "repos_url": "https://api.github.com/users/asieira/repos", "site_admin": false, "starred_url": "https://api.github.com/users/asieira/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/asieira/subscriptions", "type": "User", "url": "https://api.github.com/users/asieira", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2017-12-05T11:49:59Z
2021-09-03T00:10:48Z
2017-12-06T02:12:03Z
CONTRIBUTOR
resolved
`chardet` is a dependency of `requests` and is licensed under the LGPL 2.1. Aren't GPL and LGPL components incompatible with the Apache 2.0 license used by `requests`, as per https://www.apache.org/legal/resolved.html#category-x and https://www.apache.org/licenses/GPL-compatibility.html?
{ "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/4417/reactions" }
https://api.github.com/repos/psf/requests/issues/4417/timeline
null
completed
null
null
false
[ "@asieira it really depends on how you interpret the language.\r\n\r\nFirst, you're linking to a section titled: `Which licenses may NOT be included within Apache products?` I believe that means projects developed specifically by the ASF not under the Apache License.\r\n\r\nLGPL might cause license issues if we wer...
https://api.github.com/repos/psf/requests/issues/4416
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4416/labels{/name}
https://api.github.com/repos/psf/requests/issues/4416/comments
https://api.github.com/repos/psf/requests/issues/4416/events
https://github.com/psf/requests/issues/4416
279,309,126
MDU6SXNzdWUyNzkzMDkxMjY=
4,416
Requests doesn't respect socket default timeout ( socket.setdefaulttimeout() )
{ "avatar_url": "https://avatars.githubusercontent.com/u/533295?v=4", "events_url": "https://api.github.com/users/farin/events{/privacy}", "followers_url": "https://api.github.com/users/farin/followers", "following_url": "https://api.github.com/users/farin/following{/other_user}", "gists_url": "https://api.github.com/users/farin/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/farin", "id": 533295, "login": "farin", "node_id": "MDQ6VXNlcjUzMzI5NQ==", "organizations_url": "https://api.github.com/users/farin/orgs", "received_events_url": "https://api.github.com/users/farin/received_events", "repos_url": "https://api.github.com/users/farin/repos", "site_admin": false, "starred_url": "https://api.github.com/users/farin/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/farin/subscriptions", "type": "User", "url": "https://api.github.com/users/farin", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2017-12-05T09:47:05Z
2021-09-08T05:00:45Z
2017-12-07T20:06:36Z
NONE
resolved
urllib3 and Requests has different semantic when handling unspecified timeout (which means no keyword arg given) ## Actual Result **urllib3** - when timeout is None -> no timeout - when timeout is not given -> internal _Default objects is used which leads to `socket.getdefaulttimeout()` see https://github.com/shazow/urllib3/blob/master/urllib3/connectionpool.py#L373 **requests** both None and not specified timeout is handled in same way. urllib3 `Timeout` object is created with None values -> no timeout at all while `socket.getdefaulttimeout()` is ignored. see https://github.com/requests/requests/blob/master/requests/adapters.py#L431 timeout arg is always passed into underlaying urllib3 ## Expected Result I think it should be better handle it same as urllib3. When timeout is not specified on request level then don't replace it with infinite timeout but just pass unspecified to timeout to urllib3 ## System Information reported on requests version 2.18.4
{ "avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4", "events_url": "https://api.github.com/users/Lukasa/events{/privacy}", "followers_url": "https://api.github.com/users/Lukasa/followers", "following_url": "https://api.github.com/users/Lukasa/following{/other_user}", "gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Lukasa", "id": 1382556, "login": "Lukasa", "node_id": "MDQ6VXNlcjEzODI1NTY=", "organizations_url": "https://api.github.com/users/Lukasa/orgs", "received_events_url": "https://api.github.com/users/Lukasa/received_events", "repos_url": "https://api.github.com/users/Lukasa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions", "type": "User", "url": "https://api.github.com/users/Lukasa", "user_view_type": "public" }
{ "+1": 1, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/psf/requests/issues/4416/reactions" }
https://api.github.com/repos/psf/requests/issues/4416/timeline
null
completed
null
null
false
[ "Thanks, this is a known issue and should be resolved in 3.0." ]
https://api.github.com/repos/psf/requests/issues/4415
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4415/labels{/name}
https://api.github.com/repos/psf/requests/issues/4415/comments
https://api.github.com/repos/psf/requests/issues/4415/events
https://github.com/psf/requests/issues/4415
278,845,105
MDU6SXNzdWUyNzg4NDUxMDU=
4,415
Requests seems to either ignore or not notice rare transport errors
{ "avatar_url": "https://avatars.githubusercontent.com/u/1025646?v=4", "events_url": "https://api.github.com/users/szborows/events{/privacy}", "followers_url": "https://api.github.com/users/szborows/followers", "following_url": "https://api.github.com/users/szborows/following{/other_user}", "gists_url": "https://api.github.com/users/szborows/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/szborows", "id": 1025646, "login": "szborows", "node_id": "MDQ6VXNlcjEwMjU2NDY=", "organizations_url": "https://api.github.com/users/szborows/orgs", "received_events_url": "https://api.github.com/users/szborows/received_events", "repos_url": "https://api.github.com/users/szborows/repos", "site_admin": false, "starred_url": "https://api.github.com/users/szborows/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/szborows/subscriptions", "type": "User", "url": "https://api.github.com/users/szborows", "user_view_type": "public" }
[]
closed
false
null
[]
{ "closed_at": null, "closed_issues": 29, "created_at": "2024-05-19T18:29:04Z", "creator": { "avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4", "events_url": "https://api.github.com/users/sethmlarson/events{/privacy}", "followers_url": "https://api.github.com/users/sethmlarson/followers", "following_url": "https://api.github.com/users/sethmlarson/following{/other_user}", "gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sethmlarson", "id": 18519037, "login": "sethmlarson", "node_id": "MDQ6VXNlcjE4NTE5MDM3", "organizations_url": "https://api.github.com/users/sethmlarson/orgs", "received_events_url": "https://api.github.com/users/sethmlarson/received_events", "repos_url": "https://api.github.com/users/sethmlarson/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions", "type": "User", "url": "https://api.github.com/users/sethmlarson", "user_view_type": "public" }, "description": "", "due_on": null, "html_url": "https://github.com/psf/requests/milestone/34", "id": 11073254, "labels_url": "https://api.github.com/repos/psf/requests/milestones/34/labels", "node_id": "MI_kwDOABTKOs4AqPbm", "number": 34, "open_issues": 0, "state": "open", "title": "Bankruptcy", "updated_at": "2024-05-20T14:37:16Z", "url": "https://api.github.com/repos/psf/requests/milestones/34" }
10
2017-12-04T01:32:43Z
2024-05-20T14:36:55Z
2024-05-20T14:36:55Z
NONE
null
So I was playing around with blockade and small piece of code that was using request library. I was researching something completely different but I have noticed some anomaly that seems to be originated somewhere in the library or libraries it uses. In essence, 1-2% of requests made when blockade disrupts the network end up with status code 200 and no exceptions, but content is only partial. Blockade is a tool to test various network conditions. It's on GitHub too. Maybe the bug is in request or maybe it lies somewhere lower. Or maybe it's my configuration that leads to such results. I successfully tried to uncover this bug on several machines (both physical laptops and VMs in the cloud). I asked colleague from my floor to reproduce this and he succeeded. Replacing requests code with `urllib.request.urlopen` results in exceptions being thrown for these 1-2% of cases. I'll be glad if someone else can confirm this or let me know that I did something wrong and should go home. ## Expected Result Exception raised. ## Actual Result Exception is not raised. Response content is cut. Following is output from freshly deployed VM in private cloud. Hash starting with `e4b` is proper one. ``` INFO | request #33: http://file_server/files/1MB.bin INFO | request #33: downloaded 1.0MB in 55.45s. code: 200, hsh: e4b7f62da691604a692844e93304de6b INFO | 172.17.0.1 - - [04/Dec/2017:01:20:16 +0000] "POST /dl HTTP/1.1" 200 0 "-" "curl/7.52.1" INFO | request #34: http://file_server/files/1MB.bin INFO | request #34: downloaded 1.0MB in 50.31s. code: 200, hsh: e4b7f62da691604a692844e93304de6b INFO | 172.17.0.1 - - [04/Dec/2017:01:21:11 +0000] "POST /dl HTTP/1.1" 200 0 "-" "curl/7.52.1" INFO | request #35: http://file_server/files/1MB.bin INFO | request #35: downloaded 0.1509552001953125MB in 69.74s. code: 200, hsh: afb64be8e2fe70f73f9d6e37d39478bf INFO | 172.17.0.1 - - [04/Dec/2017:01:22:25 +0000] "POST /dl HTTP/1.1" 200 0 "-" "curl/7.52.1" INFO | request #36: http://file_server/files/1MB.bin INFO | request #36: downloaded 1.0MB in 55.48s. code: 200, hsh: e4b7f62da691604a692844e93304de6b INFO | 172.17.0.1 - - [04/Dec/2017:01:23:25 +0000] "POST /dl HTTP/1.1" 200 0 "-" "curl/7.52.1" INFO | request #37: http://file_server/files/1MB.bin INFO | request #37: downloaded 1.0MB in 62.19s. code: 200, hsh: e4b7f62da691604a692844e93304de6b ``` ## Reproduction Steps 1. Clone my repo: `szborows/blockade-example`. 2. Install blockade (I've tested both 0.3.1 and 0.4.0): `pip install blockade` 3. Build docker image: `./build` and pull nginx: `docker pull nginx:1.11-alpine` 4. Start blockade: `blockade up`. It should confirm with two containers up 5. I open separate console to see output from backend container in real time: `docker logs -f blockadeexample_backend` 6. Customize and run the script. You can disable tcpdump at start etc. To start script execute `./run` 7. If you don't observe any anomalies in the logs after several runs (each does 100 iterations), then try to change `30` in `test_flaky` to something bigger. On some machines in cloud I needed to increase this to 40 to observe the failure sooner. ## System Information Python version is: 3.6-alpine. Requests version: 2.18.4. Blockade version: 0.4.0. Edit: Adding detailed info from my local container. ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "3.6.0" }, "platform": { "release": "4.8.0-1-amd64", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.18.4" }, "system_ssl": { "version": "100020af" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": false } ```
{ "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/4415/reactions" }
https://api.github.com/repos/psf/requests/issues/4415/timeline
null
completed
null
null
false
[ "Those log messages have no context or meaning. Please explain what you're trying to communicate with them. Further, please provide the actual requests code that you're using. As far as I can tell, requests isn't in use from those logs.", "I think code speaks for itself:\r\nhttps://github.com/szborows/blockade-ex...
https://api.github.com/repos/psf/requests/issues/4414
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4414/labels{/name}
https://api.github.com/repos/psf/requests/issues/4414/comments
https://api.github.com/repos/psf/requests/issues/4414/events
https://github.com/psf/requests/issues/4414
278,840,668
MDU6SXNzdWUyNzg4NDA2Njg=
4,414
Cookie is not set in requests.Session when "Set-Cookie" header is received
{ "avatar_url": "https://avatars.githubusercontent.com/u/1923704?v=4", "events_url": "https://api.github.com/users/dmfigol/events{/privacy}", "followers_url": "https://api.github.com/users/dmfigol/followers", "following_url": "https://api.github.com/users/dmfigol/following{/other_user}", "gists_url": "https://api.github.com/users/dmfigol/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dmfigol", "id": 1923704, "login": "dmfigol", "node_id": "MDQ6VXNlcjE5MjM3MDQ=", "organizations_url": "https://api.github.com/users/dmfigol/orgs", "received_events_url": "https://api.github.com/users/dmfigol/received_events", "repos_url": "https://api.github.com/users/dmfigol/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dmfigol/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dmfigol/subscriptions", "type": "User", "url": "https://api.github.com/users/dmfigol", "user_view_type": "public" }
[]
closed
true
null
[]
null
9
2017-12-04T00:48:00Z
2018-07-25T15:19:18Z
2018-03-12T21:42:12Z
NONE
off-topic
**requests.Session** does not honor **Set-Cookie** header ## Expected Result The cookie should be set for the session. ## Actual Result Cookie is not set. ## Reproduction Steps ```python session = requests.Session() r = session.get(AUTH_URL, auth=(USERNAME,PASSWORD), verify=False) print(r.status_code) print(r.headers) print(r.content) print(session.cookies, r.cookies) r = session.get(GROUP_URL, verify=False) print(r.content) print(r.status_code) ########## OUTPUT ######### 200 {'Date': 'Mon, 04 Dec 2017 00:30:40 GMT', 'Content-Type': 'application/json', 'Content-Length': '7', 'Connection': 'keep-alive', 'Set-Cookie': 'X-JWT-ACCESS-TOKEN=<long-token>;Version=-1;Comment=;Domain=;Path=/;Secure', 'X-Kong-Upstream-Latency': '200', 'X-Kong-Proxy-Latency': '31', 'Via': 'kong/0.9.7'} b'success' <RequestsCookieJar[]> <RequestsCookieJar[]> ##### << here, cookies are NOT set b'{"message":"Unauthorized"}\n' 401 ``` ## Additional Information I see a bug in API: '**Content-Type**' for the response is '**application/json**', but the response itself is not a valid JSON (`b'success'`). I am going to contact API developers to fix this. I am not 100% sure it is related to my problem, but I thought you should know. ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "3.6.3" }, "platform": { "release": "7", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.18.4" }, "system_ssl": { "version": "100020bf" }, "urllib3": { "version": "1.22" }, "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/4414/reactions" }
https://api.github.com/repos/psf/requests/issues/4414/timeline
null
completed
null
null
false
[ "This is what you've provided as the value of `Set-Cookie`: `X-JWT-ACCESS-TOKEN=<long-token>;Version=-1;Comment=;Domain=;Path=/;Secure`. Judging by that value, it appears that there are a few things wrong with this string (presuming `<long-token>` is the only editing you did).\r\n\r\nThe header in this case is defi...
https://api.github.com/repos/psf/requests/issues/4413
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4413/labels{/name}
https://api.github.com/repos/psf/requests/issues/4413/comments
https://api.github.com/repos/psf/requests/issues/4413/events
https://github.com/psf/requests/issues/4413
278,150,353
MDU6SXNzdWUyNzgxNTAzNTM=
4,413
Timeout not working for "requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))"
{ "avatar_url": "https://avatars.githubusercontent.com/u/26564456?v=4", "events_url": "https://api.github.com/users/hingston/events{/privacy}", "followers_url": "https://api.github.com/users/hingston/followers", "following_url": "https://api.github.com/users/hingston/following{/other_user}", "gists_url": "https://api.github.com/users/hingston/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/hingston", "id": 26564456, "login": "hingston", "node_id": "MDQ6VXNlcjI2NTY0NDU2", "organizations_url": "https://api.github.com/users/hingston/orgs", "received_events_url": "https://api.github.com/users/hingston/received_events", "repos_url": "https://api.github.com/users/hingston/repos", "site_admin": false, "starred_url": "https://api.github.com/users/hingston/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hingston/subscriptions", "type": "User", "url": "https://api.github.com/users/hingston", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2017-11-30T14:59:42Z
2021-09-08T05:00:47Z
2017-11-30T15:18:11Z
NONE
resolved
I'm making calls to an API and multiple times a day requests hangs then throws `'Remote end closed connection without response'` after 1-2 minutes even with the timeout set to 3 seconds. ## Expected Result I would expect it to timeout after 3 seconds. ## Actual Result `Time elpased (hh:mm:ss.ms) 0:01:55.254653` ``` File "/home/vmagent/app/checker/views.py", line 127, in call_api return sessions[region].get(url, timeout=3) File "/env/lib/python3.6/site-packages/requests/sessions.py", line 521, in get return self.request('GET', url, **kwargs) File "/env/lib/python3.6/site-packages/requests/sessions.py", line 508, in request resp = self.send(prep, **send_kwargs) File "/env/lib/python3.6/site-packages/requests/sessions.py", line 618, in send r = adapter.send(request, **kwargs) File "/env/lib/python3.6/site-packages/requests/adapters.py", line 490, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',)) ``` ## Reproduction Steps ``` import datetime import traceback from requests import session, Timeout from checker.forms import REGIONS sessions = {} for r in REGIONS: sessions[r] = session() sessions[r].headers.update({'X-API-KEY': 'API-KEY-#####'}) def call_api(url, region): start_time = datetime.datetime.now() try: return sessions[region].get(url, timeout=3) except Timeout: time_elapsed = datetime.datetime.now() - start_time print('Time elpased (hh:mm:ss.ms) {}'.format(time_elapsed)) return 408 # Timeout except: time_elapsed = datetime.datetime.now() - start_time print('Time elpased (hh:mm:ss.ms) {}'.format(time_elapsed)) traceback.print_exc() return 520 # Unknown error ``` ## System Information ``` pip==9.0.1 mysqlclient==1.3.12 Django==2.0rc1 django-db-geventpool==1.21 django-removewww==0.1.2 gevent==1.2.2 gunicorn==19.7.1 psycopg2==2.7.3.2 python-dateutil==2.6.1 pytz==2017.3 regex==2017.11.9 requests-toolbelt==0.8.0 requests[security] six==1.11.0 wheel==0.30.0 ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.1.4" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "3.6.3" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "1010007f", "version": "17.4.0" }, "requests": { "version": "2.18.4" }, "system_ssl": { "version": "100020bf" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": true }
{ "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4413/reactions" }
https://api.github.com/repos/psf/requests/issues/4413/timeline
null
completed
null
null
false
[ "I think there's a misunderstanding here that would be clarified by reviewing our [documentation](http://docs.python-requests.org/en/master/user/quickstart/#timeouts)\r\n\r\nSpecifically our Note (emphasis mine):\r\n\r\n> `timeout` is **not a time limit on the entire response** download; rather, an exception is rai...
https://api.github.com/repos/psf/requests/issues/4412
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4412/labels{/name}
https://api.github.com/repos/psf/requests/issues/4412/comments
https://api.github.com/repos/psf/requests/issues/4412/events
https://github.com/psf/requests/issues/4412
278,027,613
MDU6SXNzdWUyNzgwMjc2MTM=
4,412
TypeError: open() got an unexpected keyword argument 'buffering'
{ "avatar_url": "https://avatars.githubusercontent.com/u/10855384?v=4", "events_url": "https://api.github.com/users/StephenSeanGleason/events{/privacy}", "followers_url": "https://api.github.com/users/StephenSeanGleason/followers", "following_url": "https://api.github.com/users/StephenSeanGleason/following{/other_user}", "gists_url": "https://api.github.com/users/StephenSeanGleason/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/StephenSeanGleason", "id": 10855384, "login": "StephenSeanGleason", "node_id": "MDQ6VXNlcjEwODU1Mzg0", "organizations_url": "https://api.github.com/users/StephenSeanGleason/orgs", "received_events_url": "https://api.github.com/users/StephenSeanGleason/received_events", "repos_url": "https://api.github.com/users/StephenSeanGleason/repos", "site_admin": false, "starred_url": "https://api.github.com/users/StephenSeanGleason/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/StephenSeanGleason/subscriptions", "type": "User", "url": "https://api.github.com/users/StephenSeanGleason", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2017-11-30T07:52:28Z
2021-09-08T05:00:47Z
2017-11-30T13:06:57Z
NONE
resolved
when I run my code I get the following error. Traceback (most recent call last): File "C:/Users/stephen/AppData/Local/Programs/Python/Python35/chatbot.py", line 97, in <module> with bz2.open("C:/RC_{}".format(timeframe.split('-')[0],timeframe), buffering=1000) as f: TypeError: open() got an unexpected keyword argument 'buffering' CODE IS NEAR BOTTOM AND UNDER #################### SYMBOLS THAT GETS ERROR MESSAGE. ANY HELP WOULD BE GREATLY APPRECIATED. THANKS. import sqlite3 import json import bz2 from datetime import datetime timeframe = '2017-10' sql_transaction = [] connection = sqlite3.connect('{}.db'.format(timeframe)) c = connection.cursor() def create_table(): c.execute("""CREATE TABLE IF NOT EXISTS parent_reply (parent_id TEXT PRIMARY KEY, comment_id TEXT UNIQUE, parent TEXT, comment TEXT, subreddit TEXT, unix INT, score INT)""") def format_data(data): data = data.replace('\n',' newlinechar ').replace('\r',' newlinechar ').replace('"',"'") return data def transaction_bldr(sql): global sql_transaction sql_transaction.append(sql) if len(sql_transaction) > 1000: c.execute('BEGIN TRANSACTION') for s in sql_transaction: try: c.execute(s) except: pass connection.commit() sql_transaction = [] def sql_insert_replace_comment(commentid,parentid,parent,comment,subreddit,time,score): try: sql = """UPDATE parent_reply SET parent_id = ?, comment_id = ?, parent = ?, comment = ?, subreddit = ?, unix = ?, score = ? WHERE parent_id =?;""".format(parentid, commentid, parent, comment, subreddit, int(time), score, parentid) transaction_bldr(sql) except Exception as e: print('s0 insertion',str(e)) def sql_insert_has_parent(commentid,parentid,parent,comment,subreddit,time,score): try: sql = """INSERT INTO parent_reply (parent_id, comment_id, parent, comment, subreddit, unix, score) VALUES ("{}","{}","{}","{}","{}",{},{});""".format(parentid, commentid, parent, comment, subreddit, int(time), score) transaction_bldr(sql) except Exception as e: print('s0 insertion',str(e)) def sql_insert_no_parent(commentid,parentid,comment,subreddit,time,score): try: sql = """INSERT INTO parent_reply (parent_id, comment_id, comment, subreddit, unix, score) VALUES ("{}","{}","{}","{}",{},{});""".format(parentid, commentid, comment, subreddit, int(time), score) transaction_bldr(sql) except Exception as e: print('s0 insertion',str(e)) def acceptable(data): if len(data.split(' ')) > 50 or len(data) < 1: return False elif len(data) > 1000: return False elif data == '[deleted]': return False elif data == '[removed]': return False else: return True def find_parent(pid): try: sql = "SELECT comment FROM parent_reply WHERE comment_id = '{}' LIMIT 1".format(pid) c.execute(sql) result = c.fetchone() if result !=None: return result[0] else: return False except Exception as e: #print(str(e)) return false def find_existing_score(pid): try: sql = "SELECT score FROM parent_reply WHERE parent_id = '{}' LIMIT 1".format(pid) c.execute(sql) result = c.fetchone() if result != None: return result[0] else: return False except Exception as e: #print(str(e)) return False if __name__ == '__main__': create_table() row_counter = 0 paired_rows = 0 ########################## with bz2.open("C:/RC_{}".format(timeframe.split('-')[0],timeframe), buffering=1000) as f: for row in f: row_counter += 1 parent_id = row['parent_id'] body = format_data(row['body']) created_utc = row['created_utc'] score = row['score'] comment_id = row['name'] subreddit = row['subreddit'] parent_data = find_parent(parent_id) if score >=2: existing_comment_score = find_existing_score(parent_id) if existing_comment_score: if score > existing_comment_score: if acceptable(body): sql_insert_replace_comment(comment_id,parent_id,parent_data,body,subreddit,created_utc,score) else: if acceptable(body): if parent_data: sql_insert_has_parent(comment_id,parent_id,parent_data,body,subreddit,created_utc,score) paired_rows += 1 else: sql_insert_no_parent(comment_id,parent_id,body,subreddit,created_utc,score) if row_counter % 100000 == 0: print('Total Rows Read: {}, Paired Rows: {}, Time: {}'.format(row_counter, paired_rows, str(datetime.now())))
{ "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/4412/reactions" }
https://api.github.com/repos/psf/requests/issues/4412/timeline
null
completed
null
null
false
[ "This seems to have nothing to do with Requests. If you want help with your code, please open a question on StackOverflow." ]
https://api.github.com/repos/psf/requests/issues/4411
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4411/labels{/name}
https://api.github.com/repos/psf/requests/issues/4411/comments
https://api.github.com/repos/psf/requests/issues/4411/events
https://github.com/psf/requests/issues/4411
277,828,012
MDU6SXNzdWUyNzc4MjgwMTI=
4,411
PATCH request with form-data file has wrong content-length
{ "avatar_url": "https://avatars.githubusercontent.com/u/19964270?v=4", "events_url": "https://api.github.com/users/adam-j-turner/events{/privacy}", "followers_url": "https://api.github.com/users/adam-j-turner/followers", "following_url": "https://api.github.com/users/adam-j-turner/following{/other_user}", "gists_url": "https://api.github.com/users/adam-j-turner/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/adam-j-turner", "id": 19964270, "login": "adam-j-turner", "node_id": "MDQ6VXNlcjE5OTY0Mjcw", "organizations_url": "https://api.github.com/users/adam-j-turner/orgs", "received_events_url": "https://api.github.com/users/adam-j-turner/received_events", "repos_url": "https://api.github.com/users/adam-j-turner/repos", "site_admin": false, "starred_url": "https://api.github.com/users/adam-j-turner/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/adam-j-turner/subscriptions", "type": "User", "url": "https://api.github.com/users/adam-j-turner", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2017-11-29T16:50:44Z
2021-09-08T05:00:49Z
2017-11-29T17:34:11Z
NONE
resolved
I have a script that submits either a POST or PATCH request with a particular binary file. It fails when using PATCH but is successful using POST. Testing with Postman gives expected results. ## Expected Result Post & Patch with same content-length ## Actual Result Patch method has much smaller content-length (not sure if being calculated wrong or if the body is malformed) ## Reproduction Steps ```python import requests testFile = open('testfile.png', 'rb') postResp = requests.post( "https://httpbin.org/post", files = {'file': testFile} ) patchResp = requests.patch( "https://httpbin.org/patch", files = {'file': testFile} ) print("Post content length:" + postResp.headers['content-length']) print("Patch content length:" + patchResp.headers['content-length']) ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "3.6.3" }, "platform": { "release": "7", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.18.4" }, "system_ssl": { "version": "100020bf" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": false } ``` This command is only available on Requests v2.16.4 and greater. Otherwise, please provide some basic information about your system (Python version, operating system, &c).
{ "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4411/reactions" }
https://api.github.com/repos/psf/requests/issues/4411/timeline
null
completed
null
null
false
[ "Requests consumes the file on the first request which means that the file object is at the end of the file and there's nothing for us to send in the second request. You either need to reopen it or `seek(0, 0)`. Cheers!" ]
https://api.github.com/repos/psf/requests/issues/4410
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4410/labels{/name}
https://api.github.com/repos/psf/requests/issues/4410/comments
https://api.github.com/repos/psf/requests/issues/4410/events
https://github.com/psf/requests/pull/4410
277,768,680
MDExOlB1bGxSZXF1ZXN0MTU1MzUwMzI3
4,410
Add SHA-256 and SHA-512 digest auth algorithms
{ "avatar_url": "https://avatars.githubusercontent.com/u/438131?v=4", "events_url": "https://api.github.com/users/linuxlizard/events{/privacy}", "followers_url": "https://api.github.com/users/linuxlizard/followers", "following_url": "https://api.github.com/users/linuxlizard/following{/other_user}", "gists_url": "https://api.github.com/users/linuxlizard/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/linuxlizard", "id": 438131, "login": "linuxlizard", "node_id": "MDQ6VXNlcjQzODEzMQ==", "organizations_url": "https://api.github.com/users/linuxlizard/orgs", "received_events_url": "https://api.github.com/users/linuxlizard/received_events", "repos_url": "https://api.github.com/users/linuxlizard/repos", "site_admin": false, "starred_url": "https://api.github.com/users/linuxlizard/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/linuxlizard/subscriptions", "type": "User", "url": "https://api.github.com/users/linuxlizard", "user_view_type": "public" }
[]
closed
true
null
[]
null
15
2017-11-29T14:12:38Z
2021-09-03T00:10:58Z
2018-05-16T14:06:58Z
CONTRIBUTOR
resolved
Added SHA-256 and SHA-512 auth algorithms to requests/auth.py Added test code to test_requests.py Requires SHA-256 and SHA-512 in the httpbin test framework.
{ "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/4410/reactions" }
https://api.github.com/repos/psf/requests/issues/4410/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4410.diff", "html_url": "https://github.com/psf/requests/pull/4410", "merged_at": "2018-05-16T14:06:58Z", "patch_url": "https://github.com/psf/requests/pull/4410.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4410" }
true
[ "Seems like the digest stuff is 404ing: mind taking a look?", "Can do.\r\n\r\nDoes need the most recent httpbin with SHA-256 and SHA-512 support.", "@Lukasa @linuxlizard, the changes were merged in httpbin but I don't believe we cut a release. I think that may be a prerequisite for pytest-httpbin working here.\...
https://api.github.com/repos/psf/requests/issues/4409
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4409/labels{/name}
https://api.github.com/repos/psf/requests/issues/4409/comments
https://api.github.com/repos/psf/requests/issues/4409/events
https://github.com/psf/requests/pull/4409
277,633,711
MDExOlB1bGxSZXF1ZXN0MTU1MjUyMzY3
4,409
Use single default ssl_context in HTTPAdapter connection pool manager
{ "avatar_url": "https://avatars.githubusercontent.com/u/34075110?v=4", "events_url": "https://api.github.com/users/jmcackles/events{/privacy}", "followers_url": "https://api.github.com/users/jmcackles/followers", "following_url": "https://api.github.com/users/jmcackles/following{/other_user}", "gists_url": "https://api.github.com/users/jmcackles/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jmcackles", "id": 34075110, "login": "jmcackles", "node_id": "MDQ6VXNlcjM0MDc1MTEw", "organizations_url": "https://api.github.com/users/jmcackles/orgs", "received_events_url": "https://api.github.com/users/jmcackles/received_events", "repos_url": "https://api.github.com/users/jmcackles/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jmcackles/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jmcackles/subscriptions", "type": "User", "url": "https://api.github.com/users/jmcackles", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2017-11-29T05:24:49Z
2021-09-04T00:06:37Z
2017-12-10T21:07:08Z
NONE
resolved
Creates default SSLContext object for each HTTPAdapter that is expected to be used for https requests. There are just a few small changes for: - Adding a default SSLContext object only to the https HTTPAdapter in each session (not the http one) - Creating the default object using the same urllib3 function that would be used to create a default SSLContext for each connection - Adding ssl_context to poolmanager's connection_pool_kw to get passed down to all connections - Pickling HTTPAdapter with the new attribute - Breaking up the HTTPAdapter's send method a little (this is not related, I was just there anyway. I'm happy to undo that if it's not wanted. There are separate functions for getting the timeout and sending chunked now.) Any feedback is welcome! This is for https://github.com/requests/requests/issues/4322
{ "avatar_url": "https://avatars.githubusercontent.com/u/34075110?v=4", "events_url": "https://api.github.com/users/jmcackles/events{/privacy}", "followers_url": "https://api.github.com/users/jmcackles/followers", "following_url": "https://api.github.com/users/jmcackles/following{/other_user}", "gists_url": "https://api.github.com/users/jmcackles/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/jmcackles", "id": 34075110, "login": "jmcackles", "node_id": "MDQ6VXNlcjM0MDc1MTEw", "organizations_url": "https://api.github.com/users/jmcackles/orgs", "received_events_url": "https://api.github.com/users/jmcackles/received_events", "repos_url": "https://api.github.com/users/jmcackles/repos", "site_admin": false, "starred_url": "https://api.github.com/users/jmcackles/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jmcackles/subscriptions", "type": "User", "url": "https://api.github.com/users/jmcackles", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4409/reactions" }
https://api.github.com/repos/psf/requests/issues/4409/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4409.diff", "html_url": "https://github.com/psf/requests/pull/4409", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/4409.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4409" }
true
[ "# [Codecov](https://codecov.io/gh/requests/requests/pull/4409?src=pr&el=h1) Report\n> Merging [#4409](https://codecov.io/gh/requests/requests/pull/4409?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/24092b11d74af0a766d9cc616622f38adb0044b9?src=pr&el=desc) will **increase** coverage by...
https://api.github.com/repos/psf/requests/issues/4408
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4408/labels{/name}
https://api.github.com/repos/psf/requests/issues/4408/comments
https://api.github.com/repos/psf/requests/issues/4408/events
https://github.com/psf/requests/issues/4408
277,624,952
MDU6SXNzdWUyNzc2MjQ5NTI=
4,408
GeocoderServiceError: [Errno 65] No route to host
{ "avatar_url": "https://avatars.githubusercontent.com/u/31523022?v=4", "events_url": "https://api.github.com/users/peaponte/events{/privacy}", "followers_url": "https://api.github.com/users/peaponte/followers", "following_url": "https://api.github.com/users/peaponte/following{/other_user}", "gists_url": "https://api.github.com/users/peaponte/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/peaponte", "id": 31523022, "login": "peaponte", "node_id": "MDQ6VXNlcjMxNTIzMDIy", "organizations_url": "https://api.github.com/users/peaponte/orgs", "received_events_url": "https://api.github.com/users/peaponte/received_events", "repos_url": "https://api.github.com/users/peaponte/repos", "site_admin": false, "starred_url": "https://api.github.com/users/peaponte/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/peaponte/subscriptions", "type": "User", "url": "https://api.github.com/users/peaponte", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2017-11-29T04:21:29Z
2021-09-08T05:00:49Z
2017-11-29T17:35:14Z
NONE
resolved
Summary. I wanted to create a new column called coordinates that use nom.geocode using information from an already existing column. But whenever I execute df1["Coordinates"]=df1["Address"].apply(nom.geocode) I get the following error: --------------------------------------------------------------------------- OSError Traceback (most recent call last) /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py in do_open(self, http_class, req, **http_conn_args) 1317 h.request(req.get_method(), req.selector, req.data, headers, -> 1318 encode_chunked=req.has_header('Transfer-encoding')) 1319 except OSError as err: # timeout error /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py in request(self, method, url, body, headers, encode_chunked) 1238 """Send a complete request to the server.""" -> 1239 self._send_request(method, url, body, headers, encode_chunked) 1240 /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py in _send_request(self, method, url, body, headers, encode_chunked) 1284 body = _encode(body, 'body') -> 1285 self.endheaders(body, encode_chunked=encode_chunked) 1286 /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py in endheaders(self, message_body, encode_chunked) 1233 raise CannotSendHeader() -> 1234 self._send_output(message_body, encode_chunked=encode_chunked) 1235 /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py in _send_output(self, message_body, encode_chunked) 1025 del self._buffer[:] -> 1026 self.send(msg) 1027 /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py in send(self, data) 963 if self.auto_open: --> 964 self.connect() 965 else: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py in connect(self) 1391 -> 1392 super().connect() 1393 /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py in connect(self) 935 self.sock = self._create_connection( --> 936 (self.host,self.port), self.timeout, self.source_address) 937 self.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socket.py in create_connection(address, timeout, source_address) 721 if err is not None: --> 722 raise err 723 else: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socket.py in create_connection(address, timeout, source_address) 712 sock.bind(source_address) --> 713 sock.connect(sa) 714 return sock OSError: [Errno 65] No route to host During handling of the above exception, another exception occurred: URLError Traceback (most recent call last) /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/geopy/geocoders/base.py in _call_geocoder(self, url, timeout, raw, requester, deserializer, **kwargs) 142 try: --> 143 page = requester(req, timeout=(timeout or self.timeout), **kwargs) 144 except Exception as error: # pylint: disable=W0703 /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py in urlopen(url, data, timeout, cafile, capath, cadefault, context) 222 opener = _opener --> 223 return opener.open(url, data, timeout) 224 /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py in open(self, fullurl, data, timeout) 525 --> 526 response = self._open(req, data) 527 /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py in _open(self, req, data) 543 result = self._call_chain(self.handle_open, protocol, protocol + --> 544 '_open', req) 545 if result: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py in _call_chain(self, chain, kind, meth_name, *args) 503 func = getattr(handler, meth_name) --> 504 result = func(*args) 505 if result is not None: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py in https_open(self, req) 1360 return self.do_open(http.client.HTTPSConnection, req, -> 1361 context=self._context, check_hostname=self._check_hostname) 1362 /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py in do_open(self, http_class, req, **http_conn_args) 1319 except OSError as err: # timeout error -> 1320 raise URLError(err) 1321 r = h.getresponse() URLError: <urlopen error [Errno 65] No route to host> During handling of the above exception, another exception occurred: GeocoderServiceError Traceback (most recent call last) <ipython-input-57-f36dadc4f72c> in <module>() ----> 1 df1["Coordinates"]=df1["Address"].apply(nom.geocode) /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandas/core/series.py in apply(self, func, convert_dtype, args, **kwds) 2508 else: 2509 values = self.asobject -> 2510 mapped = lib.map_infer(values, f, convert=convert_dtype) 2511 2512 if len(mapped) and isinstance(mapped[0], Series): pandas/_libs/src/inference.pyx in pandas._libs.lib.map_infer() /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/geopy/geocoders/osm.py in geocode(self, query, exactly_one, timeout, addressdetails, language, geometry) 191 logger.debug("%s.geocode: %s", self.__class__.__name__, url) 192 return self._parse_json( --> 193 self._call_geocoder(url, timeout=timeout), exactly_one 194 ) 195 /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/geopy/geocoders/base.py in _call_geocoder(self, url, timeout, raw, requester, deserializer, **kwargs) 169 if "timed out" in message: 170 raise GeocoderTimedOut('Service timed out') --> 171 raise GeocoderServiceError(message) 172 173 if hasattr(page, 'getcode'): GeocoderServiceError: [Errno 65] No route to host Im on a mac using python3
{ "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/4408/reactions" }
https://api.github.com/repos/psf/requests/issues/4408/timeline
null
completed
null
null
false
[ "This has nothing to do with the requests library. geocoders is using the standard library `urllib.request` module, not the `requests` module." ]
https://api.github.com/repos/psf/requests/issues/4407
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4407/labels{/name}
https://api.github.com/repos/psf/requests/issues/4407/comments
https://api.github.com/repos/psf/requests/issues/4407/events
https://github.com/psf/requests/issues/4407
277,615,304
MDU6SXNzdWUyNzc2MTUzMDQ=
4,407
If it possible to let requests stop (but don't raise Exception) when it get to the max redirection limit?
{ "avatar_url": "https://avatars.githubusercontent.com/u/24400940?v=4", "events_url": "https://api.github.com/users/Humbertzhang/events{/privacy}", "followers_url": "https://api.github.com/users/Humbertzhang/followers", "following_url": "https://api.github.com/users/Humbertzhang/following{/other_user}", "gists_url": "https://api.github.com/users/Humbertzhang/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Humbertzhang", "id": 24400940, "login": "Humbertzhang", "node_id": "MDQ6VXNlcjI0NDAwOTQw", "organizations_url": "https://api.github.com/users/Humbertzhang/orgs", "received_events_url": "https://api.github.com/users/Humbertzhang/received_events", "repos_url": "https://api.github.com/users/Humbertzhang/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Humbertzhang/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Humbertzhang/subscriptions", "type": "User", "url": "https://api.github.com/users/Humbertzhang", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2017-11-29T03:14:06Z
2021-09-08T05:00:48Z
2017-11-29T17:38:57Z
NONE
resolved
When I use **requests**, I find that you can't let **requests** stop when redirected a fixed times. But I think someone(like me) will need headers or something else among those redirections. ## Expected Result If I set a flag to let requests.session stop when it comes to the max redirection limit, and then, It won't raise a **TooManyRedirects**, but will stop and let you could get the headers or anything in this request. ## Actual Result It will raise a **TooManyRedirects** Exception. ## Reproduction Steps It will work like that: ```python import requests session = reqeusts.Session() session.max_redirects = 3 session.stopflag = True # flag that will let redirects stop when it comes to max redirect time. r = session.get(will_redirect_many_times_url) # it will stop when redirect 3 times # And then I can get the infomation at this request. h = r.headers ``` Actually I modified my requests a little bit, I add that code: ```python if i == self.max_redirects: break ``` before: ```python if i >= self.max_redirects: raise TooManyRedirects('Exceeded %s redirects.' % self.max_redirects) ``` At `requests/session.py` at 113 lines and It will stop when comes to max redirect limit. ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "1.2.3" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "2.7.12" }, "platform": { "release": "4.4.0-98-generic", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "1000207f", "version": "0.15.1" }, "requests": { "version": "2.18.4" }, "system_ssl": { "version": "1000207f" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": true } ```
{ "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/4407/reactions" }
https://api.github.com/repos/psf/requests/issues/4407/timeline
null
completed
null
null
false
[ "If you need the information from the most recent response you should do\r\n\r\n```py\r\ntry:\r\n r = session.get(...)\r\nexcept requests.exceptions.TooManyRedirects as exc:\r\n r = exc.response\r\n```\r\n\r\nbecause we include the most recent response on that exception. 🎉 \r\n\r\nWe're in a feature-freeze a...
https://api.github.com/repos/psf/requests/issues/4406
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4406/labels{/name}
https://api.github.com/repos/psf/requests/issues/4406/comments
https://api.github.com/repos/psf/requests/issues/4406/events
https://github.com/psf/requests/issues/4406
277,344,923
MDU6SXNzdWUyNzczNDQ5MjM=
4,406
SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)
{ "avatar_url": "https://avatars.githubusercontent.com/u/32579122?v=4", "events_url": "https://api.github.com/users/munaAchyuta/events{/privacy}", "followers_url": "https://api.github.com/users/munaAchyuta/followers", "following_url": "https://api.github.com/users/munaAchyuta/following{/other_user}", "gists_url": "https://api.github.com/users/munaAchyuta/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/munaAchyuta", "id": 32579122, "login": "munaAchyuta", "node_id": "MDQ6VXNlcjMyNTc5MTIy", "organizations_url": "https://api.github.com/users/munaAchyuta/orgs", "received_events_url": "https://api.github.com/users/munaAchyuta/received_events", "repos_url": "https://api.github.com/users/munaAchyuta/repos", "site_admin": false, "starred_url": "https://api.github.com/users/munaAchyuta/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/munaAchyuta/subscriptions", "type": "User", "url": "https://api.github.com/users/munaAchyuta", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2017-11-28T11:09:23Z
2021-09-08T05:00:47Z
2017-11-28T12:54:20Z
NONE
resolved
i am facing `requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)` issue. i am using python > v2.7.13 , requests > v2.7.0. my service is started with https using bottle-paste. i have created certificates using openssl. for server-side i am using **.pem** and from client-side i am using **.pkcs12**. and my service using **OpenSSL** . i am using **sslcontext** to start service `SSL.Context(SSL.SSLv23_METHOD).` and as you guys know requests module using ssl. **same service can hit from java , postman** with using client certificates( .pkcs12 ). not sure why is it failing here ? can any one help me here ??
{ "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/4406/reactions" }
https://api.github.com/repos/psf/requests/issues/4406/timeline
null
completed
null
null
false
[ "Python's ssl module does not support PKCS12 files. You have to extract the PKCS12 and dump the key and cert to disk. You may also need to dump the CA and intermediate chain.\r\n\r\nSomething like this should do the trick. ``cert.pem`` contains key, cert and maybe chain.\r\n\r\n```\r\n$ openssl pkcs12 -in file.p12 ...
https://api.github.com/repos/psf/requests/issues/4405
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4405/labels{/name}
https://api.github.com/repos/psf/requests/issues/4405/comments
https://api.github.com/repos/psf/requests/issues/4405/events
https://github.com/psf/requests/issues/4405
277,308,397
MDU6SXNzdWUyNzczMDgzOTc=
4,405
bad handshake: SysCallError(-1, 'Unexpected EOF')
{ "avatar_url": "https://avatars.githubusercontent.com/u/13550005?v=4", "events_url": "https://api.github.com/users/datar-ai/events{/privacy}", "followers_url": "https://api.github.com/users/datar-ai/followers", "following_url": "https://api.github.com/users/datar-ai/following{/other_user}", "gists_url": "https://api.github.com/users/datar-ai/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/datar-ai", "id": 13550005, "login": "datar-ai", "node_id": "MDQ6VXNlcjEzNTUwMDA1", "organizations_url": "https://api.github.com/users/datar-ai/orgs", "received_events_url": "https://api.github.com/users/datar-ai/received_events", "repos_url": "https://api.github.com/users/datar-ai/repos", "site_admin": false, "starred_url": "https://api.github.com/users/datar-ai/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/datar-ai/subscriptions", "type": "User", "url": "https://api.github.com/users/datar-ai", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2017-11-28T09:12:30Z
2021-09-08T05:00:51Z
2017-11-28T12:40:06Z
NONE
resolved
Summary. I try requests in site [https://www.digitimes.com.tw](https://www.digitimes.com.tw), but it failed. I had tried the other similar recommendations but not works solution. Please advise, thanks. The site SSL Server Test Report [(here)](https://www.ssllabs.com/ssltest/analyze.html?d=www.digitimes.com.tw) ## Expected Result Successful connect and get result expected. ## Actual Result ``` $ python test.py *** HTTPSConnectionPool(host='www.digitimes.com.tw', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')",),)) Traceback (most recent call last): File "/Users/Roger/Virtualenv/BizMI/lib/python3.6/site-packages/urllib3/contrib/pyopenssl.py", line 441, in wrap_socket cnx.do_handshake() File "/Users/Roger/Virtualenv/BizMI/lib/python3.6/site-packages/OpenSSL/SSL.py", line 1716, in do_handshake self._raise_ssl_error(self._ssl, result) File "/Users/Roger/Virtualenv/BizMI/lib/python3.6/site-packages/OpenSSL/SSL.py", line 1449, in _raise_ssl_error raise SysCallError(-1, "Unexpected EOF") OpenSSL.SSL.SysCallError: (-1, 'Unexpected EOF') During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/Roger/Virtualenv/BizMI/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen chunked=chunked) File "/Users/Roger/Virtualenv/BizMI/lib/python3.6/site-packages/urllib3/connectionpool.py", line 346, in _make_request self._validate_conn(conn) File "/Users/Roger/Virtualenv/BizMI/lib/python3.6/site-packages/urllib3/connectionpool.py", line 850, in _validate_conn conn.connect() File "/Users/Roger/Virtualenv/BizMI/lib/python3.6/site-packages/urllib3/connection.py", line 326, in connect ssl_context=context) File "/Users/Roger/Virtualenv/BizMI/lib/python3.6/site-packages/urllib3/util/ssl_.py", line 329, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File "/Users/Roger/Virtualenv/BizMI/lib/python3.6/site-packages/urllib3/contrib/pyopenssl.py", line 448, in wrap_socket raise ssl.SSLError('bad handshake: %r' % e) ssl.SSLError: ("bad handshake: SysCallError(-1, 'Unexpected EOF')",) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/Roger/Virtualenv/BizMI/lib/python3.6/site-packages/requests/adapters.py", line 440, in send timeout=timeout File "/Users/Roger/Virtualenv/BizMI/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen _stacktrace=sys.exc_info()[2]) File "/Users/Roger/Virtualenv/BizMI/lib/python3.6/site-packages/urllib3/util/retry.py", line 388, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www.digitimes.com.tw', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')",),)) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "test.py", line 51, in <module> r = requests.get("https://www.digitimes.com.tw") File "/Users/Roger/Virtualenv/BizMI/lib/python3.6/site-packages/requests/api.py", line 72, in get return request('get', url, params=params, **kwargs) File "/Users/Roger/Virtualenv/BizMI/lib/python3.6/site-packages/requests/api.py", line 58, in request return session.request(method=method, url=url, **kwargs) File "/Users/Roger/Virtualenv/BizMI/lib/python3.6/site-packages/requests/sessions.py", line 508, in request resp = self.send(prep, **send_kwargs) File "/Users/Roger/Virtualenv/BizMI/lib/python3.6/site-packages/requests/sessions.py", line 618, in send r = adapter.send(request, **kwargs) File "/Users/Roger/Virtualenv/BizMI/lib/python3.6/site-packages/requests/adapters.py", line 506, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='www.digitimes.com.tw', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')",),))` ``` ## Reproduction Steps ```python import sys, traceback import ssl from requests.adapters import HTTPAdapter from requests.packages.urllib3.util.ssl_ import create_urllib3_context from requests.packages.urllib3.poolmanager import PoolManager import requests # This is the 2.11 Requests cipher string, containing 3DES. CIPHERS = ( 'ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+HIGH:' 'DH+HIGH:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+HIGH:RSA+3DES:!aNULL:' '!eNULL:!MD5' ) class DESAdapter(HTTPAdapter): """ A TransportAdapter that re-enables 3DES support in Requests. """ def init_poolmanager(self, *args, **kwargs): context = create_urllib3_context(ciphers=CIPHERS) kwargs['ssl_context'] = context return super(DESAdapter, self).init_poolmanager(*args, **kwargs) def proxy_manager_for(self, *args, **kwargs): context = create_urllib3_context(ciphers=CIPHERS) kwargs['ssl_context'] = context return super(DESAdapter, self).proxy_manager_for(*args, **kwargs) class SSLAdapter(HTTPAdapter): '''An HTTPS Transport Adapter that uses an arbitrary SSL version.''' def __init__(self, ssl_version=None, **kwargs): self.ssl_version = ssl_version super(SSLAdapter, self).__init__(**kwargs) def init_poolmanager(self, connections, maxsize, block=False): self.poolmanager = PoolManager(num_pools=connections, maxsize=maxsize, block=block, ssl_version=self.ssl_version) # Main Function if __name__ == "__main__": try: s = requests.Session() s.mount("https://www.digitimes.com.tw", SSLAdapter(ssl_version=ssl.PROTOCOL_TLSv1)) r = requests.get("https://www.digitimes.com.tw") print(r.text) except Exception as e: print('*** ', e) traceback.print_exc(file=sys.stdout) sys.exit() ``` ## Openssl Test ``` $ openssl s_client -connect www.digitimes.com.tw:443 CONNECTED(00000003) 140735617835912:error:140790E5:SSL routines:ssl23_write:ssl handshake failure:s23_lib.c:177: --- no peer certificate available --- No client certificate CA names sent --- SSL handshake has read 0 bytes and written 308 bytes --- New, (NONE), Cipher is (NONE) Secure Renegotiation IS NOT supported Compression: NONE Expansion: NONE No ALPN negotiated SSL-Session: Protocol : TLSv1.2 Cipher : 0000 Session-ID: Session-ID-ctx: Master-Key: Key-Arg : None PSK identity: None PSK identity hint: None SRP username: None Start Time: 1511860095 Timeout : 300 (sec) Verify return code: 0 (ok) --- ``` ``` $ openssl s_client -tls1 -connect www.digitimes.com.tw:443CONNECTED(00000003) depth=0 OU = Domain Control Validated, OU = PositiveSSL Wildcard, CN = *.digitimes.com.tw verify error:num=20:unable to get local issuer certificate verify return:1 depth=0 OU = Domain Control Validated, OU = PositiveSSL Wildcard, CN = *.digitimes.com.tw verify error:num=21:unable to verify the first certificate verify return:1 --- Certificate chain 0 s:/OU=Domain Control Validated/OU=PositiveSSL Wildcard/CN=*.digitimes.com.tw i:/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO RSA Domain Validation Secure Server CA --- Server certificate -----BEGIN CERTIFICATE----- MIIFXjCCBEagAwIBAgIRALqqTCTEbaUa69+U7geazxUwDQYJKoZIhvcNAQELBQAw gZAxCzAJBgNVBAYTAkdCMRswGQYDVQQIExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAO BgNVBAcTB1NhbGZvcmQxGjAYBgNVBAoTEUNPTU9ETyBDQSBMaW1pdGVkMTYwNAYD VQQDEy1DT01PRE8gUlNBIERvbWFpbiBWYWxpZGF0aW9uIFNlY3VyZSBTZXJ2ZXIg Q0EwHhcNMTcwNTA0MDAwMDAwWhcNMTgwNTAzMjM1OTU5WjBfMSEwHwYDVQQLExhE b21haW4gQ29udHJvbCBWYWxpZGF0ZWQxHTAbBgNVBAsTFFBvc2l0aXZlU1NMIFdp bGRjYXJkMRswGQYDVQQDDBIqLmRpZ2l0aW1lcy5jb20udHcwggEiMA0GCSqGSIb3 DQEBAQUAA4IBDwAwggEKAoIBAQC203XaoQxrqSjAXjdob2uQ6msnnXfBNufNiofI v5fmzH7FcHCfW5ER7FSHv7bp5lAviNj4Lcg/UTkmR6MdBJDJF3xP2YpYNug5ZxGo MuucSwh0J8d1YrqIOvcDtU8S2hnXaISuNn+HTd5n8xPI/mjHPI10DJzASq4fwzg9 0IMKU72JpHLH6oquJLXkrgugF3ILIKQhEAUsMtHYmw13iSVCVnyRPfcnInBo9soY 7pfqaUhxJ4p9prCtRXOvYnT0feQvxchNsyxUnii9/E/Ut0/sQd8Pni5912/X9Tk3 rFb5F2lOdCnXnAqE+yOXm9Mgk4XRbMotZE5eyrH9onwg7OujAgMBAAGjggHhMIIB 3TAfBgNVHSMEGDAWgBSQr2o6lFoL2JDqElZz30O0Oija5zAdBgNVHQ4EFgQU5Edj aePc5bmyT6s9KXgDjAPqkkAwDgYDVR0PAQH/BAQDAgWgMAwGA1UdEwEB/wQCMAAw HQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCME8GA1UdIARIMEYwOgYLKwYB BAGyMQECAgcwKzApBggrBgEFBQcCARYdaHR0cHM6Ly9zZWN1cmUuY29tb2RvLmNv bS9DUFMwCAYGZ4EMAQIBMFQGA1UdHwRNMEswSaBHoEWGQ2h0dHA6Ly9jcmwuY29t b2RvY2EuY29tL0NPTU9ET1JTQURvbWFpblZhbGlkYXRpb25TZWN1cmVTZXJ2ZXJD QS5jcmwwgYUGCCsGAQUFBwEBBHkwdzBPBggrBgEFBQcwAoZDaHR0cDovL2NydC5j b21vZG9jYS5jb20vQ09NT0RPUlNBRG9tYWluVmFsaWRhdGlvblNlY3VyZVNlcnZl ckNBLmNydDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuY29tb2RvY2EuY29tMC8G A1UdEQQoMCaCEiouZGlnaXRpbWVzLmNvbS50d4IQZGlnaXRpbWVzLmNvbS50dzAN BgkqhkiG9w0BAQsFAAOCAQEAKvWwwiUFq1ZiK0dBh8w0HqGZ+lcoyFavU3xlQw+Z uJjia6qzwT4jGfdexeM1lOAPPPZOS2/gc6fz6MXQJmLN0B2iMOHo65H2KJnvR+Uy X/WMgiM6IKnw83c71kqZyjotf6DGTNOvxmfU48Ewc+jaJkCm2dzqejF6kzBtQNXS U2Inf1okmhcfEV5DaN+CQh71NcBabtsDTY2QFo+iKoj/Gi+7NdA4Az53fFgf2dOp IfDMtz5n/fL5f0JExs0+WWu7zDeepCqHkRSco0EBpkEIr9B439+dQ9MaeRkAFFcz JVbSLGRttz/lbgoljcUmPNbd8tK3039gHKCSO38ZZihIew== -----END CERTIFICATE----- subject=/OU=Domain Control Validated/OU=PositiveSSL Wildcard/CN=*.digitimes.com.tw issuer=/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO RSA Domain Validation Secure Server CA --- No client certificate CA names sent --- SSL handshake has read 1521 bytes and written 510 bytes --- New, TLSv1/SSLv3, Cipher is RC4-MD5 Server public key is 2048 bit Secure Renegotiation IS supported Compression: NONE Expansion: NONE No ALPN negotiated SSL-Session: Protocol : TLSv1 Cipher : RC4-MD5 Session-ID: BA240000CAEE7F2860C3B98B84171478DF72EC936376BB52FB109907363FFBE8 Session-ID-ctx: Master-Key: 7D183B074FCFB5B412D272C248A15BA725CFF5C651F656DBA17DE2D4ACBFF726938A5DB92850C918E08591017450D65E Key-Arg : None PSK identity: None PSK identity hint: None SRP username: None Start Time: 1511860297 Timeout : 7200 (sec) Verify return code: 21 (unable to verify the first certificate) --- ^C ``` ## System Information ``` $ python -m requests.help { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.1.3" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "3.6.1" }, "platform": { "release": "17.2.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "1010007f", "version": "17.4.0" }, "requests": { "version": "2.18.4" }, "system_ssl": { "version": "100020bf" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": true } ``` Env: MacOS 10.13.1 Python 3.6.1 requests==2.18.4 urllib3==1.22 openssl version OpenSSL 1.0.2m 2 Nov 2017
{ "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/4405/reactions" }
https://api.github.com/repos/psf/requests/issues/4405/timeline
null
completed
null
null
false
[ "I've been struggling with this same problem for a month or more, in my case is a SOAP call, but it should be the same handshake.\r\n\r\nIf i solve this i'll come straight away to post my solution.\r\n\r\nGood luck!", "![screenshot from 2017-11-28 06-19-36](https://user-images.githubusercontent.com/240830/3331994...
https://api.github.com/repos/psf/requests/issues/4404
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4404/labels{/name}
https://api.github.com/repos/psf/requests/issues/4404/comments
https://api.github.com/repos/psf/requests/issues/4404/events
https://github.com/psf/requests/pull/4404
277,297,592
MDExOlB1bGxSZXF1ZXN0MTU1MDA2NzM4
4,404
Empty file stream should be set to Content-Length:0
{ "avatar_url": "https://avatars.githubusercontent.com/u/19793192?v=4", "events_url": "https://api.github.com/users/dt3310321/events{/privacy}", "followers_url": "https://api.github.com/users/dt3310321/followers", "following_url": "https://api.github.com/users/dt3310321/following{/other_user}", "gists_url": "https://api.github.com/users/dt3310321/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dt3310321", "id": 19793192, "login": "dt3310321", "node_id": "MDQ6VXNlcjE5NzkzMTky", "organizations_url": "https://api.github.com/users/dt3310321/orgs", "received_events_url": "https://api.github.com/users/dt3310321/received_events", "repos_url": "https://api.github.com/users/dt3310321/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dt3310321/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dt3310321/subscriptions", "type": "User", "url": "https://api.github.com/users/dt3310321", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2017-11-28T08:30:51Z
2021-09-04T00:06:38Z
2017-11-29T21:18:55Z
NONE
resolved
I have trouble in uploading empty files to AWS S3 using requests, the point is that AWS S3 doesn't support Transfer-Encoding: chunked to upload files. Dealing with the file pointer(fp) which points to an empty file, requests set it to Transfer-Encoding: chunked. In fact, the length of empty file can be calculated by the function super_len() without raising exception, the length is zero, but requests treats it same with None(caused by exceptions)! ```python try: length = super_len(data) except (TypeError, AttributeError, UnsupportedOperation): length = None ``` I touched an empty file named empty.txt, and the result is 'Transfer-Encoding': 'chunked' instead of 'Content-Length': '0'. In this situation, i think the result should be 'Content-Length': '0', since the length of the file can be calculated! ```python >>> import requests >>> fp = open('empty.txt', 'rb') >>> r = requests.put('http://httpbin.org/put', data=fp) >>> r.request.headers {'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'User-Agent': 'python-requests/2.18.4'} >>> fp.close() '''
{ "avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4", "events_url": "https://api.github.com/users/Lukasa/events{/privacy}", "followers_url": "https://api.github.com/users/Lukasa/followers", "following_url": "https://api.github.com/users/Lukasa/following{/other_user}", "gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Lukasa", "id": 1382556, "login": "Lukasa", "node_id": "MDQ6VXNlcjEzODI1NTY=", "organizations_url": "https://api.github.com/users/Lukasa/orgs", "received_events_url": "https://api.github.com/users/Lukasa/received_events", "repos_url": "https://api.github.com/users/Lukasa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions", "type": "User", "url": "https://api.github.com/users/Lukasa", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4404/reactions" }
https://api.github.com/repos/psf/requests/issues/4404/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4404.diff", "html_url": "https://github.com/psf/requests/pull/4404", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/4404.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4404" }
true
[ "The travis have failed, the trouble is shown in the snip code in super_len(), requests treate None(length can't be determined automatically) to zero. So, how can i get the header set to Content-Length:0, when the file is empty, but the total_length can be calculated out, the total_length is absolutely determined ...
https://api.github.com/repos/psf/requests/issues/4403
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4403/labels{/name}
https://api.github.com/repos/psf/requests/issues/4403/comments
https://api.github.com/repos/psf/requests/issues/4403/events
https://github.com/psf/requests/issues/4403
277,250,100
MDU6SXNzdWUyNzcyNTAxMDA=
4,403
requests.get() always pumps out errors in my Spyder3.2.4
{ "avatar_url": "https://avatars.githubusercontent.com/u/9277924?v=4", "events_url": "https://api.github.com/users/gfkdcadet/events{/privacy}", "followers_url": "https://api.github.com/users/gfkdcadet/followers", "following_url": "https://api.github.com/users/gfkdcadet/following{/other_user}", "gists_url": "https://api.github.com/users/gfkdcadet/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/gfkdcadet", "id": 9277924, "login": "gfkdcadet", "node_id": "MDQ6VXNlcjkyNzc5MjQ=", "organizations_url": "https://api.github.com/users/gfkdcadet/orgs", "received_events_url": "https://api.github.com/users/gfkdcadet/received_events", "repos_url": "https://api.github.com/users/gfkdcadet/repos", "site_admin": false, "starred_url": "https://api.github.com/users/gfkdcadet/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gfkdcadet/subscriptions", "type": "User", "url": "https://api.github.com/users/gfkdcadet", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2017-11-28T03:53:37Z
2021-09-08T05:00:45Z
2017-11-28T04:00:52Z
NONE
resolved
Summary. I was trying to get data from a website by using requests module in my spyder3.2.4. I used requests.get() to realize the goal. It worked well. But, recentely, when I used requests.get(), spyder would pump out errors. Really confusing. What you expected. ## import requests r = requests.get(url) r.status_code 200 What happened instead. **AttributeError: module 'requests' has no attribute 'get'** ```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/4403/reactions" }
https://api.github.com/repos/psf/requests/issues/4403/timeline
null
completed
null
null
false
[ "I have a screenshot of the problem. But I cannot upload it..... When I tried, it always told me that something went really wrong, and it cannnot process that file! \r\npity....\r\nhelp me..... The problem is abusing me .....", "@gfkdcadet, this is almost certainly an issue with you having a file name \"requests....
https://api.github.com/repos/psf/requests/issues/4402
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4402/labels{/name}
https://api.github.com/repos/psf/requests/issues/4402/comments
https://api.github.com/repos/psf/requests/issues/4402/events
https://github.com/psf/requests/issues/4402
277,117,957
MDU6SXNzdWUyNzcxMTc5NTc=
4,402
Connection timeout doesn't work for chunk-encoded requests
{ "avatar_url": "https://avatars.githubusercontent.com/u/3468064?v=4", "events_url": "https://api.github.com/users/isobit/events{/privacy}", "followers_url": "https://api.github.com/users/isobit/followers", "following_url": "https://api.github.com/users/isobit/following{/other_user}", "gists_url": "https://api.github.com/users/isobit/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/isobit", "id": 3468064, "login": "isobit", "node_id": "MDQ6VXNlcjM0NjgwNjQ=", "organizations_url": "https://api.github.com/users/isobit/orgs", "received_events_url": "https://api.github.com/users/isobit/received_events", "repos_url": "https://api.github.com/users/isobit/repos", "site_admin": false, "starred_url": "https://api.github.com/users/isobit/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/isobit/subscriptions", "type": "User", "url": "https://api.github.com/users/isobit", "user_view_type": "public" }
[]
closed
false
null
[]
null
4
2017-11-27T18:19:03Z
2024-05-19T19:00:10Z
2024-05-19T19:00:10Z
NONE
null
Original issue was #1422, but I was able to reproduce in 2.18.4. ## Expected Result Chunk-encoded requests timeout after the specified timeout if the server does not respond. ## Actual Result Request holds connection open and never times out. ## Reproduction Steps First, run a test server that accepts POST requests and waits 10 seconds before responding: ```python from http.server import BaseHTTPRequestHandler, HTTPServer import time class Handler(BaseHTTPRequestHandler): def do_POST(self): time.sleep(10) self.send_response(200) self.end_headers() if __name__ == '__main__': httpd = HTTPServer(('', 8000), Handler) print('Listening on :8000') httpd.serve_forever() ``` Then, in another REPL, verify timeout works for non-chunk-encoded requests: ```python import requests requests.post('http://localhost:8000', timeout=2.0, data='hello'.encode('utf-8')) ```` A timeout exception should be thrown. Then, verify timeout does not work for chunk-encoded requests: ```python def gen(): yield 'hello'.encode('utf-8') requests.post('http://localhost:8000', timeout=2.0, data=gen()) ``` A `<Response [200]>` will be returned, indicating that the timeout did not work properly (a timeout exception _should_ have been thrown instead). ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "3.6.3" }, "platform": { "release": "4.4.0-43-Microsoft", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.18.4" }, "system_ssl": { "version": "1000207f" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": false } ``` ## Workaround Insert the following on [line 454 of requests/adapters.py](https://github.com/requests/requests/blob/master/requests/adapters.py#L454): ```python low_conn.timeout = timeout.connect_timeout ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/18519037?v=4", "events_url": "https://api.github.com/users/sethmlarson/events{/privacy}", "followers_url": "https://api.github.com/users/sethmlarson/followers", "following_url": "https://api.github.com/users/sethmlarson/following{/other_user}", "gists_url": "https://api.github.com/users/sethmlarson/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sethmlarson", "id": 18519037, "login": "sethmlarson", "node_id": "MDQ6VXNlcjE4NTE5MDM3", "organizations_url": "https://api.github.com/users/sethmlarson/orgs", "received_events_url": "https://api.github.com/users/sethmlarson/received_events", "repos_url": "https://api.github.com/users/sethmlarson/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sethmlarson/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sethmlarson/subscriptions", "type": "User", "url": "https://api.github.com/users/sethmlarson", "user_view_type": "public" }
{ "+1": 3, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 3, "url": "https://api.github.com/repos/psf/requests/issues/4402/reactions" }
https://api.github.com/repos/psf/requests/issues/4402/timeline
null
completed
null
null
false
[ "This would be resolved by moving to use urllib3's chunked encoding logic as well. I concur with @sigmavirus24's notes on another issue: if we can get some socket-level tests of our chunked handling, we can move to using urllib3's logic to resolve this issue.", "In the consequence of that bug, when using with ses...
https://api.github.com/repos/psf/requests/issues/4401
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4401/labels{/name}
https://api.github.com/repos/psf/requests/issues/4401/comments
https://api.github.com/repos/psf/requests/issues/4401/events
https://github.com/psf/requests/issues/4401
276,971,584
MDU6SXNzdWUyNzY5NzE1ODQ=
4,401
Find cause of status code 0
{ "avatar_url": "https://avatars.githubusercontent.com/u/1812267?v=4", "events_url": "https://api.github.com/users/grillorafael/events{/privacy}", "followers_url": "https://api.github.com/users/grillorafael/followers", "following_url": "https://api.github.com/users/grillorafael/following{/other_user}", "gists_url": "https://api.github.com/users/grillorafael/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/grillorafael", "id": 1812267, "login": "grillorafael", "node_id": "MDQ6VXNlcjE4MTIyNjc=", "organizations_url": "https://api.github.com/users/grillorafael/orgs", "received_events_url": "https://api.github.com/users/grillorafael/received_events", "repos_url": "https://api.github.com/users/grillorafael/repos", "site_admin": false, "starred_url": "https://api.github.com/users/grillorafael/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/grillorafael/subscriptions", "type": "User", "url": "https://api.github.com/users/grillorafael", "user_view_type": "public" }
[ { "color": "e10c02", "default": false, "description": null, "id": 117744, "name": "Bug", "node_id": "MDU6TGFiZWwxMTc3NDQ=", "url": "https://api.github.com/repos/psf/requests/labels/Bug" }, { "color": "f7c6c7", "default": false, "description": null, "id": 167537670, ...
closed
true
null
[]
null
6
2017-11-27T10:39:30Z
2021-09-08T05:00:52Z
2017-11-27T21:52:45Z
NONE
resolved
Hi All, I'm trying to debug why sometimes my requests fail (Doing some perf test through `locust.io`) but I can't find the cause. My nginx logs have no error attached and what I see is requests giving status code 0. I thought it could be timeout but I timed the request and I see <1sec. Is there a way for me to find out why I'm getting this behavior? I'm basically getting `status_code==0` but I can't find a reason to that. I'm using python 2.7 and locust to run the perf test
{ "avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4", "events_url": "https://api.github.com/users/Lukasa/events{/privacy}", "followers_url": "https://api.github.com/users/Lukasa/followers", "following_url": "https://api.github.com/users/Lukasa/following{/other_user}", "gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Lukasa", "id": 1382556, "login": "Lukasa", "node_id": "MDQ6VXNlcjEzODI1NTY=", "organizations_url": "https://api.github.com/users/Lukasa/orgs", "received_events_url": "https://api.github.com/users/Lukasa/received_events", "repos_url": "https://api.github.com/users/Lukasa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions", "type": "User", "url": "https://api.github.com/users/Lukasa", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4401/reactions" }
https://api.github.com/repos/psf/requests/issues/4401/timeline
null
completed
null
null
false
[ "I believe we pull the status code [here](https://github.com/requests/requests/blob/d1fb1a29ab949223d8d64797e0fcc9a7d2690483/requests/adapters.py#L267) which means fundamentally this is a urllib3 bug. Requests defaults the status code to `None` but has specific handling for [this case](https://github.com/requests/r...
https://api.github.com/repos/psf/requests/issues/4400
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4400/labels{/name}
https://api.github.com/repos/psf/requests/issues/4400/comments
https://api.github.com/repos/psf/requests/issues/4400/events
https://github.com/psf/requests/issues/4400
276,888,106
MDU6SXNzdWUyNzY4ODgxMDY=
4,400
IndexError when handle http response
{ "avatar_url": "https://avatars.githubusercontent.com/u/7598892?v=4", "events_url": "https://api.github.com/users/beruhan/events{/privacy}", "followers_url": "https://api.github.com/users/beruhan/followers", "following_url": "https://api.github.com/users/beruhan/following{/other_user}", "gists_url": "https://api.github.com/users/beruhan/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/beruhan", "id": 7598892, "login": "beruhan", "node_id": "MDQ6VXNlcjc1OTg4OTI=", "organizations_url": "https://api.github.com/users/beruhan/orgs", "received_events_url": "https://api.github.com/users/beruhan/received_events", "repos_url": "https://api.github.com/users/beruhan/repos", "site_admin": false, "starred_url": "https://api.github.com/users/beruhan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/beruhan/subscriptions", "type": "User", "url": "https://api.github.com/users/beruhan", "user_view_type": "public" }
[ { "color": "fef2c0", "default": false, "description": null, "id": 298537994, "name": "Needs More Information", "node_id": "MDU6TGFiZWwyOTg1Mzc5OTQ=", "url": "https://api.github.com/repos/psf/requests/labels/Needs%20More%20Information" } ]
closed
true
null
[]
null
7
2017-11-27T03:06:41Z
2021-09-08T05:00:52Z
2017-11-27T21:51:47Z
NONE
resolved
I receive a http response like this, ``` HTTP/1.1 200 OK Content-Type: application/octet-stream Content-Length: 89606 Content-Disposition: attachment; filename="MB-500Ap_2009-01-12.cfg" Connection: close Brickcom-50xA OperationSetting.locale=auto HostName.name=cam ModuleInfo.DIDO_module=1 ModuleInfo.PIR_module=0 ModuleInfo.WLED=0 SensorFPSSetting.fps=0 ModuleInfo.AUTOIRIS_module=0 ModuleInfo.IRCUT_module=0 ModuleInfo.IRLED_module=0 ModuleInfo.lightsensor=0 ModuleInfo.EXPOSURE_module=0 ModuleInfo.MDNS_module=0 ModuleInfo.PTZ_module=1 ModuleInfo.MSN_module=0 ModuleInfo.WIFI_module=0 ModuleInfo.watchDog_module=0 ModuleInfo.sdcard_module=1 ModuleInfo.usbstorage_module=0 ModuleInfo.sambamount_module=0 ModuleInfo.QoS=0 ModuleInfo.shutter_speed=0 ModuleInfo.discovery_internet=1 ModuleInfo.POE_module= ModuleInfo.audio_record=1 ``` it throws exceptions.IndexError, but I use chrome visit the same url,It has not error
{ "avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4", "events_url": "https://api.github.com/users/Lukasa/events{/privacy}", "followers_url": "https://api.github.com/users/Lukasa/followers", "following_url": "https://api.github.com/users/Lukasa/following{/other_user}", "gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Lukasa", "id": 1382556, "login": "Lukasa", "node_id": "MDQ6VXNlcjEzODI1NTY=", "organizations_url": "https://api.github.com/users/Lukasa/orgs", "received_events_url": "https://api.github.com/users/Lukasa/received_events", "repos_url": "https://api.github.com/users/Lukasa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions", "type": "User", "url": "https://api.github.com/users/Lukasa", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4400/reactions" }
https://api.github.com/repos/psf/requests/issues/4400/timeline
null
completed
null
null
false
[ "Please provide the traceback for the IndexError you receive or a URL that we can use to reproduce this.", "We also need the output from `python -m requests.help` or failing that `python -c 'import requests; print(requests.__version__)'`", "`python -m requests.help` output is\r\n `{\r\n \"chardet\": {\r\n \...
https://api.github.com/repos/psf/requests/issues/4399
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4399/labels{/name}
https://api.github.com/repos/psf/requests/issues/4399/comments
https://api.github.com/repos/psf/requests/issues/4399/events
https://github.com/psf/requests/issues/4399
276,871,849
MDU6SXNzdWUyNzY4NzE4NDk=
4,399
pandas.read_html(url)
{ "avatar_url": "https://avatars.githubusercontent.com/u/33677455?v=4", "events_url": "https://api.github.com/users/zhongyutech/events{/privacy}", "followers_url": "https://api.github.com/users/zhongyutech/followers", "following_url": "https://api.github.com/users/zhongyutech/following{/other_user}", "gists_url": "https://api.github.com/users/zhongyutech/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/zhongyutech", "id": 33677455, "login": "zhongyutech", "node_id": "MDQ6VXNlcjMzNjc3NDU1", "organizations_url": "https://api.github.com/users/zhongyutech/orgs", "received_events_url": "https://api.github.com/users/zhongyutech/received_events", "repos_url": "https://api.github.com/users/zhongyutech/repos", "site_admin": false, "starred_url": "https://api.github.com/users/zhongyutech/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zhongyutech/subscriptions", "type": "User", "url": "https://api.github.com/users/zhongyutech", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2017-11-27T00:33:54Z
2021-09-08T05:00:53Z
2017-11-27T00:37:24Z
NONE
resolved
Summary. ## Expected Result import pandas as pd for i in range(1,10): url="https://myip.ms/browse/sites/{0}/ipID/23.227.38.0/ipIDii/23.227.38.255/sort/2/asc/1/".format(i) dfs=pd.read_html(url) data=dfs[13] select_index=data.index[data.index%2==0] jg=data.iloc[select_index,:7] jg.to_excel("d:\{}.xls".format(i)) ## Actual Result don't need one by one,get all! What a wonder! I hope you can try
{ "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/4399/reactions" }
https://api.github.com/repos/psf/requests/issues/4399/timeline
null
completed
null
null
false
[ "I believe you've filed this against the wrong project. I don't see anything related to this project." ]
https://api.github.com/repos/psf/requests/issues/4398
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4398/labels{/name}
https://api.github.com/repos/psf/requests/issues/4398/comments
https://api.github.com/repos/psf/requests/issues/4398/events
https://github.com/psf/requests/issues/4398
276,847,495
MDU6SXNzdWUyNzY4NDc0OTU=
4,398
Could we set the request json's dump charset?
{ "avatar_url": "https://avatars.githubusercontent.com/u/5487535?v=4", "events_url": "https://api.github.com/users/hsiunien/events{/privacy}", "followers_url": "https://api.github.com/users/hsiunien/followers", "following_url": "https://api.github.com/users/hsiunien/following{/other_user}", "gists_url": "https://api.github.com/users/hsiunien/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/hsiunien", "id": 5487535, "login": "hsiunien", "node_id": "MDQ6VXNlcjU0ODc1MzU=", "organizations_url": "https://api.github.com/users/hsiunien/orgs", "received_events_url": "https://api.github.com/users/hsiunien/received_events", "repos_url": "https://api.github.com/users/hsiunien/repos", "site_admin": false, "starred_url": "https://api.github.com/users/hsiunien/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hsiunien/subscriptions", "type": "User", "url": "https://api.github.com/users/hsiunien", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2017-11-26T19:01:21Z
2021-09-08T03:00:31Z
2017-11-26T23:48:24Z
NONE
resolved
As you know, I use the requests post some data to the server, my JSON data is ``` {'name':'张三'} ``` ## Expected Result origin json data,like {'name':'张三'} But I catch the package, it translated into ## Actual Result ``` {'name':'\u5f20\u4e09'} ``` But the server couldn't recognize it. ## Reproduction Steps ```python import requests request.post('http://example.com/xxx',json={'name':'张三'}) ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "3.6.2" }, "platform": { "release": "16.7.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.18.4" }, "system_ssl": { "version": "100020df" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": false } ``` I trace the source code, I found requests call the json.dumps in models.py at about line 454, ```python if not data and json is not None: # urllib3 requires a bytes-like body. Python 2's json.dumps # provides this natively, but Python 3 gives a Unicode string. content_type = 'application/json' body = complexjson.dumps(json) if not isinstance(body, bytes): body = body.encode('utf-8') is_stream = all([ hasattr(data, '__iter__'), not isinstance(data, (basestring, list, tuple, collections.Mapping)) ]) ``` the dumps haven't any parameter, so how could I set the parameter ensure_ascii?
{ "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/4398/reactions" }
https://api.github.com/repos/psf/requests/issues/4398/timeline
null
completed
null
null
false
[ "You can call `json.dumps` yourself to get that effect. We don't provide anything other than the 98% use case. This is an advanced use-case and we expect that you can do this yourself (including setting the `Content-Type`).\r\n\r\nCheers,\r\nIan", "@sigmavirus24 Could you please reconsider that? I am sure non-asc...
https://api.github.com/repos/psf/requests/issues/4397
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4397/labels{/name}
https://api.github.com/repos/psf/requests/issues/4397/comments
https://api.github.com/repos/psf/requests/issues/4397/events
https://github.com/psf/requests/issues/4397
276,559,358
MDU6SXNzdWUyNzY1NTkzNTg=
4,397
Sslv3 alert handshake failure with pyopenssl
{ "avatar_url": "https://avatars.githubusercontent.com/u/19307144?v=4", "events_url": "https://api.github.com/users/Kausapaq/events{/privacy}", "followers_url": "https://api.github.com/users/Kausapaq/followers", "following_url": "https://api.github.com/users/Kausapaq/following{/other_user}", "gists_url": "https://api.github.com/users/Kausapaq/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Kausapaq", "id": 19307144, "login": "Kausapaq", "node_id": "MDQ6VXNlcjE5MzA3MTQ0", "organizations_url": "https://api.github.com/users/Kausapaq/orgs", "received_events_url": "https://api.github.com/users/Kausapaq/received_events", "repos_url": "https://api.github.com/users/Kausapaq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Kausapaq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Kausapaq/subscriptions", "type": "User", "url": "https://api.github.com/users/Kausapaq", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2017-11-24T09:30:34Z
2021-09-08T01:21:15Z
2017-11-27T20:38:57Z
NONE
resolved
I’m receiving a bad handshake error when attempting to make a post with requests. Here is my code: ``` import requests url = "https://mss.swicpc.bankgirot.se/swish-cpcapi/api/v1/paymentrequests" r = requests.post(url=url, cert=("/path/to/client_cert.pem", "/path/to/private_key.pem"), verify= "/path/to/server_cert.pem") ``` I get the following exception: ``` File "/home/www-data/py2713env/lib/python2.7/site-packages/requests/api.py", line 112, in post return request('post', url, data=data, json=json, **kwargs) File "/home/www-data/py2713env/lib/python2.7/site-packages/requests/api.py", line 58, in request return session.request(method=method, url=url, **kwargs) File "/home/www-data/py2713env/lib/python2.7/site-packages/requests/sessions.py", line 508, in request resp = self.send(prep, **send_kwargs) File "/home/www-data/py2713env/lib/python2.7/site-packages/requests/sessions.py", line 618, in send r = adapter.send(request, **kwargs) File "/home/www-data/py2713env/lib/python2.7/site-packages/requests/adapters.py", line 506, in send raise SSLError(e, request=request) SSLError: HTTPSConnectionPool(host='mss.swicpc.bankgirot.se', port=443): Max retries exceeded with url: /swish-cpcapi/api/v1/paymentrequests (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_read_bytes', 'sslv3 alert handshake failure')],)",),)) ``` The error disappears if I remove pyopenssl from urllib3, by including this line of code before making the request: ``` from requests.packages.urllib3.contrib import pyopenssl pyopenssl.extract_from_urllib3() ``` So I'm guessing that there is a problem with the current pyopenssl version I'm using. System Information: $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.1.3" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "2.7.13" }, "platform": { "release": "3.13.0-042stab123.3", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "1010007f", "version": "17.4.0" }, "requests": { "version": "2.18.4" }, "system_ssl": { "version": "1000106f" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": true } ``` Any suggestions on how to fix this problem with pyopenssl?
{ "avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4", "events_url": "https://api.github.com/users/Lukasa/events{/privacy}", "followers_url": "https://api.github.com/users/Lukasa/followers", "following_url": "https://api.github.com/users/Lukasa/following{/other_user}", "gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Lukasa", "id": 1382556, "login": "Lukasa", "node_id": "MDQ6VXNlcjEzODI1NTY=", "organizations_url": "https://api.github.com/users/Lukasa/orgs", "received_events_url": "https://api.github.com/users/Lukasa/received_events", "repos_url": "https://api.github.com/users/Lukasa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions", "type": "User", "url": "https://api.github.com/users/Lukasa", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4397/reactions" }
https://api.github.com/repos/psf/requests/issues/4397/timeline
null
completed
null
null
false
[ "Your pyopenssl is using a much newer version of OpenSSL. This likely includes some extra fields in the TLS handshake that the server doesn't like very much. My recommendation is to remove pyopenssl from your environment.", "Thank you Lukasa! So, this error occurs because I’m using a TLS protocol which the server...
https://api.github.com/repos/psf/requests/issues/4396
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4396/labels{/name}
https://api.github.com/repos/psf/requests/issues/4396/comments
https://api.github.com/repos/psf/requests/issues/4396/events
https://github.com/psf/requests/issues/4396
276,071,563
MDU6SXNzdWUyNzYwNzE1NjM=
4,396
HTTPDigestAuth Loosing Credentials in Redirect
{ "avatar_url": "https://avatars.githubusercontent.com/u/4992805?v=4", "events_url": "https://api.github.com/users/miili/events{/privacy}", "followers_url": "https://api.github.com/users/miili/followers", "following_url": "https://api.github.com/users/miili/following{/other_user}", "gists_url": "https://api.github.com/users/miili/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/miili", "id": 4992805, "login": "miili", "node_id": "MDQ6VXNlcjQ5OTI4MDU=", "organizations_url": "https://api.github.com/users/miili/orgs", "received_events_url": "https://api.github.com/users/miili/received_events", "repos_url": "https://api.github.com/users/miili/repos", "site_admin": false, "starred_url": "https://api.github.com/users/miili/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/miili/subscriptions", "type": "User", "url": "https://api.github.com/users/miili", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2017-11-22T13:42:11Z
2021-09-08T05:00:54Z
2017-11-24T15:30:11Z
NONE
resolved
Loosing credentials over redirect `https://e4ftl01.cr.usgs.gov/SRTM/SRTMGL3.003/2000.02.11/N01E041.SRTMGL3.hgt.zip` Cannot send credentials to the website. ## Actual Result 401 - Unauthorized :angry: ## Reproduction Steps ```python import requests from requests.auth import HTTPDigestAuth cred = ('usr', 'pwd') s = requests.Session() s.auth = HTTPDigestAuth(*cred) r = s.get('https://e4ftl01.cr.usgs.gov/SRTM/SRTMGL3.003/2000.02.11/N01E041.SRTMGL3.hgt.zip') >>> <Response 401> print(r.headers) >>> {'Server': 'nginx/1.10.2', 'Date': 'Wed, 22 Nov 2017 13:38:23 GMT', 'Content-Type': 'text/html; charset=utf-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'X-Frame-Options': 'SAMEORIGIN', 'X-XSS-Protection': '1; mode=block', 'X-Content-Type-Options': 'nosniff', 'WWW-Authenticate': 'Basic realm="Please enter your Earthdata Login credentials. If you do not have a Earthdata Login, create one at https://urs.earthdata.nasa.gov//users/new"', 'Cache-Control': 'no-cache', 'X-Request-Id': 'a40e5c15-2072-4ac2-832d-293db65a87d2', 'X-Runtime': '0.040991', 'Strict-Transport-Security': 'max-age=31536000'} ``` ## Solution ```python import requests from requests.auth import HTTPDigestAuth cred = ('usr', 'pwd') s = requests.Session() s.auth = HTTPDigestAuth(*cred) r = s.get('https://e4ftl01.cr.usgs.gov/SRTM/SRTMGL3.003/2000.02.11/N01E041.SRTMGL3.hgt.zip') r = s.get(r.url, stream=True) with open('/tmp/file', 'wb') as f: for d in r.iter_content(): f.write(d) ``` ## System Information $ python3 -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "3.6.3" }, "platform": { "release": "4.12.0-1-amd64", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.18.4" }, "system_ssl": { "version": "1010007f" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": false } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4396/reactions" }
https://api.github.com/repos/psf/requests/issues/4396/timeline
null
completed
null
null
false
[ "I am able to reproduce this problem with the master branch. In my case, the HTTP status code of the redirect is 307.\r\n\r\n@miili Could you also share the output for `r.history` after the 401?", "Oh, actually, my server didn't support HTTP Digest authentication. Looking at the headers of the response from the U...
https://api.github.com/repos/psf/requests/issues/4395
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4395/labels{/name}
https://api.github.com/repos/psf/requests/issues/4395/comments
https://api.github.com/repos/psf/requests/issues/4395/events
https://github.com/psf/requests/issues/4395
275,975,253
MDU6SXNzdWUyNzU5NzUyNTM=
4,395
Get error "requests.exceptions.ConnectionError: ('Connection aborted.', error(54, 'Connection reset by peer'))"
{ "avatar_url": "https://avatars.githubusercontent.com/u/7599378?v=4", "events_url": "https://api.github.com/users/thanhmimi/events{/privacy}", "followers_url": "https://api.github.com/users/thanhmimi/followers", "following_url": "https://api.github.com/users/thanhmimi/following{/other_user}", "gists_url": "https://api.github.com/users/thanhmimi/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/thanhmimi", "id": 7599378, "login": "thanhmimi", "node_id": "MDQ6VXNlcjc1OTkzNzg=", "organizations_url": "https://api.github.com/users/thanhmimi/orgs", "received_events_url": "https://api.github.com/users/thanhmimi/received_events", "repos_url": "https://api.github.com/users/thanhmimi/repos", "site_admin": false, "starred_url": "https://api.github.com/users/thanhmimi/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/thanhmimi/subscriptions", "type": "User", "url": "https://api.github.com/users/thanhmimi", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2017-11-22T08:00:38Z
2021-09-08T05:00:53Z
2017-11-27T13:04:16Z
NONE
resolved
Summary. With python 2.7.10, I got this error but it's ok with python 3.6. I tried to ask a co-worker to try my code with his computer, it's still work with python2.7.10. It's strange ## Expected Result ## Actual Result What happened instead. ## Reproduction Steps ```python import requests ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.1.3" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "2.7.10" }, "platform": { "release": "16.7.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "9081df", "version": "0.13.1" }, "requests": { "version": "2.18.4" }, "system_ssl": { "version": "9081df" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": true } ``` This command is only available on Requests v2.16.4 and greater. Otherwise, please provide some basic information about your system (Python version, operating system, &c).
{ "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 1, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/psf/requests/issues/4395/reactions" }
https://api.github.com/repos/psf/requests/issues/4395/timeline
null
completed
null
null
false
[ "We need to know more about what’s happening here: can we get some sample code? All this means is that the remote server is closing the connection when we aren’t expecting it.", "This has gone 5 days without information necessary to investigate anything. As such, I'm closing this. If you have the chance to provid...
https://api.github.com/repos/psf/requests/issues/4394
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4394/labels{/name}
https://api.github.com/repos/psf/requests/issues/4394/comments
https://api.github.com/repos/psf/requests/issues/4394/events
https://github.com/psf/requests/pull/4394
275,866,368
MDExOlB1bGxSZXF1ZXN0MTU0MDA2MTA4
4,394
Add documentation for available status codes
{ "avatar_url": "https://avatars.githubusercontent.com/u/842470?v=4", "events_url": "https://api.github.com/users/zaneb/events{/privacy}", "followers_url": "https://api.github.com/users/zaneb/followers", "following_url": "https://api.github.com/users/zaneb/following{/other_user}", "gists_url": "https://api.github.com/users/zaneb/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/zaneb", "id": 842470, "login": "zaneb", "node_id": "MDQ6VXNlcjg0MjQ3MA==", "organizations_url": "https://api.github.com/users/zaneb/orgs", "received_events_url": "https://api.github.com/users/zaneb/received_events", "repos_url": "https://api.github.com/users/zaneb/repos", "site_admin": false, "starred_url": "https://api.github.com/users/zaneb/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zaneb/subscriptions", "type": "User", "url": "https://api.github.com/users/zaneb", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2017-11-21T21:31:13Z
2021-09-04T00:06:39Z
2017-11-23T20:19:13Z
CONTRIBUTOR
resolved
There was no way to determine what actual names were available outside of looking at the source code. They were not listed in the documentation or accessible through the interactive help. In addition, doing `pydoc requests.status_codes` displayed some pretty unhelpful information - the utf-8 encoding string was included in the module name, there was no description, and internal variables used for initialisation leaked into the module scope: DATA code = 511 codes = <lookup 'status_codes'> title = 'network_authentication' titles = ('network_authentication_required', 'network_auth', ... This change prevents the internal variables from leaking, adds a docstring (which has the side-effect of correcting the module name), and appends information on the allowed status code names to the docstring when the module is initialised. The improved module documentation is then used in the API documentation to provide another easy reference to the complete list of status codes.
{ "avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4", "events_url": "https://api.github.com/users/Lukasa/events{/privacy}", "followers_url": "https://api.github.com/users/Lukasa/followers", "following_url": "https://api.github.com/users/Lukasa/following{/other_user}", "gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Lukasa", "id": 1382556, "login": "Lukasa", "node_id": "MDQ6VXNlcjEzODI1NTY=", "organizations_url": "https://api.github.com/users/Lukasa/orgs", "received_events_url": "https://api.github.com/users/Lukasa/received_events", "repos_url": "https://api.github.com/users/Lukasa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions", "type": "User", "url": "https://api.github.com/users/Lukasa", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4394/reactions" }
https://api.github.com/repos/psf/requests/issues/4394/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4394.diff", "html_url": "https://github.com/psf/requests/pull/4394", "merged_at": "2017-11-23T20:19:13Z", "patch_url": "https://github.com/psf/requests/pull/4394.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4394" }
true
[ "# [Codecov](https://codecov.io/gh/requests/requests/pull/4394?src=pr&el=h1) Report\n> Merging [#4394](https://codecov.io/gh/requests/requests/pull/4394?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/e68ef0ecad271f335377804a747afe676d17024d?src=pr&el=desc) will **increase** coverage by...
https://api.github.com/repos/psf/requests/issues/4393
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4393/labels{/name}
https://api.github.com/repos/psf/requests/issues/4393/comments
https://api.github.com/repos/psf/requests/issues/4393/events
https://github.com/psf/requests/issues/4393
275,842,771
MDU6SXNzdWUyNzU4NDI3NzE=
4,393
Quickstart guide is missing section on cookies.
{ "avatar_url": "https://avatars.githubusercontent.com/u/6380199?v=4", "events_url": "https://api.github.com/users/eliothxchan/events{/privacy}", "followers_url": "https://api.github.com/users/eliothxchan/followers", "following_url": "https://api.github.com/users/eliothxchan/following{/other_user}", "gists_url": "https://api.github.com/users/eliothxchan/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/eliothxchan", "id": 6380199, "login": "eliothxchan", "node_id": "MDQ6VXNlcjYzODAxOTk=", "organizations_url": "https://api.github.com/users/eliothxchan/orgs", "received_events_url": "https://api.github.com/users/eliothxchan/received_events", "repos_url": "https://api.github.com/users/eliothxchan/repos", "site_admin": false, "starred_url": "https://api.github.com/users/eliothxchan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/eliothxchan/subscriptions", "type": "User", "url": "https://api.github.com/users/eliothxchan", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2017-11-21T20:05:17Z
2021-09-08T06:00:27Z
2017-11-21T20:14:26Z
NONE
resolved
The quickstart guide has a section for cookies in the table of contents, but there isn't actually anything there. http://docs.python-requests.org/en/master/user/quickstart/#cookies
{ "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/4393/reactions" }
https://api.github.com/repos/psf/requests/issues/4393/timeline
null
completed
null
null
false
[ "@eliotxchan, is this happening consistently on page refreshes and across different browsers? I can access that page fine on multiple devices.\r\n\r\nIf it still isn't showing up, there's either a network or browser issue somewhere on your end.", "Additionally, you can find the section on cookies here: https://gi...
https://api.github.com/repos/psf/requests/issues/4392
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4392/labels{/name}
https://api.github.com/repos/psf/requests/issues/4392/comments
https://api.github.com/repos/psf/requests/issues/4392/events
https://github.com/psf/requests/issues/4392
275,463,564
MDU6SXNzdWUyNzU0NjM1NjQ=
4,392
Streamed request with preset Host header sends two Host headers
{ "avatar_url": "https://avatars.githubusercontent.com/u/46775?v=4", "events_url": "https://api.github.com/users/mjpieters/events{/privacy}", "followers_url": "https://api.github.com/users/mjpieters/followers", "following_url": "https://api.github.com/users/mjpieters/following{/other_user}", "gists_url": "https://api.github.com/users/mjpieters/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mjpieters", "id": 46775, "login": "mjpieters", "node_id": "MDQ6VXNlcjQ2Nzc1", "organizations_url": "https://api.github.com/users/mjpieters/orgs", "received_events_url": "https://api.github.com/users/mjpieters/received_events", "repos_url": "https://api.github.com/users/mjpieters/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mjpieters/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mjpieters/subscriptions", "type": "User", "url": "https://api.github.com/users/mjpieters", "user_view_type": "public" }
[ { "color": "e10c02", "default": false, "description": null, "id": 117744, "name": "Bug", "node_id": "MDU6TGFiZWwxMTc3NDQ=", "url": "https://api.github.com/repos/psf/requests/labels/Bug" } ]
closed
false
null
[]
null
8
2017-11-20T19:04:03Z
2024-05-19T18:59:49Z
2024-05-19T18:59:48Z
CONTRIBUTOR
null
The following code sends **two** host headers: ```python import requests def gen(): yield b'binary data' requests.post( 'http://localhost:3000/', data=gen(), headers={'Host': 'example.com'} ) ``` (I tested with `nc -vvl 3000` on OS X). Headers received: ``` POST / HTTP/1.1 Host: localhost:3000 User-Agent: python-requests/2.18.1 Accept-Encoding: gzip, deflate Accept: */* Connection: keep-alive Host: example.com Transfer-Encoding: chunked ``` This is because when chunking a request, we don't tell the `httplib` / `http.client` library to skip the host header if one is already set. From the [`adapters.HTTPAdapter.send()` implementation](https://github.com/requests/requests/blob/9a8a826f226e6973d72914b4a4fc806e0b5036f4/requests/adapters.py#L456-L458): ```python low_conn.putrequest(request.method, url, skip_accept_encoding=True) ``` which leaves the [`skip_host` parameter](https://docs.python.org/3/library/http.client.html#http.client.HTTPConnection.putrequest) set to `False`. It probably should use `skip_host='host' in request.headers` here. ## System Information ``` >>> requests.help.main() { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.0.3" }, "implementation": { "name": "CPython", "version": "3.6.3" }, "platform": { "release": "16.7.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "1010006f", "version": "17.3.0" }, "requests": { "version": "2.18.1" }, "system_ssl": { "version": "100020cf" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": true } ```
{ "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/4392/reactions" }
https://api.github.com/repos/psf/requests/issues/4392/timeline
null
completed
null
null
false
[ "Yep, this looks like a miss from #3637. Since we're not using urllib3's chunked request interface, we never got the change integrated in Requests.\r\n\r\nThe quick path here is to carry the host dedupe logic from urrlib3 into that try block. The better but likely more involved solution would be to try to use urll...
https://api.github.com/repos/psf/requests/issues/4391
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4391/labels{/name}
https://api.github.com/repos/psf/requests/issues/4391/comments
https://api.github.com/repos/psf/requests/issues/4391/events
https://github.com/psf/requests/issues/4391
275,422,135
MDU6SXNzdWUyNzU0MjIxMzU=
4,391
requests.session ignores second `verify` argument?
{ "avatar_url": "https://avatars.githubusercontent.com/u/769730?v=4", "events_url": "https://api.github.com/users/hjwp/events{/privacy}", "followers_url": "https://api.github.com/users/hjwp/followers", "following_url": "https://api.github.com/users/hjwp/following{/other_user}", "gists_url": "https://api.github.com/users/hjwp/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/hjwp", "id": 769730, "login": "hjwp", "node_id": "MDQ6VXNlcjc2OTczMA==", "organizations_url": "https://api.github.com/users/hjwp/orgs", "received_events_url": "https://api.github.com/users/hjwp/received_events", "repos_url": "https://api.github.com/users/hjwp/repos", "site_admin": false, "starred_url": "https://api.github.com/users/hjwp/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hjwp/subscriptions", "type": "User", "url": "https://api.github.com/users/hjwp", "user_view_type": "public" }
[]
closed
true
null
[]
null
8
2017-11-20T16:44:42Z
2021-09-01T00:11:35Z
2018-01-23T15:50:43Z
NONE
resolved
Am doing some testing for HTTPS certificates, and am seeing some unexpected behaviour from the requests "session" object: ``` import requests # www.ottg.eu has a known invalid https certificate: requests.session().get('https://www.ottg.eu', verify=True) # raises error as expected session = requests.session() session.get('https://www.ottg.eu', verify=False) # as expected does not raise, prints InsecureRequestWarning, session.get('https://www.ottg.eu', verify=True) # unexpectedly, this seems to ignore the verify parameter, and it does not raise # it also still prints the InsecureRequestWarning ``` That doesn't seem right? tested against requests 2.18.4 on ubuntu 17.10
{ "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/4391/reactions" }
https://api.github.com/repos/psf/requests/issues/4391/timeline
null
completed
null
null
false
[ "(just repro'd in both python2 and python3, and on windows)", "maybe this is expected behaviour? because of connection pooling?", "(with apologies for the stream-of-consciousness) -- it definitely is because of connection pooling, isn't it. behaviour surprising but maybe not unexpected after all? i suppose a...
https://api.github.com/repos/psf/requests/issues/4390
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4390/labels{/name}
https://api.github.com/repos/psf/requests/issues/4390/comments
https://api.github.com/repos/psf/requests/issues/4390/events
https://github.com/psf/requests/pull/4390
275,284,831
MDExOlB1bGxSZXF1ZXN0MTUzNTc3OTY2
4,390
[docs; tiny] Clarify that Response.ok will *only* return True/False
{ "avatar_url": "https://avatars.githubusercontent.com/u/301220?v=4", "events_url": "https://api.github.com/users/alexwlchan/events{/privacy}", "followers_url": "https://api.github.com/users/alexwlchan/followers", "following_url": "https://api.github.com/users/alexwlchan/following{/other_user}", "gists_url": "https://api.github.com/users/alexwlchan/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/alexwlchan", "id": 301220, "login": "alexwlchan", "node_id": "MDQ6VXNlcjMwMTIyMA==", "organizations_url": "https://api.github.com/users/alexwlchan/orgs", "received_events_url": "https://api.github.com/users/alexwlchan/received_events", "repos_url": "https://api.github.com/users/alexwlchan/repos", "site_admin": false, "starred_url": "https://api.github.com/users/alexwlchan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/alexwlchan/subscriptions", "type": "User", "url": "https://api.github.com/users/alexwlchan", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2017-11-20T09:19:38Z
2021-09-04T00:06:40Z
2017-11-20T13:18:01Z
CONTRIBUTOR
resolved
This is a tiny documentation fix, just to be super-duper explicit about the return value of `response.ok`. (I wanted to check I could use its value in a function that’s meant to return a boolean, but the docs weren’t clear about what a non-Truthy return value would be.)
{ "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/4390/reactions" }
https://api.github.com/repos/psf/requests/issues/4390/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4390.diff", "html_url": "https://github.com/psf/requests/pull/4390", "merged_at": "2017-11-20T13:18:01Z", "patch_url": "https://github.com/psf/requests/pull/4390.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4390" }
true
[ "# [Codecov](https://codecov.io/gh/requests/requests/pull/4390?src=pr&el=h1) Report\n> Merging [#4390](https://codecov.io/gh/requests/requests/pull/4390?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/c3f2553114fdaf83b9c646a73987bbd2f13285e1?src=pr&el=desc) will **not change** coverage....
https://api.github.com/repos/psf/requests/issues/4389
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4389/labels{/name}
https://api.github.com/repos/psf/requests/issues/4389/comments
https://api.github.com/repos/psf/requests/issues/4389/events
https://github.com/psf/requests/issues/4389
275,169,373
MDU6SXNzdWUyNzUxNjkzNzM=
4,389
Raise the real error if max retries failed.
{ "avatar_url": "https://avatars.githubusercontent.com/u/1014282?v=4", "events_url": "https://api.github.com/users/orzilca/events{/privacy}", "followers_url": "https://api.github.com/users/orzilca/followers", "following_url": "https://api.github.com/users/orzilca/following{/other_user}", "gists_url": "https://api.github.com/users/orzilca/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/orzilca", "id": 1014282, "login": "orzilca", "node_id": "MDQ6VXNlcjEwMTQyODI=", "organizations_url": "https://api.github.com/users/orzilca/orgs", "received_events_url": "https://api.github.com/users/orzilca/received_events", "repos_url": "https://api.github.com/users/orzilca/repos", "site_admin": false, "starred_url": "https://api.github.com/users/orzilca/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/orzilca/subscriptions", "type": "User", "url": "https://api.github.com/users/orzilca", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2017-11-19T15:55:02Z
2021-09-08T05:00:51Z
2017-11-28T12:59:35Z
NONE
resolved
When using Retry(), if max retries is reached an error is thrown "max retries". Is it possible to see the real API error? the real HTTP response instead? ## Expected Result The real error/http response. (ResponseError in the example below) ## Actual Result max retries error, not logging correctly on Sentry. ``` MaxRetryError(\"HTTPSConnectionPool(host='***', port=443): Max retries exceeded with url: *** (Caused by ResponseError('too many 401 error responses',))\",) is not JSON serializable ``` ## Reproduction Steps ```python import requests import urllib import logging import json from requests.packages.urllib3.util.retry import Retry session = requests.Session() retries = Retry( total=3, backoff_factor=0.5, method_whitelist=frozenset(['HEAD', 'TRACE', 'GET', 'PUT', 'OPTIONS', 'DELETE', 'POST']), status_forcelist=[401, 403, 404, 500, 502, 503, 504] ) session.mount("http://", requests.adapters.HTTPAdapter(max_retries=retries)) session.mount("https://", requests.adapters.HTTPAdapter(max_retries=retries)) if method == 'GET': if params: endpoint = '%s?%s' % (endpoint, urllib.urlencode(params)) response = session.get(endpoint, headers=headers) elif method == 'POST': response = session.post(endpoint, data=params, headers=headers) elif method == 'POST/JSON': response = session.post(endpoint, json=params, headers=headers) elif method == 'PUT/JSON': response = session.put(endpoint, json=params, headers=headers) else: raise Exception("Invalid method.") ``` ## System Information $ python -m requests.help ``` Python 2.7.5 (default, Nov 6 2016, 00:28:07) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux2 Requests version 2.13 urllib3 version 1.20 ```
{ "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/4389/reactions" }
https://api.github.com/repos/psf/requests/issues/4389/timeline
null
completed
null
null
false
[ "Which error is the real one? What happens if for each of your three retries, we get a different error? Let's say, first we get a `ConnectionTimeout`. Then we receive a 500 and then a 403? Which one do you want us to tell you about?", "Thats a good question @sigmavirus24 \r\n\r\nBasically I wish to know to real e...
https://api.github.com/repos/psf/requests/issues/4388
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4388/labels{/name}
https://api.github.com/repos/psf/requests/issues/4388/comments
https://api.github.com/repos/psf/requests/issues/4388/events
https://github.com/psf/requests/issues/4388
275,151,457
MDU6SXNzdWUyNzUxNTE0NTc=
4,388
FileNotFoundError: [Errno 2] No such file or directory: './README.rst'
{ "avatar_url": "https://avatars.githubusercontent.com/u/30954037?v=4", "events_url": "https://api.github.com/users/lvallejou85/events{/privacy}", "followers_url": "https://api.github.com/users/lvallejou85/followers", "following_url": "https://api.github.com/users/lvallejou85/following{/other_user}", "gists_url": "https://api.github.com/users/lvallejou85/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lvallejou85", "id": 30954037, "login": "lvallejou85", "node_id": "MDQ6VXNlcjMwOTU0MDM3", "organizations_url": "https://api.github.com/users/lvallejou85/orgs", "received_events_url": "https://api.github.com/users/lvallejou85/received_events", "repos_url": "https://api.github.com/users/lvallejou85/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lvallejou85/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lvallejou85/subscriptions", "type": "User", "url": "https://api.github.com/users/lvallejou85", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2017-11-19T11:27:43Z
2021-09-08T06:00:27Z
2017-11-19T16:02:17Z
NONE
resolved
Summary. ## Expected Result pip install request Installed OK ## Actual Result pip install request Collecting request Using cached request-0.0.13.tar.gz Collecting get (from request) Using cached get-0.0.21.tar.gz Collecting post (from request) Using cached post-0.0.13.tar.gz Collecting setupfiles (from request) Using cached setupfiles-0.0.50.tar.gz Collecting query_string (from get->request) Using cached query_string-0.0.12.tar.gz Collecting public (from query_string->get->request) Using cached public-0.0.41.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-bex9djjl/public/setup.py", line 28, in <module> setup_cfg_data = read_configuration(path) File "/tmp/pip-build-bex9djjl/public/setup.py", line 23, in read_configuration val = open(val).read() FileNotFoundError: [Errno 2] No such file or directory: './README.rst' ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-bex9djjl/public/ What happened instead. Library installation failed ## Reproduction Steps ```python pip install request ``` ## System Information $ python -m requests.help ``` No module named requests.help ``` 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). ![selection_999 1555](https://user-images.githubusercontent.com/30954037/32990180-bca9465a-ccf2-11e7-8025-55fa1a7d985d.png) ![image](https://user-images.githubusercontent.com/30954037/32990178-b2fb6b88-ccf2-11e7-8882-71dcc56747e2.png)
{ "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/4388/reactions" }
https://api.github.com/repos/psf/requests/issues/4388/timeline
null
completed
null
null
false
[ "@lvallejou85 it looks like you're missing the final \"s\" in the package name in your install command. It should be `pip install requests`." ]
https://api.github.com/repos/psf/requests/issues/4387
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4387/labels{/name}
https://api.github.com/repos/psf/requests/issues/4387/comments
https://api.github.com/repos/psf/requests/issues/4387/events
https://github.com/psf/requests/pull/4387
275,004,208
MDExOlB1bGxSZXF1ZXN0MTUzMzk5ODEx
4,387
Clarify raw response reading in the quickstart.
{ "avatar_url": "https://avatars.githubusercontent.com/u/350812?v=4", "events_url": "https://api.github.com/users/dave-shawley/events{/privacy}", "followers_url": "https://api.github.com/users/dave-shawley/followers", "following_url": "https://api.github.com/users/dave-shawley/following{/other_user}", "gists_url": "https://api.github.com/users/dave-shawley/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/dave-shawley", "id": 350812, "login": "dave-shawley", "node_id": "MDQ6VXNlcjM1MDgxMg==", "organizations_url": "https://api.github.com/users/dave-shawley/orgs", "received_events_url": "https://api.github.com/users/dave-shawley/received_events", "repos_url": "https://api.github.com/users/dave-shawley/repos", "site_admin": false, "starred_url": "https://api.github.com/users/dave-shawley/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/dave-shawley/subscriptions", "type": "User", "url": "https://api.github.com/users/dave-shawley", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2017-11-17T21:38:49Z
2021-09-04T00:06:41Z
2017-11-18T09:44:29Z
CONTRIBUTOR
resolved
It's a small change but this would have saved me a bit of time today.
{ "avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4", "events_url": "https://api.github.com/users/Lukasa/events{/privacy}", "followers_url": "https://api.github.com/users/Lukasa/followers", "following_url": "https://api.github.com/users/Lukasa/following{/other_user}", "gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Lukasa", "id": 1382556, "login": "Lukasa", "node_id": "MDQ6VXNlcjEzODI1NTY=", "organizations_url": "https://api.github.com/users/Lukasa/orgs", "received_events_url": "https://api.github.com/users/Lukasa/received_events", "repos_url": "https://api.github.com/users/Lukasa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions", "type": "User", "url": "https://api.github.com/users/Lukasa", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4387/reactions" }
https://api.github.com/repos/psf/requests/issues/4387/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4387.diff", "html_url": "https://github.com/psf/requests/pull/4387", "merged_at": "2017-11-18T09:44:29Z", "patch_url": "https://github.com/psf/requests/pull/4387.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4387" }
true
[]
https://api.github.com/repos/psf/requests/issues/4386
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4386/labels{/name}
https://api.github.com/repos/psf/requests/issues/4386/comments
https://api.github.com/repos/psf/requests/issues/4386/events
https://github.com/psf/requests/issues/4386
274,857,764
MDU6SXNzdWUyNzQ4NTc3NjQ=
4,386
pip install : Unable to determine SOCKS version
{ "avatar_url": "https://avatars.githubusercontent.com/u/18721751?v=4", "events_url": "https://api.github.com/users/torfhub/events{/privacy}", "followers_url": "https://api.github.com/users/torfhub/followers", "following_url": "https://api.github.com/users/torfhub/following{/other_user}", "gists_url": "https://api.github.com/users/torfhub/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/torfhub", "id": 18721751, "login": "torfhub", "node_id": "MDQ6VXNlcjE4NzIxNzUx", "organizations_url": "https://api.github.com/users/torfhub/orgs", "received_events_url": "https://api.github.com/users/torfhub/received_events", "repos_url": "https://api.github.com/users/torfhub/repos", "site_admin": false, "starred_url": "https://api.github.com/users/torfhub/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/torfhub/subscriptions", "type": "User", "url": "https://api.github.com/users/torfhub", "user_view_type": "public" }
[]
closed
true
null
[]
null
2
2017-11-17T13:00:08Z
2021-09-08T05:00:51Z
2017-11-28T13:12:36Z
NONE
resolved
i have try all the method, it just not work !
{ "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/4386/reactions" }
https://api.github.com/repos/psf/requests/issues/4386/timeline
null
completed
null
null
false
[ "@torfhub If you really have found a problem and expect to have it fixed, what you wrote is not enough.\r\n\r\nStart by reading [CONTRIBUTING.md](https://github.com/requests/requests/blob/master/CONTRIBUTING.md)\r\n--\r\nAt least post here the command and the output.\r\n", "Hi @torfhub,\r\n\r\nWe will need a lot ...
https://api.github.com/repos/psf/requests/issues/4385
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4385/labels{/name}
https://api.github.com/repos/psf/requests/issues/4385/comments
https://api.github.com/repos/psf/requests/issues/4385/events
https://github.com/psf/requests/issues/4385
274,778,655
MDU6SXNzdWUyNzQ3Nzg2NTU=
4,385
not able to extract key:value from Json
{ "avatar_url": "https://avatars.githubusercontent.com/u/33282235?v=4", "events_url": "https://api.github.com/users/rishi-pal/events{/privacy}", "followers_url": "https://api.github.com/users/rishi-pal/followers", "following_url": "https://api.github.com/users/rishi-pal/following{/other_user}", "gists_url": "https://api.github.com/users/rishi-pal/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/rishi-pal", "id": 33282235, "login": "rishi-pal", "node_id": "MDQ6VXNlcjMzMjgyMjM1", "organizations_url": "https://api.github.com/users/rishi-pal/orgs", "received_events_url": "https://api.github.com/users/rishi-pal/received_events", "repos_url": "https://api.github.com/users/rishi-pal/repos", "site_admin": false, "starred_url": "https://api.github.com/users/rishi-pal/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/rishi-pal/subscriptions", "type": "User", "url": "https://api.github.com/users/rishi-pal", "user_view_type": "public" }
[]
closed
true
null
[]
null
8
2017-11-17T07:44:17Z
2021-09-08T06:00:27Z
2017-11-17T12:11:05Z
NONE
resolved
I am able to get whole json data but not able to get specific key:values from json data (url). Have someone seen this issue ? ## Expected Result Specific Key:Value Pair i.e ( ID : 123456) What you expected. I want to extract key-value from json data ## Actual Result Getting below error print (data["id"]) Traceback (most recent call last): File "", line 1, in KeyError: 'id' What happened instead. ## Reproduction Steps <code> import urllib, json import requests from requests.auth import HTTPBasicAuth url = requests.get('http://ac-infinibox10.com/api/rest/pools', auth=HTTPBasicAuth('test', 'test')) data = url.json() print(data) ###### this works print (data['id']) ###### this does not works ================== System information: Python 2.7 RHEL 7
{ "avatar_url": "https://avatars.githubusercontent.com/u/33282235?v=4", "events_url": "https://api.github.com/users/rishi-pal/events{/privacy}", "followers_url": "https://api.github.com/users/rishi-pal/followers", "following_url": "https://api.github.com/users/rishi-pal/following{/other_user}", "gists_url": "https://api.github.com/users/rishi-pal/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/rishi-pal", "id": 33282235, "login": "rishi-pal", "node_id": "MDQ6VXNlcjMzMjgyMjM1", "organizations_url": "https://api.github.com/users/rishi-pal/orgs", "received_events_url": "https://api.github.com/users/rishi-pal/received_events", "repos_url": "https://api.github.com/users/rishi-pal/repos", "site_admin": false, "starred_url": "https://api.github.com/users/rishi-pal/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/rishi-pal/subscriptions", "type": "User", "url": "https://api.github.com/users/rishi-pal", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4385/reactions" }
https://api.github.com/repos/psf/requests/issues/4385/timeline
null
completed
null
null
false
[ "Hi - can you print output of `print(data)` ?", "{u'metadata': {u'ready': True, u'number_of_objects': 3, u'pages_total': 1, u'page': 1, u'page_size': 50}, u'result': [{u'volumes_count': 1, u'updated_at': 1487594704819, u'max_extend': -1, u'allocated_physical_space': 10000007168, u'free_virtual_space': 99990000369...
https://api.github.com/repos/psf/requests/issues/4384
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4384/labels{/name}
https://api.github.com/repos/psf/requests/issues/4384/comments
https://api.github.com/repos/psf/requests/issues/4384/events
https://github.com/psf/requests/pull/4384
274,425,324
MDExOlB1bGxSZXF1ZXN0MTUyOTczNTI0
4,384
Correct HTTP -> HTML in quickstart doc
{ "avatar_url": "https://avatars.githubusercontent.com/u/532281?v=4", "events_url": "https://api.github.com/users/taleinat/events{/privacy}", "followers_url": "https://api.github.com/users/taleinat/followers", "following_url": "https://api.github.com/users/taleinat/following{/other_user}", "gists_url": "https://api.github.com/users/taleinat/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/taleinat", "id": 532281, "login": "taleinat", "node_id": "MDQ6VXNlcjUzMjI4MQ==", "organizations_url": "https://api.github.com/users/taleinat/orgs", "received_events_url": "https://api.github.com/users/taleinat/received_events", "repos_url": "https://api.github.com/users/taleinat/repos", "site_admin": false, "starred_url": "https://api.github.com/users/taleinat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/taleinat/subscriptions", "type": "User", "url": "https://api.github.com/users/taleinat", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2017-11-16T08:00:32Z
2021-09-04T00:06:41Z
2017-11-16T16:01:45Z
CONTRIBUTOR
resolved
The quickstart doc apparently wanted to mention that "HTML and XML have ways of specifying their encoding in their body".
{ "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/4384/reactions" }
https://api.github.com/repos/psf/requests/issues/4384/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4384.diff", "html_url": "https://github.com/psf/requests/pull/4384", "merged_at": "2017-11-16T16:01:45Z", "patch_url": "https://github.com/psf/requests/pull/4384.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4384" }
true
[ "# [Codecov](https://codecov.io/gh/requests/requests/pull/4384?src=pr&el=h1) Report\n> Merging [#4384](https://codecov.io/gh/requests/requests/pull/4384?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/d55de2d391d1350766221ce0aa36e670dc2a0169?src=pr&el=desc) will **not change** coverage....
https://api.github.com/repos/psf/requests/issues/4383
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4383/labels{/name}
https://api.github.com/repos/psf/requests/issues/4383/comments
https://api.github.com/repos/psf/requests/issues/4383/events
https://github.com/psf/requests/issues/4383
274,030,998
MDU6SXNzdWUyNzQwMzA5OTg=
4,383
How can I get session storage variable in Python requests library?
{ "avatar_url": "https://avatars.githubusercontent.com/u/24641385?v=4", "events_url": "https://api.github.com/users/willowTank/events{/privacy}", "followers_url": "https://api.github.com/users/willowTank/followers", "following_url": "https://api.github.com/users/willowTank/following{/other_user}", "gists_url": "https://api.github.com/users/willowTank/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/willowTank", "id": 24641385, "login": "willowTank", "node_id": "MDQ6VXNlcjI0NjQxMzg1", "organizations_url": "https://api.github.com/users/willowTank/orgs", "received_events_url": "https://api.github.com/users/willowTank/received_events", "repos_url": "https://api.github.com/users/willowTank/repos", "site_admin": false, "starred_url": "https://api.github.com/users/willowTank/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/willowTank/subscriptions", "type": "User", "url": "https://api.github.com/users/willowTank", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2017-11-15T04:26:46Z
2021-09-08T06:00:28Z
2017-11-15T20:24:45Z
NONE
resolved
I want to get session storage variable when I call any url. Best Regards here is my code ``` > self.session = requests.Session() > self.session.mount('https://', HTTPAdapter(max_retries=4)) > resp = self.session.get("https://m.betclic.it/sport/sportList/") ``` this is session storage when I visit this site ![uta](https://user-images.githubusercontent.com/24641385/32818822-82fd67e6-ca00-11e7-890b-9bdf2cfc88e2.png)
{ "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/4383/reactions" }
https://api.github.com/repos/psf/requests/issues/4383/timeline
null
completed
null
null
false
[ "This isn't a bug or feature request and is therefore better suited to a question and answer site like [StackOverflow](https://stackoverflow.com/questions/tagged/python-requests)." ]
https://api.github.com/repos/psf/requests/issues/4382
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4382/labels{/name}
https://api.github.com/repos/psf/requests/issues/4382/comments
https://api.github.com/repos/psf/requests/issues/4382/events
https://github.com/psf/requests/issues/4382
273,081,514
MDU6SXNzdWUyNzMwODE1MTQ=
4,382
request fails with bad handshake error
{ "avatar_url": "https://avatars.githubusercontent.com/u/8977402?v=4", "events_url": "https://api.github.com/users/uttampawar/events{/privacy}", "followers_url": "https://api.github.com/users/uttampawar/followers", "following_url": "https://api.github.com/users/uttampawar/following{/other_user}", "gists_url": "https://api.github.com/users/uttampawar/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/uttampawar", "id": 8977402, "login": "uttampawar", "node_id": "MDQ6VXNlcjg5Nzc0MDI=", "organizations_url": "https://api.github.com/users/uttampawar/orgs", "received_events_url": "https://api.github.com/users/uttampawar/received_events", "repos_url": "https://api.github.com/users/uttampawar/repos", "site_admin": false, "starred_url": "https://api.github.com/users/uttampawar/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/uttampawar/subscriptions", "type": "User", "url": "https://api.github.com/users/uttampawar", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2017-11-10T22:42:54Z
2021-09-08T06:00:28Z
2017-11-14T18:57:48Z
NONE
resolved
Summary. I've a node.js server running with local certificate for SSL connection created using openssl command as, ``` $ openssl req -x509 -newkey rsa:2048 -nodes -sha256 -subj '/CN=localhost' -keyout localhost-privkey.pem -out localhost-cert.pem ``` Trying to use requests module to initiate communication with this node.js server which fails with various errors. ## Reproduction Steps ```python >>> import requests >>> requests.get("https://localhost:9000/getcpuinfo") ... requests.exceptions.SSLError: ("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",) ``` So I tried to pass verify=False option as, ``` >>> requests.get("https://localhost:9000/getcpuinfo", verify=False) equests.exceptions.SSLError: ("bad handshake: SysCallError(-1, 'Unexpected EOF')",) ``` I tested the server with "curl" utility as shown below, ``` $ curl https://localhost:9000/loaddb curl: (60) SSL certificate problem: self signed certificate <--- fails ``` But it works with "-k" to ignore certificate verification step, ``` $ curl -k https://localhost:9000/getcpuinfo {"hw":{"architecture":"x64","model":"Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz","speed":899,"sys":3600700,"irq":0,"idle":2617236700,"user":17612800,"nice":39400,"endianness":"LE","totalmem":33605652480,"freemem":27233288192},"sw":{"platform":"linux","release":"4.9.0-3-amd64","type":"Linux","uptime":265048},"appName":"Cluster","version":{"http_parser":"2.7.0","node":"9.0.0-pre","v8":"6.1.534.42","uv":"1.14.1","zlib":"1.2.11","ares":"1.13.0","modules":"58","nghttp2":"1.25.0","openssl":"1.0.2l","icu":"59.1","unicode":"9.0","cldr":"31.0.1","tz":"2017b"},"cpuCount":0} ``` So why doesn't requests module ignores certificate validation when "verify=False"? Environment details: OS: Linux nodejs-work 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u5 (2017-09-19) x86_64 GNU/Linux Python: Python 2.7.13 (default, Jan 19 2017, 14:48:08) [GCC 6.3.0 20170118] on linux2 Client/Public certificate (localhost-cert.pem), ``` ----BEGIN CERTIFICATE----- MIIC/jCCAeagAwIBAgIJAKATu2AY/QT4MA0GCSqGSIb3DQEBCwUAMBQxEjAQBgNV BAMMCWxvY2FsaG9zdDAeFw0xNzExMDkyMTQ1NTBaFw0xNzEyMDkyMTQ1NTBaMBQx EjAQBgNVBAMMCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC ggEBAJTPk5nao0wG/EDFGnq7BvXMkEZ5oUVq7PAUxWi+E/byJk924l7Z5kACgWBa zQL0lLXLpdMk97EFGWMblz5Ehtqh7U8HaE9OZ6x/pesDTka+REnpXecklRrdZHX7 lfFnNIU58grPpB2GyUXrRdOtcPlaKXUo+VTd7PgwMtYVtt8pyTWxSB2MMYrqJGT8 78KX6trRzQLm7tas3U0jD59+R8j7gxU6FyFaNJBrkJ5T9kHGKOsAzSqZdCgRBjl5 i7xcXJfOAAnZ3jhGlY5DQht+HZDHhjkLG9kcZZhFDYteFk8drzbd3lBw96nLq+8A Sy92FtQL4GiYSwZ0WVAmwmTCGjUCAwEAAaNTMFEwHQYDVR0OBBYEFLYjwGKbcV9h sYHxe8l9UvXVivByMB8GA1UdIwQYMBaAFLYjwGKbcV9hsYHxe8l9UvXVivByMA8G A1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHl7okBCJlms+cwfzLhs sbyyuX2wgngxyvjy497zBmeh1TiueGPhOx9u/sfJSZmoUaeRd/zPGkp2DcPQ+Lo2 EHYrXMPE1Ecgpu/15JZ8jNuE+FwZb9lllULLwzq8pDkdbdsSRltdV/rFlZ2YkscB c+xvVaCltw5KpKnY6AWHoqwoDcd8TZKzyKXLSuluKbHNC1lvg8cMzs6hFA9P92Ae 9P08AKLAIOGJ7QzRrXQIsAO4p9rHheeZeYQZyNiRrXPQUoWos4+OjynaNs+FabhN XBtSl/GGPRRRfU/D9v4iKfQx15CEvs1AKn1Z6mIPF05pSqbgIoz2mJBV6UM7e+hz TRs= -----END CERTIFICATE----- ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4", "events_url": "https://api.github.com/users/Lukasa/events{/privacy}", "followers_url": "https://api.github.com/users/Lukasa/followers", "following_url": "https://api.github.com/users/Lukasa/following{/other_user}", "gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Lukasa", "id": 1382556, "login": "Lukasa", "node_id": "MDQ6VXNlcjEzODI1NTY=", "organizations_url": "https://api.github.com/users/Lukasa/orgs", "received_events_url": "https://api.github.com/users/Lukasa/received_events", "repos_url": "https://api.github.com/users/Lukasa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions", "type": "User", "url": "https://api.github.com/users/Lukasa", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4382/reactions" }
https://api.github.com/repos/psf/requests/issues/4382/timeline
null
completed
null
null
false
[ "Requests *is* ignoring the certificate validation: the server you're using is closing the connection in our face after it sends the certificate to us. That is an issue with your server." ]
https://api.github.com/repos/psf/requests/issues/4381
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4381/labels{/name}
https://api.github.com/repos/psf/requests/issues/4381/comments
https://api.github.com/repos/psf/requests/issues/4381/events
https://github.com/psf/requests/issues/4381
272,981,702
MDU6SXNzdWUyNzI5ODE3MDI=
4,381
SSLError "bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],) with self signed certificate
{ "avatar_url": "https://avatars.githubusercontent.com/u/17707629?v=4", "events_url": "https://api.github.com/users/sg77/events{/privacy}", "followers_url": "https://api.github.com/users/sg77/followers", "following_url": "https://api.github.com/users/sg77/following{/other_user}", "gists_url": "https://api.github.com/users/sg77/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sg77", "id": 17707629, "login": "sg77", "node_id": "MDQ6VXNlcjE3NzA3NjI5", "organizations_url": "https://api.github.com/users/sg77/orgs", "received_events_url": "https://api.github.com/users/sg77/received_events", "repos_url": "https://api.github.com/users/sg77/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sg77/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sg77/subscriptions", "type": "User", "url": "https://api.github.com/users/sg77", "user_view_type": "public" }
[]
closed
true
null
[]
null
13
2017-11-10T16:09:37Z
2021-08-27T00:08:35Z
2017-11-14T18:56:35Z
NONE
resolved
Hello. I'm trying to connect to a server with https. I have the certificate which is a self signed certificate which is being included in the verify parameter but the result is an error 'certificate verify failed' error. I was suspecting it had to do with the certificate being self signed (by Microsoft IIS) but with curl this works. Thanks in advance! This is the openssl output: ``` openssl s_client -showcerts -connect server:44300 CONNECTED(00000003) depth=0 CN = server verify error:num=20:unable to get local issuer certificate verify return:1 depth=0 CN = server verify error:num=21:unable to verify the first certificate verify return:1 --- Certificate chain 0 s:/CN=server i:/CN=server -----BEGIN CERTIFICATE----- <certificate data here> -----END CERTIFICATE----- --- Server certificate subject=/CN=server issuer=/CN=server --- No client certificate CA names sent Peer signing digest: SHA1 Server Temp Key: ECDH, P-256, 256 bits --- SSL handshake has read 1477 bytes and written 431 bytes --- New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES256-GCM-SHA384 Server public key is 2048 bit Secure Renegotiation IS supported Compression: NONE Expansion: NONE No ALPN negotiated SSL-Session: Protocol : TLSv1.2 Cipher : ECDHE-RSA-AES256-GCM-SHA384 Session-ID: CC4A000083B1E03B446416C9C0B16CBEAB79949E3CF5C936A309A6F92FA01364 Session-ID-ctx: Master-Key: 798A570B0EC2A0CBB7C4C4DE6167E7579A92239942D869CD794B8BEBEA6EB5E492394634AD32665A8BB829DE1F3858D2 Key-Arg : None PSK identity: None PSK identity hint: None SRP username: None Start Time: 1510329948 Timeout : 300 (sec) Verify return code: 21 (unable to verify the first certificate) --- ``` ## Expected Result I'm expecting, since the certificate is in the verify parameter, that the connection won't fail. If I try the same with curl outside python it works: ``` curl https://server:44300 --cacert /usr/share/ca-certificates/server.crt HTTP/1.1 403 Forbidden Cache-Control: no-store, no-cache, must-revalidate Pragma: no-cache Content-Length: 1158 Content-Type: text/html Server: Microsoft-IIS/10.0 X-Frame-Options: SAMEORIGIN P3P: CP=None Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS Access-Control-Allow-Headers: X-Requested-With,Content-Type Access-Control-Allow-Credentials: true Date: Fri, 10 Nov 2017 16:02:26 GMT ``` (It fails but not because of certificate issues) ## Actual Result ``` Traceback (most recent call last): File "<string>", line 1, in <module> File "xxxxx/TestVirtualEnv/local/lib/python2.7/site-packages/requests/api.py", line 72, in get return request('get', url, params=params, **kwargs) File "xxxxx/TestVirtualEnv/local/lib/python2.7/site-packages/requests/api.py", line 58, in request return session.request(method=method, url=url, **kwargs) File "xxxxx/TestVirtualEnv/local/lib/python2.7/site-packages/requests/sessions.py", line 508, in request resp = self.send(prep, **send_kwargs) File "xxxxx/TestVirtualEnv/local/lib/python2.7/site-packages/requests/sessions.py", line 618, in send r = adapter.send(request, **kwargs) File "xxxxx/TestVirtualEnv/local/lib/python2.7/site-packages/requests/adapters.py", line 506, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='nlybstqvp4nb75n.code1.emi.philips.com', port=44300): Max retries exceeded with url: / (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),)) ``` ## Reproduction Steps ```python import requests requests.get('https://server:44300', verify='/usr/share/ca-certificates/server.crt') ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.1.3" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "2.7.12" }, "platform": { "release": "4.10.0-38-generic", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "1010007f", "version": "17.3.0" }, "requests": { "version": "2.18.4" }, "system_ssl": { "version": "1000207f" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": true } ``` This command is only available on Requests v2.16.4 and greater. Otherwise, please provide some basic information about your system (Python version, operating system, &c).
{ "avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4", "events_url": "https://api.github.com/users/Lukasa/events{/privacy}", "followers_url": "https://api.github.com/users/Lukasa/followers", "following_url": "https://api.github.com/users/Lukasa/following{/other_user}", "gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Lukasa", "id": 1382556, "login": "Lukasa", "node_id": "MDQ6VXNlcjEzODI1NTY=", "organizations_url": "https://api.github.com/users/Lukasa/orgs", "received_events_url": "https://api.github.com/users/Lukasa/received_events", "repos_url": "https://api.github.com/users/Lukasa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions", "type": "User", "url": "https://api.github.com/users/Lukasa", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4381/reactions" }
https://api.github.com/repos/psf/requests/issues/4381/timeline
null
completed
null
null
false
[ "BTW, this is Ubuntu 16.04", "This error is almost certainly because the certificate itself is invalid in some way. Can you provide the PEM-encoded certificate itself, please?", "Hi. Thanks for the quick answer. This is the certificate:\r\n-----BEGIN CERTIFICATE-----\r\nMIID3TCCAsWgAwIBAgIIU/nMdlbWojMwDQYJKoZIh...
https://api.github.com/repos/psf/requests/issues/4380
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4380/labels{/name}
https://api.github.com/repos/psf/requests/issues/4380/comments
https://api.github.com/repos/psf/requests/issues/4380/events
https://github.com/psf/requests/pull/4380
272,844,649
MDExOlB1bGxSZXF1ZXN0MTUxODQzNTA5
4,380
utils: winreg module may not exist like on windows universal platform.
{ "avatar_url": "https://avatars.githubusercontent.com/u/2063885?v=4", "events_url": "https://api.github.com/users/afedchin/events{/privacy}", "followers_url": "https://api.github.com/users/afedchin/followers", "following_url": "https://api.github.com/users/afedchin/following{/other_user}", "gists_url": "https://api.github.com/users/afedchin/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/afedchin", "id": 2063885, "login": "afedchin", "node_id": "MDQ6VXNlcjIwNjM4ODU=", "organizations_url": "https://api.github.com/users/afedchin/orgs", "received_events_url": "https://api.github.com/users/afedchin/received_events", "repos_url": "https://api.github.com/users/afedchin/repos", "site_admin": false, "starred_url": "https://api.github.com/users/afedchin/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/afedchin/subscriptions", "type": "User", "url": "https://api.github.com/users/afedchin", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2017-11-10T07:35:33Z
2021-09-04T00:06:36Z
2017-11-27T20:39:16Z
CONTRIBUTOR
resolved
UWP has no API to get access to windows registry, so python has no winreg module on UWP. This fixes unexpected error on UWP.
{ "avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4", "events_url": "https://api.github.com/users/Lukasa/events{/privacy}", "followers_url": "https://api.github.com/users/Lukasa/followers", "following_url": "https://api.github.com/users/Lukasa/following{/other_user}", "gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Lukasa", "id": 1382556, "login": "Lukasa", "node_id": "MDQ6VXNlcjEzODI1NTY=", "organizations_url": "https://api.github.com/users/Lukasa/orgs", "received_events_url": "https://api.github.com/users/Lukasa/received_events", "repos_url": "https://api.github.com/users/Lukasa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions", "type": "User", "url": "https://api.github.com/users/Lukasa", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4380/reactions" }
https://api.github.com/repos/psf/requests/issues/4380/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4380.diff", "html_url": "https://github.com/psf/requests/pull/4380", "merged_at": "2017-11-27T20:39:16Z", "patch_url": "https://github.com/psf/requests/pull/4380.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4380" }
true
[ "# [Codecov](https://codecov.io/gh/requests/requests/pull/4380?src=pr&el=h1) Report\n> Merging [#4380](https://codecov.io/gh/requests/requests/pull/4380?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/d1fb1a29ab949223d8d64797e0fcc9a7d2690483?src=pr&el=desc) will **decrease** coverage by...
https://api.github.com/repos/psf/requests/issues/4379
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4379/labels{/name}
https://api.github.com/repos/psf/requests/issues/4379/comments
https://api.github.com/repos/psf/requests/issues/4379/events
https://github.com/psf/requests/issues/4379
272,439,890
MDU6SXNzdWUyNzI0Mzk4OTA=
4,379
Error in request: EOF occurred in violation of protocol (_ssl.c:590)
{ "avatar_url": "https://avatars.githubusercontent.com/u/8120377?v=4", "events_url": "https://api.github.com/users/w888/events{/privacy}", "followers_url": "https://api.github.com/users/w888/followers", "following_url": "https://api.github.com/users/w888/following{/other_user}", "gists_url": "https://api.github.com/users/w888/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/w888", "id": 8120377, "login": "w888", "node_id": "MDQ6VXNlcjgxMjAzNzc=", "organizations_url": "https://api.github.com/users/w888/orgs", "received_events_url": "https://api.github.com/users/w888/received_events", "repos_url": "https://api.github.com/users/w888/repos", "site_admin": false, "starred_url": "https://api.github.com/users/w888/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/w888/subscriptions", "type": "User", "url": "https://api.github.com/users/w888", "user_view_type": "public" }
[]
closed
true
null
[]
null
3
2017-11-09T04:49:27Z
2021-09-08T05:00:46Z
2017-11-28T13:14:14Z
NONE
resolved
Summary. ## Expected Result No exception ## Actual Result ``` INFO:root:Updating jobs in ['vm_docker_test.yaml'] ([]) Traceback (most recent call last): File "/usr/local/Cellar/jenkins-job-builder/1.6.2/libexec/bin/jenkins-jobs", line 10, in <module> sys.exit(main()) File "/usr/local/Cellar/jenkins-job-builder/1.6.2/libexec/lib/python2.7/site-packages/jenkins_jobs/cmd.py", line 191, in main execute(options, config) File "/usr/local/Cellar/jenkins-job-builder/1.6.2/libexec/lib/python2.7/site-packages/jenkins_jobs/cmd.py", line 372, in execute n_workers=options.n_workers) File "/usr/local/Cellar/jenkins-job-builder/1.6.2/libexec/lib/python2.7/site-packages/jenkins_jobs/builder.py", line 348, in update_jobs self.load_files(input_fn) File "/usr/local/Cellar/jenkins-job-builder/1.6.2/libexec/lib/python2.7/site-packages/jenkins_jobs/builder.py", line 245, in load_files self.parser = YamlParser(self.global_config, self.plugins_list) File "/usr/local/Cellar/jenkins-job-builder/1.6.2/libexec/lib/python2.7/site-packages/jenkins_jobs/builder.py", line 241, in plugins_list self._plugins_list = self.jenkins.get_plugins_info() File "/usr/local/Cellar/jenkins-job-builder/1.6.2/libexec/lib/python2.7/site-packages/jenkins_jobs/builder.py", line 205, in get_plugins_info raise e jenkins.JenkinsException: Error in request: EOF occurred in violation of protocol (_ssl.c:590) ``` ## Reproduction Steps i am trying to create a jenkins jobs through jjb ``` jenkins-jobs --conf ./jenkins_jobs.ini update vm_docker_test.yaml ``` where jenkins_jobs.ini ``` [job_builder] ignore_cache=True keep_descriptions=False recursive=False exclude=.*:manual:./development allow_duplicates=False allow_empty_variables=True [jenkins] user=someuser password=somepassword url=https://subdomain.company.com/jenkins/group query_plugins_info=True ``` ## System Information ``` openssl version OpenSSL 1.0.2l 25 May 2017 pip freeze asn1crypto==0.23.0 certifi==2017.7.27.1 cffi==1.11.2 chardet==3.0.4 cryptography==2.1.2 Cython==0.27.1 enum34==1.1.6 http-client==0.1.22 idna==2.5 ipaddress==1.0.18 ndg-httpsclient==0.4.3 pyasn1==0.3.7 pycparser==2.18 pycurl==7.43.0 pyOpenSSL==17.3.0 requests==2.18.4 six==1.11.0 urllib3==1.22 ```
{ "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/4379/reactions" }
https://api.github.com/repos/psf/requests/issues/4379/timeline
null
completed
null
null
false
[ "It seems like your Jenkins doesn't like our TLS handshake. Can you run `openssl s_client -connect jenkins_host:jenkins_port` and provide the output here?", "Hi @w888,\r\n\r\nIt seems this isn't an issue for you any longer. If I'm wrong, please provide us with the information that @Lukasa requested.\r\n\r\nUntil ...
https://api.github.com/repos/psf/requests/issues/4378
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4378/labels{/name}
https://api.github.com/repos/psf/requests/issues/4378/comments
https://api.github.com/repos/psf/requests/issues/4378/events
https://github.com/psf/requests/pull/4378
272,411,012
MDExOlB1bGxSZXF1ZXN0MTUxNTQxMzE4
4,378
for RFC-7616 add SHA-256 and SHA-512
{ "avatar_url": "https://avatars.githubusercontent.com/u/438131?v=4", "events_url": "https://api.github.com/users/linuxlizard/events{/privacy}", "followers_url": "https://api.github.com/users/linuxlizard/followers", "following_url": "https://api.github.com/users/linuxlizard/following{/other_user}", "gists_url": "https://api.github.com/users/linuxlizard/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/linuxlizard", "id": 438131, "login": "linuxlizard", "node_id": "MDQ6VXNlcjQzODEzMQ==", "organizations_url": "https://api.github.com/users/linuxlizard/orgs", "received_events_url": "https://api.github.com/users/linuxlizard/received_events", "repos_url": "https://api.github.com/users/linuxlizard/repos", "site_admin": false, "starred_url": "https://api.github.com/users/linuxlizard/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/linuxlizard/subscriptions", "type": "User", "url": "https://api.github.com/users/linuxlizard", "user_view_type": "public" }
[]
closed
true
null
[]
null
9
2017-11-09T01:38:02Z
2021-09-04T00:06:38Z
2017-11-29T14:08:31Z
CONTRIBUTOR
resolved
While working with some FIPS libraries that disabled MD5, we ran into a problem with our Requests based tools not being able to talk to our server. <img width="1440" alt="screen shot 2017-11-08 at 4 19 47 pm" src="https://user-images.githubusercontent.com/438131/32584052-c4a29c36-c4b3-11e7-8ca1-7601c60c60f2.png"> I haven't fully read the RFC-7616 SHA-256 and SHA-512 standards but this patch works. Thanks for Requests!
{ "avatar_url": "https://avatars.githubusercontent.com/u/438131?v=4", "events_url": "https://api.github.com/users/linuxlizard/events{/privacy}", "followers_url": "https://api.github.com/users/linuxlizard/followers", "following_url": "https://api.github.com/users/linuxlizard/following{/other_user}", "gists_url": "https://api.github.com/users/linuxlizard/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/linuxlizard", "id": 438131, "login": "linuxlizard", "node_id": "MDQ6VXNlcjQzODEzMQ==", "organizations_url": "https://api.github.com/users/linuxlizard/orgs", "received_events_url": "https://api.github.com/users/linuxlizard/received_events", "repos_url": "https://api.github.com/users/linuxlizard/repos", "site_admin": false, "starred_url": "https://api.github.com/users/linuxlizard/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/linuxlizard/subscriptions", "type": "User", "url": "https://api.github.com/users/linuxlizard", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4378/reactions" }
https://api.github.com/repos/psf/requests/issues/4378/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4378.diff", "html_url": "https://github.com/psf/requests/pull/4378", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/4378.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4378" }
true
[ "# [Codecov](https://codecov.io/gh/requests/requests/pull/4378?src=pr&el=h1) Report\n> Merging [#4378](https://codecov.io/gh/requests/requests/pull/4378?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/c3f2553114fdaf83b9c646a73987bbd2f13285e1?src=pr&el=desc) will **decrease** coverage by...
https://api.github.com/repos/psf/requests/issues/4377
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4377/labels{/name}
https://api.github.com/repos/psf/requests/issues/4377/comments
https://api.github.com/repos/psf/requests/issues/4377/events
https://github.com/psf/requests/pull/4377
271,849,469
MDExOlB1bGxSZXF1ZXN0MTUxMTI2Njc4
4,377
#4373, fix possible winreg value type difference
{ "avatar_url": "https://avatars.githubusercontent.com/u/1170592?v=4", "events_url": "https://api.github.com/users/mingyuan-xia/events{/privacy}", "followers_url": "https://api.github.com/users/mingyuan-xia/followers", "following_url": "https://api.github.com/users/mingyuan-xia/following{/other_user}", "gists_url": "https://api.github.com/users/mingyuan-xia/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mingyuan-xia", "id": 1170592, "login": "mingyuan-xia", "node_id": "MDQ6VXNlcjExNzA1OTI=", "organizations_url": "https://api.github.com/users/mingyuan-xia/orgs", "received_events_url": "https://api.github.com/users/mingyuan-xia/received_events", "repos_url": "https://api.github.com/users/mingyuan-xia/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mingyuan-xia/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mingyuan-xia/subscriptions", "type": "User", "url": "https://api.github.com/users/mingyuan-xia", "user_view_type": "public" }
[]
closed
true
null
[]
null
6
2017-11-07T14:25:49Z
2021-09-04T00:06:40Z
2017-11-20T20:01:05Z
CONTRIBUTOR
resolved
{ "avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4", "events_url": "https://api.github.com/users/Lukasa/events{/privacy}", "followers_url": "https://api.github.com/users/Lukasa/followers", "following_url": "https://api.github.com/users/Lukasa/following{/other_user}", "gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Lukasa", "id": 1382556, "login": "Lukasa", "node_id": "MDQ6VXNlcjEzODI1NTY=", "organizations_url": "https://api.github.com/users/Lukasa/orgs", "received_events_url": "https://api.github.com/users/Lukasa/received_events", "repos_url": "https://api.github.com/users/Lukasa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions", "type": "User", "url": "https://api.github.com/users/Lukasa", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4377/reactions" }
https://api.github.com/repos/psf/requests/issues/4377/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4377.diff", "html_url": "https://github.com/psf/requests/pull/4377", "merged_at": "2017-11-20T20:01:05Z", "patch_url": "https://github.com/psf/requests/pull/4377.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4377" }
true
[ "# [Codecov](https://codecov.io/gh/requests/requests/pull/4377?src=pr&el=h1) Report\n> Merging [#4377](https://codecov.io/gh/requests/requests/pull/4377?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/e4fc3539b43416f9e9ba6837d73b1b7392d4b242?src=pr&el=desc) will **increase** coverage by...
https://api.github.com/repos/psf/requests/issues/4376
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4376/labels{/name}
https://api.github.com/repos/psf/requests/issues/4376/comments
https://api.github.com/repos/psf/requests/issues/4376/events
https://github.com/psf/requests/issues/4376
271,639,730
MDU6SXNzdWUyNzE2Mzk3MzA=
4,376
SSLError when requests deportesweb.madrid.es
{ "avatar_url": "https://avatars.githubusercontent.com/u/5998601?v=4", "events_url": "https://api.github.com/users/s-nt-s/events{/privacy}", "followers_url": "https://api.github.com/users/s-nt-s/followers", "following_url": "https://api.github.com/users/s-nt-s/following{/other_user}", "gists_url": "https://api.github.com/users/s-nt-s/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/s-nt-s", "id": 5998601, "login": "s-nt-s", "node_id": "MDQ6VXNlcjU5OTg2MDE=", "organizations_url": "https://api.github.com/users/s-nt-s/orgs", "received_events_url": "https://api.github.com/users/s-nt-s/received_events", "repos_url": "https://api.github.com/users/s-nt-s/repos", "site_admin": false, "starred_url": "https://api.github.com/users/s-nt-s/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/s-nt-s/subscriptions", "type": "User", "url": "https://api.github.com/users/s-nt-s", "user_view_type": "public" }
[]
closed
true
null
[]
null
14
2017-11-06T22:13:47Z
2021-09-08T06:00:29Z
2017-11-07T20:45:56Z
NONE
resolved
`ssl.SSLEOFError: EOF occurred in violation of protocol ` when requests `deportesweb.madrid.es` ## Reproduction Steps ```console Python 3.5.2 (default, Sep 14 2017, 22:51:06) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import requests >>> s = requests.Session() >>> s.get("https://deportesweb.madrid.es/deportesWeb/Login", verify=False) Traceback (most recent call last): File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 560, in urlopen body=body, headers=headers) File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 346, in _make_request self._validate_conn(conn) File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 787, in _validate_conn conn.connect() File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 252, in connect ssl_version=resolved_ssl_version) File "/usr/lib/python3/dist-packages/urllib3/util/ssl_.py", line 305, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File "/usr/lib/python3.5/ssl.py", line 377, in wrap_socket _context=self) File "/usr/lib/python3.5/ssl.py", line 752, in __init__ self.do_handshake() File "/usr/lib/python3.5/ssl.py", line 988, in do_handshake self._sslobj.do_handshake() File "/usr/lib/python3.5/ssl.py", line 633, in do_handshake self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:645) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/requests/adapters.py", line 376, in send timeout=timeout File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 589, in urlopen raise SSLError(e) requests.packages.urllib3.exceptions.SSLError: EOF occurred in violation of protocol (_ssl.c:645) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python3/dist-packages/requests/sessions.py", line 480, in get return self.request('GET', url, **kwargs) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 468, in request resp = self.send(prep, **send_kwargs) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 576, in send r = adapter.send(request, **kwargs) File "/usr/lib/python3/dist-packages/requests/adapters.py", line 447, in send raise SSLError(e, request=request) requests.exceptions.SSLError: EOF occurred in violation of protocol (_ssl.c:645) ``` ## System Information ``` $ python3 -m requests.help /usr/bin/python3: No module named requests.help $ python3 --version Python 3.5.2 $ python3 -c "import requests; print (requests.__version__)" 2.9.1 $ uname -a Linux yamato 4.4.0-53-generic #74-Ubuntu SMP Fri Dec 2 15:59:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux ``` https://www.ssllabs.com/ssltest/analyze.html?d=deportesweb.madrid.es&hideResults=on ## Second try ```console $ sudo pip3 install -U requests Collecting requests Downloading requests-2.18.4-py2.py3-none-any.whl (88kB) 100% |████████████████████████████████| 92kB 270kB/s Collecting urllib3<1.23,>=1.21.1 (from requests) Downloading urllib3-1.22-py2.py3-none-any.whl (132kB) 100% |████████████████████████████████| 133kB 193kB/s Collecting chardet<3.1.0,>=3.0.2 (from requests) Downloading chardet-3.0.4-py2.py3-none-any.whl (133kB) 100% |████████████████████████████████| 143kB 305kB/s Collecting idna<2.7,>=2.5 (from requests) Downloading idna-2.6-py2.py3-none-any.whl (56kB) 100% |████████████████████████████████| 61kB 562kB/s Collecting certifi>=2017.4.17 (from requests) Downloading certifi-2017.11.5-py2.py3-none-any.whl (330kB) 100% |████████████████████████████████| 337kB 93kB/s Installing collected packages: urllib3, chardet, idna, certifi, requests Found existing installation: urllib3 1.13.1 Uninstalling urllib3-1.13.1: Successfully uninstalled urllib3-1.13.1 Found existing installation: chardet 2.3.0 Uninstalling chardet-2.3.0: Successfully uninstalled chardet-2.3.0 Found existing installation: idna 2.0 Uninstalling idna-2.0: Successfully uninstalled idna-2.0 Found existing installation: requests 2.9.1 Uninstalling requests-2.9.1: Successfully uninstalled requests-2.9.1 Successfully installed certifi-2017.11.5 chardet-3.0.4 idna-2.6 requests-2.18.4 urllib3-1.22 $ python3 -c "import requests; print (requests.__version__)" 2.18.4 $ python3 -m requests.help { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "3.5.2" }, "platform": { "release": "4.4.0-53-generic", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.18.4" }, "system_ssl": { "version": "1000207f" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": false } $ python3 Python 3.5.2 (default, Sep 14 2017, 22:51:06) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import requests >>> s = requests.Session() >>> s.get("https://deportesweb.madrid.es/deportesWeb/Login", verify=False) Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 601, in urlopen chunked=chunked) File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 346, in _make_request self._validate_conn(conn) File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 850, in _validate_conn conn.connect() File "/usr/local/lib/python3.5/dist-packages/urllib3/connection.py", line 326, in connect ssl_context=context) File "/usr/local/lib/python3.5/dist-packages/urllib3/util/ssl_.py", line 329, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File "/usr/lib/python3.5/ssl.py", line 377, in wrap_socket _context=self) File "/usr/lib/python3.5/ssl.py", line 752, in __init__ self.do_handshake() File "/usr/lib/python3.5/ssl.py", line 988, in do_handshake self._sslobj.do_handshake() File "/usr/lib/python3.5/ssl.py", line 633, in do_handshake self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:645) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/requests/adapters.py", line 440, in send timeout=timeout File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 639, in urlopen _stacktrace=sys.exc_info()[2]) File "/usr/local/lib/python3.5/dist-packages/urllib3/util/retry.py", line 388, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='deportesweb.madrid.es', port=443): Max retries exceeded with url: /deportesWeb/Login (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:645)'),)) 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.5/dist-packages/requests/sessions.py", line 521, in get return self.request('GET', url, **kwargs) File "/usr/local/lib/python3.5/dist-packages/requests/sessions.py", line 508, in request resp = self.send(prep, **send_kwargs) File "/usr/local/lib/python3.5/dist-packages/requests/sessions.py", line 618, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.5/dist-packages/requests/adapters.py", line 506, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='deportesweb.madrid.es', port=443): Max retries exceeded with url: /deportesWeb/Login (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:645)'),)) ``` ## Third try ```console $ sudo pip3 install -U pyopenssl Collecting pyopenssl Downloading pyOpenSSL-17.3.0-py2.py3-none-any.whl (51kB) 100% |████████████████████████████████| 51kB 1.1MB/s Collecting cryptography>=1.9 (from pyopenssl) Downloading cryptography-2.1.3-cp35-cp35m-manylinux1_x86_64.whl (2.2MB) 100% |████████████████████████████████| 2.2MB 242kB/s Collecting six>=1.5.2 (from pyopenssl) Downloading six-1.11.0-py2.py3-none-any.whl Collecting cffi>=1.7; platform_python_implementation != "PyPy" (from cryptography>=1.9->pyopenssl) Downloading cffi-1.11.2-cp35-cp35m-manylinux1_x86_64.whl (419kB) 100% |████████████████████████████████| 419kB 1.3MB/s Collecting asn1crypto>=0.21.0 (from cryptography>=1.9->pyopenssl) Downloading asn1crypto-0.23.0-py2.py3-none-any.whl (99kB) 100% |████████████████████████████████| 102kB 3.7MB/s Requirement already up-to-date: idna>=2.1 in /usr/local/lib/python3.5/dist-packages (from cryptography>=1.9->pyopenssl) Collecting pycparser (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography>=1.9->pyopenssl) Downloading pycparser-2.18.tar.gz (245kB) 100% |████████████████████████████████| 256kB 1.6MB/s Installing collected packages: six, pycparser, cffi, asn1crypto, cryptography, pyopenssl Found existing installation: six 1.10.0 Uninstalling six-1.10.0: Successfully uninstalled six-1.10.0 Running setup.py install for pycparser ... done Found existing installation: cryptography 1.2.3 Uninstalling cryptography-1.2.3: Successfully uninstalled cryptography-1.2.3 Successfully installed asn1crypto-0.23.0 cffi-1.11.2 cryptography-2.1.3 pycparser-2.18 pyopenssl-17.3.0 six-1.11.0 $ python3 Python 3.5.2 (default, Sep 14 2017, 22:51:06) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import requests >>> s = requests.Session() >>> s.get("https://deportesweb.madrid.es/deportesWeb/Login", verify=False) Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/urllib3/contrib/pyopenssl.py", line 441, in wrap_socket cnx.do_handshake() File "/usr/local/lib/python3.5/dist-packages/OpenSSL/SSL.py", line 1716, in do_handshake self._raise_ssl_error(self._ssl, result) File "/usr/local/lib/python3.5/dist-packages/OpenSSL/SSL.py", line 1449, in _raise_ssl_error raise SysCallError(-1, "Unexpected EOF") OpenSSL.SSL.SysCallError: (-1, 'Unexpected EOF') During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 601, in urlopen chunked=chunked) File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 346, in _make_request self._validate_conn(conn) File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 850, in _validate_conn conn.connect() File "/usr/local/lib/python3.5/dist-packages/urllib3/connection.py", line 326, in connect ssl_context=context) File "/usr/local/lib/python3.5/dist-packages/urllib3/util/ssl_.py", line 329, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File "/usr/local/lib/python3.5/dist-packages/urllib3/contrib/pyopenssl.py", line 448, in wrap_socket raise ssl.SSLError('bad handshake: %r' % e) ssl.SSLError: ("bad handshake: SysCallError(-1, 'Unexpected EOF')",) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/requests/adapters.py", line 440, in send timeout=timeout File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 639, in urlopen _stacktrace=sys.exc_info()[2]) File "/usr/local/lib/python3.5/dist-packages/urllib3/util/retry.py", line 388, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='deportesweb.madrid.es', port=443): Max retries exceeded with url: /deportesWeb/Login (Caused by SSLError(SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')",),)) 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.5/dist-packages/requests/sessions.py", line 521, in get return self.request('GET', url, **kwargs) File "/usr/local/lib/python3.5/dist-packages/requests/sessions.py", line 508, in request resp = self.send(prep, **send_kwargs) File "/usr/local/lib/python3.5/dist-packages/requests/sessions.py", line 618, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.5/dist-packages/requests/adapters.py", line 506, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='deportesweb.madrid.es', port=443): Max retries exceeded with url: /deportesWeb/Login (Caused by SSLError(SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')",),)) ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4", "events_url": "https://api.github.com/users/Lukasa/events{/privacy}", "followers_url": "https://api.github.com/users/Lukasa/followers", "following_url": "https://api.github.com/users/Lukasa/following{/other_user}", "gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Lukasa", "id": 1382556, "login": "Lukasa", "node_id": "MDQ6VXNlcjEzODI1NTY=", "organizations_url": "https://api.github.com/users/Lukasa/orgs", "received_events_url": "https://api.github.com/users/Lukasa/received_events", "repos_url": "https://api.github.com/users/Lukasa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions", "type": "User", "url": "https://api.github.com/users/Lukasa", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4376/reactions" }
https://api.github.com/repos/psf/requests/issues/4376/timeline
null
completed
null
null
false
[ "It's an error on `deportesweb.madrid.es` side.\r\n\r\n```\r\n$ wget https://deportesweb.madrid.es/deportesWeb/Login\r\n\r\n--2017-11-07 09:20:51-- https://deportesweb.madrid.es/deportesWeb/Login\r\nResolving deportesweb.madrid.es... 195.55.79.160\r\nConnecting to deportesweb.madrid.es|195.55.79.160|:443... conne...
https://api.github.com/repos/psf/requests/issues/4375
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4375/labels{/name}
https://api.github.com/repos/psf/requests/issues/4375/comments
https://api.github.com/repos/psf/requests/issues/4375/events
https://github.com/psf/requests/issues/4375
271,614,638
MDU6SXNzdWUyNzE2MTQ2Mzg=
4,375
Handle HTTPDigestAuth requests that return stale=true
{ "avatar_url": "https://avatars.githubusercontent.com/u/7587111?v=4", "events_url": "https://api.github.com/users/greeny88/events{/privacy}", "followers_url": "https://api.github.com/users/greeny88/followers", "following_url": "https://api.github.com/users/greeny88/following{/other_user}", "gists_url": "https://api.github.com/users/greeny88/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/greeny88", "id": 7587111, "login": "greeny88", "node_id": "MDQ6VXNlcjc1ODcxMTE=", "organizations_url": "https://api.github.com/users/greeny88/orgs", "received_events_url": "https://api.github.com/users/greeny88/received_events", "repos_url": "https://api.github.com/users/greeny88/repos", "site_admin": false, "starred_url": "https://api.github.com/users/greeny88/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/greeny88/subscriptions", "type": "User", "url": "https://api.github.com/users/greeny88", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2017-11-06T20:46:50Z
2021-09-08T06:00:30Z
2017-11-06T21:07:32Z
NONE
resolved
I'm using the requests library to communicate with a Wildfly management API. In one specific environment, I am getting sporadic 401 responses that include in the 'WWW-Authenticate' the 'stale=true' flag. My understanding of the spec on this header is that the server sees that the authentication is valid but the nonce is old so it sends a new nonce with the stale flag to signal that it wants you to try again with the newly returned nonce. My question is how do I do that with requests? It seems that if I can find a way to build the Authorization header I could manage sending the response myself. However, ideally, I would like to set a limit on the number of times that request would retry this with the new nonce but I don't see that this is an option. In fact, it appears it is currently limited to the 2 attempts (the original 401 and the following response). How do I go about handling this?
{ "avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4", "events_url": "https://api.github.com/users/Lukasa/events{/privacy}", "followers_url": "https://api.github.com/users/Lukasa/followers", "following_url": "https://api.github.com/users/Lukasa/following{/other_user}", "gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Lukasa", "id": 1382556, "login": "Lukasa", "node_id": "MDQ6VXNlcjEzODI1NTY=", "organizations_url": "https://api.github.com/users/Lukasa/orgs", "received_events_url": "https://api.github.com/users/Lukasa/received_events", "repos_url": "https://api.github.com/users/Lukasa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions", "type": "User", "url": "https://api.github.com/users/Lukasa", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4375/reactions" }
https://api.github.com/repos/psf/requests/issues/4375/timeline
null
completed
null
null
false
[ "So the Requests standard Digest Handler does not handle any of this, so you'll need to write a custom auth handler. This is very straightforward, and you can use the DigestAuth handler in the repository as a jumping off point: take that code and make the edits you need." ]
https://api.github.com/repos/psf/requests/issues/4374
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4374/labels{/name}
https://api.github.com/repos/psf/requests/issues/4374/comments
https://api.github.com/repos/psf/requests/issues/4374/events
https://github.com/psf/requests/issues/4374
271,388,756
MDU6SXNzdWUyNzEzODg3NTY=
4,374
pyinstaller make a exe file which contain requests run failed on no requests' windows
{ "avatar_url": "https://avatars.githubusercontent.com/u/20035768?v=4", "events_url": "https://api.github.com/users/Shaunchenzhaojin/events{/privacy}", "followers_url": "https://api.github.com/users/Shaunchenzhaojin/followers", "following_url": "https://api.github.com/users/Shaunchenzhaojin/following{/other_user}", "gists_url": "https://api.github.com/users/Shaunchenzhaojin/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Shaunchenzhaojin", "id": 20035768, "login": "Shaunchenzhaojin", "node_id": "MDQ6VXNlcjIwMDM1NzY4", "organizations_url": "https://api.github.com/users/Shaunchenzhaojin/orgs", "received_events_url": "https://api.github.com/users/Shaunchenzhaojin/received_events", "repos_url": "https://api.github.com/users/Shaunchenzhaojin/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Shaunchenzhaojin/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Shaunchenzhaojin/subscriptions", "type": "User", "url": "https://api.github.com/users/Shaunchenzhaojin", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2017-11-06T08:07:01Z
2021-09-08T06:00:30Z
2017-11-06T20:55:24Z
NONE
resolved
Help me, I just being crazy.... My Pyinstaller version is 3.2.1, Python 2.7.13 and I make a exe which contain requests. But it can not run on other's windows whose without requests. So, which version should I try?
{ "avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4", "events_url": "https://api.github.com/users/Lukasa/events{/privacy}", "followers_url": "https://api.github.com/users/Lukasa/followers", "following_url": "https://api.github.com/users/Lukasa/following{/other_user}", "gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Lukasa", "id": 1382556, "login": "Lukasa", "node_id": "MDQ6VXNlcjEzODI1NTY=", "organizations_url": "https://api.github.com/users/Lukasa/orgs", "received_events_url": "https://api.github.com/users/Lukasa/received_events", "repos_url": "https://api.github.com/users/Lukasa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions", "type": "User", "url": "https://api.github.com/users/Lukasa", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4374/reactions" }
https://api.github.com/repos/psf/requests/issues/4374/timeline
null
completed
null
null
false
[ "I'm afraid this is an issue with PyInstaller, not Requests: we can't really help you with PyInstaller. You'll need to take this up with the developers of PyInstaller." ]
https://api.github.com/repos/psf/requests/issues/4373
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4373/labels{/name}
https://api.github.com/repos/psf/requests/issues/4373/comments
https://api.github.com/repos/psf/requests/issues/4373/events
https://github.com/psf/requests/issues/4373
271,370,604
MDU6SXNzdWUyNzEzNzA2MDQ=
4,373
On Windows, getting wrong proxy settings from Windows registry
{ "avatar_url": "https://avatars.githubusercontent.com/u/1170592?v=4", "events_url": "https://api.github.com/users/mingyuan-xia/events{/privacy}", "followers_url": "https://api.github.com/users/mingyuan-xia/followers", "following_url": "https://api.github.com/users/mingyuan-xia/following{/other_user}", "gists_url": "https://api.github.com/users/mingyuan-xia/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mingyuan-xia", "id": 1170592, "login": "mingyuan-xia", "node_id": "MDQ6VXNlcjExNzA1OTI=", "organizations_url": "https://api.github.com/users/mingyuan-xia/orgs", "received_events_url": "https://api.github.com/users/mingyuan-xia/received_events", "repos_url": "https://api.github.com/users/mingyuan-xia/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mingyuan-xia/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mingyuan-xia/subscriptions", "type": "User", "url": "https://api.github.com/users/mingyuan-xia", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2017-11-06T06:23:08Z
2021-09-08T05:00:54Z
2017-11-22T04:06:07Z
CONTRIBUTOR
resolved
For some windows machines (not all), a confusing Windows registry key type (`HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings \ ProxyEnable`) fails the following code in `requests/requests/utils.py`. ``` proxyEnable = winreg.QueryValueEx(internetSettings, 'ProxyEnable')[0] proxyOverride = winreg.QueryValueEx(internetSettings, 'ProxyOverride')[0] ``` The case is if proxyEnable is a string , everything is fine. But `ProxyEnable` could be `REG_SZ` on some Windows machines (no idea why, but it happens). After user deletes this key or set if to `REG_DWORD 0x00000000(0)`, things get right. But I believe better type checks in requests will help. First found: https://stackoverflow.com/questions/46260169/python-locationvalueerror-no-host-specified Aggregated discussion: https://github.com/conda/conda/issues/3962 ## Expected Result Type checks. no failure for `REG_SZ` values.
{ "avatar_url": "https://avatars.githubusercontent.com/u/1170592?v=4", "events_url": "https://api.github.com/users/mingyuan-xia/events{/privacy}", "followers_url": "https://api.github.com/users/mingyuan-xia/followers", "following_url": "https://api.github.com/users/mingyuan-xia/following{/other_user}", "gists_url": "https://api.github.com/users/mingyuan-xia/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mingyuan-xia", "id": 1170592, "login": "mingyuan-xia", "node_id": "MDQ6VXNlcjExNzA1OTI=", "organizations_url": "https://api.github.com/users/mingyuan-xia/orgs", "received_events_url": "https://api.github.com/users/mingyuan-xia/received_events", "repos_url": "https://api.github.com/users/mingyuan-xia/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mingyuan-xia/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mingyuan-xia/subscriptions", "type": "User", "url": "https://api.github.com/users/mingyuan-xia", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 1, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/psf/requests/issues/4373/reactions" }
https://api.github.com/repos/psf/requests/issues/4373/timeline
null
completed
null
null
false
[ "I'd be happy to merge a patch that resolves this issue.", "PR: https://github.com/requests/requests/pull/4377", "@mingyuan-xia Could you please open a PR with that patch? I'd really love to see that get fixed in the next release of requests.", "https://github.com/requests/requests/pull/4377" ]
https://api.github.com/repos/psf/requests/issues/4372
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4372/labels{/name}
https://api.github.com/repos/psf/requests/issues/4372/comments
https://api.github.com/repos/psf/requests/issues/4372/events
https://github.com/psf/requests/pull/4372
271,213,442
MDExOlB1bGxSZXF1ZXN0MTUwNjg4Njkx
4,372
When Location decoding fails, fall back to original
{ "avatar_url": "https://avatars.githubusercontent.com/u/46775?v=4", "events_url": "https://api.github.com/users/mjpieters/events{/privacy}", "followers_url": "https://api.github.com/users/mjpieters/followers", "following_url": "https://api.github.com/users/mjpieters/following{/other_user}", "gists_url": "https://api.github.com/users/mjpieters/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mjpieters", "id": 46775, "login": "mjpieters", "node_id": "MDQ6VXNlcjQ2Nzc1", "organizations_url": "https://api.github.com/users/mjpieters/orgs", "received_events_url": "https://api.github.com/users/mjpieters/received_events", "repos_url": "https://api.github.com/users/mjpieters/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mjpieters/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mjpieters/subscriptions", "type": "User", "url": "https://api.github.com/users/mjpieters", "user_view_type": "public" }
[]
open
false
null
[]
null
11
2017-11-04T18:28:35Z
2022-01-03T15:30:58Z
null
CONTRIBUTOR
null
Issue #3888 correctly identified Location headers as *usually* containing UTF-8 codepoints (when not correctly URL encoded), but this is not always the case. For example the URL http://www.finanzen.net/suchergebnis.asp?strSuchString=DE0005933931 redirects to `b'/etf/ishares_core_dax\xae_ucits_etf_de'`, containing the Latin-1 byte for the ® character. If UTF-8 decoding fails, it is better to fall back to the original. This issue was found via https://stackoverflow.com/questions/47113376/python-3-x-requests-redirect-with-unicode-character
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/4372/reactions" }
https://api.github.com/repos/psf/requests/issues/4372/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4372.diff", "html_url": "https://github.com/psf/requests/pull/4372", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/4372.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4372" }
true
[ "Crumbs, tests fail on 2.x because it encodes a bytestring (latin-1 encoded), while Python 3 handles a Unicode value. Returning a native `latin-1` string should work there.", "Nope, `to_native_string()` returns a `str` on Python 2. Suggestions to produce consistent output on 2.x and 3.x appreciated; just returnin...
https://api.github.com/repos/psf/requests/issues/4371
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4371/labels{/name}
https://api.github.com/repos/psf/requests/issues/4371/comments
https://api.github.com/repos/psf/requests/issues/4371/events
https://github.com/psf/requests/pull/4371
271,151,619
MDExOlB1bGxSZXF1ZXN0MTUwNjUyOTgw
4,371
support extraction of certificate bundle from a zip archive
{ "avatar_url": "https://avatars.githubusercontent.com/u/2501228?v=4", "events_url": "https://api.github.com/users/ahvigil/events{/privacy}", "followers_url": "https://api.github.com/users/ahvigil/followers", "following_url": "https://api.github.com/users/ahvigil/following{/other_user}", "gists_url": "https://api.github.com/users/ahvigil/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ahvigil", "id": 2501228, "login": "ahvigil", "node_id": "MDQ6VXNlcjI1MDEyMjg=", "organizations_url": "https://api.github.com/users/ahvigil/orgs", "received_events_url": "https://api.github.com/users/ahvigil/received_events", "repos_url": "https://api.github.com/users/ahvigil/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ahvigil/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ahvigil/subscriptions", "type": "User", "url": "https://api.github.com/users/ahvigil", "user_view_type": "public" }
[]
closed
true
null
[]
null
4
2017-11-04T00:27:37Z
2021-09-04T00:06:42Z
2017-11-06T21:08:46Z
CONTRIBUTOR
resolved
Resolves #4369 by checking whether the default CA certificate bundle is being imported from a zip archive. If it is, extract the certificate bundle to a temp folder so it can be handled by the standard OpenSSL libraries.
{ "avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4", "events_url": "https://api.github.com/users/Lukasa/events{/privacy}", "followers_url": "https://api.github.com/users/Lukasa/followers", "following_url": "https://api.github.com/users/Lukasa/following{/other_user}", "gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Lukasa", "id": 1382556, "login": "Lukasa", "node_id": "MDQ6VXNlcjEzODI1NTY=", "organizations_url": "https://api.github.com/users/Lukasa/orgs", "received_events_url": "https://api.github.com/users/Lukasa/received_events", "repos_url": "https://api.github.com/users/Lukasa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions", "type": "User", "url": "https://api.github.com/users/Lukasa", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4371/reactions" }
https://api.github.com/repos/psf/requests/issues/4371/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4371.diff", "html_url": "https://github.com/psf/requests/pull/4371", "merged_at": "2017-11-06T21:08:45Z", "patch_url": "https://github.com/psf/requests/pull/4371.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4371" }
true
[ "# [Codecov](https://codecov.io/gh/requests/requests/pull/4371?src=pr&el=h1) Report\n> Merging [#4371](https://codecov.io/gh/requests/requests/pull/4371?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/81b63419cbd8a6f0c9c2b79083d25dc2260156e3?src=pr&el=desc) will **decrease** coverage by...
https://api.github.com/repos/psf/requests/issues/4370
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4370/labels{/name}
https://api.github.com/repos/psf/requests/issues/4370/comments
https://api.github.com/repos/psf/requests/issues/4370/events
https://github.com/psf/requests/pull/4370
271,148,297
MDExOlB1bGxSZXF1ZXN0MTUwNjUwNTk4
4,370
Actually gmo used
{ "avatar_url": "https://avatars.githubusercontent.com/u/412673?v=4", "events_url": "https://api.github.com/users/gunlinux/events{/privacy}", "followers_url": "https://api.github.com/users/gunlinux/followers", "following_url": "https://api.github.com/users/gunlinux/following{/other_user}", "gists_url": "https://api.github.com/users/gunlinux/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/gunlinux", "id": 412673, "login": "gunlinux", "node_id": "MDQ6VXNlcjQxMjY3Mw==", "organizations_url": "https://api.github.com/users/gunlinux/orgs", "received_events_url": "https://api.github.com/users/gunlinux/received_events", "repos_url": "https://api.github.com/users/gunlinux/repos", "site_admin": false, "starred_url": "https://api.github.com/users/gunlinux/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/gunlinux/subscriptions", "type": "User", "url": "https://api.github.com/users/gunlinux", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2017-11-03T23:56:54Z
2017-11-04T08:44:48Z
2017-11-04T08:44:34Z
NONE
null
Not serious. Not cool.
{ "avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4", "events_url": "https://api.github.com/users/Lukasa/events{/privacy}", "followers_url": "https://api.github.com/users/Lukasa/followers", "following_url": "https://api.github.com/users/Lukasa/following{/other_user}", "gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Lukasa", "id": 1382556, "login": "Lukasa", "node_id": "MDQ6VXNlcjEzODI1NTY=", "organizations_url": "https://api.github.com/users/Lukasa/orgs", "received_events_url": "https://api.github.com/users/Lukasa/received_events", "repos_url": "https://api.github.com/users/Lukasa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions", "type": "User", "url": "https://api.github.com/users/Lukasa", "user_view_type": "public" }
{ "+1": 0, "-1": 1, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/psf/requests/issues/4370/reactions" }
https://api.github.com/repos/psf/requests/issues/4370/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4370.diff", "html_url": "https://github.com/psf/requests/pull/4370", "merged_at": null, "patch_url": "https://github.com/psf/requests/pull/4370.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4370" }
true
[ "# [Codecov](https://codecov.io/gh/requests/requests/pull/4370?src=pr&el=h1) Report\n> Merging [#4370](https://codecov.io/gh/requests/requests/pull/4370?src=pr&el=desc) into [master](https://codecov.io/gh/requests/requests/commit/81b63419cbd8a6f0c9c2b79083d25dc2260156e3?src=pr&el=desc) will **not change** coverage....
https://api.github.com/repos/psf/requests/issues/4369
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4369/labels{/name}
https://api.github.com/repos/psf/requests/issues/4369/comments
https://api.github.com/repos/psf/requests/issues/4369/events
https://github.com/psf/requests/issues/4369
271,078,608
MDU6SXNzdWUyNzEwNzg2MDg=
4,369
IOError when making https requests from executable zip archive
{ "avatar_url": "https://avatars.githubusercontent.com/u/2501228?v=4", "events_url": "https://api.github.com/users/ahvigil/events{/privacy}", "followers_url": "https://api.github.com/users/ahvigil/followers", "following_url": "https://api.github.com/users/ahvigil/following{/other_user}", "gists_url": "https://api.github.com/users/ahvigil/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ahvigil", "id": 2501228, "login": "ahvigil", "node_id": "MDQ6VXNlcjI1MDEyMjg=", "organizations_url": "https://api.github.com/users/ahvigil/orgs", "received_events_url": "https://api.github.com/users/ahvigil/received_events", "repos_url": "https://api.github.com/users/ahvigil/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ahvigil/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ahvigil/subscriptions", "type": "User", "url": "https://api.github.com/users/ahvigil", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2017-11-03T18:43:03Z
2021-09-08T06:00:30Z
2017-11-06T21:08:46Z
CONTRIBUTOR
resolved
Python has supported running packaged zip files [since 2.6](https://bugs.python.org/issue1739468). The [zipapp](https://docs.python.org/3/library/zipapp.html) module newly introduced in python 3 is supposed to make it even easier to create executable python zip archives. As part of this, the contents of the zip archive are added to `sys.path` on execution to facilitate bundling dependencies. Unfortunately, the way `requests` currently handles TLS CA certs is incompatible with this feature- It tries to load a certificate bundle from the `cacert.pem` file provided by the `certifi` package, but this fails in the case where the provided `certifi` installation is packaged as part of a zip archive. ## Expected Result Making https requests using `requests` as part of a zip archive succeeds. ## Actual Result Making https calls using a requests installation from a zip file raises an `IOError` ``` Traceback (most recent call last): File "/usr/local/lib/python3.6/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/local/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "./zipapptest.pyz/__main__.py", line 2, in <module> File "./zipapptest.pyz/requests/api.py", line 72, in get File "./zipapptest.pyz/requests/api.py", line 58, in request File "./zipapptest.pyz/requests/sessions.py", line 508, in request File "./zipapptest.pyz/requests/sessions.py", line 618, in send File "./zipapptest.pyz/requests/adapters.py", line 407, in send File "./zipapptest.pyz/requests/adapters.py", line 226, in cert_verify OSError: Could not find a suitable TLS CA certificate bundle, invalid path: ./zipapptest.pyz/certifi/cacert.pem ``` ## Reproduction Steps I generated a minimal zip that should execute the following code: ```python import requests requests.get('https://www.google.com') ``` Reproduced within a `python:3` docker container ```bash # will generate a barebones zip archive from the contents of this folder mkdir zipapptest # produce a 2 line __main__.py that reproduces the bug cat >zipapptest/__main__.py <<EOF import requests requests.get('https://www.google.com') EOF # I will try to include the requests dependency in the archive pip install -t zipapptest requests # generate an executable zip from the above folder python -m zipapp --python $(which python) zipapptest # try to run the generated archive ./zipapptest.pyz ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "3.6.3" }, "platform": { "release": "4.9.49-moby", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.18.4" }, "system_ssl": { "version": "1000114f" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": false } ``` This command is only available on Requests v2.16.4 and greater. Otherwise, please provide some basic information about your system (Python version, operating system, &c).
{ "avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4", "events_url": "https://api.github.com/users/Lukasa/events{/privacy}", "followers_url": "https://api.github.com/users/Lukasa/followers", "following_url": "https://api.github.com/users/Lukasa/following{/other_user}", "gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Lukasa", "id": 1382556, "login": "Lukasa", "node_id": "MDQ6VXNlcjEzODI1NTY=", "organizations_url": "https://api.github.com/users/Lukasa/orgs", "received_events_url": "https://api.github.com/users/Lukasa/received_events", "repos_url": "https://api.github.com/users/Lukasa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions", "type": "User", "url": "https://api.github.com/users/Lukasa", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4369/reactions" }
https://api.github.com/repos/psf/requests/issues/4369/timeline
null
completed
null
null
false
[]
https://api.github.com/repos/psf/requests/issues/4368
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4368/labels{/name}
https://api.github.com/repos/psf/requests/issues/4368/comments
https://api.github.com/repos/psf/requests/issues/4368/events
https://github.com/psf/requests/pull/4368
270,985,347
MDExOlB1bGxSZXF1ZXN0MTUwNTMzMDE0
4,368
Clarify behaviour of `json` parameter.
{ "avatar_url": "https://avatars.githubusercontent.com/u/131395?v=4", "events_url": "https://api.github.com/users/danielroseman/events{/privacy}", "followers_url": "https://api.github.com/users/danielroseman/followers", "following_url": "https://api.github.com/users/danielroseman/following{/other_user}", "gists_url": "https://api.github.com/users/danielroseman/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/danielroseman", "id": 131395, "login": "danielroseman", "node_id": "MDQ6VXNlcjEzMTM5NQ==", "organizations_url": "https://api.github.com/users/danielroseman/orgs", "received_events_url": "https://api.github.com/users/danielroseman/received_events", "repos_url": "https://api.github.com/users/danielroseman/repos", "site_admin": false, "starred_url": "https://api.github.com/users/danielroseman/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/danielroseman/subscriptions", "type": "User", "url": "https://api.github.com/users/danielroseman", "user_view_type": "public" }
[]
closed
true
null
[]
null
5
2017-11-03T13:53:31Z
2021-09-04T00:06:40Z
2017-11-22T15:56:10Z
CONTRIBUTOR
resolved
`json` is ignored if `data` is not empty.
{ "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/4368/reactions" }
https://api.github.com/repos/psf/requests/issues/4368/timeline
null
null
false
{ "diff_url": "https://github.com/psf/requests/pull/4368.diff", "html_url": "https://github.com/psf/requests/pull/4368", "merged_at": "2017-11-22T15:56:10Z", "patch_url": "https://github.com/psf/requests/pull/4368.patch", "url": "https://api.github.com/repos/psf/requests/pulls/4368" }
true
[ "How about this?\r\n\r\n> The `data` parameter takes precedence over the `json` parameter.", "# [Codecov](https://codecov.io/gh/requests/requests/pull/4368?src=pr&el=h1) Report\n> Merging [#4368](https://codecov.io/gh/requests/requests/pull/4368?src=pr&el=desc) into [master](https://codecov.io/gh/requests/request...
https://api.github.com/repos/psf/requests/issues/4367
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4367/labels{/name}
https://api.github.com/repos/psf/requests/issues/4367/comments
https://api.github.com/repos/psf/requests/issues/4367/events
https://github.com/psf/requests/issues/4367
270,978,423
MDU6SXNzdWUyNzA5Nzg0MjM=
4,367
Exception ignored in: <generator object iter_slices at 0x7f...90>
{ "avatar_url": "https://avatars.githubusercontent.com/u/14262975?v=4", "events_url": "https://api.github.com/users/mikkqu/events{/privacy}", "followers_url": "https://api.github.com/users/mikkqu/followers", "following_url": "https://api.github.com/users/mikkqu/following{/other_user}", "gists_url": "https://api.github.com/users/mikkqu/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mikkqu", "id": 14262975, "login": "mikkqu", "node_id": "MDQ6VXNlcjE0MjYyOTc1", "organizations_url": "https://api.github.com/users/mikkqu/orgs", "received_events_url": "https://api.github.com/users/mikkqu/received_events", "repos_url": "https://api.github.com/users/mikkqu/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mikkqu/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mikkqu/subscriptions", "type": "User", "url": "https://api.github.com/users/mikkqu", "user_view_type": "public" }
[]
closed
true
null
[]
null
6
2017-11-03T13:31:03Z
2018-03-13T16:55:36Z
2017-11-27T13:15:04Z
NONE
off-topic
I am getting an annoying warning message from requests library. Everything seem to work fine except that the message is extremely annoying and I'm having a lot of them. That's how it looks like. ``` Exception ignored in: <generator object iter_slices at 0x7f332d3cf990> Traceback (most recent call last): File "/home/mqu/.pyenv/versions/3.6.2/lib/python3.6/site-packages/requests/utils.py", line 449, in iter_slices def iter_slices(string, slice_length): SystemError: error return without exception set ``` This is the only line where I'm using requests in my program, I'm just sending JSON to different servers once in a while. ``` requests.post(url, json={'command': command, 'arguments': arguments}).json() ``` Could this error message be more descriptive? What can I do to make it go away? Anything else I can provide to you to help me identify the cause? Thanks in advance. requests-2.18.4
{ "avatar_url": "https://avatars.githubusercontent.com/u/240830?v=4", "events_url": "https://api.github.com/users/sigmavirus24/events{/privacy}", "followers_url": "https://api.github.com/users/sigmavirus24/followers", "following_url": "https://api.github.com/users/sigmavirus24/following{/other_user}", "gists_url": "https://api.github.com/users/sigmavirus24/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sigmavirus24", "id": 240830, "login": "sigmavirus24", "node_id": "MDQ6VXNlcjI0MDgzMA==", "organizations_url": "https://api.github.com/users/sigmavirus24/orgs", "received_events_url": "https://api.github.com/users/sigmavirus24/received_events", "repos_url": "https://api.github.com/users/sigmavirus24/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sigmavirus24/subscriptions", "type": "User", "url": "https://api.github.com/users/sigmavirus24", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4367/reactions" }
https://api.github.com/repos/psf/requests/issues/4367/timeline
null
completed
null
null
false
[ "The usage of requests will not by itself throw such an exception. Can you provide a [SSCCE](http://www.sscce.org/) that demonstrates the problem?\r\n\r\nThis works fine:\r\n\r\n```python\r\nimport requests\r\n\r\nbody = {\"foo\": 1, \"bar\": \"BAR\", \"baz\": True}\r\nresponse = requests.post(\"https://httpbin.org...
https://api.github.com/repos/psf/requests/issues/4366
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4366/labels{/name}
https://api.github.com/repos/psf/requests/issues/4366/comments
https://api.github.com/repos/psf/requests/issues/4366/events
https://github.com/psf/requests/issues/4366
270,706,372
MDU6SXNzdWUyNzA3MDYzNzI=
4,366
Response content corrupted for file download
{ "avatar_url": "https://avatars.githubusercontent.com/u/16189532?v=4", "events_url": "https://api.github.com/users/djkirkham/events{/privacy}", "followers_url": "https://api.github.com/users/djkirkham/followers", "following_url": "https://api.github.com/users/djkirkham/following{/other_user}", "gists_url": "https://api.github.com/users/djkirkham/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/djkirkham", "id": 16189532, "login": "djkirkham", "node_id": "MDQ6VXNlcjE2MTg5NTMy", "organizations_url": "https://api.github.com/users/djkirkham/orgs", "received_events_url": "https://api.github.com/users/djkirkham/received_events", "repos_url": "https://api.github.com/users/djkirkham/repos", "site_admin": false, "starred_url": "https://api.github.com/users/djkirkham/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/djkirkham/subscriptions", "type": "User", "url": "https://api.github.com/users/djkirkham", "user_view_type": "public" }
[]
closed
true
null
[]
null
10
2017-11-02T15:52:56Z
2021-09-08T06:00:31Z
2017-11-02T17:08:10Z
NONE
resolved
Using `requests` to download http://hdfeos.org/software/pyhdf/pyhdf-0.9.0.tar.gz results in a corrupted file. Other methods of downloading the file (`wget`, `urllib.urlretrieve`) download the file correctly. ## Expected Result When the file downloads correctly the [sha256 listed here](http://hdfeos.org/software/pyhdf/SHA256) can be obtained: ``` $ sha256sum pyhdf-0.9.0.tar.gz c20c58e53f8fbdc47a1fcdec954262528f486cfcb4efa7e1c2e8847ad3e8092f pyhdf-0.9.0.tar.gz ``` ## Actual Result ``` $ sha256sum pyhdf-0.9.0.tar.gz f1fd2d72838f30fc4e3a7688a4e1a395483b08e54f4955f3b4d384639e13c67a pyhdf-0.9.0.tar.gz ``` ## Reproduction Steps ```python import requests resp = requests.get('http://hdfeos.org/software/pyhdf/pyhdf-0.9.0.tar.gz') with open('pyhdf-0.9.0.tar.gz', 'w') as f: f.write(resp.content) ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.2" }, "cryptography": { "version": "1.9" }, "idna": { "version": "" }, "implementation": { "name": "CPython", "version": "2.7.13" }, "platform": { "release": "2.6.32-696.10.3.el6.x86_64", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "100020bf", "version": "16.2.0" }, "requests": { "version": "2.18.4" }, "system_ssl": { "version": "100020cf" }, "urllib3": { "version": "1.21.1" }, "using_pyopenssl": true } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/16189532?v=4", "events_url": "https://api.github.com/users/djkirkham/events{/privacy}", "followers_url": "https://api.github.com/users/djkirkham/followers", "following_url": "https://api.github.com/users/djkirkham/following{/other_user}", "gists_url": "https://api.github.com/users/djkirkham/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/djkirkham", "id": 16189532, "login": "djkirkham", "node_id": "MDQ6VXNlcjE2MTg5NTMy", "organizations_url": "https://api.github.com/users/djkirkham/orgs", "received_events_url": "https://api.github.com/users/djkirkham/received_events", "repos_url": "https://api.github.com/users/djkirkham/repos", "site_admin": false, "starred_url": "https://api.github.com/users/djkirkham/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/djkirkham/subscriptions", "type": "User", "url": "https://api.github.com/users/djkirkham", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4366/reactions" }
https://api.github.com/repos/psf/requests/issues/4366/timeline
null
completed
null
null
false
[ "Requests gunzips the file:\r\n\r\n```\r\n$ file pyhdf-0.9.0.tar.gz\r\npyhdf-0.9.0.tar.gz: POSIX tar archive (GNU)\r\n$ tar tf pyhdf-0.9.0.tar.gz \r\npyhdf-0.9.0/\r\npyhdf-0.9.0/PKG-INFO\r\npyhdf-0.9.0/pyhdf/\r\npyhdf-0.9.0/pyhdf/error.py\r\npyhdf-0.9.0/pyhdf/HC.py\r\npyhdf-0.9.0/pyhdf/HDF.py\r\npyhdf-0.9.0/pyhdf...
https://api.github.com/repos/psf/requests/issues/4365
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4365/labels{/name}
https://api.github.com/repos/psf/requests/issues/4365/comments
https://api.github.com/repos/psf/requests/issues/4365/events
https://github.com/psf/requests/issues/4365
270,560,459
MDU6SXNzdWUyNzA1NjA0NTk=
4,365
can requests has a way to automatically determine the type of authentication?
{ "avatar_url": "https://avatars.githubusercontent.com/u/7598892?v=4", "events_url": "https://api.github.com/users/beruhan/events{/privacy}", "followers_url": "https://api.github.com/users/beruhan/followers", "following_url": "https://api.github.com/users/beruhan/following{/other_user}", "gists_url": "https://api.github.com/users/beruhan/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/beruhan", "id": 7598892, "login": "beruhan", "node_id": "MDQ6VXNlcjc1OTg4OTI=", "organizations_url": "https://api.github.com/users/beruhan/orgs", "received_events_url": "https://api.github.com/users/beruhan/received_events", "repos_url": "https://api.github.com/users/beruhan/repos", "site_admin": false, "starred_url": "https://api.github.com/users/beruhan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/beruhan/subscriptions", "type": "User", "url": "https://api.github.com/users/beruhan", "user_view_type": "public" }
[]
closed
true
null
[]
null
1
2017-11-02T07:43:06Z
2021-09-08T06:00:31Z
2017-11-02T21:20:34Z
NONE
resolved
I have a problem that I known the web services require authentication,but I can't determine Basic or Digest it need,How can I deal with this situation?
{ "avatar_url": "https://avatars.githubusercontent.com/u/1382556?v=4", "events_url": "https://api.github.com/users/Lukasa/events{/privacy}", "followers_url": "https://api.github.com/users/Lukasa/followers", "following_url": "https://api.github.com/users/Lukasa/following{/other_user}", "gists_url": "https://api.github.com/users/Lukasa/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Lukasa", "id": 1382556, "login": "Lukasa", "node_id": "MDQ6VXNlcjEzODI1NTY=", "organizations_url": "https://api.github.com/users/Lukasa/orgs", "received_events_url": "https://api.github.com/users/Lukasa/received_events", "repos_url": "https://api.github.com/users/Lukasa/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Lukasa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Lukasa/subscriptions", "type": "User", "url": "https://api.github.com/users/Lukasa", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4365/reactions" }
https://api.github.com/repos/psf/requests/issues/4365/timeline
null
completed
null
null
false
[ "The requests-toolbelt has a [`GuessAuth`](http://toolbelt.readthedocs.io/en/latest/authentication.html#guessauth) handler which is perfect for this use-case." ]
https://api.github.com/repos/psf/requests/issues/4364
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4364/labels{/name}
https://api.github.com/repos/psf/requests/issues/4364/comments
https://api.github.com/repos/psf/requests/issues/4364/events
https://github.com/psf/requests/issues/4364
270,276,195
MDU6SXNzdWUyNzAyNzYxOTU=
4,364
Delete cookies not working with adapter
{ "avatar_url": "https://avatars.githubusercontent.com/u/6284?v=4", "events_url": "https://api.github.com/users/Singletoned/events{/privacy}", "followers_url": "https://api.github.com/users/Singletoned/followers", "following_url": "https://api.github.com/users/Singletoned/following{/other_user}", "gists_url": "https://api.github.com/users/Singletoned/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Singletoned", "id": 6284, "login": "Singletoned", "node_id": "MDQ6VXNlcjYyODQ=", "organizations_url": "https://api.github.com/users/Singletoned/orgs", "received_events_url": "https://api.github.com/users/Singletoned/received_events", "repos_url": "https://api.github.com/users/Singletoned/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Singletoned/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Singletoned/subscriptions", "type": "User", "url": "https://api.github.com/users/Singletoned", "user_view_type": "public" }
[]
closed
true
null
[]
null
14
2017-11-01T11:16:23Z
2021-09-08T06:00:31Z
2017-11-06T08:52:14Z
NONE
resolved
## Summary. Using the requests-wsgi-adapter code, deleting cookies (eg using httpbin) doesn't work. I wrote a test that demonstrates it: https://github.com/Singletoned/requests-wsgi-adapter/blob/feature/delete-cookies/tests.py#L77 The equivalent code using requests and httpbin.org works fine, but using requests, requests-wsgi-adapter and httpbin as a wsgi app, it fails to delete the cookie. ``` # This works as expected import requests session = requests.Session() response = session.get("http://httpbin.org/cookies/set?flim=flam&flooble=flumble") print(response.json()) assert response.json()['cookies'] == {'flooble': 'flumble', 'flim': 'flam'} response = session.get("http://httpbin.org/cookies/delete?flim=flam") print(response.json()) assert response.json()['cookies'] == {'flooble': 'flumble'} ``` I imagine the fact that is doesn't work is a result of the interface between requests and requests-wsgi-adapter, but I can't work out what is going wrong. Any help investigating this would be greatly appreciated. I wonder if it might be something to do with the cookie domain... ## Expected Result I expect the `flim` cookie to not be in the response anymore. ## Actual Result Rather than deleting the cookie it appears to do nothing. ## Reproduction Steps ``` # pip install httpbin requests-wsgi-adapter # This fails import httpbin import requests from wsgiadapter import WSGIAdapter session = requests.session() session.mount('http://localhost', WSGIAdapter(app=httpbin.app)) session.get( "http://localhost/cookies/set?flimble=floop&flamble=flaap") response = session.get("http://localhost/cookies") assert response.json() == { 'cookies': {'flimble': 'floop', 'flamble': 'flaap'}} response = session.get( "http://localhost/cookies/delete?flimble") result = response.json() expected = {'cookies': {'flamble': 'flaap'}} assert result == expected, result ``` ## System Information $ python -m requests.help ``` { "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "implementation": { "name": "CPython", "version": "3.6.2" }, "platform": { "release": "16.7.0", "system": "Darwin" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.18.1" }, "system_ssl": { "version": "100020cf" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": false } ```
{ "avatar_url": "https://avatars.githubusercontent.com/u/6284?v=4", "events_url": "https://api.github.com/users/Singletoned/events{/privacy}", "followers_url": "https://api.github.com/users/Singletoned/followers", "following_url": "https://api.github.com/users/Singletoned/following{/other_user}", "gists_url": "https://api.github.com/users/Singletoned/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Singletoned", "id": 6284, "login": "Singletoned", "node_id": "MDQ6VXNlcjYyODQ=", "organizations_url": "https://api.github.com/users/Singletoned/orgs", "received_events_url": "https://api.github.com/users/Singletoned/received_events", "repos_url": "https://api.github.com/users/Singletoned/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Singletoned/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Singletoned/subscriptions", "type": "User", "url": "https://api.github.com/users/Singletoned", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4364/reactions" }
https://api.github.com/repos/psf/requests/issues/4364/timeline
null
completed
null
null
false
[ "What are the response headers for each request in both cases?", "These are the failing headers using the wsgi adapter:\r\n```\r\n[('Content-Type', 'text/html; charset=utf-8'),\r\n ('Content-Length', '223'),\r\n ('Location', '/cookies'),\r\n ('Set-Cookie', 'flimble=floop; Path=/'),\r\n ('Set-Cookie', 'flamble=fla...
https://api.github.com/repos/psf/requests/issues/4363
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4363/labels{/name}
https://api.github.com/repos/psf/requests/issues/4363/comments
https://api.github.com/repos/psf/requests/issues/4363/events
https://github.com/psf/requests/issues/4363
270,121,018
MDU6SXNzdWUyNzAxMjEwMTg=
4,363
rl print response headers
{ "avatar_url": "https://avatars.githubusercontent.com/u/25519096?v=4", "events_url": "https://api.github.com/users/hrpomrx/events{/privacy}", "followers_url": "https://api.github.com/users/hrpomrx/followers", "following_url": "https://api.github.com/users/hrpomrx/following{/other_user}", "gists_url": "https://api.github.com/users/hrpomrx/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/hrpomrx", "id": 25519096, "login": "hrpomrx", "node_id": "MDQ6VXNlcjI1NTE5MDk2", "organizations_url": "https://api.github.com/users/hrpomrx/orgs", "received_events_url": "https://api.github.com/users/hrpomrx/received_events", "repos_url": "https://api.github.com/users/hrpomrx/repos", "site_admin": false, "starred_url": "https://api.github.com/users/hrpomrx/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hrpomrx/subscriptions", "type": "User", "url": "https://api.github.com/users/hrpomrx", "user_view_type": "public" }
[]
closed
true
null
[]
null
0
2017-10-31T21:13:36Z
2021-09-08T06:00:32Z
2017-10-31T21:15:24Z
NONE
resolved
Summary. ## Expected Result What you expected. ## Actual Result What happened instead. ## Reproduction Steps ```python import requests ``` ## System Information $ python -m requests.help ``` <paste here> ``` This command is only available on Requests v2.16.4 and greater. Otherwise, please provide some basic information about your system (Python version, operating system, &c).
{ "avatar_url": "https://avatars.githubusercontent.com/u/25519096?v=4", "events_url": "https://api.github.com/users/hrpomrx/events{/privacy}", "followers_url": "https://api.github.com/users/hrpomrx/followers", "following_url": "https://api.github.com/users/hrpomrx/following{/other_user}", "gists_url": "https://api.github.com/users/hrpomrx/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/hrpomrx", "id": 25519096, "login": "hrpomrx", "node_id": "MDQ6VXNlcjI1NTE5MDk2", "organizations_url": "https://api.github.com/users/hrpomrx/orgs", "received_events_url": "https://api.github.com/users/hrpomrx/received_events", "repos_url": "https://api.github.com/users/hrpomrx/repos", "site_admin": false, "starred_url": "https://api.github.com/users/hrpomrx/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hrpomrx/subscriptions", "type": "User", "url": "https://api.github.com/users/hrpomrx", "user_view_type": "public" }
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/psf/requests/issues/4363/reactions" }
https://api.github.com/repos/psf/requests/issues/4363/timeline
null
completed
null
null
false
[]
https://api.github.com/repos/psf/requests/issues/4362
https://api.github.com/repos/psf/requests
https://api.github.com/repos/psf/requests/issues/4362/labels{/name}
https://api.github.com/repos/psf/requests/issues/4362/comments
https://api.github.com/repos/psf/requests/issues/4362/events
https://github.com/psf/requests/issues/4362
269,952,391
MDU6SXNzdWUyNjk5NTIzOTE=
4,362
Redirect resolved even though allow_redirects is set to False causing exception for unsupported connection adapter
{ "avatar_url": "https://avatars.githubusercontent.com/u/4640825?v=4", "events_url": "https://api.github.com/users/fevertree/events{/privacy}", "followers_url": "https://api.github.com/users/fevertree/followers", "following_url": "https://api.github.com/users/fevertree/following{/other_user}", "gists_url": "https://api.github.com/users/fevertree/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/fevertree", "id": 4640825, "login": "fevertree", "node_id": "MDQ6VXNlcjQ2NDA4MjU=", "organizations_url": "https://api.github.com/users/fevertree/orgs", "received_events_url": "https://api.github.com/users/fevertree/received_events", "repos_url": "https://api.github.com/users/fevertree/repos", "site_admin": false, "starred_url": "https://api.github.com/users/fevertree/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/fevertree/subscriptions", "type": "User", "url": "https://api.github.com/users/fevertree", "user_view_type": "public" }
[ { "color": "e10c02", "default": false, "description": null, "id": 117744, "name": "Bug", "node_id": "MDU6TGFiZWwxMTc3NDQ=", "url": "https://api.github.com/repos/psf/requests/labels/Bug" } ]
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
6
2017-10-31T13:11:11Z
2022-03-29T03:12:39Z
2021-12-29T02:32:57Z
NONE
resolved
I'm currently mocking an API that is consumed by an Android application. One of the API responses contains a redirect to a custom URL schema `app://` in the `Location` header Since I am not interested in my mocked API client in following the redirect (which would raise an InvalidSchema exception anyway), I have set `allow_redirects = False` on my session object. Although the redirect is not fired, it is still being resolved, causing an exception due to the missing url adapter. ## Expected Result Since I'm not interested in the redirects being followed, it would make sense to not resolve the redirected request in the first place. ## How to reproduce ```python import requests S = requests.session() S.allow_redirects = False destination = https://somesite.example # URL with a redirect to a non-standard protocol S.get(url=destination) ``` Response headers (example): ``` HTTP/1.1 302 Found Server: Apache-Coyote Cache-Control: no-cache, no-store, max-age=0, must-revalidate Pragma: no-cache Expires: 0 Strict-Transport-Security: max-age=31536000 ; includeSubDomains Location: app://api-test.somesite.example?q=example Content-Language: en Content-Length: 0 Date: Tue, 31 Oct 2017 12:39:17 GMT Connection: close ``` Exception thrown by code: ``` Traceback (most recent call last): File "example.py", line 6, in <module> S.get(url=destination) in get return self.request('GET', url, **kwargs) File ~/.local/lib/python2.7/site-packages/requests/sessions.py", line 518, in request resp = self.send(prep, **send_kwargs) File "~/.local/lib/python2.7/site-packages/requests/sessions.py", line 661, in send history = [resp for resp in gen] if allow_redirects else [] File "~/.local/lib/python2.7/site-packages/requests/sessions.py", line 214, in resolve_redirects **adapter_kwargs File "~/.local/lib/python2.7/site-packages/requests/sessions.py", line 633, in send adapter = self.get_adapter(url=request.url) File "~/.local/lib/python2.7/site-packages/requests/sessions.py", line 717, in get_adapter raise InvalidSchema("No connection adapters were found for '%s'" % url) requests.exceptions.InvalidSchema: No connection adapters were found for 'app://api-test.somesite.com?q=example' ``` ## Actual Result InvalidSchema exception
{ "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/4362/reactions" }
https://api.github.com/repos/psf/requests/issues/4362/timeline
null
completed
null
null
false
[ "@kennethreitz This is the result of `Response.next`, which you added. Mind taking a look?", "@fevertree can you try this and see if you still get the exception?\r\n\r\n```\r\nimport requests\r\n\r\nS = requests.session()\r\ndestination = https://somesite.example # URL with a redirect to a non-standard protocol\r...