Brett Cannon <br...@python.org> added the comment:
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. ---------- resolution: -> not a bug status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43477> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com