inference/compiled/subprocess/functions.py: Skip python3.11's frozen imports

Bug: https://github.com/davidhalter/jedi/issues/1858
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
This commit is contained in:
Andrew Ammerlaan
2022-10-19 16:53:17 +02:00
parent 3a60943f6e
commit 0a6ad1010c

View File

@@ -151,7 +151,11 @@ def _find_module(string, path=None, full_name=None, is_global_search=True):
spec = find_spec(string, p)
if spec is not None:
if spec.origin == "frozen":
continue
loader = spec.loader
if loader is None and not spec.has_location:
# This is a namespace package.
full_name = string if not path else full_name