_sslutil__avoid_deprecation_warnings_from_python_3_10_s_ssl_module
authorDebian Python Team <team+python@tracker.debian.org>
Thu, 21 Apr 2022 22:42:37 +0000 (23:42 +0100)
committerPeter Michael Green <plugwash@raspbian.org>
Thu, 21 Apr 2022 22:42:37 +0000 (23:42 +0100)
commitbee411180fefaa8ea1e6701cdfbf91dd0ef8f4aa
tree1e5596aa6de5f91fa98db24d0743d161bc1dddfb
parent7807017df4ea069b80ddd77d72ff5478065a6489
_sslutil__avoid_deprecation_warnings_from_python_3_10_s_ssl_module

# HG changeset patch
# User Julien Cristau <jcristau@debian.org>
# Date 1649506532 -7200
#      Sat Apr 09 14:15:32 2022 +0200
# Node ID 410916fc5935c7855c2cf4876d8311d34aabc29a
# Parent  96cc0ab5e1e68e4e163e8933842f908dcf42897a
sslutil: avoid deprecation warnings from python 3.10's ssl module

Use ssl.PROTOCOL_TLS_{CLIENT,SERVER} and
SSLContext.{min,max}imum_version when supported (3.7+).

And, catch deprecation warnings when the user asks for deprecated TLS
versions (1.0 and 1.1).

Differential Revision: https://phab.mercurial-scm.org/D12488

Gbp-Pq: Topic py310
Gbp-Pq: Name 3_sslutil__avoid_deprecation_warnings_from_python_3_10_s_ssl_module.patch
mercurial/sslutil.py