[issue21881] python cannot parse tcl value
Roundup Robot added the comment: New changeset 4514804d0e50 by Serhiy Storchaka in branch '2.7': Issue #21881: Be more tolerant in test_tcl to not parsable by float() NaN http://hg.python.org/cpython/rev/4514804d0e50 New changeset 4879f6337ef6 by Serhiy Storchaka in branch '3.4': Issue #21881: Be more tolerant in test_tcl to not parsable by float() NaN http://hg.python.org/cpython/rev/4879f6337ef6 New changeset 72289f574664 by Serhiy Storchaka in branch 'default': Issue #21881: Be more tolerant in test_tcl to not parsable by float() NaN http://hg.python.org/cpython/rev/72289f574664 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21881 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21881] python cannot parse tcl value
Roundup Robot added the comment: New changeset 01ec8bb7187f by Serhiy Storchaka in branch '2.7': Issue #21881: Just omit tests for platform-specific NaN representation in test_tcl. http://hg.python.org/cpython/rev/01ec8bb7187f New changeset 5ac811cbec87 by Serhiy Storchaka in branch '3.4': Issue #21881: Just omit tests for platform-specific NaN representation in test_tcl. http://hg.python.org/cpython/rev/5ac811cbec87 New changeset f138a74ee611 by Serhiy Storchaka in branch 'default': Issue #21881: Just omit tests for platform-specific NaN representation in test_tcl. http://hg.python.org/cpython/rev/f138a74ee611 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21881 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21881] python cannot parse tcl value
Serhiy Storchaka added the comment: On some platforms NaN representation has a minus before nan (see http://buildbot.python.org/all/builders/x86%20OpenIndiana%202.7/builds/2384/steps/test/logs/stdio). So it is easier just omit tests for these platform-specific values. Regardless of the fact that it is very unlikely to get NaN in Tk, in future we should fix getdouble() (it should work with Tcl_Obj) and use it everywhere in tkinter instead of float(). -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21881 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21881] python cannot parse tcl value
Serhiy Storchaka added the comment: Here is a patch which omits using of float() to convert Tcl's NaN values. -- keywords: +patch stage: needs patch - patch review Added file: http://bugs.python.org/file35864/test_tcl_nan.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21881 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21881] python cannot parse tcl value
Andreas Schwab added the comment: Thanks, this is working now. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21881 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21881] python cannot parse tcl value
Serhiy Storchaka added the comment: Interesting, what result of getdouble? import _tkinter tk = _tkinter.create() nan = float('nan') tk.getdouble(nan) nan What returns getdouble() (note that _tkinter is imported instead of tkinter!) for NaN value? -- assignee: - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21881 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21881] python cannot parse tcl value
Andreas Schwab added the comment: _tkinter.create().getdouble(float('nan')) nan -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21881 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21881] python cannot parse tcl value
Ned Deily added the comment: What version of Tcl are you using and on what platform? -- nosy: +ned.deily, serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21881 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21881] python cannot parse tcl value
Andreas Schwab added the comment: You will see this on any architecture where the canonical NaN has all bits set (or a subset of them). This include mips and m68k. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21881 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21881] python cannot parse tcl value
Changes by Ned Deily n...@acm.org: -- nosy: -ned.deily stage: - needs patch versions: +Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21881 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21881] python cannot parse tcl value
New submission from Andreas Schwab: Lib/test/test_tcl.py fails with: test test_tcl failed -- Traceback (most recent call last): File /home/abuild/rpmbuild/BUILD/Python-2.7.7/Lib/test/test_tcl.py, line 430 , in test_user_command check(float('nan'), 'NaN', eq=nan_eq) File /home/abuild/rpmbuild/BUILD/Python-2.7.7/Lib/test/test_tcl.py, line 397 , in check eq(result[0], expected2) File /home/abuild/rpmbuild/BUILD/Python-2.7.7/Lib/test/test_tcl.py, line 405 , in nan_eq actual = float(actual) ValueError: invalid literal for float(): NaN(7) -- components: Tkinter messages: 221887 nosy: schwab priority: normal severity: normal status: open title: python cannot parse tcl value type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21881 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com