Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[internal] Use
f_globals
instead of inspect.getmodule
in `collect…
…_rules` (pantsbuild#16357) While working on pantsbuild#7369, I discovered that `inspect.getmodule` requires relevant modules to exist on the filesystem. PyOxidizer's importer imports from memory, so finding rules by `inspect.getmodule` will not work. This change uses the `f_globals` attribute on the callling frame to get the global objects of the frame that invokes `collect_rules`. I believe this is functionally equivalent. [ci skip-rust] [ci skip-build-wheels]
- Loading branch information