[Python-checkins] bpo-44389: Fix typo in ssl deprecation warning message (GH-26754)

miss-islington webhook-mailer at python.org
Thu Jun 17 06:01:15 EDT 2021


https://github.com/python/cpython/commit/08f2b9dedea13d2e9d11c189914387db3a66e2ca
commit: 08f2b9dedea13d2e9d11c189914387db3a66e2ca
branch: 3.10
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2021-06-17T03:00:56-07:00
summary:

bpo-44389: Fix typo in ssl deprecation warning message (GH-26754)


`ssl.SSL_NO_TLS` should be `ssl.OP_NO_TLS`.
(cherry picked from commit c544393b89f9b3e2b1a22588fc9ae58019314879)

Co-authored-by: Joe <nigelchiang at outlook.com>

files:
M Lib/test/test_ssl.py
M Modules/_ssl.c

diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index eddb85144cc58..06e501e396784 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -609,7 +609,7 @@ def test_openssl111_deprecations(self):
                 with self.assertWarns(DeprecationWarning) as cm:
                     ctx.options |= option
                 self.assertEqual(
-                    'ssl.OP_NO_SSL*/ssl.SSL_NO_TLS* options are deprecated',
+                    'ssl.OP_NO_SSL*/ssl.OP_NO_TLS* options are deprecated',
                     str(cm.warning)
                 )
 
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index 26f31f8f4c534..ad5269d7b07b6 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -3597,7 +3597,7 @@ set_options(PySSLContext *self, PyObject *arg, void *c)
     set = ~opts & new_opts;
 
     if ((set & opt_no) != 0) {
-        if (_ssl_deprecated("ssl.OP_NO_SSL*/ssl.SSL_NO_TLS* options are "
+        if (_ssl_deprecated("ssl.OP_NO_SSL*/ssl.OP_NO_TLS* options are "
                             "deprecated", 2) < 0) {
             return -1;
         }



More information about the Python-checkins mailing list