Skip to content

Commit c544393

Browse files
authored
bpo-44389: Fix typo in ssl deprecation warning message (GH-26754)
`ssl.SSL_NO_TLS` should be `ssl.OP_NO_TLS`.
1 parent 7247f6f commit c544393

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Lib/test/test_ssl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ def test_openssl111_deprecations(self):
605605
with self.assertWarns(DeprecationWarning) as cm:
606606
ctx.options |= option
607607
self.assertEqual(
608-
'ssl.OP_NO_SSL*/ssl.SSL_NO_TLS* options are deprecated',
608+
'ssl.OP_NO_SSL*/ssl.OP_NO_TLS* options are deprecated',
609609
str(cm.warning)
610610
)
611611

Modules/_ssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3597,7 +3597,7 @@ set_options(PySSLContext *self, PyObject *arg, void *c)
35973597
set = ~opts & new_opts;
35983598

35993599
if ((set & opt_no) != 0) {
3600-
if (_ssl_deprecated("ssl.OP_NO_SSL*/ssl.SSL_NO_TLS* options are "
3600+
if (_ssl_deprecated("ssl.OP_NO_SSL*/ssl.OP_NO_TLS* options are "
36013601
"deprecated", 2) < 0) {
36023602
return -1;
36033603
}

0 commit comments

Comments
 (0)