Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue32100

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:IDLE: PathBrowser isn't working
Type:behaviorStage:resolved
Components:IDLEVersions:Python 3.7, Python 3.6
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To: terry.reedyNosy List: cheryl.sabella, terry.reedy
Priority:normalKeywords:patch

Created on2017-11-21 01:14 bycheryl.sabella, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Pull Requests
URLStatusLinkedEdit
PR 4484mergedcheryl.sabella,2017-11-21 01:23
PR 4512mergedterry.reedy,2017-11-23 00:19
PR 4626mergedterry.reedy,2017-11-29 02:21
PR 4629mergedpython-dev,2017-11-29 02:51
Messages (10)
msg306606 -(view)Author: Cheryl Sabella (cheryl.sabella)*(Python committer)Date: 2017-11-21 01:14
Clicking on Path Browser in the File menu gives an error instead of opening the Path Browser.
msg306667 -(view)Author: Terry J. Reedy (terry.reedy)*(Python committer)Date: 2017-11-21 16:34
Error is printed in console window if IDLE started from one.>>> import idlelib.idle# Select pathbrowser in File menuException in Tkinter callbackTraceback (most recent call last):  File "F:\dev\3x\lib\tkinter\__init__.py", line 1699, in __call__    return self.func(*args)  File "F:\dev\3x\lib\idlelib\editor.py", line 671, in open_path_browser    pathbrowser.PathBrowser(self.flist)  File "F:\dev\3x\lib\idlelib\pathbrowser.py", line 18, in __init__    self.init(flist)TypeError: init() takes 1 positional argument but 2 were given
msg306676 -(view)Author: Terry J. Reedy (terry.reedy)*(Python committer)Date: 2017-11-21 18:46
The issue is this:1. PathBrowser subclasses ModuleBrowser.2. ModuleBrowser.init() has the common code for initializing both.3.#31460 changed the signature of ModuleBrowser.__init__ *and* .init.4. I must not have tested pathbrowser after the .init change.  Bad.5. test_pathbrowser needs a new gui test class that at least calls PathBrowser.__init__, which will call ModuleBrowser.init3.6.3 is OK, 3.7.0a2 has this bug.  3.7.0a3 is due 11/27.  Patch should be merged before this with or without new unittests.---Module items can be expanded either by clicking [+] or double-clicking.  The latter also opens the file so that lines can be highlighted.  I have thought about disabling both, and opening a module browser instead, but I can see the usefulness of expanding several files one level deep to get an overview of parts or all of a package.  On the other hand, we might have double-click open both the module and a module browser.
msg306692 -(view)Author: Cheryl Sabella (cheryl.sabella)*(Python committer)Date: 2017-11-21 23:05
I added a test for PathBrowser, but I didn't change the existing tests, except to move them to their own test class.
msg306757 -(view)Author: Terry J. Reedy (terry.reedy)*(Python committer)Date: 2017-11-22 21:10
The reason double-clicking got worse from 3.6.3 to now is this.  Previously, browser.ModuleBrowserTreeItem.OnDoubleClick ignored the file_open global (set to pyshell.flist.open in .__init__) and called pyshell.flist.open.  The Class and Method OnDoubleClick called file_open.  So double-clicking a file name in pathbrowser opened the file, but expanding a file and double-clicking a class or function name raised "'NoneType' object is not callable".  I don't know if I ever tried the latter before.  We subsequently changed the Module DoubleClick to also use file_open, so double clicking a file name also raises. (I meant to submit this yesterday.)
msg306765 -(view)Author: Terry J. Reedy (terry.reedy)*(Python committer)Date: 2017-11-23 00:05
New changeset20d48a44a54ed5e4a6df00e89ae27e3983128265 by Terry Jan Reedy (Cheryl Sabella) in branch 'master':bpo-32100: IDLE: Fix pathbrowser errors; improve tests. (#4484)https://github.com/python/cpython/commit/20d48a44a54ed5e4a6df00e89ae27e3983128265
msg306776 -(view)Author: Terry J. Reedy (terry.reedy)*(Python committer)Date: 2017-11-23 01:05
New changesetae3c5c7b9e5e5ba53213e12cc100e32415d5762c by Terry Jan Reedy in branch '3.6':[3.6]bpo-32100: IDLE: Fix pathbrowser errors; improve tests. (GH-4484) (#4512)https://github.com/python/cpython/commit/ae3c5c7b9e5e5ba53213e12cc100e32415d5762c
msg306777 -(view)Author: Terry J. Reedy (terry.reedy)*(Python committer)Date: 2017-11-23 01:09
Thanks for catching and fixing this.
msg307200 -(view)Author: Terry J. Reedy (terry.reedy)*(Python committer)Date: 2017-11-29 02:50
New changesetfd6f8c56b9a757210e8ceaea9edc50e502dc2085 by Terry Jan Reedy in branch 'master':bpo-32100: Delete unneeded import in idlelib.pathbrowser. (#4626)https://github.com/python/cpython/commit/fd6f8c56b9a757210e8ceaea9edc50e502dc2085
msg307204 -(view)Author: Terry J. Reedy (terry.reedy)*(Python committer)Date: 2017-11-29 03:15
New changeset38ecf57306ef25874ef7c44a9875771e90faee97 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.6':bpo-32100: Delete unneeded import in idlelib.pathbrowser. (GH-4626) (#4629)https://github.com/python/cpython/commit/38ecf57306ef25874ef7c44a9875771e90faee97
History
DateUserActionArgs
2022-04-11 14:58:54adminsetgithub: 76281
2017-11-29 03:15:09terry.reedysetmessages: +msg307204
2017-11-29 02:51:30python-devsetpull_requests: +pull_request4544
2017-11-29 02:50:23terry.reedysetmessages: +msg307200
2017-11-29 02:21:34terry.reedysetpull_requests: +pull_request4541
2017-11-23 01:09:23terry.reedysetstatus: open -> closed
resolution: fixed
messages: +msg306777

stage: patch review -> resolved
2017-11-23 01:05:37terry.reedysetmessages: +msg306776
2017-11-23 00:19:33terry.reedysetpull_requests: +pull_request4449
2017-11-23 00:05:27terry.reedysetmessages: +msg306765
2017-11-22 21:10:20terry.reedysetmessages: +msg306757
2017-11-21 23:05:39cheryl.sabellasetmessages: +msg306692
2017-11-21 18:46:00terry.reedysetmessages: +msg306676
2017-11-21 16:34:58terry.reedysettype: crash -> behavior
messages: +msg306667
versions: + Python 3.6
2017-11-21 01:23:48cheryl.sabellasetkeywords: +patch
stage: patch review
pull_requests: +pull_request4421
2017-11-21 01:14:15cheryl.sabellacreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp