Fix crypto imports on macOS Big Sur (#1639)

This commit is contained in:
Ali Alaee 2020-11-28 18:24:52 +03:30 committed by GitHub
parent e3a194acb4
commit 23fc38f7c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -23,11 +23,11 @@ def _find_ssl_lib():
# https://www.shh.sh/2020/01/04/python-abort-trap-6.html
if sys.platform == 'darwin':
release, _version_info, _machine = platform.mac_ver()
ten, major, *minor = release.split('.')
ver, major, *_ = release.split('.')
# macOS 10.14 "mojave" is the last known major release
# to support unversioned libssl.dylib. Anything above
# needs specific versions
if major and int(major) > 14:
if int(ver) > 10 or int(ver) == 10 and int(major) > 14:
lib = (
ctypes.util.find_library('libssl.46') or
ctypes.util.find_library('libssl.44') or

View File

@ -1,3 +1,3 @@
# Versions should comply with PEP440.
# This line is parsed in setup.py:
__version__ = '1.18.0'
__version__ = '1.18.1'