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 barry, brett.cannon, docs@python, eric.snow, iritkatriel, ncoghlan
Date 2021-12-07.00:49:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1638838199.42.0.482004254962.issue21761@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-12-07 00:49:59eric.snowsetrecipients: + eric.snow, barry, brett.cannon, ncoghlan, docs@python, iritkatriel
2021-12-07 00:49:59eric.snowsetmessageid: <1638838199.42.0.482004254962.issue21761@roundup.psfhosted.org>
2021-12-07 00:49:59eric.snowlinkissue21761 messages
2021-12-07 00:49:59eric.snowcreate
Morty Proxy This is a proxified and sanitized view of the page, visit original site.