pylance-release
pylance-release copied to clipboard
Attributes not recognized when using `converters` in `attrs` module
In newer versions of Pylance the typing doesn't seem to work properly when using the converter
argument of the attrs.field
function to define an attribute. Previously this worked fine - through trial and error it seems this bug appeared when moving from Pylance 2023.6.30
to 2023.6.40
.
The only mention of this I could find online was this stack overflow post.
Environment data
- Language Server version: v2023.12.1
- OS and version: Windows 11
- Python version (& distribution if applicable, e.g. Anaconda): 3.11
- Attrs module: 23.2.0
Also observed on Windows 10 with Python 3.8 and attrs==23.1.0
.
Code Snippet
import attrs
@attrs.define
class A:
x: tuple[int, ...] = attrs.field(converter=tuple)
A([1,2,3]).x
Expected behavior
The attribute x
should be highlighted blue, typed as (variable) x: tuple[int, ...]
and should be refactorable.
Actual behavior
The attribute x
is highlighted white, typed as (function) x: tuple[int, ...]
and not refactorable.
Logs
2024-01-24 13:27:02.505 [info] [Info - 1:27:02 PM] (8512) Pylance language server 2023.12.1 (pyright a78e2b10) starting
2024-01-24 13:27:02.506 [info] [Info - 1:27:02 PM] (8512) Server root directory: C:\Users\jamie\.vscode\extensions\ms-python.vscode-pylance-2023.12.1\dist
2024-01-24 13:27:02.513 [info] [Info - 1:27:02 PM] (8512) Starting service instance "jtools"
2024-01-24 13:27:02.554 [info] (8512) No configuration file found.
2024-01-24 13:27:02.554 [info] (8512) pyproject.toml file found at C:\Users\jamie\Repos\jtools.
2024-01-24 13:27:02.554 [info] [Info - 1:27:02 PM] (8512) Setting pythonPath for service "jtools": "C:\Users\jamie\AppData\Local\Programs\Python\Python312\python.exe"
2024-01-24 13:27:02.555 [info] [Info - 1:27:02 PM] (8512) Setting environmentName for service "jtools": "3.12.0 (global)"
2024-01-24 13:27:02.560 [info] [Info - 1:27:02 PM] (8512) Loading pyproject.toml file at C:\Users\jamie\Repos\jtools\pyproject.toml
2024-01-24 13:27:02.565 [info] [Info - 1:27:02 PM] (8512) Pyproject file "C:\Users\jamie\Repos\jtools\pyproject.toml" has no "[tool.pyright]" section.
2024-01-24 13:27:02.642 [info] [Info - 1:27:02 PM] (8512) Assuming Python version 3.12
2024-01-24 13:27:02.642 [info] (8512) Assuming Python platform Windows
2024-01-24 13:27:02.738 [info] [Info - 1:27:02 PM] (8512) Search paths for C:\Users\jamie\Repos\jtools
2024-01-24 13:27:02.738 [info] [Info - 1:27:02 PM] (8512) C:\Users\jamie\.vscode\extensions\ms-python.vscode-pylance-2023.12.1\dist\typeshed-fallback\stdlib
2024-01-24 13:27:02.739 [info] [Info - 1:27:02 PM] (8512) C:\Users\jamie\Repos\jtools
2024-01-24 13:27:02.739 [info] [Info - 1:27:02 PM] (8512) C:\Users\jamie\Repos\jtools\src
2024-01-24 13:27:02.739 [info] [Info - 1:27:02 PM] (8512) C:\Users\jamie\Repos\jtools\typings
2024-01-24 13:27:02.739 [info] [Info - 1:27:02 PM] (8512) C:\Users\jamie\.vscode\extensions\ms-python.vscode-pylance-2023.12.1\dist\typeshed-fallback\stubs\...
2024-01-24 13:27:02.739 [info] [Info - 1:27:02 PM] (8512) C:\Users\jamie\.vscode\extensions\ms-python.vscode-pylance-2023.12.1\dist\bundled\stubs
2024-01-24 13:27:02.740 [info] [Info - 1:27:02 PM] (8512) C:\Users\jamie\AppData\Local\Programs\Python\Python312\DLLs
2024-01-24 13:27:02.740 [info] [Info - 1:27:02 PM] (8512) C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib
2024-01-24 13:27:02.740 [info] [Info - 1:27:02 PM] (8512) C:\Users\jamie\AppData\Local\Programs\Python\Python312
2024-01-24 13:27:02.740 [info] [Info - 1:27:02 PM] (8512) C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib\site-packages
2024-01-24 13:27:02.741 [info] [Info - 1:27:02 PM] (8512) Adding fs watcher for library directories:
C:\Users\jamie\AppData\Local\Programs\Python\Python312\DLLs
C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib
C:\Users\jamie\AppData\Local\Programs\Python\Python312
C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib\site-packages
2024-01-24 13:27:02.742 [info] [Info - 1:27:02 PM] (8512) Adding fs watcher for directories:
C:\Users\jamie\Repos\jtools
2024-01-24 13:27:02.742 [info] (8512) Searching for source files
2024-01-24 13:27:02.750 [info] [Info - 1:27:02 PM] (8512) Found 4 source files
2024-01-24 13:27:02.750 [info] (8512) pytest configurations: {"message":"script","classes":["Test"],"files":["test_*.py","*_test.py"],"functions":["test"]}
2024-01-24 13:27:02.750 [info] (8512) pytest configurations: {"message":"script","classes":["Test"],"files":["test_*.py","*_test.py"],"functions":["test"]}
2024-01-24 13:27:02.816 [info] (8512) [FG] parsing: C:\Users\jamie\Repos\jtools\temp.py (24ms)
2024-01-24 13:27:02.923 [info] (8512) [FG] parsing: C:\Users\jamie\.vscode\extensions\ms-python.vscode-pylance-2023.12.1\dist\typeshed-fallback\stdlib\builtins.pyi [fs read 4ms] (105ms)
2024-01-24 13:27:02.970 [info] (8512) [FG] binding: C:\Users\jamie\.vscode\extensions\ms-python.vscode-pylance-2023.12.1\dist\typeshed-fallback\stdlib\builtins.pyi (46ms)
2024-01-24 13:27:02.972 [info] (8512) [FG] binding: C:\Users\jamie\Repos\jtools\temp.py (1ms)
2024-01-24 13:27:03.309 [info] ERROR: The process "2244" not found.
2024-01-24 13:27:03.314 [info] (8512) pytest configurations: {"message":"request cancelled","classes":["Test"],"files":["test_*.py","*_test.py"],"functions":["test"]}
2024-01-24 13:27:03.374 [info] (8512) [IDX(2)] scan packages C:\Users\jamie\Repos\jtools ...
2024-01-24 13:27:03.375 [info] (8512) [IDX(2)] read stdlib indices (37ms)
2024-01-24 13:27:03.379 [info] (8512) [BG(1)] getSemanticTokens full at C:\Users\jamie\Repos\jtools\temp.py ...
2024-01-24 13:27:03.379 [info] (8512) [BG(1)] parsing: C:\Users\jamie\Repos\jtools\temp.py (62ms)
2024-01-24 13:27:03.478 [info] (8512) [BG(1)] parsing: C:\Users\jamie\.vscode\extensions\ms-python.vscode-pylance-2023.12.1\dist\typeshed-fallback\stdlib\builtins.pyi [fs read 3ms] (97ms)
2024-01-24 13:27:03.513 [info] (8512) [BG(1)] binding: C:\Users\jamie\.vscode\extensions\ms-python.vscode-pylance-2023.12.1\dist\typeshed-fallback\stdlib\builtins.pyi (34ms)
2024-01-24 13:27:03.514 [info] (8512) [BG(1)] binding: C:\Users\jamie\Repos\jtools\temp.py (1ms)
2024-01-24 13:27:03.558 [info] (8512) [BG(1)] parsing: C:\Users\jamie\.vscode\extensions\ms-python.vscode-pylance-2023.12.1\dist\typeshed-fallback\stdlib\typing.pyi [fs read 0ms] (34ms)
2024-01-24 13:27:03.568 [info] (8512) [BG(1)] binding: C:\Users\jamie\.vscode\extensions\ms-python.vscode-pylance-2023.12.1\dist\typeshed-fallback\stdlib\typing.pyi (10ms)
2024-01-24 13:27:03.580 [info] (8512) [BG(1)] parsing: C:\Users\jamie\.vscode\extensions\ms-python.vscode-pylance-2023.12.1\dist\typeshed-fallback\stdlib\typing_extensions.pyi [fs read 0ms] (7ms)
2024-01-24 13:27:03.584 [info] (8512) [BG(1)] binding: C:\Users\jamie\.vscode\extensions\ms-python.vscode-pylance-2023.12.1\dist\typeshed-fallback\stdlib\typing_extensions.pyi (4ms)
2024-01-24 13:27:03.616 [info] (8512) [BG(1)] parsing: C:\Users\jamie\.vscode\extensions\ms-python.vscode-pylance-2023.12.1\dist\typeshed-fallback\stdlib\_typeshed\__init__.pyi [fs read 1ms] (9ms)
2024-01-24 13:27:03.619 [info] (8512) [BG(1)] binding: C:\Users\jamie\.vscode\extensions\ms-python.vscode-pylance-2023.12.1\dist\typeshed-fallback\stdlib\_typeshed\__init__.pyi (2ms)
2024-01-24 13:27:03.628 [info] (8512) [BG(1)] parsing: C:\Users\jamie\.vscode\extensions\ms-python.vscode-pylance-2023.12.1\dist\typeshed-fallback\stdlib\types.pyi [fs read 0ms] (9ms)
2024-01-24 13:27:03.637 [info] (8512) [BG(1)] binding: C:\Users\jamie\.vscode\extensions\ms-python.vscode-pylance-2023.12.1\dist\typeshed-fallback\stdlib\types.pyi (9ms)
2024-01-24 13:27:03.653 [info] (8512) [BG(1)] parsing: C:\Users\jamie\.vscode\extensions\ms-python.vscode-pylance-2023.12.1\dist\typeshed-fallback\stdlib\abc.pyi [fs read 0ms] (2ms)
2024-01-24 13:27:03.653 [info] (8512) [BG(1)] binding: C:\Users\jamie\.vscode\extensions\ms-python.vscode-pylance-2023.12.1\dist\typeshed-fallback\stdlib\abc.pyi (1ms)
2024-01-24 13:27:03.660 [info] (8512) [BG(1)] parsing: C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib\site-packages\attrs\__init__.pyi [fs read 0ms] (8ms)
2024-01-24 13:27:03.665 [info] (8512) [BG(1)] binding: C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib\site-packages\attrs\__init__.pyi (1ms)
2024-01-24 13:27:03.673 [info] (8512) [BG(1)] parsing: C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib\site-packages\attr\__init__.pyi [fs read 0ms] (5ms)
2024-01-24 13:27:03.679 [info] (8512) [BG(1)] binding: C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib\site-packages\attr\__init__.pyi (4ms)
2024-01-24 13:27:03.697 [info] (8512) [BG(1)] parsing: C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib\site-packages\attr\setters.pyi [fs read 1ms] (1ms)
2024-01-24 13:27:03.698 [info] (8512) [BG(1)] binding: C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib\site-packages\attr\setters.pyi (1ms)
2024-01-24 13:27:03.726 [info] (8512) [BG(1)] parsing: C:\Users\jamie\.vscode\extensions\ms-python.vscode-pylance-2023.12.1\dist\typeshed-fallback\stdlib\collections\abc.pyi [fs read 0ms] (0ms)
2024-01-24 13:27:03.728 [info] (8512) [BG(1)] binding: C:\Users\jamie\.vscode\extensions\ms-python.vscode-pylance-2023.12.1\dist\typeshed-fallback\stdlib\collections\abc.pyi ...
2024-01-24 13:27:03.728 [info] (8512) [BG(1)] parsing: C:\Users\jamie\.vscode\extensions\ms-python.vscode-pylance-2023.12.1\dist\typeshed-fallback\stdlib\_collections_abc.pyi [fs read 1ms] (1ms)
2024-01-24 13:27:03.728 [info] (8512) [BG(1)] binding: C:\Users\jamie\.vscode\extensions\ms-python.vscode-pylance-2023.12.1\dist\typeshed-fallback\stdlib\_collections_abc.pyi (0ms)
2024-01-24 13:27:03.729 [info] (8512) [BG(1)] binding: C:\Users\jamie\.vscode\extensions\ms-python.vscode-pylance-2023.12.1\dist\typeshed-fallback\stdlib\collections\abc.pyi (3ms)
2024-01-24 13:27:03.739 [info] (8512) [BG(1)] getSemanticTokens full at C:\Users\jamie\Repos\jtools\temp.py (423ms)
2024-01-24 13:27:03.763 [info] (8512) [BG(1)] analyzing: C:\Users\jamie\Repos\jtools\temp.py ...
2024-01-24 13:27:03.763 [info] (8512) [BG(1)] checking: C:\Users\jamie\Repos\jtools\temp.py (22ms)
2024-01-24 13:27:03.764 [info] (8512) [BG(1)] analyzing: C:\Users\jamie\Repos\jtools\temp.py (23ms)
2024-01-24 13:27:03.765 [info] (8512) [BG(1)] getSemanticTokens range 0:0 - 6:12 at C:\Users\jamie\Repos\jtools\temp.py (1ms)
2024-01-24 13:27:03.770 [info] (8512) [BG(1)] indexing: C:\Users\jamie\Repos\jtools\temp.py [found 1] (1ms)
2024-01-24 13:27:03.770 [info] (8512) [BG(1)] indexing: C:\Users\jamie\Repos\jtools\src\jtools\__init__.py ...
2024-01-24 13:27:03.770 [info] (8512) [BG(1)] parsing: C:\Users\jamie\Repos\jtools\src\jtools\__init__.py [fs read 0ms] (2ms)
2024-01-24 13:27:03.770 [info] (8512) [BG(1)] binding: C:\Users\jamie\Repos\jtools\src\jtools\__init__.py (0ms)
2024-01-24 13:27:03.771 [info] (8512) [BG(1)] indexing: C:\Users\jamie\Repos\jtools\src\jtools\__init__.py [found 1] (3ms)
2024-01-24 13:27:03.778 [info] (8512) [BG(1)] indexing: C:\Users\jamie\Repos\jtools\src\jtools\bom_disposal.py ...
2024-01-24 13:27:03.778 [info] (8512) [BG(1)] parsing: C:\Users\jamie\Repos\jtools\src\jtools\bom_disposal.py [fs read 0ms] (7ms)
2024-01-24 13:27:03.780 [info] (8512) [BG(1)] binding: C:\Users\jamie\Repos\jtools\src\jtools\bom_disposal.py (2ms)
2024-01-24 13:27:03.780 [info] (8512) [BG(1)] indexing: C:\Users\jamie\Repos\jtools\src\jtools\bom_disposal.py [found 1] (9ms)
2024-01-24 13:27:03.819 [info] (8512) [BG(1)] indexing: C:\Users\jamie\Repos\jtools\src\jtools\depgraph.py ...
2024-01-24 13:27:03.819 [info] (8512) [BG(1)] parsing: C:\Users\jamie\Repos\jtools\src\jtools\depgraph.py [fs read 0ms] (38ms)
2024-01-24 13:27:03.820 [info] [Info - 1:27:03 PM] (8512) Could not resolve source for 'networkx' in file 'C:\Users\jamie\Repos\jtools\src\jtools\depgraph.py'
2024-01-24 13:27:03.820 [info] [Info - 1:27:03 PM] (8512) Looking in root directory of execution environment 'C:\Users\jamie\Repos\jtools'
2024-01-24 13:27:03.820 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve using root path 'C:\Users\jamie\Repos\jtools'
2024-01-24 13:27:03.820 [info] [Info - 1:27:03 PM] (8512) Looking in extraPath 'C:\Users\jamie\Repos\jtools\src'
2024-01-24 13:27:03.821 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve using root path 'C:\Users\jamie\Repos\jtools\src'
2024-01-24 13:27:03.821 [info] [Info - 1:27:03 PM] (8512) Finding python search paths
2024-01-24 13:27:03.821 [info] [Info - 1:27:03 PM] (8512) Executing interpreter: 'C:\Users\jamie\AppData\Local\Programs\Python\Python312\python.exe'
2024-01-24 13:27:03.822 [info] [Info - 1:27:03 PM] (8512) Skipping 'C:\Users\jamie\AppData\Local\Programs\Python\Python312\python312.zip' because it is not a valid directory
2024-01-24 13:27:03.822 [info] [Info - 1:27:03 PM] (8512) Received 4 paths from interpreter
2024-01-24 13:27:03.822 [info] [Info - 1:27:03 PM] (8512) C:\Users\jamie\AppData\Local\Programs\Python\Python312\DLLs
2024-01-24 13:27:03.823 [info] [Info - 1:27:03 PM] (8512) C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib
2024-01-24 13:27:03.823 [info] [Info - 1:27:03 PM] (8512) C:\Users\jamie\AppData\Local\Programs\Python\Python312
2024-01-24 13:27:03.824 [info] [Info - 1:27:03 PM] (8512) C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib\site-packages
2024-01-24 13:27:03.824 [info] [Info - 1:27:03 PM] (8512) Looking in python search path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312\DLLs'
2024-01-24 13:27:03.824 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve using root path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312\DLLs'
2024-01-24 13:27:03.824 [info] [Info - 1:27:03 PM] (8512) Looking in python search path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib'
2024-01-24 13:27:03.825 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve using root path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib'
2024-01-24 13:27:03.825 [info] [Info - 1:27:03 PM] (8512) Looking in python search path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312'
2024-01-24 13:27:03.826 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve using root path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312'
2024-01-24 13:27:03.826 [info] [Info - 1:27:03 PM] (8512) Looking in python search path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib\site-packages'
2024-01-24 13:27:03.826 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve using root path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib\site-packages'
2024-01-24 13:27:03.826 [info] [Info - 1:27:03 PM] (8512) Could not import 'packaging' in file 'C:\Users\jamie\Repos\jtools\src\jtools\depgraph.py'
2024-01-24 13:27:03.826 [info] [Info - 1:27:03 PM] (8512) Looking in stubPath 'C:\Users\jamie\Repos\jtools\typings'
2024-01-24 13:27:03.827 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve stub package using root path 'C:\Users\jamie\Repos\jtools\typings'
2024-01-24 13:27:03.827 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve using root path 'C:\Users\jamie\Repos\jtools\typings'
2024-01-24 13:27:03.827 [info] [Info - 1:27:03 PM] (8512) Looking in root directory of execution environment 'C:\Users\jamie\Repos\jtools'
2024-01-24 13:27:03.827 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve stub package using root path 'C:\Users\jamie\Repos\jtools'
2024-01-24 13:27:03.827 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve using root path 'C:\Users\jamie\Repos\jtools'
2024-01-24 13:27:03.828 [info] [Info - 1:27:03 PM] (8512) Looking in extraPath 'C:\Users\jamie\Repos\jtools\src'
2024-01-24 13:27:03.829 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve stub package using root path 'C:\Users\jamie\Repos\jtools\src'
2024-01-24 13:27:03.830 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve using root path 'C:\Users\jamie\Repos\jtools\src'
2024-01-24 13:27:03.830 [info] [Info - 1:27:03 PM] (8512) Finding python search paths
2024-01-24 13:27:03.830 [info] [Info - 1:27:03 PM] (8512) Executing interpreter: 'C:\Users\jamie\AppData\Local\Programs\Python\Python312\python.exe'
2024-01-24 13:27:03.831 [info] [Info - 1:27:03 PM] (8512) Skipping 'C:\Users\jamie\AppData\Local\Programs\Python\Python312\python312.zip' because it is not a valid directory
2024-01-24 13:27:03.831 [info] [Info - 1:27:03 PM] (8512) Received 4 paths from interpreter
2024-01-24 13:27:03.831 [info] [Info - 1:27:03 PM] (8512) C:\Users\jamie\AppData\Local\Programs\Python\Python312\DLLs
2024-01-24 13:27:03.831 [info] [Info - 1:27:03 PM] (8512) C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib
2024-01-24 13:27:03.831 [info] [Info - 1:27:03 PM] (8512) C:\Users\jamie\AppData\Local\Programs\Python\Python312
2024-01-24 13:27:03.832 [info] [Info - 1:27:03 PM] (8512) C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib\site-packages
2024-01-24 13:27:03.832 [info] [Info - 1:27:03 PM] (8512) Looking in python search path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312\DLLs'
2024-01-24 13:27:03.832 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve stub package using root path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312\DLLs'
2024-01-24 13:27:03.832 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve using root path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312\DLLs'
2024-01-24 13:27:03.832 [info] [Info - 1:27:03 PM] (8512) Looking in python search path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib'
2024-01-24 13:27:03.832 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve stub package using root path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib'
2024-01-24 13:27:03.833 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve using root path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib'
2024-01-24 13:27:03.833 [info] [Info - 1:27:03 PM] (8512) Looking in python search path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312'
2024-01-24 13:27:03.834 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve stub package using root path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312'
2024-01-24 13:27:03.835 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve using root path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312'
2024-01-24 13:27:03.835 [info] [Info - 1:27:03 PM] (8512) Looking in python search path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib\site-packages'
2024-01-24 13:27:03.835 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve stub package using root path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib\site-packages'
2024-01-24 13:27:03.836 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve using root path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib\site-packages'
2024-01-24 13:27:03.836 [info] [Info - 1:27:03 PM] (8512) Looking in bundled stubs path 'C:\Users\jamie\.vscode\extensions\ms-python.vscode-pylance-2023.12.1\dist\bundled\stubs'
2024-01-24 13:27:03.836 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve stub package using root path 'C:\Users\jamie\.vscode\extensions\ms-python.vscode-pylance-2023.12.1\dist\bundled\stubs'
2024-01-24 13:27:03.836 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve using root path 'C:\Users\jamie\.vscode\extensions\ms-python.vscode-pylance-2023.12.1\dist\bundled\stubs'
2024-01-24 13:27:03.836 [info] [Info - 1:27:03 PM] (8512) Looking for typeshed stdlib path
2024-01-24 13:27:03.837 [info] [Info - 1:27:03 PM] (8512) Looking for typeshed stdlib path
2024-01-24 13:27:03.837 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve using root path 'C:\Users\jamie\.vscode\extensions\ms-python.vscode-pylance-2023.12.1\dist\typeshed-fallback\stdlib'
2024-01-24 13:27:03.837 [info] [Info - 1:27:03 PM] (8512) Typeshed path not found
2024-01-24 13:27:03.837 [info] [Info - 1:27:03 PM] (8512) Looking for typeshed third-party path
2024-01-24 13:27:03.837 [info] [Info - 1:27:03 PM] (8512) Looking for typeshed stubs path
2024-01-24 13:27:03.837 [info] [Info - 1:27:03 PM] (8512) Typeshed path not found
2024-01-24 13:27:03.838 [info] [Info - 1:27:03 PM] (8512) Could not import 'packaging.requirements' in file 'C:\Users\jamie\Repos\jtools\src\jtools\depgraph.py'
2024-01-24 13:27:03.838 [info] [Info - 1:27:03 PM] (8512) Looking in stubPath 'C:\Users\jamie\Repos\jtools\typings'
2024-01-24 13:27:03.838 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve stub package using root path 'C:\Users\jamie\Repos\jtools\typings'
2024-01-24 13:27:03.838 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve using root path 'C:\Users\jamie\Repos\jtools\typings'
2024-01-24 13:27:03.838 [info] [Info - 1:27:03 PM] (8512) Looking in root directory of execution environment 'C:\Users\jamie\Repos\jtools'
2024-01-24 13:27:03.838 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve stub package using root path 'C:\Users\jamie\Repos\jtools'
2024-01-24 13:27:03.838 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve using root path 'C:\Users\jamie\Repos\jtools'
2024-01-24 13:27:03.839 [info] [Info - 1:27:03 PM] (8512) Looking in extraPath 'C:\Users\jamie\Repos\jtools\src'
2024-01-24 13:27:03.839 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve stub package using root path 'C:\Users\jamie\Repos\jtools\src'
2024-01-24 13:27:03.839 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve using root path 'C:\Users\jamie\Repos\jtools\src'
2024-01-24 13:27:03.839 [info] [Info - 1:27:03 PM] (8512) Finding python search paths
2024-01-24 13:27:03.839 [info] [Info - 1:27:03 PM] (8512) Executing interpreter: 'C:\Users\jamie\AppData\Local\Programs\Python\Python312\python.exe'
2024-01-24 13:27:03.839 [info] [Info - 1:27:03 PM] (8512) Skipping 'C:\Users\jamie\AppData\Local\Programs\Python\Python312\python312.zip' because it is not a valid directory
2024-01-24 13:27:03.839 [info] [Info - 1:27:03 PM] (8512) Received 4 paths from interpreter
2024-01-24 13:27:03.840 [info] [Info - 1:27:03 PM] (8512) C:\Users\jamie\AppData\Local\Programs\Python\Python312\DLLs
2024-01-24 13:27:03.840 [info] [Info - 1:27:03 PM] (8512) C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib
2024-01-24 13:27:03.840 [info] [Info - 1:27:03 PM] (8512) C:\Users\jamie\AppData\Local\Programs\Python\Python312
2024-01-24 13:27:03.840 [info] [Info - 1:27:03 PM] (8512) C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib\site-packages
2024-01-24 13:27:03.840 [info] [Info - 1:27:03 PM] (8512) Looking in python search path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312\DLLs'
2024-01-24 13:27:03.840 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve stub package using root path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312\DLLs'
2024-01-24 13:27:03.840 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve using root path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312\DLLs'
2024-01-24 13:27:03.841 [info] [Info - 1:27:03 PM] (8512) Looking in python search path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib'
2024-01-24 13:27:03.841 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve stub package using root path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib'
2024-01-24 13:27:03.841 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve using root path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib'
2024-01-24 13:27:03.841 [info] [Info - 1:27:03 PM] (8512) Looking in python search path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312'
2024-01-24 13:27:03.841 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve stub package using root path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312'
2024-01-24 13:27:03.841 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve using root path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312'
2024-01-24 13:27:03.841 [info] [Info - 1:27:03 PM] (8512) Looking in python search path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib\site-packages'
2024-01-24 13:27:03.842 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve stub package using root path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib\site-packages'
2024-01-24 13:27:03.842 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve using root path 'C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib\site-packages'
2024-01-24 13:27:03.842 [info] [Info - 1:27:03 PM] (8512) Looking in bundled stubs path 'C:\Users\jamie\.vscode\extensions\ms-python.vscode-pylance-2023.12.1\dist\bundled\stubs'
2024-01-24 13:27:03.842 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve stub package using root path 'C:\Users\jamie\.vscode\extensions\ms-python.vscode-pylance-2023.12.1\dist\bundled\stubs'
2024-01-24 13:27:03.842 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve using root path 'C:\Users\jamie\.vscode\extensions\ms-python.vscode-pylance-2023.12.1\dist\bundled\stubs'
2024-01-24 13:27:03.843 [info] [Info - 1:27:03 PM] (8512) Looking for typeshed stdlib path
2024-01-24 13:27:03.843 [info] [Info - 1:27:03 PM] (8512) Looking for typeshed stdlib path
2024-01-24 13:27:03.843 [info] [Info - 1:27:03 PM] (8512) Attempting to resolve using root path 'C:\Users\jamie\.vscode\extensions\ms-python.vscode-pylance-2023.12.1\dist\typeshed-fallback\stdlib'
2024-01-24 13:27:03.843 [info] [Info - 1:27:03 PM] (8512) Typeshed path not found
2024-01-24 13:27:03.844 [info] [Info - 1:27:03 PM] (8512) Looking for typeshed third-party path
2024-01-24 13:27:03.844 [info] [Info - 1:27:03 PM] (8512) Looking for typeshed stubs path
2024-01-24 13:27:03.844 [info] [Info - 1:27:03 PM] (8512) Typeshed path not found
2024-01-24 13:27:03.844 [info] (8512) [BG(1)] binding: C:\Users\jamie\Repos\jtools\src\jtools\depgraph.py (7ms)
2024-01-24 13:27:03.844 [info] (8512) [BG(1)] indexing: C:\Users\jamie\Repos\jtools\src\jtools\depgraph.py [found 11] (49ms)
2024-01-24 13:27:03.845 [info] (8512) pytest configurations: {"message":"script","classes":["Test"],"files":["test_*.py","*_test.py"],"functions":["test"]}
2024-01-24 13:27:04.126 [info] (8512) [IDX(2)] scan packages C:\Users\jamie\Repos\jtools (789ms)
2024-01-24 13:27:04.188 [info] (8512) [IDX(2)] index packages C:\Users\jamie\Repos\jtools ...
2024-01-24 13:27:04.188 [info] (8512) [IDX(2)] index execution environment C:\Users\jamie\Repos\jtools ...
2024-01-24 13:27:04.188 [info] (8512) [IDX(2)] indexing: C:\Users\jamie\Repos\jtools\src\jtools\__init__.py [skipped: no '__all__' defined] (1ms)
2024-01-24 13:27:04.189 [info] (8512) [IDX(2)] indexing: C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib\concurrent\__init__.py [skipped: no '__all__' defined] (0ms)
2024-01-24 13:27:04.189 [info] (8512) [IDX(2)] indexing: C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib\idlelib\__init__.py [skipped: no '__all__' defined] (0ms)
2024-01-24 13:27:04.189 [info] (8512) [IDX(2)] indexing: C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib\lib2to3\__init__.py [skipped: no '__all__' defined] (0ms)
2024-01-24 13:27:04.189 [info] (8512) [IDX(2)] indexing: C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib\pydoc_data\__init__.py [skipped: no '__all__' defined] (0ms)
2024-01-24 13:27:04.189 [info] (8512) [IDX(2)] indexing: C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib\test\__init__.py [skipped: no '__all__' defined] (0ms)
2024-01-24 13:27:04.190 [info] (8512) [IDX(2)] indexing: C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib\turtledemo\__init__.py [skipped: no '__all__' defined] (0ms)
2024-01-24 13:27:04.190 [info] (8512) [IDX(2)] indexing: C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib\urllib\__init__.py [skipped: no '__all__' defined] (0ms)
2024-01-24 13:27:04.190 [info] (8512) [IDX(2)] indexing: C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib\wsgiref\__init__.py [skipped: no '__all__' defined] (0ms)
2024-01-24 13:27:04.191 [info] (8512) [IDX(2)] indexing: C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib\xmlrpc\__init__.py [skipped: no '__all__' defined] (0ms)
2024-01-24 13:27:04.191 [info] (8512) [IDX(2)] indexing: C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib\__phello__\__init__.py [skipped: no '__all__' defined] (0ms)
2024-01-24 13:27:04.191 [info] (8512) [IDX(2)] indexing: C:\Users\jamie\AppData\Local\Programs\Python\Python312\Lib\site-packages\mypyc\__init__.py [skipped: no '__all__' defined] (0ms)
2024-01-24 13:27:04.192 [info] (8512) [IDX(2)] index execution environment C:\Users\jamie\Repos\jtools [found 67 in 6 files] (16ms)
2024-01-24 13:27:04.193 [info] (8512) [IDX(2)] index packages C:\Users\jamie\Repos\jtools [found 67 in 1 exec envs] (21ms)
Thanks for tracking down when the regression happened. This confirmed my guess that this was due to our experimental support for PEP 712. This PEP is still being discussed, but initial feedback from the Steering Council was negative.
Given that it took 6 months for this issue to be reported, I'm inclined to wait for the Steering Council's decision and then either remove our support for PEP 712 entirely (if they reject it) or investigate and fix this issue with our PEP 712 support (if they approve it).
If we get a signal from other users (via up votes) that this needs to be fixed now, we can consider addressing it before the Steering Council makes their final decision.
Thanks very much for the explanation - I will wait in hope that the PEP is accepted! I for one think converters
is a useful feature and would be sad if support was dropped.
I'm encountering this issue too. Can confirm that rolling back to 2023.6.30
fixes the bug. There hasn't been any activity on the PEP 712 discussion board for quite a few months now.. Hoping a decision can be made soon 🤞🏽
Pyright recently put our experimental PEP 712 support behind a feature flag (enableExperimentalFeatures
). Pylance will pick that up soon. That won't technically fix this issue, since the behavior is still broken with enableExperimentalFeatures
enabled, but should provide some relief to affected users.
I wasn't aware of this issue until just now. This was caused by a bug in the type evaluator that was unrelated to (but exposed by) a tuple
converter. The fix will be included in the next release of pyright.
This issue has been fixed in prerelease version 2024.5.102, which we've just released. You can find the changelog here: CHANGELOG.md