[New-bugs-announce] [issue3850] find_recursion_limit.py is broken

Antoine Pitrou report at bugs.python.org
Fri Sep 12 22:06:55 CEST 2008

New submission from Antoine Pitrou <pitrou at free.fr>:

find_recursion_limit.py in trunk is broken: it fails with an
AttributeError while a RuntimeError is expected. This has appeared due
to the recent changes in recursion limit handling, but the problem is
deeper. As I explained on the ML, functions like PyDict_GetItem()
discard any exception that occur inside them, and return NULL instead.
The caller can then interpret the NULL as an "attribute missing" and
raise AttributeError.

The obvious quick fix is to replace "except RuntimeError" with "except
(RuntimeError, AttributeError)" in find_recursion_limit.py.

components: Demos and Tools
keywords: easy
messages: 73131
nosy: pitrou
priority: high
severity: normal
status: open
title: find_recursion_limit.py is broken
type: behavior
versions: Python 2.6

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list