Issue21526
Created on 2014-05-18 20:41 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| tkinter_newboolean.patch | serhiy.storchaka, 2014-05-18 20:41 | review | ||
| Messages (11) | |||
|---|---|---|---|
| msg218755 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2014-05-18 20:41 | |
Recent Tcl versions (since 8.5) no longer use internal "boolean" type. Instead they use "booleanString" type (but looks as only internally). Here is a patch which add support for "booleanString" Tcl type in case when it leaks to user. There are no any new tests because there is no simple way (if any) to create pure Tcl boolean object. |
|||
| msg238950 - (view) | Author: Roundup Robot (python-dev) | Date: 2015-03-22 22:48 | |
New changeset e9d86c1de292 by Serhiy Storchaka in branch 'default': Issue #21526: Tkinter now supports new boolean type in Tcl 8.5. https://hg.python.org/cpython/rev/e9d86c1de292 |
|||
| msg239750 - (view) | Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * | Date: 2015-03-31 20:49 | |
I'm not sure that this change is correct. I have Tcl version 8.6 installed, and I checked that "app->BooleanType" is NULL. Fortunately value->typePtr is probably never NULL, but I think the comparison should be skipped in this case. Where did you see this booleanString? |
|||
| msg239751 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2015-03-31 21:09 | |
The case (value->typePtr == NULL) is tested above for purpose, so it is not a bug when one of type pointers is NULL. "booleanString" was added in 8.5, replacing "boolean", but in 8.6 it is not used. All boolean values in 8.6 are just integers 0 and 1. |
|||
| msg239753 - (view) | Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * | Date: 2015-03-31 22:16 | |
Ah, the NULL case is indeed tested just above. So the current code works correctly. |
|||
| msg239880 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2015-04-02 07:07 | |
When I said this, I understood that the patch should be backported to maintained releases.
Unpatched Python with Tcl 8.5:
>>> import tkinter; tcl = tkinter.Tcl()
>>> tcl.call('expr', 'false')
<booleanString object: 'false'>
>>> bool(tcl.call('expr', 'false'))
True
|
|||
| msg239886 - (view) | Author: Roundup Robot (python-dev) | Date: 2015-04-02 08:03 | |
New changeset de3496cd609e by Serhiy Storchaka in branch '3.4': Issue #21526: Tkinter now supports new boolean type in Tcl 8.5. https://hg.python.org/cpython/rev/de3496cd609e New changeset b2413da7516f by Serhiy Storchaka in branch 'default': Issue #21526: Fixed support of new boolean type in Tcl 8.5. https://hg.python.org/cpython/rev/b2413da7516f New changeset d0554559de53 by Serhiy Storchaka in branch '2.7': Issue #21526: Tkinter now supports new boolean type in Tcl 8.5. https://hg.python.org/cpython/rev/d0554559de53 |
|||
| msg239889 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2015-04-02 08:10 | |
And indeed, "app->BooleanType" is NULL, because the "booleanString" type is not registered in Tcl. Thank you for pointing on it Amaury. Now it is fixed. |
|||
| msg239893 - (view) | Author: Roundup Robot (python-dev) | Date: 2015-04-02 08:48 | |
New changeset 954e7e1d85f1 by Serhiy Storchaka in branch '2.7': Issue #21526: Fixed the test_booleans test for wantobjects = 0. https://hg.python.org/cpython/rev/954e7e1d85f1 New changeset 4255ca2f5314 by Serhiy Storchaka in branch '3.4': Issue #21526: Fixed the test_booleans test for wantobjects = 0. https://hg.python.org/cpython/rev/4255ca2f5314 New changeset bb0b5b6c13f3 by Serhiy Storchaka in branch 'default': Issue #21526: Fixed the test_booleans test for wantobjects = 0. https://hg.python.org/cpython/rev/bb0b5b6c13f3 |
|||
| msg239916 - (view) | Author: STINNER Victor (vstinner) * | Date: 2015-04-02 14:16 | |
http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/9465/steps/test/logs/stdio ====================================================================== FAIL: test_booleans (test.test_tcl.TclTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/test_tcl.py", line 391, in test_booleans check('true', True) File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/test_tcl.py", line 386, in check self.assertEqual(result, expected) AssertionError: 'true' != True |
|||
| msg239931 - (view) | Author: Roundup Robot (python-dev) | Date: 2015-04-02 17:08 | |
New changeset 77e5623e22dd by Serhiy Storchaka in branch '2.7': Issue #21526: Skip test_booleans on Tcl < 8.5. https://hg.python.org/cpython/rev/77e5623e22dd New changeset 3b8039c37b37 by Serhiy Storchaka in branch '3.4': Issue #21526: Skip test_booleans on Tcl < 8.5. https://hg.python.org/cpython/rev/3b8039c37b37 New changeset 8ad98ade3f78 by Serhiy Storchaka in branch 'default': Issue #21526: Skip test_booleans on Tcl < 8.5. https://hg.python.org/cpython/rev/8ad98ade3f78 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:03 | admin | set | github: 65725 |
| 2015-04-02 22:28:46 | serhiy.storchaka | set | status: open -> closed resolution: fixed |
| 2015-04-02 17:08:11 | python-dev | set | messages: + msg239931 |
| 2015-04-02 14:16:58 | vstinner | set | status: closed -> open nosy:
+ vstinner resolution: fixed -> (no value) |
| 2015-04-02 08:48:25 | python-dev | set | messages: + msg239893 |
| 2015-04-02 08:10:55 | serhiy.storchaka | set | status: open -> closed messages: + msg239889 |
| 2015-04-02 08:03:06 | python-dev | set | messages: + msg239886 |
| 2015-04-02 07:08:43 | serhiy.storchaka | set | status: closed -> open |
| 2015-04-02 07:07:19 | serhiy.storchaka | set | messages: + msg239880 |
| 2015-03-31 22:16:54 | amaury.forgeotdarc | set | status: open -> closed resolution: fixed messages: + msg239753 |
| 2015-03-31 21:09:06 | serhiy.storchaka | set | messages: + msg239751 |
| 2015-03-31 20:49:07 | amaury.forgeotdarc | set | status: closed -> open nosy:
+ amaury.forgeotdarc resolution: fixed -> (no value) |
| 2015-03-23 08:34:54 | serhiy.storchaka | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2015-03-22 22:48:33 | python-dev | set | nosy:
+ python-dev messages: + msg238950 |
| 2014-05-18 20:41:31 | serhiy.storchaka | create | |