ionelmc / python-hunter

Hunter is a flexible code tracing toolkit.
https://python-hunter.readthedocs.io/
BSD 2-Clause "Simplified" License
800 stars 46 forks source link

Trace importlib #112

Open DUOLabs333 opened 1 year ago

DUOLabs333 commented 1 year ago

Importlib is not used from the Python source code, but from a "frozen" variant. The problem is, the module has no source code, so I get NO SOURCE: Source code string for '<frozen importlib._bootstrap_external>' is empty. Is there a way to set hunter to read importlib whenever it encounters its frozen form (or maybe generalize this to any frozen module in the stdlib)?

ionelmc commented 1 year ago

I need to investigate if it's possible to pull out the sources somehow.