From 0e0aeea2602bb8c1540cc9bb01e53aaaccb7ab51 Mon Sep 17 00:00:00 2001 From: Daniel Kaiser Date: Wed, 3 May 2023 13:56:21 +0200 Subject: [PATCH] Fix deprecation warnings Since Python 3.10 `ssl.PROTOCOL_TLS` is deprecated and is replaced by `ssl.PROTOCOL_TLS_CLIENT` --- chromedriver_binary/utils.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chromedriver_binary/utils.py b/chromedriver_binary/utils.py index 3d9a653..13cf298 100644 --- a/chromedriver_binary/utils.py +++ b/chromedriver_binary/utils.py @@ -12,7 +12,7 @@ try: from urllib.request import urlopen, URLError - ssl_context = ssl.SSLContext() + ssl_context = ssl.create_default_context() except ImportError: from urllib2 import urlopen, URLError ssl_context = ssl.SSLContext(protocol=ssl.PROTOCOL_TLS) diff --git a/setup.py b/setup.py index 47ec98a..38109ab 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ try: from io import BytesIO from urllib.request import urlopen, URLError - ssl_context = ssl.SSLContext() + ssl_context = ssl.create_default_context() except ImportError: from StringIO import StringIO as BytesIO from urllib2 import urlopen, URLError