-
Notifications
You must be signed in to change notification settings - Fork 769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IntelliSense fails to detect editable installs after setuptools update #3265
Comments
Any updates on this? |
See this issue for additional details: microsoft/pyright#3880. |
Yeah, there's a quick and dirty solution: pip uninstall your_package
export SETUPTOOLS_ENABLE_FEATURES="legacy-editable"
pip install -e your_package |
Thanks, that should do as a fix for the meantime! Any future plans/routes to actually solve this for good? EDIT: it actually doesn't do as a fix for me; it still doesn't work. |
@stur86, we're thinking about it. This is not going to be a quick fix. |
There has been discussion about ways to solve this problem. See this typing-sig thread. If a solution is found, agreed upon by typing-sig, and standardized, Pylance will consider supporting it. However, for the time being this is by design since your editable install is using an import hook. There are more details including workarounds here. |
Type: Bug
Behaviour
Expected vs. Actual
IntelliSense should detect pip-installed packages even if the
-e
option was used to install them in editable mode. However, a few weeks ago, in order to comply with PEP 660 (see also pypa/setuptools#3548 ), setuptools changed the way editable installs work, by introducing__editable__<pkg>_finder.py
files in place of symlinks. This has made IntelliSense unable to detect them.Steps to reproduce:
pip install -e <path-to-pkg>
Diagnostic data
python.languageServer
setting: DefaultOutput for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)User Settings
Extension version: 2022.12.1
VS Code version: Code 1.70.2 (e4503b30fc78200f846c62cf8091b76ff5547662, 2022-08-16T05:35:13.448Z)
OS version: Windows_NT x64 10.0.22000
Modes:
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: