-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
addressed in next versionIssue is fixed and will appear in next published versionIssue is fixed and will appear in next published versionbugSomething isn't workingSomething isn't workingregression
Description
Describe the bug
We have a virtualenv composed of symlinked packages (using uv2nix but that's irrelevant). After upgrading from 1.1.404 to 1.1.405 a package import is no longer recognized. It looks like, symlinking files is the issues, symlinked code directories work fine.
Code or Screenshots
- Using
cpp_demangleas an example. This package puts its extension immediately undersite-packages(.venv/lib/python3.11/site-packages/cpp_demangle.cpython-311-x86_64-linux-gnu.soin my case). Also using pyright 1.1.404, as the last working version:
❯ python3 --version
Python 3.11.13
❯ python3 -m venv .venv
❯ source .venv/bin/activate
❯ pip install cpp_demangle pyright==1.1.404
Collecting cpp_demangle
Using cached cpp_demangle-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (1.7 kB)
Collecting pyright==1.1.404
Using cached pyright-1.1.404-py3-none-any.whl.metadata (6.6 kB)
[...]
❯ echo "import cpp_demangle" > test.py- pyright works as expected:
❯ pyright test.py
WARNING: there is a new pyright version available (v1.1.404 -> v1.1.405).
Please install the new version or set PYRIGHT_PYTHON_FORCE_VERSION to `latest`
0 errors, 0 warnings, 0 informations- moving the extension module out and symlinking it back, no error with 1.1.404
❯ mv .venv/lib/python3.11/site-packages/cpp_demangle.cpython-311-x86_64-linux-gnu.so /tmp/
❯ ln -s /tmp/cpp_demangle.cpython-311-x86_64-linux-gnu.so .venv/lib/python3.11/site-packages/
❯ pyright test.py
WARNING: there is a new pyright version available (v1.1.404 -> v1.1.405).
Please install the new version or set PYRIGHT_PYTHON_FORCE_VERSION to `latest`
0 errors, 0 warnings, 0 informations- error is here after updating pyright
❯ pip install -U pyright==1.1.405
Collecting pyright==1.1.405
Using cached pyright-1.1.405-py3-none-any.whl.metadata (6.6 kB)
[...]
Successfully installed pyright-1.1.405
❯ pyright test.py
/tmp/tmp.1zKCH7jPWl/test.py
/tmp/tmp.1zKCH7jPWl/test.py:1:8 - error: Import "cpp_demangle" could not be resolved (reportMissingImports)
1 error, 0 warnings, 0 informations- moving back the library, error goes away on 1.1.405
❯ rm .venv/lib/python3.11/site-packages/cpp_demangle.cpython-311-x86_64-linux-gnu.so
❯ mv /tmp/cpp_demangle.cpython-311-x86_64-linux-gnu.so .venv/lib/python3.11/site-packages
❯ pyright test.py
0 errors, 0 warnings, 0 informationsReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
addressed in next versionIssue is fixed and will appear in next published versionIssue is fixed and will appear in next published versionbugSomething isn't workingSomething isn't workingregression