# HG changeset patch # User Augie Fackler # Date 2015-01-13 20:08:55 # Node ID b2358bc1407c19007b0e7852262f61d5fe7a8f83 # Parent e278fc8bb0c3d0fd77e220fedc40261be6e86492 hghave: we now support Python 2.7.9's ssl for https diff --git a/tests/hghave.py b/tests/hghave.py --- a/tests/hghave.py +++ b/tests/hghave.py @@ -307,11 +307,13 @@ def has_outer_repo(): return not matchoutput('hg root 2>&1', r'abort: no repository found', True) -@check("ssl", "python >= 2.6 ssl module and python OpenSSL") +@check("ssl", ("(python >= 2.6 ssl module and python OpenSSL) " + "OR python >= 2.7.9 ssl")) def has_ssl(): try: import ssl - ssl.wrap_socket # silence unused import warning + if getattr(ssl, 'create_default_context', False): + return True import OpenSSL OpenSSL.SSL.Context return True