-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-95411: IDLE - Enable using the module browser with .pyw files #95397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-95411: IDLE - Enable using the module browser with .pyw files #95397
Conversation
This reverts commit a7757f7.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me on main, .pyw can be browsed, .pyi cannot. I am not surprised because .pyi files cannot be imported and it could be said that they are not modules. In any case, pyclbr use importlib in spec = importlib.util._find_spec_from_path(fullmodule, search_path)
and calls
spec.submodule_search_locations
and spec.loader.get_source
. We might have to continue to exclude .pyi files.
When you're done making the requested changes, leave the comment: |
- use util.py_extensions in test - remove now obsoleted UtilTest.test_extensions
The Anyway, I agree with this. One possibility is to use two sets:
Another solution: add more data to the set and couple it with e.g. py_extensions = (
# (ext, browseable)
(".py", True),
(".pyw", True),
(".pyi", False),
)
# possible enhancement: use namedtuple iso. ordinary tuple Third, and simplest solution: add a new |
I believe I have made the requested changes; please review again. |
Thanks for making the requested changes! @terryjreedy: please review the changes made to this pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pending a last look, I expect to merge after you move the browser stuff as requested above.
Misc/NEWS.d/next/IDLE/2022-07-29-11-08-52.gh-issue-95411.dazlqH.rst
Outdated
Show resolved
Hide resolved
When you're done making the requested changes, leave the comment: |
I have made the requested changes; please review again. |
Thanks for making the requested changes! @terryjreedy: please review the changes made to this pull request. |
Thanks @erlend-aasland for the PR, and @terryjreedy for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11. |
GH-95457 is a backport of this pull request to the 3.11 branch. |
pythonGH-95397) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> (cherry picked from commit 7e19e41) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
pythonGH-95397) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> (cherry picked from commit 7e19e41) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
GH-95458 is a backport of this pull request to the 3.10 branch. |
Uh oh!
There was an error while loading. Please reload this page.