Migrate `sys.rs` generation to `stdlibs`
charliermarsh opened this issue · comments
Charlie Marsh commented
This was brought to my attention via email. We have a script to generate https://github.com/astral-sh/ruff/blob/main/crates/ruff_python_stdlib/src/sys.rs, and it does this by polling (e.g.) https://docs.python.org/3.10/objects.inv.
There's a nice Python library we can use instead of objects.inv
, which (IIUC) catches a bunch of other modules that aren't present there (e.g., _ssl
): https://github.com/omnilib/stdlibs