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.

classification
Title: Implement FrozenImporter.get_source()
Type: behavior Stage: needs patch
Components: Library (Lib) Versions: Python 3.11
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: FFY00, eric.snow
Priority: normal Keywords:

Created on 2021-10-28 18:36 by eric.snow, last changed 2022-04-11 14:59 by admin.

Messages (2)
msg405219 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2021-10-28 18:36
FrozenImporter (in Lib/importlib/_bootstrap.py) has a get_source() method but it always returns None.  Now that __file__ is set on frozen (stdlib) modules, we can implement FrozenImporter.get_source() appropriately.
msg405220 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2021-10-28 18:37
Note that once the get_source() implementation is done, the only missing method for importlib.abc.InspectLoader is source_to_code().  (See https://docs.python.org/3/library/importlib.html#importlib.abc.InspectLoader.)
History
Date User Action Args
2022-04-11 14:59:51adminsetgithub: 89821
2021-10-28 18:37:14eric.snowsetmessages: + msg405220
2021-10-28 18:36:49eric.snowcreate