From 3bace31c4a3569f9776d5eea5b4b06c768aa99fb Mon Sep 17 00:00:00 2001 From: jianghang Date: Wed, 16 Jun 2021 20:54:43 +0800 Subject: [PATCH 1/2] Fix typo in ssl deprecation warning message --- Modules/_ssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/_ssl.c b/Modules/_ssl.c index 26f31f8f4c5341..ad5269d7b07b63 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; } From b4d8677cdd20c700898945a3944d56b4e45ead4b Mon Sep 17 00:00:00 2001 From: jianghang Date: Wed, 16 Jun 2021 22:37:35 +0800 Subject: [PATCH 2/2] Fix tests --- Lib/test/test_ssl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 6cea0ee9f1da53..cee97a83020b8d 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -605,7 +605,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) )