diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-06-17 10:00:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-17 10:00:56 (GMT) |
commit | 08f2b9dedea13d2e9d11c189914387db3a66e2ca (patch) | |
tree | efe1f0ae74da699ad0f5c13d65324b435d5737e9 | |
parent | c689e0a7e2a25621da82f22cc64d089eae05e753 (diff) | |
download | cpython-08f2b9dedea13d2e9d11c189914387db3a66e2ca.zip cpython-08f2b9dedea13d2e9d11c189914387db3a66e2ca.tar.gz cpython-08f2b9dedea13d2e9d11c189914387db3a66e2ca.tar.bz2 |
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@outlook.com>
-rw-r--r-- | Lib/test/test_ssl.py | 2 | ||||
-rw-r--r-- | Modules/_ssl.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index eddb851..06e501e 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -609,7 +609,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 26f31f8..ad5269d 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; } |