mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
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 c544393b89
)
Co-authored-by: Joe <nigelchiang@outlook.com>
This commit is contained in:
parent
c689e0a7e2
commit
08f2b9dede
2 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
)
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue