Skip to content

_wmi missing in sys.stdlib_module_names #123892

Closed

Description

@mtnpke

Bug report

Bug description:

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.)

CPython versions tested on:

3.13

Operating systems tested on:

Windows

Linked PRs

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    on Sep 10, 2024
  2. added 2 commits that reference this issue on Sep 10, 2024
  3. vstinner commented on Sep 10, 2024

    @vstinner
    Member

    should _wmi not be included in sys.stdlib_module_names?

    Correct. I wrote PR gh-123893 to add it. Thanks!

  4. mtnpke commented on Sep 10, 2024

    @mtnpke
    Author

    That was fast! Thanks!

  5. added a commit that references this issue on Sep 10, 2024
  6. added 2 commits that reference this issue on Sep 10, 2024
  7. vstinner commented on Sep 10, 2024

    @vstinner
    Member

    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.

  8. vstinner commented on Sep 10, 2024

    @vstinner
    Member

    Thanks for the bug report @mtnpke.

  9. added a commit that references this issue on Sep 10, 2024
  10. added a commit that references this issue on Sep 10, 2024
  11. added a commit that references this issue on Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions