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-17.17:19:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1616001566.98.0.842507619819.issue43477@roundup.psfhosted.org>
In-reply-to
Content
Having `test_pkg.test_submodule` be set after your import based on the sequence of imports your example executes is entirely expected and a side-effect of how import is (at least now) designed. So I disagree with the assessment "that nothing here was requested by the user", since imports have side-effects, and one of those is setting submodules as attributes on packages post-import.

Thanks for the report and all the details, Thomas, but I am still going to close this as not a bug.
History
Date User Action Args
2021-03-17 17:19:27brett.cannonsetrecipients: + brett.cannon, eric.smith, kaorihinata
2021-03-17 17:19:26brett.cannonsetmessageid: <1616001566.98.0.842507619819.issue43477@roundup.psfhosted.org>
2021-03-17 17:19:26brett.cannonlinkissue43477 messages
2021-03-17 17:19:26brett.cannoncreate