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.
Created on 2014年06月29日 19:38 by schwab, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| test_tcl_nan.patch | serhiy.storchaka, 2014年07月05日 07:42 | review | ||
| Messages (10) | |||
|---|---|---|---|
| msg221887 - (view) | Author: Andreas Schwab (schwab) * | Date: 2014年06月29日 19:38 | |
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(7ffffffffffff) |
|||
| msg221947 - (view) | Author: Ned Deily (ned.deily) * (Python committer) | Date: 2014年06月30日 08:07 | |
What version of Tcl are you using and on what platform? |
|||
| msg221973 - (view) | Author: Andreas Schwab (schwab) * | Date: 2014年06月30日 18:22 | |
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. |
|||
| msg222297 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2014年07月04日 17:35 | |
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?
|
|||
| msg222299 - (view) | Author: Andreas Schwab (schwab) * | Date: 2014年07月04日 18:06 | |
>>> _tkinter.create().getdouble(float('nan'))
nan
|
|||
| msg222340 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2014年07月05日 07:42 | |
Here is a patch which omits using of float() to convert Tcl's NaN values. |
|||
| msg222345 - (view) | Author: Andreas Schwab (schwab) * | Date: 2014年07月05日 10:11 | |
Thanks, this is working now. |
|||
| msg222445 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2014年07月07日 10:48 | |
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 |
|||
| msg222455 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2014年07月07日 12:20 | |
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 |
|||
| msg222456 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2014年07月07日 12:29 | |
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(). |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:05 | admin | set | github: 66080 |
| 2014年07月07日 12:29:41 | serhiy.storchaka | set | status: open -> closed resolution: fixed messages: + msg222456 stage: patch review -> resolved |
| 2014年07月07日 12:20:20 | python-dev | set | messages: + msg222455 |
| 2014年07月07日 10:48:30 | python-dev | set | nosy:
+ python-dev messages: + msg222445 |
| 2014年07月05日 10:11:38 | schwab | set | messages: + msg222345 |
| 2014年07月05日 07:42:14 | serhiy.storchaka | set | files:
+ test_tcl_nan.patch keywords: + patch messages: + msg222340 stage: needs patch -> patch review |
| 2014年07月04日 18:06:10 | schwab | set | messages: + msg222299 |
| 2014年07月04日 17:35:46 | serhiy.storchaka | set | assignee: serhiy.storchaka messages: + msg222297 |
| 2014年06月30日 19:18:44 | ned.deily | set | nosy:
- ned.deily stage: needs patch versions: + Python 3.4, Python 3.5 |
| 2014年06月30日 18:22:14 | schwab | set | messages: + msg221973 |
| 2014年06月30日 08:07:25 | ned.deily | set | nosy:
+ serhiy.storchaka, ned.deily messages: + msg221947 |
| 2014年06月29日 19:38:46 | schwab | create | |