https:// does not work with Python 3.6
See original GitHub issueWhen requesting a https:// url, request
method falls into an infinite recursion.
The issue is this method in python/ssl.py
.
@options.setter
def options(self, value):
super(SSLContext, SSLContext).options.__set__(self, value)
The commit which introduced this line to python is this https://hg.python.org/cpython/rev/c32e9f9b00f7.
The actual error looks like this:
File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 501, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 488, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 609, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 423, in send
timeout=timeout
File "/usr/local/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 594, in urlopen
chunked=chunked)
File "/usr/local/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 350, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 835, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.6/site-packages/requests/packages/urllib3/connection.py", line 311, in connect
cert_reqs=resolve_cert_reqs(self.cert_reqs),
File "/usr/local/lib/python3.6/site-packages/requests/packages/urllib3/util/ssl_.py", line 264, in create_urllib3_context
context.options |= options
File "/usr/local/lib/python3.6/ssl.py", line 459, in options
super(SSLContext, SSLContext).options.__set__(self, value)
File "/usr/local/lib/python3.6/ssl.py", line 459, in options
super(SSLContext, SSLContext).options.__set__(self, value)
File "/usr/local/lib/python3.6/ssl.py", line 459, in options
super(SSLContext, SSLContext).options.__set__(self, value)
[Previous line repeated 316 more times]
RecursionError: maximum recursion depth exceeded while calling a Python object
Tested using python 3.6.0b4
.
Issue Analytics
- State:
- Created 7 years ago
- Comments:16 (9 by maintainers)
Top Results From Across the Web
Issues - GitHub
When requesting a https:// url, request method falls into an infinite recursion. The issue is this method in python/ssl.py.
Read more >Code works on Python 3.6, but does not work in 3.7
python 3.7 ssl documentation states that "Changed in version 3.7: Hostname or IP address is matched by OpenSSL during handshake. The function ...
Read more >ssl — TLS/SSL wrapper for socket objects — Python 3.11.1 ...
Raised to signal an error from the underlying SSL implementation (currently provided by the OpenSSL library). This signifies some problem in the higher-level ......
Read more >SSL module in Python is not available | unable to ... - YouTube
Hello Friends, If you are facing below kind of warning or error while installing python package then watch this episode to solve it....
Read more >VS Code Debugger not working for python - Microsoft Q&A
I rolled back to v2022.8.1 and it worked for my python 3.6. I think RickChen is right too though, 3.9 worked for me...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Requests has some problems with gevent and monkey patching because it performs feature detection on the select module at import time. A future release will bring it up to date with a newer urllib3 that contains fixes for this problem, but in the meantime gevent’s monkey patch should be applied before importing requests.
@AeroNotix please don’t use this issue or this project’s tracker to discuss gevent problems.