pylance-release
pylance-release copied to clipboard
Quickfix add import proposes import that are not available for my python version (ignores sys.version_info)
Environment data
Pylance async client (2024.6.1) started with python extension (2024.8.1) Pylance language server 2024.6.1 (pyright version 1.1.364, commit 0618acc5) starting Assuming Python version 3.11.8.final.0 Ubuntu 22.04
Code Snippet
Repro Steps
With a python 3.11 venv, if I type batched and try to add import, VSCode proposes itertools.batched which is not yet available for this version of python.
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3-venv python3.11-dev python3.11-venv
python3.11 -m venv .venv
@bschnurr I think it is a dup of your stdlib.json rebuild PR.
use this option - https://github.com/microsoft/pylance-release/blob/main/docs/settings/python_analysis_regenerateStdLibIndices.md