aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/websocket-client/py2/websocket/_ssl_compat.py
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-12-09 18:25:21 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-12-09 19:18:57 +0300
commit13374e0884578812cda7697d0c5680122db59a37 (patch)
tree30a022eb841035299deb2b8c393b2902f0c21735 /contrib/python/websocket-client/py2/websocket/_ssl_compat.py
parentc7ade6d3bf7cd492235a61b77153351e422a28f3 (diff)
downloadydb-13374e0884578812cda7697d0c5680122db59a37.tar.gz
Intermediate changes
commit_hash:034150f557268506d7bc0cbd8b5becf65f765593
Diffstat (limited to 'contrib/python/websocket-client/py2/websocket/_ssl_compat.py')
-rw-r--r--contrib/python/websocket-client/py2/websocket/_ssl_compat.py53
1 files changed, 0 insertions, 53 deletions
diff --git a/contrib/python/websocket-client/py2/websocket/_ssl_compat.py b/contrib/python/websocket-client/py2/websocket/_ssl_compat.py
deleted file mode 100644
index 9e201ddf003..00000000000
--- a/contrib/python/websocket-client/py2/websocket/_ssl_compat.py
+++ /dev/null
@@ -1,53 +0,0 @@
-"""
-websocket - WebSocket client library for Python
-
-Copyright (C) 2010 Hiroki Ohtani(liris)
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-"""
-__all__ = ["HAVE_SSL", "ssl", "SSLError", "SSLWantReadError", "SSLWantWriteError"]
-
-try:
- import ssl
- from ssl import SSLError
- from ssl import SSLWantReadError
- from ssl import SSLWantWriteError
- if hasattr(ssl, 'SSLContext') and hasattr(ssl.SSLContext, 'check_hostname'):
- HAVE_CONTEXT_CHECK_HOSTNAME = True
- else:
- HAVE_CONTEXT_CHECK_HOSTNAME = False
- if hasattr(ssl, "match_hostname"):
- from ssl import match_hostname
- else:
- from backports.ssl_match_hostname import match_hostname
- __all__.append("match_hostname")
- __all__.append("HAVE_CONTEXT_CHECK_HOSTNAME")
-
- HAVE_SSL = True
-except ImportError:
- # dummy class of SSLError for ssl none-support environment.
- class SSLError(Exception):
- pass
-
- class SSLWantReadError(Exception):
- pass
-
- class SSLWantWriteError(Exception):
- pass
-
- ssl = None
-
- HAVE_SSL = False