_sslutil__avoid_deprecation_warnings_from_python_3_10_s_ssl_module
authorDebian Python Team <team+python@tracker.debian.org>
Tue, 7 Jun 2022 18:53:46 +0000 (19:53 +0100)
committerJulien Cristau <jcristau@debian.org>
Tue, 7 Jun 2022 18:53:46 +0000 (19:53 +0100)
commit98339d1e7df3a8d754b1931b28c1df17ca4f7149
treeac52b8cf7fe850412a912f84d60a8acd8e0f0c2e
parente534012086a878580cb1c61b6985327f84eceb43
_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