28 Sep
2021
28 Sep
'21
9:37 a.m.
On Tue, Sep 28, 2021 at 6:47 AM Pablo Galindo Salgado <pablogsal@gmail.com> 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