Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ThreadWorker): don't unload modules without __loader__ (backport)
DuckDB (and likely other packages) manually add their submodules (e.g. duckdb.duckdb.functional) during side-effects when the "parent" (e.g. duckdb.duckdb) is loaded. Since extension modules can't be reloaded, it is impossible to re-run these side-effects to recreate these modules. This commit preserves modules without the __loader__ attribute (which is added by Python's normal import machinery), sacrificing isolation for compatibility.
- Loading branch information