Skip to content

bpo-32100: IDLE: PathBrowser does not open#4484

Merged
terryjreedy merged 5 commits intopython:masterfrom
csabella:path_browser
Nov 23, 2017
Merged

bpo-32100: IDLE: PathBrowser does not open#4484
terryjreedy merged 5 commits intopython:masterfrom
csabella:path_browser

Conversation

@csabella
Copy link
Copy Markdown
Contributor

@csabella csabella commented Nov 21, 2017

Minimal change to get PathBrowser working.

  • The call to init() in ModuleBrowser no longer takes flist as a parameter, but PathBrowser was sending it.
  • The call to PathBrowser from editor.py was sending flist - changed to root.
  • file_open in ModuleBrowserTreeItem.OnDoubleClick didn't have file_open defined, which gave an error when trying to open a file from the Path Browser.

Not fixed:

  • Double clicking a file in the Path Browser shows all the classes and functions, just like Module Browser. I don't think this is desirable?

https://bugs.python.org/issue32100

@terryjreedy
Copy link
Copy Markdown
Member

Having worked out the reasons for the initialization and double-click bugs, the fixes look exactly right. I want to add tests that would have caught both. (But see the issue.)

@terryjreedy
Copy link
Copy Markdown
Member

Very nice addition. I am testing and slightly editing and will upload a patch soon.

@terryjreedy
Copy link
Copy Markdown
Member

Changes:

  1. Re-arrange imports, both test files.
  2. root.update_idletasks(), both files, suppresses can't invoke "event" command: messages,
    without causing widget flash on screen.
  3. Test that 'file_open' is not None, both files.
  4. Always rebind file_open to make above true.
  5. Improve use of unittest.mock.

I

@terryjreedy
Copy link
Copy Markdown
Member

I cannot edit even my comments or add inline comments or leave 'Review'. Will merge, if I can, if Travis passes.

@terryjreedy terryjreedy merged commit 20d48a4 into python:master Nov 23, 2017
@miss-islington
Copy link
Copy Markdown
Contributor

Thanks @csabella for the PR, and @terryjreedy for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6.
🐍🍒⛏🤖

@miss-islington
Copy link
Copy Markdown
Contributor

Sorry, @csabella and @terryjreedy, I could not cleanly backport this to 3.6 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 20d48a44a54ed5e4a6df00e89ae27e3983128265 3.6

terryjreedy pushed a commit to terryjreedy/cpython that referenced this pull request Nov 23, 2017
…GH-4484)

Patch mostly by Cheryl Sabella.
(cherry picked from commit 20d48a4)
@bedevere-bot
Copy link
Copy Markdown

GH-4512 is a backport of this pull request to the 3.6 branch.

@csabella
Copy link
Copy Markdown
Contributor Author

@terryjreedy Thanks!

@csabella csabella deleted the path_browser branch November 23, 2017 01:00
terryjreedy added a commit that referenced this pull request Nov 23, 2017
… (#4512)

Patch mostly by Cheryl Sabella.
(cherry picked from commit 20d48a4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants