Mailing List Archive

[issue15604] PyObject_IsTrue failure checks
New submission from Serhiy Storchaka:

PyObject_IsTrue can fail, but not everywhere in a code a returned value checked. Here is a patches which add such checks.

Note, patches for all three Python versions are rather different.

----------
components: Interpreter Core, Library (Lib)
files: istrue_check-3.3.patch
keywords: needs review, patch
messages: 167789
nosy: storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: PyObject_IsTrue failure checks
type: resource usage
versions: Python 2.7, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file26742/istrue_check-3.3.patch

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue15604>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue15604] PyObject_IsTrue failure checks [ In reply to ]
Changes by Serhiy Storchaka <storchaka@gmail.com>:


Added file: http://bugs.python.org/file26743/istrue_check-3.2.patch

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue15604>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue15604] PyObject_IsTrue failure checks [ In reply to ]
Changes by Serhiy Storchaka <storchaka@gmail.com>:


Added file: http://bugs.python.org/file26744/istrue_check-2.7.patch

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue15604>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue15604] PyObject_IsTrue failure checks [ In reply to ]
Antoine Pitrou added the comment:

Is it possible to add test cases for (at least some of) these issues?

----------
nosy: +pitrou

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue15604>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue15604] PyObject_IsTrue failure checks [ In reply to ]
Serhiy Storchaka added the comment:

I shall try to do this, but it will take a lot of time. Besides, now in the code there are a lot of *correct* checked usage of PyObject_IsTrue without test cases. So I'm not sure that the tests are needed here, and that they are worth the effort.

----------

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue15604>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue15604] PyObject_IsTrue failure checks [ In reply to ]
Changes by Andrew Svetlov <andrew.svetlov@gmail.com>:


----------
nosy: +asvetlov

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue15604>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue15604] PyObject_IsTrue failure checks [ In reply to ]
Serhiy Storchaka added the comment:

Patches updated to reflect Antoine's comments.

----------
Added file: http://bugs.python.org/file26813/istrue_check-3.3_2.patch
Added file: http://bugs.python.org/file26814/istrue_check-3.2_2.patch
Added file: http://bugs.python.org/file26815/istrue_check-2.7_2.patch

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue15604>
_______________________________________
[issue15604] PyObject_IsTrue failure checks [ In reply to ]
Serhiy Storchaka added the comment:

Patches updated again.

----------
Added file: http://bugs.python.org/file26838/istrue_check-3.3_3.patch
Added file: http://bugs.python.org/file26839/istrue_check-3.2_3.patch
Added file: http://bugs.python.org/file26840/istrue_check-2.7_3.patch

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue15604>
_______________________________________
[issue15604] PyObject_IsTrue failure checks [ In reply to ]
Roundup Robot added the comment:

New changeset ba1c48f8b571 by Antoine Pitrou in branch '2.7':
Issue #15604: Update uses of PyObject_IsTrue() to check for and handle errors correctly.
http://hg.python.org/cpython/rev/ba1c48f8b571

New changeset 56dc7b09f390 by Antoine Pitrou in branch '3.2':
Issue #15604: Update uses of PyObject_IsTrue() to check for and handle errors correctly.
http://hg.python.org/cpython/rev/56dc7b09f390

New changeset b878df1d23b1 by Antoine Pitrou in branch 'default':
Issue #15604: Update uses of PyObject_IsTrue() to check for and handle errors correctly.
http://hg.python.org/cpython/rev/b878df1d23b1

----------
nosy: +python-dev

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue15604>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue15604] PyObject_IsTrue failure checks [ In reply to ]
Serhiy Storchaka added the comment:

Thank you Antoine.

----------
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue15604>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue15604] PyObject_IsTrue failure checks [ In reply to ]
Changes by Jesús Cea Avión <jcea@jcea.es>:


----------
nosy: +jcea

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