I can see in the 3.10 release notes, that ssl.PROTOCOL_TLS becomes deprecated. Is there any further context explaining why, and what the preferred usage is instead, so that I (and anyone else) can understand this a bit more thoroughly?
It's also confusing that other not deprecated flags are described in terms of this deprecated flag. These will need rewriting when the deprecated flag is removed
These changes are part of PEP-644; support for OpenSSL v1.1.1. The benefits are detailed in the PEP <https://www.python.org/dev/peps/pep-0644/#benefits>_.
Later, the deprecation process began in bpo-43880 <https://bugs.python.org/issue43880>_. It seems like PROTOCOL_TLS is the only thing with a deprecation warning that does not have a suggested alternative.
I'm confused as to how this can be deprecated; what will be the new mechanism for selecting a protocol? If someone can provide some brief clarification, I'd be more than happy to update the docs!
You either use TLS_PROTOCOL_CLIENT for a client-side socket or TLS_PROTOCOL_SERVER for a server-side socket. TLS_PROTOCOL_CLIENT gives you a secure context for client connections with cert and hostname verification.
jdevries3133 commented on Jun 10, 2021
jdevries3133mannequin
Mannequin
More actions
Would you like me to submit a PR for this simple patch?
Activity
graingert commented on Jun 9, 2021
encode/httpx#1670 (comment)
graingert commented on Jun 9, 2021
It's also confusing that other not deprecated flags are described in terms of this deprecated flag. These will need rewriting when the deprecated flag is removed
jdevries3133 commented on Jun 10, 2021
These changes are part of PEP-644; support for OpenSSL v1.1.1. The benefits are detailed in the PEP <https://www.python.org/dev/peps/pep-0644/#benefits>_.
Later, the deprecation process began in bpo-43880 <https://bugs.python.org/issue43880>_. It seems like PROTOCOL_TLS is the only thing with a deprecation warning that does not have a suggested alternative.
I'm confused as to how this can be deprecated; what will be the new mechanism for selecting a protocol? If someone can provide some brief clarification, I'd be more than happy to update the docs!
tiran commented on Jun 10, 2021
You either use TLS_PROTOCOL_CLIENT for a client-side socket or TLS_PROTOCOL_SERVER for a server-side socket. TLS_PROTOCOL_CLIENT gives you a secure context for client connections with cert and hostname verification.
jdevries3133 commented on Jun 10, 2021
Would you like me to submit a PR for this simple patch?
jdevries3133@42d9bd7
graingert commented on Jun 10, 2021
TLS_PROTOCOL_CLIENT and TLS_PROTOCOL_SERVER are defined in terms of the deprecated TLS_PROTOCOL, so now this makes the definition circular
tiran commented on Jun 11, 2021
New changeset e26014f by Christian Heimes in branch 'main':
bpo-44362: ssl: improve deprecation warnings and docs (GH-26646)
e26014f
miss-islington commented on Jun 11, 2021
New changeset d7930fb by Miss Islington (bot) in branch '3.10':
bpo-44362: ssl: improve deprecation warnings and docs (GH-26646)
d7930fb