From: Joe Date: Thu, 17 Jun 2021 09:39:57 +0000 (+0800) Subject: bpo-44389: Fix typo in ssl deprecation warning message (GH-26754) X-Git-Tag: v3.11.0a1~844 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c544393b89f9b3e2b1a22588fc9ae58019314879;p=thirdparty%2FPython%2Fcpython.git bpo-44389: Fix typo in ssl deprecation warning message (GH-26754) `ssl.SSL_NO_TLS` should be `ssl.OP_NO_TLS`. --- diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 6cea0ee9f1da..cee97a83020b 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -605,7 +605,7 @@ class BasicSocketTests(unittest.TestCase): 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 26f31f8f4c53..ad5269d7b07b 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; }