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 eric.snow
Recipients FFY00, barry, brett.cannon, eric.snow, iritkatriel, ncoghlan, pitrou, pmpp, rhettinger
Date 2021-10-21.16:58:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1634835527.62.0.0859756442264.issue33277@roundup.psfhosted.org>
In-reply-to
Content
I ended up writing up more thoughts on this in the issue about __package__: https://bugs.python.org/issue45540#msg404619.

Users can call importlib.util.find_spec(), which is probably good enough to figure out how a module was originally imported.  So I don't have any serious objections to making the spec the writable single-source-of-truth.

FWIW, I'd rather there were high-level helpers available as an alternative to the low-level practice of modifying module attrs.  However, in this case it probably isn't frequent enough to make it worth it.
History
Date User Action Args
2021-10-21 16:58:47eric.snowsetrecipients: + eric.snow, barry, brett.cannon, rhettinger, ncoghlan, pitrou, pmpp, FFY00, iritkatriel
2021-10-21 16:58:47eric.snowsetmessageid: <1634835527.62.0.0859756442264.issue33277@roundup.psfhosted.org>
2021-10-21 16:58:47eric.snowlinkissue33277 messages
2021-10-21 16:58:47eric.snowcreate