Message404623
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. |
|
Date |
User |
Action |
Args |
2021-10-21 16:58:47 | eric.snow | set | recipients:
+ eric.snow, barry, brett.cannon, rhettinger, ncoghlan, pitrou, pmpp, FFY00, iritkatriel |
2021-10-21 16:58:47 | eric.snow | set | messageid: <1634835527.62.0.0859756442264.issue33277@roundup.psfhosted.org> |
2021-10-21 16:58:47 | eric.snow | link | issue33277 messages |
2021-10-21 16:58:47 | eric.snow | create | |
|