On Tue, Sep 28, 2021 at 6:47 AM Pablo Galindo Salgado <[email protected]> wrote: > One interesting consequence of what Eric mentioned (They have a different > loader and repr. Also, frozen modules do not > have __file__ set (and __path__ is always []).) is that frozen modules don't > have a `__file__` attribute IIRC and therefore > tracebacks won't include the source.
FYI, we are planning on setting __file__ on the frozen stdlib modules, whenever possible. (We can do that whenever we can determine the stdlib dir during startup. See https://bugs.python.org/issue45211.) Regardless, for tracebacks we would need to set co_filename on the module's code objects, right? -eric _______________________________________________ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/W6F2V3H3KHGLOL5CJDLTO7DGO37LYIG5/ Code of Conduct: http://python.org/psf/codeofconduct/
