This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_idle fails under -OO
Type: Stage: resolved
Components: IDLE Versions: Python 3.4, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: brett.cannon, python-dev, serhiy.storchaka, terry.reedy
Priority: normal Keywords: patch

Created on 2015-03-31 14:29 by brett.cannon, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue23825.patch serhiy.storchaka, 2015-03-31 15:23 review
Messages (4)
msg239726 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-03-31 15:23
Here is a patch.
msg240039 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2015-04-03 21:30
The relevant code in CallTips.py itself

    if isinstance(ob_call, types.MethodType):
        doc = ob_call.__doc__
    else:
        doc = getattr(ob, "__doc__", "")
    if doc: <add more to calltip>

equally ignores both None and '', but I forgot the None possibility in the tests.  I cannot test the patch, but the fix looks right.  Putting the doc conditional expression before the for loops works because if one .__doc__ is set to None, all are.  For the same reason, doc could be defined as a global name, but if the patch makes test_idle pass, it is fine as it is.
msg240040 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2015-04-03 21:36
Whatever you do with the other -OO patches, I would prefer that this be applied to 3.4.  The 3.4/3.5 files should be identical.
msg240046 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-04-04 06:50
New changeset 912719dd684f by Serhiy Storchaka in branch '2.7':
Issue #23825: Fixed test_idle under -OO.
https://hg.python.org/cpython/rev/912719dd684f

New changeset 657ebef5b291 by Serhiy Storchaka in branch '3.4':
Issue #23825: Fixed test_idle under -OO.
https://hg.python.org/cpython/rev/657ebef5b291

New changeset e6654af0fc93 by Serhiy Storchaka in branch 'default':
Issue #23825: Fixed test_idle under -OO.
https://hg.python.org/cpython/rev/e6654af0fc93
History
Date User Action Args
2022-04-11 14:58:14adminsetgithub: 68013
2015-04-04 06:54:05serhiy.storchakasetstatus: open -> closed
assignee: serhiy.storchaka
resolution: fixed
stage: commit review -> resolved
2015-04-04 06:50:41python-devsetnosy: + python-dev
messages: + msg240046
2015-04-03 21:36:54terry.reedysetmessages: + msg240040
versions: + Python 3.4
2015-04-03 21:30:17terry.reedysetnosy: + terry.reedy

messages: + msg240039
stage: patch review -> commit review
2015-03-31 15:23:43serhiy.storchakasetfiles: + issue23825.patch

nosy: + serhiy.storchaka
messages: + msg239726

keywords: + patch
stage: needs patch -> patch review
2015-03-31 14:29:03brett.cannoncreate