# HG changeset patch # User Augie Fackler # Date 1421179735 18000 # Node ID b2358bc1407c19007b0e7852262f61d5fe7a8f83 # Parent e278fc8bb0c3d0fd77e220fedc40261be6e86492 hghave: we now support Python 2.7.9's ssl for https diff -r e278fc8bb0c3 -r b2358bc1407c tests/hghave.py --- a/tests/hghave.py Tue Jan 13 14:15:08 2015 -0500 +++ b/tests/hghave.py Tue Jan 13 15:08:55 2015 -0500 @@ -307,11 +307,13 @@ 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