From 9eb8c47ddb6b48e14dbdb87bb1b02fcb580cb20d Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Tue, 10 Jan 2023 23:18:16 +0100 Subject: Fix a regression in 2.13.2 where a ``RunTimeError`` could be raised unexpectedly (#1959) * Add a unit test for broken __getattr__ in extension modules Co-authored-by: Florian Bruhin Closes #1958 --- tests/testdata/python3/data/fake_module_with_broken_getattr.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 tests/testdata/python3/data/fake_module_with_broken_getattr.py (limited to 'tests/testdata/python3') diff --git a/tests/testdata/python3/data/fake_module_with_broken_getattr.py b/tests/testdata/python3/data/fake_module_with_broken_getattr.py new file mode 100644 index 00000000..e860928e --- /dev/null +++ b/tests/testdata/python3/data/fake_module_with_broken_getattr.py @@ -0,0 +1,7 @@ +class Broken: + + def __getattr__(self, name): + raise Exception("boom") + + +broken = Broken() -- cgit v1.2.1