You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 456bea1
Browse filesBrowse the repository at this point in the historyBrowse files
Check a module in the Python environment it is imported from
In file mode and the language server, each file gets the config of its
location. A library installed editable into an app's environment, but
with its own config and environment, then resolves its imports in its
own environment, and the app sees two copies of the same package
(#3556). Project mode does not have this problem, because it uses one
config for every file.
`SysInfo` now also carries the site-package path of the environment.
It is part of the `Handle` key and every import passes it on, so a file
reached from two environments becomes two modules. When a file lies in
one of its handle's site-package directories and that environment
differs from its location config's, `State::get_config` uses a cached
copy of the config with the importer's site-package path, so its imports
resolve to the same modules as the importer's. A file opened on its own
keeps its own config. Bundled stubs never carry an environment, and the
stdlib is still computed once per version and platform.
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments