https://github.com/python/cpython/commit/50b36037518a8e7f7eee39b597d56b5b2756eb86 commit: 50b36037518a8e7f7eee39b597d56b5b2756eb86 branch: main author: neonene <[email protected]> committer: encukou <[email protected]> date: 2024-08-03T15:15:26+02:00 summary:
gh-122334: Fix test_embed failure when missing _ssl module (GH-122630) 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 ab112d6be85b46..916a9a79887dfc 100644 --- a/Lib/test/test_embed.py +++ b/Lib/test/test_embed.py @@ -465,8 +465,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]
