Repository navigation
gh-95411: IDLE - Enable using the module browser with .pyw files - #95397
Conversation
This reverts commit a7757f7.
terryjreedy
left a comment
There was a problem hiding this comment.
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 tupleThird, 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. |
|
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.