[PATCH 2 of 5] sslutil: fix names of variables containing minimum protocol strings

Yuya Nishihara yuya at tcha.org
Sun May 31 13:48:44 UTC 2020


On Sun, 31 May 2020 12:24:45 +0200, Manuel Jacob wrote:
> # HG changeset patch
> # User Manuel Jacob <me at manueljacob.de>
> # Date 1590914858 -7200
> #      Sun May 31 10:47:38 2020 +0200
> # Node ID efea7f15c5d5e32f3a6be167c733581afc612b3c
> # Parent  ce6f9d86860e841386d94f9434606ca96d426310
> # EXP-Topic sslutil_cleanup
> sslutil: fix names of variables containing minimum protocol strings

> diff --git a/mercurial/sslutil.py b/mercurial/sslutil.py
> --- a/mercurial/sslutil.py
> +++ b/mercurial/sslutil.py
> @@ -76,7 +76,7 @@ def _hostsettings(ui, hostname):
>          b'protocol': None,
>          # String representation of minimum protocol to be used for UI
>          # presentation.
> -        b'protocolui': None,
> +        b'minimumprotocolui': None,
>          # ssl.CERT_* constant used by SSLContext.verify_mode.
>          b'verifymode': None,
>          # Defines extra ssl.OP* bitwise options to set.

It's out of the scope of this series, but I felt a bit awkward while
reviewing stringly-typed stuff in sslutil. Maybe it's better to use attr.s()
instead of Dict[bytes, Any], and define b'tls1.0', ... as constants.



More information about the Mercurial-devel mailing list