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
Given that import _wmi succeeds on a minimal Python distribution (embeddable amd64 downloaded from https://www.python.org/downloads/release/python-3130rc2/ for example), should _wmi not be included in sys.stdlib_module_names?
python-3.13.0rc2-embed-amd64 $ .\python.exe
Python 3.13.0rc2 (tags/v3.13.0rc2:ec61006, Sep 6 2024, 22:13:49) [MSC v.1940 64 bit (AMD64)] on win32
>>> import sys
>>> "_wmi" in sys.stdlib_module_names
False
>>> import _wmi
>>>
(My use case is that I am generating license exports automatically and any packages that are not resolvable to a distribution and not included in stdlib_module_names lead to an error or need special-casing.)
Activity
pythongh-123892: Add "_wmi" to sys.stdlib_module_names
pythongh-123892: Add "_wmi" to sys.stdlib_module_names
vstinner commentedon Sep 10, 2024
Correct. I wrote PR gh-123893 to add it. Thanks!
mtnpke commentedon Sep 10, 2024
That was fast! Thanks!
gh-123892: Add "_wmi" to sys.stdlib_module_names (#123893)
pythongh-123892: Add "_wmi" to sys.stdlib_module_names (pythonGH-123893)
pythongh-123892: Add "_wmi" to sys.stdlib_module_names (pythonGH-123893)
vstinner commentedon Sep 10, 2024
Fixed by fb1b51a. Backports will follow.
Sadly, the list of Windows extensions is maintained manually, and we forgot the _wmi extension. It's now fixed.
vstinner commentedon Sep 10, 2024
Thanks for the bug report @mtnpke.
[3.12] gh-123892: Add "_wmi" to sys.stdlib_module_names (GH-123893) (#…
pythongh-123892: Add "_wmi" to sys.stdlib_module_names (python#123893)
[3.13] gh-123892: Add "_wmi" to sys.stdlib_module_names (GH-123893) (#…