Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python3 "DeprecationWarning: ssl.PROTOCOL_TLSv1_2 is deprecated sslcontext = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)" error [closed]

Tags:

python-3.x

Hi i downloaded a tool from github and when I try to run it, I get an alert like this; linkfinder.py:133: DeprecationWarning: ssl.PROTOCOL_TLSv1_2 is deprecated sslcontext = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)

Tool : https://github.com/GerbenJavado/LinkFinder how to fix this error on python3?

enter image description here --> code

enter image description here --> error

any idea?

like image 934
kylojshan Avatar asked Sep 02 '25 03:09

kylojshan


1 Answers

Please refer the Python 3's SSL documentation.

ssl.PROTOCOL_TLSv1_2

Deprecated since version 3.6: OpenSSL has deprecated all version specific protocols.

Recommendation:

Use either ssl.PROTOCOL_TLS_CLIENT or ssl.PROTOCOL_TLS_SERVER as per your requirement.

like image 171
Yozachar Avatar answered Sep 05 '25 00:09

Yozachar