Mailing List Archive

[issue1242657] list(obj) can swallow KeyboardInterrupt
Nick Coghlan <ncoghlan@gmail.com> added the comment:

Reassigning to Raymond (as per the thread at
http://mail.python.org/pipermail/python-dev/2009-January/085030.html)

----------
assignee: georg.brandl -> rhettinger
nosy: +ncoghlan

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue1242657>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue1242657] list(obj) can swallow KeyboardInterrupt [ In reply to ]
Raymond Hettinger <rhettinger@users.sourceforge.net> added the comment:

Here's a patch that fixes-up length_hint and it's internal callers.

I think there are plenty of other places that also swallow exceptions
but will leave those for someone who wants to look at every instance of
PyErr_Clear() to see if it has been restricted to some small group of
exceptions.

----------
assignee: rhettinger ->
keywords: +patch
versions: +Python 2.7, Python 3.0
Added file: http://bugs.python.org/file12749/lenhint.diff

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue1242657>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue1242657] list(obj) can swallow KeyboardInterrupt [ In reply to ]
Raymond Hettinger <rhettinger@users.sourceforge.net> added the comment:

Anyone else want to pick this up from here?

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue1242657>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue1242657] list(obj) can swallow KeyboardInterrupt [ In reply to ]
Amaury Forgeot d'Arc <amauryfa@gmail.com> added the comment:

In _PyObject_LengthHint() code, at the line:
if (ro == NULL && PyErr_Occurred()) {
It seems that PyErr_Occurred() is not useful and is always true when the
previous PyObject_CallMethodObjArgs() returned NULL.

Otherwise the patch is fine to me.

----------
nosy: +amaury.forgeotdarc

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue1242657>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue1242657] list(obj) can swallow KeyboardInterrupt [ In reply to ]
Changes by Raymond Hettinger <rhettinger@users.sourceforge.net>:


----------
assignee: -> rhettinger

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue1242657>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue1242657] list(obj) can swallow KeyboardInterrupt [ In reply to ]
Changes by Raymond Hettinger <rhettinger@users.sourceforge.net>:


----------
priority: normal -> high

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue1242657>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue1242657] list(obj) can swallow KeyboardInterrupt [ In reply to ]
Raymond Hettinger <rhettinger@users.sourceforge.net> added the comment:

Thanks for the review.
Fixed in r69227.

----------
resolution: -> fixed
status: open -> closed

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue1242657>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com