# HG changeset patch # User Mathias De Mare # Date 1657634393 -7200 # Node ID be3828081624cfe58c620dab6b95d820de9c9d4e # Parent 1e12ea7d8435ffd0d02a76e2ebeb17d1cf09d073 sslutil: use proper attribute to select python 3.7+ The previous attribute was python 3.6+, but guarded a python 3.7+ block. Using the correct attribute avoids: File "/usr/lib64/python3.6/site-packages/mercurial/sslutil.py", line 334, in wrapsocket sslcontext.minimum_version = ssl.TLSVersion.TLSv1_1 AttributeError: module 'ssl' has no attribute 'TLSVersion' diff -r 1e12ea7d8435 -r be3828081624 mercurial/sslutil.py --- a/mercurial/sslutil.py Wed Jul 06 11:52:26 2022 +0400 +++ b/mercurial/sslutil.py Tue Jul 12 15:59:53 2022 +0200 @@ -312,7 +312,7 @@ # is loaded and contains that removed CA, you've just undone the user's # choice. - if util.safehasattr(ssl, 'PROTOCOL_TLS_CLIENT'): + if util.safehasattr(ssl, 'TLSVersion'): # python 3.7+ sslcontext = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) minimumprotocol = settings[b'minimumprotocol']