Don't reexport star-imported symbols when implicit reexports are disabled #7361
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based on #7099, please see only the second commit.
Currently, in regular files, symbols imported into module A with
from B import *
are considered explicitly exported from module A as well, i.e.they are considered part of module's A public API.
This behavior makes sense in stub files as a shorthand (and is specified
in PEP 484), but for regular files I think it is better to be explicit:
add the symbols to
__all__
.Fixes #7042
Further discussion: #7042 (comment)