Bug 284088
Summary: | [AutoInstall] don't mutate sys.path | ||
---|---|---|---|
Product: | WebKit | Reporter: | Sam Sneddon [:gsnedders] <gsnedders> |
Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | 285094 | ||
Bug Blocks: |
Sam Sneddon [:gsnedders]
There shouldn't be any need to mutate sys.path at all; this actually leads to a kinda weird interaction between where the AutoInstaller lives on sys.meta_path and where the AutoInstaller has added directories on sys.path.
Our importlib.abc.MetaPathFinder.find_spec should just return a spec that suffices to load the module, and thus no sys.path modification should be necessary. We can probably even delegate most of the actual implementation to importlib.machinery.FileFinder.
Note that if we stop mutating sys.path, we should _also_ make sure we also implement DistributionFinder.find_distributions so importlib.metadata can continue to find distribution metadata.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/141332934>