Migrate sys.rs generation to stdlibs (#11374)

## Summary

Closes #11347
This commit is contained in:
Rahul Modpur 2024-05-13 06:51:51 +05:30 committed by GitHub
parent 7c824faa88
commit 6a28f3448e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 182 additions and 41 deletions

View file

@ -5,10 +5,96 @@ pub fn is_known_standard_library(minor_version: u8, module: &str) -> bool {
(minor_version, module),
(
_,
"_ast"
"__hello__"
| "__phello__"
| "_abc"
| "_ast"
| "_asyncio"
| "_bisect"
| "_blake2"
| "_bz2"
| "_codecs"
| "_codecs_cn"
| "_codecs_hk"
| "_codecs_iso2022"
| "_codecs_jp"
| "_codecs_kr"
| "_codecs_tw"
| "_collections"
| "_collections_abc"
| "_compat_pickle"
| "_compression"
| "_contextvars"
| "_crypt"
| "_csv"
| "_ctypes"
| "_ctypes_test"
| "_curses"
| "_curses_panel"
| "_datetime"
| "_dbm"
| "_decimal"
| "_elementtree"
| "_frozen_importlib"
| "_frozen_importlib_external"
| "_functools"
| "_gdbm"
| "_hashlib"
| "_heapq"
| "_imp"
| "_io"
| "_json"
| "_locale"
| "_lsprof"
| "_lzma"
| "_markupbase"
| "_md5"
| "_msi"
| "_multibytecodec"
| "_multiprocessing"
| "_opcode"
| "_operator"
| "_osx_support"
| "_overlapped"
| "_pickle"
| "_posixsubprocess"
| "_py_abc"
| "_pydecimal"
| "_pyio"
| "_queue"
| "_random"
| "_scproxy"
| "_sha1"
| "_sha3"
| "_signal"
| "_sitebuiltins"
| "_socket"
| "_sqlite3"
| "_sre"
| "_ssl"
| "_stat"
| "_string"
| "_strptime"
| "_struct"
| "_symtable"
| "_testbuffer"
| "_testcapi"
| "_testconsole"
| "_testimportmultiple"
| "_testmultiphase"
| "_thread"
| "_threading_local"
| "_tkinter"
| "_tracemalloc"
| "_uuid"
| "_warnings"
| "_weakref"
| "_weakrefset"
| "_winapi"
| "_xxtestfuzz"
| "abc"
| "aifc"
| "antigravity"
| "argparse"
| "array"
| "ast"
@ -65,6 +151,7 @@ pub fn is_known_standard_library(minor_version: u8, module: &str) -> bool {
| "ftplib"
| "functools"
| "gc"
| "genericpath"
| "getopt"
| "getpass"
| "gettext"
@ -76,6 +163,7 @@ pub fn is_known_standard_library(minor_version: u8, module: &str) -> bool {
| "hmac"
| "html"
| "http"
| "idlelib"
| "imaplib"
| "imghdr"
| "importlib"
@ -103,8 +191,11 @@ pub fn is_known_standard_library(minor_version: u8, module: &str) -> bool {
| "netrc"
| "nis"
| "nntplib"
| "nt"
| "ntpath"
| "nturl2path"
| "numbers"
| "opcode"
| "operator"
| "optparse"
| "os"
@ -128,6 +219,8 @@ pub fn is_known_standard_library(minor_version: u8, module: &str) -> bool {
| "py_compile"
| "pyclbr"
| "pydoc"
| "pydoc_data"
| "pyexpat"
| "queue"
| "quopri"
| "random"
@ -173,8 +266,8 @@ pub fn is_known_standard_library(minor_version: u8, module: &str) -> bool {
| "telnetlib"
| "tempfile"
| "termios"
| "test"
| "textwrap"
| "this"
| "threading"
| "time"
| "timeit"
@ -205,13 +298,19 @@ pub fn is_known_standard_library(minor_version: u8, module: &str) -> bool {
| "xdrlib"
| "xml"
| "xmlrpc"
| "xx"
| "xxlimited"
| "xxsubtype"
| "zipapp"
| "zipfile"
| "zipimport"
| "zlib"
) | (
7,
"_dummy_thread"
"_bootlocale"
| "_dummy_thread"
| "_sha256"
| "_sha512"
| "asynchat"
| "asyncore"
| "binhex"
@ -225,7 +324,14 @@ pub fn is_known_standard_library(minor_version: u8, module: &str) -> bool {
| "symbol"
) | (
8,
"_dummy_thread"
"_bootlocale"
| "_dummy_thread"
| "_posixshmem"
| "_sha256"
| "_sha512"
| "_statistics"
| "_testinternalcapi"
| "_xxsubinterpreters"
| "asynchat"
| "asyncore"
| "binhex"
@ -238,7 +344,18 @@ pub fn is_known_standard_library(minor_version: u8, module: &str) -> bool {
| "symbol"
) | (
9,
"asynchat"
"_aix_support"
| "_bootlocale"
| "_bootsubprocess"
| "_peg_parser"
| "_posixshmem"
| "_sha256"
| "_sha512"
| "_statistics"
| "_testinternalcapi"
| "_xxsubinterpreters"
| "_zoneinfo"
| "asynchat"
| "asyncore"
| "binhex"
| "distutils"
@ -246,31 +363,80 @@ pub fn is_known_standard_library(minor_version: u8, module: &str) -> bool {
| "graphlib"
| "imp"
| "parser"
| "peg_parser"
| "smtpd"
| "symbol"
| "zoneinfo"
) | (
10,
"asynchat"
"_aix_support"
| "_bootsubprocess"
| "_posixshmem"
| "_sha256"
| "_sha512"
| "_statistics"
| "_testclinic"
| "_testinternalcapi"
| "_xxsubinterpreters"
| "_zoneinfo"
| "asynchat"
| "asyncore"
| "binhex"
| "distutils"
| "graphlib"
| "idlelib"
| "imp"
| "smtpd"
| "xxlimited_35"
| "zoneinfo"
) | (
11,
"asynchat"
"__hello_alias__"
| "__hello_only__"
| "__phello_alias__"
| "_aix_support"
| "_bootsubprocess"
| "_posixshmem"
| "_sha256"
| "_sha512"
| "_statistics"
| "_testclinic"
| "_testinternalcapi"
| "_tokenize"
| "_typing"
| "_xxsubinterpreters"
| "_zoneinfo"
| "asynchat"
| "asyncore"
| "distutils"
| "graphlib"
| "idlelib"
| "imp"
| "smtpd"
| "tomllib"
| "xxlimited_35"
| "zoneinfo"
) | (12, "graphlib" | "idlelib" | "tomllib" | "zoneinfo")
) | (
12,
"__hello_alias__"
| "__hello_only__"
| "__phello_alias__"
| "_aix_support"
| "_posixshmem"
| "_pydatetime"
| "_pylong"
| "_sha2"
| "_statistics"
| "_testclinic"
| "_testinternalcapi"
| "_testsinglephase"
| "_tokenize"
| "_typing"
| "_xxinterpchannels"
| "_xxsubinterpreters"
| "_zoneinfo"
| "graphlib"
| "tomllib"
| "xxlimited_35"
| "zoneinfo"
)
)
}