https://github.com/python/cpython/commit/e808146af1841abc7d5f86470041d3ef7712050e
commit: e808146af1841abc7d5f86470041d3ef7712050e
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: Yhg1s <[email protected]>
date: 2024-08-06T21:00:14+02:00
summary:

[3.13] gh-122334: Fix test_embed failure when missing _ssl module (GH-122630) 
(#122647)

gh-122334: Fix test_embed failure when missing _ssl module (GH-122630)
(cherry picked from commit 50b36037518a8e7f7eee39b597d56b5b2756eb86)

Co-authored-by: neonene <[email protected]>
Co-authored-by: Wulian233 <[email protected]>

files:
M Lib/test/test_embed.py

diff --git a/Lib/test/test_embed.py b/Lib/test/test_embed.py
index 19db79f8a161d5..4083044e743324 100644
--- a/Lib/test/test_embed.py
+++ b/Lib/test/test_embed.py
@@ -464,8 +464,12 @@ def test_getargs_reset_static_parser(self):
         # Test _PyArg_Parser initializations via _PyArg_UnpackKeywords()
         # https://github.com/python/cpython/issues/122334
         code = textwrap.dedent("""
-            import _ssl
-            _ssl.txt2obj(txt='1.3')
+            try:
+                import _ssl
+            except ModuleNotFoundError:
+                _ssl = None
+            if _ssl is not None:
+                _ssl.txt2obj(txt='1.3')
             print('1')
 
             import _queue

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to