Message407885
The key point is that loaders should be using the spec, not any of the module attrs (like `__file__` and `__cached__`), nor setting them.
For the specific paragraph I referenced, it would look more like:
It is also appropriate to set __cached__ when __file__ is not set.
However, that scenario is quite atypical. Ultimately, __file__ and
__cached__ are set by the import system from the module spec provided
by the finder. The spec instructs the loader. If a loader can load
from a cached module but otherwise does not load from a file, that
atypical scenario may be appropriate. |
|
| Date |
User |
Action |
Args |
| 2021-12-07 00:49:59 | eric.snow | set | recipients:
+ eric.snow, barry, brett.cannon, ncoghlan, docs@python, iritkatriel |
| 2021-12-07 00:49:59 | eric.snow | set | messageid: <1638838199.42.0.482004254962.issue21761@roundup.psfhosted.org> |
| 2021-12-07 00:49:59 | eric.snow | link | issue21761 messages |
| 2021-12-07 00:49:59 | eric.snow | create | |
|