Skip to content

Stop module-name discovery at the path root - #737

Open
itisrmk wants to merge 1 commit into
python-lsp:developfrom
itisrmk:devin/1795853492-bound-module-path-walk
Open

itisrmk wants to merge 1 commit into
python-lsp:developfrom
itisrmk:devin/1795853492-bound-module-path-walk

Conversation

@itisrmk

@itisrmk itisrmk commented Nov 28, 2026

Copy link
Copy Markdown

Fixes #736.

Opening an untitled document or one with an empty path can hang when the server starts in a Python package directory. The old parent walk repeatedly treats the empty directory as the working directory. Stop at the root instead, while preserving dotted names for nested packages.

Added regressions for both document paths and a nested package. The utility, document, and symbol tests passed. Thanks to @hamarshehmhmd for reproducing the issue and identifying the parent-walk problem.

AI disclosure: Devin drafted the patch and tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inifinit loop in path_to_dot_name

1 participant