From 9dd76c7ce546caa3328557de71b51719288762d6 Mon Sep 17 00:00:00 2001 From: Peter Law Date: Tue, 4 Mar 2025 22:07:56 +0000 Subject: [PATCH 1/3] Explicit sphinx config path This is now required by ReadTheDocs; see https://about.readthedocs.com/blog/2024/12/deprecate-config-files-without-sphinx-or-mkdocs-config/ --- .readthedocs.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.readthedocs.yml b/.readthedocs.yml index a91352d4..58505775 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -10,6 +10,9 @@ python: submodules: include: all +sphinx: + configuration: docs/conf.py + build: os: ubuntu-22.04 tools: From 699c930bd4df61477cc31bb7400992e7a26b1c02 Mon Sep 17 00:00:00 2001 From: Robin <167366979+allrob23@users.noreply.github.com> Date: Wed, 5 Mar 2025 12:53:08 +0000 Subject: [PATCH 2/3] perf: improve performance by replacing list to set --- jedi/inference/imports.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jedi/inference/imports.py b/jedi/inference/imports.py index c1a4953f..f7a363c1 100644 --- a/jedi/inference/imports.py +++ b/jedi/inference/imports.py @@ -480,7 +480,7 @@ def _load_builtin_module(inference_state, import_names=None, sys_path=None): if sys_path is None: sys_path = inference_state.get_sys_path() if not project._load_unsafe_extensions: - safe_paths = project._get_base_sys_path(inference_state) + safe_paths = set(project._get_base_sys_path(inference_state)) sys_path = [p for p in sys_path if p in safe_paths] dotted_name = '.'.join(import_names) From 35a12fab7ad5752284f3e613ac4bbe102f09812c Mon Sep 17 00:00:00 2001 From: Damian Birchler Date: Thu, 13 Mar 2025 09:52:49 +0100 Subject: [PATCH 3/3] Don't remove `sys.path[0]`. Fixes https://github.com/davidhalter/jedi/issues/2053. --- jedi/inference/compiled/subprocess/__main__.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/jedi/inference/compiled/subprocess/__main__.py b/jedi/inference/compiled/subprocess/__main__.py index 58ccd2d6..897ebf33 100644 --- a/jedi/inference/compiled/subprocess/__main__.py +++ b/jedi/inference/compiled/subprocess/__main__.py @@ -3,10 +3,6 @@ import sys from importlib.abc import MetaPathFinder from importlib.machinery import PathFinder -# Remove the first entry, because it's simply a directory entry that equals -# this directory. -del sys.path[0] - def _get_paths(): # Get the path to jedi.