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
multiprocessing.pool doesn't show as member even though it's imported #2372
However, doing so complained that pool wasn't valid, even though hovering over the import (and semantic tokens in Pylance at the import) correctly understood that it was a module.
The problem occurred because the multiprocessing module privately imported the pool submodule and didn't re-export it. Pyright therefore internally marked pool as "not externally visible". But it should have been visible because multiprocessing.pool was explicitly imported (in addition to multiprocessing).
Activity
erictraut commentedon Oct 6, 2021
I think I need more context. Can you provide a self-contained minimal repro?
jakebailey commentedon Oct 6, 2021
The main context was the file in this PR: https://github.com/python/typeshed/pull/6111/files
I'll try to minimize it when I'm back at my desk.
erictraut commentedon Oct 7, 2021
The problem occurred because the
multiprocessingmodule privately imported thepoolsubmodule and didn't re-export it. Pyright therefore internally markedpoolas "not externally visible". But it should have been visible becausemultiprocessing.poolwas explicitly imported (in addition tomultiprocessing).This will be fixed in the next release.
erictraut commentedon Oct 7, 2021
This is included in pyright 1.1.176, which I just published. It will also be included in the next release of pylance.