Skip to content
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

Folder renaming not working with Python language server #121707

Closed
mrtolkien opened this issue Apr 20, 2021 · 4 comments
Closed

Folder renaming not working with Python language server #121707

mrtolkien opened this issue Apr 20, 2021 · 4 comments
Assignees
Labels
*caused-by-extension Issue identified to be caused by an extension

Comments

@mrtolkien
Copy link

mrtolkien commented Apr 20, 2021

Issue Type: Bug

  • Open a folder with a python package
  • Try to rename a symbol representing a folder within __init__.py -> "No result found"
  • Try to rename a folder directly -> no changes reflected in python files

Using Python language server + PyLance on WSL2.

Video example:
video

VS Code version: Code 1.55.2 (3c4e3df, 2021-04-13T09:35:57.887Z)
OS version: Windows_NT x64 10.0.19042
Remote OS version: Linux x64 5.4.72-microsoft-standard-WSL2

System Info
Item Value
CPUs AMD Ryzen 7 5800X 8-Core Processor (16 x 3793)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.94GB (17.16GB free)
Process Argv --crash-reporter-id ea62742e-2d7a-4234-b611-aca124c7078b
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu-20.04
OS Linux x64 5.4.72-microsoft-standard-WSL2
CPUs AMD Ryzen 7 5800X 8-Core Processor (16 x 3792)
Memory (System) 25.01GB (19.83GB free)
VM 0%
Extensions (13)
Extension Author (truncated) Version
better-comments aar 2.1.0
bracket-pair-colorizer Coe 1.0.61
auto-close-tag for 0.5.10
remote-containers ms- 0.166.1
remote-wsl ms- 0.54.6
material-icon-theme PKi 4.6.0
path-intellisense chr 2.3.0
vscode-markdownlint Dav 0.40.3
prettier-vscode esb 6.3.2
vscode-docker ms- 1.12.1
python ms- 2021.4.765268190
vscode-pylance ms- 2021.4.1
jupyter ms- 2021.5.745244803
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspyt653:30270858
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstry244:30276681
pythonvsdeb440:30248342
pythonvsded773:30248341
pythonvspyt875:30259475
pythonvsnew554:30281908
pythontb:30283811
openwslfolder:30282073
vspre833cf:30267465
pythonptprofiler:30281270
vshan820:30276952
pythondataviewer:30285071
vscus158cf:30286554

@mrtolkien
Copy link
Author

mrtolkien commented Apr 20, 2021

Trying to refactor without PyLance and directly with Python’s Jedi gives:

Refactor failed. Unknown Change
[
<FrameSummary file /home/tolki/.vscode-server/extensions/ms-python.python-2021.4.765268190/pythonFiles/refactor.py, line 380 in watch>,
<FrameSummary file /home/tolki/.vscode-server/extensions/ms-python.python-2021.4.765268190/pythonFiles/refactor.py, line 346 in _process_request>,
<FrameSummary file /home/tolki/.vscode-server/extensions/ms-python.python-2021.4.765268190/pythonFiles/refactor.py, line 259 in _rename>,
<FrameSummary file /home/tolki/.vscode-server/extensions/ms-python.python-2021.4.765268190/pythonFiles/refactor.py, line 128 in refactor>,
<FrameSummary file /home/tolki/.vscode-server/extensions/ms-python.python-2021.4.765268190/pythonFiles/refactor.py, line 163 in onRefactor>
]

@mrtolkien
Copy link
Author

Added another much simpler example to reproduce from scratch:
PACKAGE
-> __init__.py = import SUBPACKAGE
-> SUBPACKAGE
-----> __init__.py = print("Hello")

This import syntax is right and works properly, and running python PACKAGE/__init__.py or import PACKAGE works.

But trying to refactor SUBPACKAGE does not work:

  • With Jedi, I get Refactor failed. Unknown Change...
  • With Pylance, I get No result

video

@isidorn
Copy link
Contributor

isidorn commented Apr 20, 2021

/extPython

@github-actions github-actions bot locked and limited conversation to collaborators Jun 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*caused-by-extension Issue identified to be caused by an extension
Projects
None yet
Development

No branches or pull requests

3 participants
@isidorn @mrtolkien and others