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 2015年05月06日 15:26 by serhiy.storchaka, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| nodefaultroot.diff | terry.reedy, 2016年06月20日 09:04 | review | ||
| nodefaultroot2.diff | serhiy.storchaka, 2016年06月20日 14:29 | review | ||
| nodefaultroot3.diff | terry.reedy, 2016年06月21日 09:38 | review | ||
| nodefaultroot4.diff | terry.reedy, 2016年06月21日 21:22 | review | ||
| Messages (15) | |||
|---|---|---|---|
| msg242680 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2015年05月06日 15:26 | |
Perhaps explicitly calling NoDefaultRoot() in IDLE will help to catch some possible bugs (in IDLE or in Tkinter). It should be called only when IDLE is ran in subprocess mode, so it will not affect user code that uses Tkinter. _default_root is used mainly for interactive experiments with Tkinter. It is worth also to call NoDefaultRoot() in IDLE tests (see Tkinter tests as a guide). |
|||
| msg268873 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2016年06月19日 21:45 | |
What your thoughts about this Terry? |
|||
| msg268888 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2016年06月20日 09:04 | |
Time to do it, at least for tests. I think patch is ready to push, with running without default root disabled until I do more testing. In particular, reread in Rietveld, do suggested actions when run through htest, and try all menu items. |
|||
| msg268901 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2016年06月20日 14:29 | |
I ran IDLE and tests and found yet few needed changes. NoDefaultRoot() should be called only if run IDLE with a subprocess support. |
|||
| msg268902 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2016年06月20日 14:31 | |
And I thing changes to tests can be applied to all versions (especially since they become diverge), but NoDefaultRoot() should be called in IDLE only in 3.6. |
|||
| msg268979 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2016年06月21日 09:38 | |
I made htest run without default root, just list test_idel, and found a few more. I grepped for 'Toplevel()'. Also for bad Tk() calls. I still need to move the call in pyshell and check this over. But I think it close. |
|||
| msg269028 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2016年06月21日 21:22 | |
Conditioned NoDefaultRoot() on use_subprocess. Ran through menu. Will push soon after rechecking patches with Rietveld. Thanks for the additional review. I don't know that this caught any real bugs in IDLE itself. But many of the htests needed upgrading to consistently use a Toplevel with the exiting root as parent (and never start a second mainloop). Not worth backporting en masse though. |
|||
| msg269033 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2016年06月21日 22:42 | |
New changeset 064b29dde096 by Terry Jan Reedy in branch 'default': Issue #24137: Run IDLE, test_idle, and htest with tkinter default root disabled. https://hg.python.org/cpython/rev/064b29dde096 |
|||
| msg269254 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2016年06月25日 20:53 | |
New changeset a8d611eb6173 by Serhiy Storchaka in branch 'default': Issue #24137: Fixed IDLE on Linux with tkinter default root disabled. https://hg.python.org/cpython/rev/a8d611eb6173 |
|||
| msg269255 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2016年06月25日 20:54 | |
You have missed my changes in nodefaultroot2.diff. |
|||
| msg269265 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2016年06月25日 23:18 | |
Using Rietveld to make a 1-2 diff for each file, it appears you made 3 changes. I incorporated 2, and missed 1 (which you just pushed). I believe I incorporated your changes by hand because I had already made additional changes myself. I suspect that at that time I failed to middle-click the '1' for 'pyshell' hard enough to get the 1-2 diff for pyshell. I should have counted and checked to make sure I had all 8 diffs. |
|||
| msg271207 - (view) | Author: Martin Panter (martin.panter) * (Python committer) | Date: 2016年07月25日 02:07 | |
It seems this change causes test_tix to fail for me; see Issue 27611 |
|||
| msg271224 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2016年07月25日 04:32 | |
New changeset 5c76f787e695 by Terry Jan Reedy in branch 'default': Issue #24137, issue #27611: Restore tkinter after test_idle. https://hg.python.org/cpython/rev/5c76f787e695 |
|||
| msg272821 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2016年08月16日 04:10 | |
New changeset a6a248479b66 by Terry Jan Reedy in branch 'default': Issue #27611, #24137: Only change tkinter when easily restored. https://hg.python.org/cpython/rev/a6a248479b66 |
|||
| msg320530 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2018年06月27日 02:17 | |
The net effect of this issue: pyshell.main calls NoDefaultRoot() when running normally, when using a subprocess and testing is not set. It does not call it when in -n mode since that would affect users. idle_test.htest calls NoDefaultRoot() unconditionally. pyshell.main is not called. test.test_idle sets testing to avoid the call when run by test.regrtest, to avoid failing the latter's changed-environment check. But it does call NoDefaultRoot when run as __main__ and the tests are run by unittest.main. Known dependencies on a default root have been removed. It is unlikely that any are left. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:16 | admin | set | github: 68325 |
| 2018年06月27日 02:17:09 | terry.reedy | set | messages: + msg320530 |
| 2016年08月16日 04:10:31 | python-dev | set | messages: + msg272821 |
| 2016年07月25日 04:32:09 | python-dev | set | messages: + msg271224 |
| 2016年07月25日 02:07:48 | martin.panter | set | nosy:
+ martin.panter messages: + msg271207 |
| 2016年06月25日 23:18:29 | terry.reedy | set | messages: + msg269265 |
| 2016年06月25日 20:54:09 | serhiy.storchaka | set | messages: + msg269255 |
| 2016年06月25日 20:53:16 | python-dev | set | messages: + msg269254 |
| 2016年06月21日 22:43:58 | terry.reedy | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2016年06月21日 22:42:02 | python-dev | set | nosy:
+ python-dev messages: + msg269033 |
| 2016年06月21日 21:22:26 | terry.reedy | set | files:
+ nodefaultroot4.diff messages: + msg269028 |
| 2016年06月21日 09:38:29 | terry.reedy | set | files:
+ nodefaultroot3.diff messages: + msg268979 |
| 2016年06月20日 14:31:49 | serhiy.storchaka | set | messages: + msg268902 |
| 2016年06月20日 14:29:04 | serhiy.storchaka | set | files:
+ nodefaultroot2.diff messages: + msg268901 |
| 2016年06月20日 09:04:41 | terry.reedy | set | files:
+ nodefaultroot.diff versions: + Python 3.6, - Python 3.5 messages: + msg268888 assignee: terry.reedy keywords: + patch stage: needs patch -> patch review |
| 2016年06月19日 21:45:33 | serhiy.storchaka | set | messages:
+ msg268873 stage: needs patch |
| 2015年05月06日 15:26:17 | serhiy.storchaka | create | |