This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author brett.cannon
Recipients brett.cannon, eric.smith, kaorihinata
Date 2021-03-15.23:24:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Sorry, I'm having a hard time following what you've written and I unfortunately don't have time to examine your (I assume) .tar.xz file. When you say "directory-based-module", do you mean a package (e.g. `` in a directory)? It's important to be clear because not all imports come from a file system, and so a package versus a module has important distinctions.

Could you write out what you're seeing and what you're expecting? E.g.
# pkg/
from pkg.submodule import *  # Expecting `submodule_attr`, getting ...

# pkg/
submodule_attr = 0

I will also say you really shouldn't be using `import *`. It primarily exists to make it easier to work in the REPL, and otherwise is rather archaic and has very odd import semantics.

As for how Python 2 did things, that (luckly) doesn't matter anymore. :) To show that this is a change in semantics you would need to check Python 3 versions to see where it shifted. If this changed in 3.9 then turning it back may work. But if it's more like 3.4 then I'm afraid these are now the semantics and the risk of code breakage is possibly too high.
Date User Action Args
2021-03-15 23:24:08brett.cannonsetrecipients: + brett.cannon, eric.smith, kaorihinata
2021-03-15 23:24:08brett.cannonsetmessageid: <>
2021-03-15 23:24:08brett.cannonlinkissue43477 messages
2021-03-15 23:24:08brett.cannoncreate