_stdlib.py 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116
  1. """List of Python standard library modules.
  2. Sadly, there is no reliable way to tell whether a module is part of the
  3. standard library except by comparing to a canonical list.
  4. This is taken from https://github.com/PyCQA/isort/tree/develop/isort/stdlibs,
  5. which itself is sourced from the Python documentation.
  6. """
  7. import sys
  8. def is_stdlib_module(module: str) -> bool:
  9. base_module = module.partition(".")[0]
  10. return base_module in _get_stdlib_modules()
  11. def _get_stdlib_modules():
  12. if sys.version_info.major == 3:
  13. if sys.version_info.minor == 6:
  14. return stdlib3_6
  15. if sys.version_info.minor == 7:
  16. return stdlib3_7
  17. if sys.version_info.minor == 8:
  18. return stdlib3_8
  19. if sys.version_info.minor == 9:
  20. return stdlib3_9
  21. if sys.version_info.minor == 10:
  22. return stdlib3_10
  23. raise RuntimeError(f"Unsupported Python version: {sys.version_info}")
  24. stdlib3_6 = {
  25. "_dummy_thread",
  26. "_thread",
  27. "abc",
  28. "aifc",
  29. "argparse",
  30. "array",
  31. "ast",
  32. "asynchat",
  33. "asyncio",
  34. "asyncore",
  35. "atexit",
  36. "audioop",
  37. "base64",
  38. "bdb",
  39. "binascii",
  40. "binhex",
  41. "bisect",
  42. "builtins",
  43. "bz2",
  44. "cProfile",
  45. "calendar",
  46. "cgi",
  47. "cgitb",
  48. "chunk",
  49. "cmath",
  50. "cmd",
  51. "code",
  52. "codecs",
  53. "codeop",
  54. "collections",
  55. "colorsys",
  56. "compileall",
  57. "concurrent",
  58. "configparser",
  59. "contextlib",
  60. "copy",
  61. "copyreg",
  62. "crypt",
  63. "csv",
  64. "ctypes",
  65. "curses",
  66. "datetime",
  67. "dbm",
  68. "decimal",
  69. "difflib",
  70. "dis",
  71. "distutils",
  72. "doctest",
  73. "dummy_threading",
  74. "email",
  75. "encodings",
  76. "ensurepip",
  77. "enum",
  78. "errno",
  79. "faulthandler",
  80. "fcntl",
  81. "filecmp",
  82. "fileinput",
  83. "fnmatch",
  84. "formatter",
  85. "fpectl",
  86. "fractions",
  87. "ftplib",
  88. "functools",
  89. "gc",
  90. "getopt",
  91. "getpass",
  92. "gettext",
  93. "glob",
  94. "grp",
  95. "gzip",
  96. "hashlib",
  97. "heapq",
  98. "hmac",
  99. "html",
  100. "http",
  101. "imaplib",
  102. "imghdr",
  103. "imp",
  104. "importlib",
  105. "inspect",
  106. "io",
  107. "ipaddress",
  108. "itertools",
  109. "json",
  110. "keyword",
  111. "lib2to3",
  112. "linecache",
  113. "locale",
  114. "logging",
  115. "lzma",
  116. "macpath",
  117. "mailbox",
  118. "mailcap",
  119. "marshal",
  120. "math",
  121. "mimetypes",
  122. "mmap",
  123. "modulefinder",
  124. "msilib",
  125. "msvcrt",
  126. "multiprocessing",
  127. "netrc",
  128. "nis",
  129. "nntplib",
  130. "ntpath",
  131. "numbers",
  132. "operator",
  133. "optparse",
  134. "os",
  135. "ossaudiodev",
  136. "parser",
  137. "pathlib",
  138. "pdb",
  139. "pickle",
  140. "pickletools",
  141. "pipes",
  142. "pkgutil",
  143. "platform",
  144. "plistlib",
  145. "poplib",
  146. "posix",
  147. "posixpath",
  148. "pprint",
  149. "profile",
  150. "pstats",
  151. "pty",
  152. "pwd",
  153. "py_compile",
  154. "pyclbr",
  155. "pydoc",
  156. "queue",
  157. "quopri",
  158. "random",
  159. "re",
  160. "readline",
  161. "reprlib",
  162. "resource",
  163. "rlcompleter",
  164. "runpy",
  165. "sched",
  166. "secrets",
  167. "select",
  168. "selectors",
  169. "shelve",
  170. "shlex",
  171. "shutil",
  172. "signal",
  173. "site",
  174. "smtpd",
  175. "smtplib",
  176. "sndhdr",
  177. "socket",
  178. "socketserver",
  179. "spwd",
  180. "sqlite3",
  181. "sre",
  182. "sre_compile",
  183. "sre_constants",
  184. "sre_parse",
  185. "ssl",
  186. "stat",
  187. "statistics",
  188. "string",
  189. "stringprep",
  190. "struct",
  191. "subprocess",
  192. "sunau",
  193. "symbol",
  194. "symtable",
  195. "sys",
  196. "sysconfig",
  197. "syslog",
  198. "tabnanny",
  199. "tarfile",
  200. "telnetlib",
  201. "tempfile",
  202. "termios",
  203. "test",
  204. "textwrap",
  205. "threading",
  206. "time",
  207. "timeit",
  208. "tkinter",
  209. "token",
  210. "tokenize",
  211. "trace",
  212. "traceback",
  213. "tracemalloc",
  214. "tty",
  215. "turtle",
  216. "turtledemo",
  217. "types",
  218. "typing",
  219. "unicodedata",
  220. "unittest",
  221. "urllib",
  222. "uu",
  223. "uuid",
  224. "venv",
  225. "warnings",
  226. "wave",
  227. "weakref",
  228. "webbrowser",
  229. "winreg",
  230. "winsound",
  231. "wsgiref",
  232. "xdrlib",
  233. "xml",
  234. "xmlrpc",
  235. "zipapp",
  236. "zipfile",
  237. "zipimport",
  238. "zlib",
  239. }
  240. stdlib3_7 = {
  241. "_dummy_thread",
  242. "_thread",
  243. "abc",
  244. "aifc",
  245. "argparse",
  246. "array",
  247. "ast",
  248. "asynchat",
  249. "asyncio",
  250. "asyncore",
  251. "atexit",
  252. "audioop",
  253. "base64",
  254. "bdb",
  255. "binascii",
  256. "binhex",
  257. "bisect",
  258. "builtins",
  259. "bz2",
  260. "cProfile",
  261. "calendar",
  262. "cgi",
  263. "cgitb",
  264. "chunk",
  265. "cmath",
  266. "cmd",
  267. "code",
  268. "codecs",
  269. "codeop",
  270. "collections",
  271. "colorsys",
  272. "compileall",
  273. "concurrent",
  274. "configparser",
  275. "contextlib",
  276. "contextvars",
  277. "copy",
  278. "copyreg",
  279. "crypt",
  280. "csv",
  281. "ctypes",
  282. "curses",
  283. "dataclasses",
  284. "datetime",
  285. "dbm",
  286. "decimal",
  287. "difflib",
  288. "dis",
  289. "distutils",
  290. "doctest",
  291. "dummy_threading",
  292. "email",
  293. "encodings",
  294. "ensurepip",
  295. "enum",
  296. "errno",
  297. "faulthandler",
  298. "fcntl",
  299. "filecmp",
  300. "fileinput",
  301. "fnmatch",
  302. "formatter",
  303. "fractions",
  304. "ftplib",
  305. "functools",
  306. "gc",
  307. "getopt",
  308. "getpass",
  309. "gettext",
  310. "glob",
  311. "grp",
  312. "gzip",
  313. "hashlib",
  314. "heapq",
  315. "hmac",
  316. "html",
  317. "http",
  318. "imaplib",
  319. "imghdr",
  320. "imp",
  321. "importlib",
  322. "inspect",
  323. "io",
  324. "ipaddress",
  325. "itertools",
  326. "json",
  327. "keyword",
  328. "lib2to3",
  329. "linecache",
  330. "locale",
  331. "logging",
  332. "lzma",
  333. "macpath",
  334. "mailbox",
  335. "mailcap",
  336. "marshal",
  337. "math",
  338. "mimetypes",
  339. "mmap",
  340. "modulefinder",
  341. "msilib",
  342. "msvcrt",
  343. "multiprocessing",
  344. "netrc",
  345. "nis",
  346. "nntplib",
  347. "ntpath",
  348. "numbers",
  349. "operator",
  350. "optparse",
  351. "os",
  352. "ossaudiodev",
  353. "parser",
  354. "pathlib",
  355. "pdb",
  356. "pickle",
  357. "pickletools",
  358. "pipes",
  359. "pkgutil",
  360. "platform",
  361. "plistlib",
  362. "poplib",
  363. "posix",
  364. "posixpath",
  365. "pprint",
  366. "profile",
  367. "pstats",
  368. "pty",
  369. "pwd",
  370. "py_compile",
  371. "pyclbr",
  372. "pydoc",
  373. "queue",
  374. "quopri",
  375. "random",
  376. "re",
  377. "readline",
  378. "reprlib",
  379. "resource",
  380. "rlcompleter",
  381. "runpy",
  382. "sched",
  383. "secrets",
  384. "select",
  385. "selectors",
  386. "shelve",
  387. "shlex",
  388. "shutil",
  389. "signal",
  390. "site",
  391. "smtpd",
  392. "smtplib",
  393. "sndhdr",
  394. "socket",
  395. "socketserver",
  396. "spwd",
  397. "sqlite3",
  398. "sre",
  399. "sre_compile",
  400. "sre_constants",
  401. "sre_parse",
  402. "ssl",
  403. "stat",
  404. "statistics",
  405. "string",
  406. "stringprep",
  407. "struct",
  408. "subprocess",
  409. "sunau",
  410. "symbol",
  411. "symtable",
  412. "sys",
  413. "sysconfig",
  414. "syslog",
  415. "tabnanny",
  416. "tarfile",
  417. "telnetlib",
  418. "tempfile",
  419. "termios",
  420. "test",
  421. "textwrap",
  422. "threading",
  423. "time",
  424. "timeit",
  425. "tkinter",
  426. "token",
  427. "tokenize",
  428. "trace",
  429. "traceback",
  430. "tracemalloc",
  431. "tty",
  432. "turtle",
  433. "turtledemo",
  434. "types",
  435. "typing",
  436. "unicodedata",
  437. "unittest",
  438. "urllib",
  439. "uu",
  440. "uuid",
  441. "venv",
  442. "warnings",
  443. "wave",
  444. "weakref",
  445. "webbrowser",
  446. "winreg",
  447. "winsound",
  448. "wsgiref",
  449. "xdrlib",
  450. "xml",
  451. "xmlrpc",
  452. "zipapp",
  453. "zipfile",
  454. "zipimport",
  455. "zlib",
  456. }
  457. stdlib3_8 = {
  458. "_dummy_thread",
  459. "_thread",
  460. "abc",
  461. "aifc",
  462. "argparse",
  463. "array",
  464. "ast",
  465. "asynchat",
  466. "asyncio",
  467. "asyncore",
  468. "atexit",
  469. "audioop",
  470. "base64",
  471. "bdb",
  472. "binascii",
  473. "binhex",
  474. "bisect",
  475. "builtins",
  476. "bz2",
  477. "cProfile",
  478. "calendar",
  479. "cgi",
  480. "cgitb",
  481. "chunk",
  482. "cmath",
  483. "cmd",
  484. "code",
  485. "codecs",
  486. "codeop",
  487. "collections",
  488. "colorsys",
  489. "compileall",
  490. "concurrent",
  491. "configparser",
  492. "contextlib",
  493. "contextvars",
  494. "copy",
  495. "copyreg",
  496. "crypt",
  497. "csv",
  498. "ctypes",
  499. "curses",
  500. "dataclasses",
  501. "datetime",
  502. "dbm",
  503. "decimal",
  504. "difflib",
  505. "dis",
  506. "distutils",
  507. "doctest",
  508. "dummy_threading",
  509. "email",
  510. "encodings",
  511. "ensurepip",
  512. "enum",
  513. "errno",
  514. "faulthandler",
  515. "fcntl",
  516. "filecmp",
  517. "fileinput",
  518. "fnmatch",
  519. "formatter",
  520. "fractions",
  521. "ftplib",
  522. "functools",
  523. "gc",
  524. "getopt",
  525. "getpass",
  526. "gettext",
  527. "glob",
  528. "grp",
  529. "gzip",
  530. "hashlib",
  531. "heapq",
  532. "hmac",
  533. "html",
  534. "http",
  535. "imaplib",
  536. "imghdr",
  537. "imp",
  538. "importlib",
  539. "inspect",
  540. "io",
  541. "ipaddress",
  542. "itertools",
  543. "json",
  544. "keyword",
  545. "lib2to3",
  546. "linecache",
  547. "locale",
  548. "logging",
  549. "lzma",
  550. "mailbox",
  551. "mailcap",
  552. "marshal",
  553. "math",
  554. "mimetypes",
  555. "mmap",
  556. "modulefinder",
  557. "msilib",
  558. "msvcrt",
  559. "multiprocessing",
  560. "netrc",
  561. "nis",
  562. "nntplib",
  563. "ntpath",
  564. "numbers",
  565. "operator",
  566. "optparse",
  567. "os",
  568. "ossaudiodev",
  569. "parser",
  570. "pathlib",
  571. "pdb",
  572. "pickle",
  573. "pickletools",
  574. "pipes",
  575. "pkgutil",
  576. "platform",
  577. "plistlib",
  578. "poplib",
  579. "posix",
  580. "posixpath",
  581. "pprint",
  582. "profile",
  583. "pstats",
  584. "pty",
  585. "pwd",
  586. "py_compile",
  587. "pyclbr",
  588. "pydoc",
  589. "queue",
  590. "quopri",
  591. "random",
  592. "re",
  593. "readline",
  594. "reprlib",
  595. "resource",
  596. "rlcompleter",
  597. "runpy",
  598. "sched",
  599. "secrets",
  600. "select",
  601. "selectors",
  602. "shelve",
  603. "shlex",
  604. "shutil",
  605. "signal",
  606. "site",
  607. "smtpd",
  608. "smtplib",
  609. "sndhdr",
  610. "socket",
  611. "socketserver",
  612. "spwd",
  613. "sqlite3",
  614. "sre",
  615. "sre_compile",
  616. "sre_constants",
  617. "sre_parse",
  618. "ssl",
  619. "stat",
  620. "statistics",
  621. "string",
  622. "stringprep",
  623. "struct",
  624. "subprocess",
  625. "sunau",
  626. "symbol",
  627. "symtable",
  628. "sys",
  629. "sysconfig",
  630. "syslog",
  631. "tabnanny",
  632. "tarfile",
  633. "telnetlib",
  634. "tempfile",
  635. "termios",
  636. "test",
  637. "textwrap",
  638. "threading",
  639. "time",
  640. "timeit",
  641. "tkinter",
  642. "token",
  643. "tokenize",
  644. "trace",
  645. "traceback",
  646. "tracemalloc",
  647. "tty",
  648. "turtle",
  649. "turtledemo",
  650. "types",
  651. "typing",
  652. "unicodedata",
  653. "unittest",
  654. "urllib",
  655. "uu",
  656. "uuid",
  657. "venv",
  658. "warnings",
  659. "wave",
  660. "weakref",
  661. "webbrowser",
  662. "winreg",
  663. "winsound",
  664. "wsgiref",
  665. "xdrlib",
  666. "xml",
  667. "xmlrpc",
  668. "zipapp",
  669. "zipfile",
  670. "zipimport",
  671. "zlib",
  672. }
  673. stdlib3_9 = {
  674. "_thread",
  675. "abc",
  676. "aifc",
  677. "argparse",
  678. "array",
  679. "ast",
  680. "asynchat",
  681. "asyncio",
  682. "asyncore",
  683. "atexit",
  684. "audioop",
  685. "base64",
  686. "bdb",
  687. "binascii",
  688. "binhex",
  689. "bisect",
  690. "builtins",
  691. "bz2",
  692. "cProfile",
  693. "calendar",
  694. "cgi",
  695. "cgitb",
  696. "chunk",
  697. "cmath",
  698. "cmd",
  699. "code",
  700. "codecs",
  701. "codeop",
  702. "collections",
  703. "colorsys",
  704. "compileall",
  705. "concurrent",
  706. "configparser",
  707. "contextlib",
  708. "contextvars",
  709. "copy",
  710. "copyreg",
  711. "crypt",
  712. "csv",
  713. "ctypes",
  714. "curses",
  715. "dataclasses",
  716. "datetime",
  717. "dbm",
  718. "decimal",
  719. "difflib",
  720. "dis",
  721. "distutils",
  722. "doctest",
  723. "email",
  724. "encodings",
  725. "ensurepip",
  726. "enum",
  727. "errno",
  728. "faulthandler",
  729. "fcntl",
  730. "filecmp",
  731. "fileinput",
  732. "fnmatch",
  733. "formatter",
  734. "fractions",
  735. "ftplib",
  736. "functools",
  737. "gc",
  738. "getopt",
  739. "getpass",
  740. "gettext",
  741. "glob",
  742. "graphlib",
  743. "grp",
  744. "gzip",
  745. "hashlib",
  746. "heapq",
  747. "hmac",
  748. "html",
  749. "http",
  750. "imaplib",
  751. "imghdr",
  752. "imp",
  753. "importlib",
  754. "inspect",
  755. "io",
  756. "ipaddress",
  757. "itertools",
  758. "json",
  759. "keyword",
  760. "lib2to3",
  761. "linecache",
  762. "locale",
  763. "logging",
  764. "lzma",
  765. "mailbox",
  766. "mailcap",
  767. "marshal",
  768. "math",
  769. "mimetypes",
  770. "mmap",
  771. "modulefinder",
  772. "msilib",
  773. "msvcrt",
  774. "multiprocessing",
  775. "netrc",
  776. "nis",
  777. "nntplib",
  778. "ntpath",
  779. "numbers",
  780. "operator",
  781. "optparse",
  782. "os",
  783. "ossaudiodev",
  784. "parser",
  785. "pathlib",
  786. "pdb",
  787. "pickle",
  788. "pickletools",
  789. "pipes",
  790. "pkgutil",
  791. "platform",
  792. "plistlib",
  793. "poplib",
  794. "posix",
  795. "posixpath",
  796. "pprint",
  797. "profile",
  798. "pstats",
  799. "pty",
  800. "pwd",
  801. "py_compile",
  802. "pyclbr",
  803. "pydoc",
  804. "queue",
  805. "quopri",
  806. "random",
  807. "re",
  808. "readline",
  809. "reprlib",
  810. "resource",
  811. "rlcompleter",
  812. "runpy",
  813. "sched",
  814. "secrets",
  815. "select",
  816. "selectors",
  817. "shelve",
  818. "shlex",
  819. "shutil",
  820. "signal",
  821. "site",
  822. "smtpd",
  823. "smtplib",
  824. "sndhdr",
  825. "socket",
  826. "socketserver",
  827. "spwd",
  828. "sqlite3",
  829. "sre",
  830. "sre_compile",
  831. "sre_constants",
  832. "sre_parse",
  833. "ssl",
  834. "stat",
  835. "statistics",
  836. "string",
  837. "stringprep",
  838. "struct",
  839. "subprocess",
  840. "sunau",
  841. "symbol",
  842. "symtable",
  843. "sys",
  844. "sysconfig",
  845. "syslog",
  846. "tabnanny",
  847. "tarfile",
  848. "telnetlib",
  849. "tempfile",
  850. "termios",
  851. "test",
  852. "textwrap",
  853. "threading",
  854. "time",
  855. "timeit",
  856. "tkinter",
  857. "token",
  858. "tokenize",
  859. "trace",
  860. "traceback",
  861. "tracemalloc",
  862. "tty",
  863. "turtle",
  864. "turtledemo",
  865. "types",
  866. "typing",
  867. "unicodedata",
  868. "unittest",
  869. "urllib",
  870. "uu",
  871. "uuid",
  872. "venv",
  873. "warnings",
  874. "wave",
  875. "weakref",
  876. "webbrowser",
  877. "winreg",
  878. "winsound",
  879. "wsgiref",
  880. "xdrlib",
  881. "xml",
  882. "xmlrpc",
  883. "zipapp",
  884. "zipfile",
  885. "zipimport",
  886. "zlib",
  887. "zoneinfo",
  888. }
  889. stdlib3_10 = {
  890. "_ast",
  891. "_thread",
  892. "abc",
  893. "aifc",
  894. "argparse",
  895. "array",
  896. "ast",
  897. "asynchat",
  898. "asyncio",
  899. "asyncore",
  900. "atexit",
  901. "audioop",
  902. "base64",
  903. "bdb",
  904. "binascii",
  905. "binhex",
  906. "bisect",
  907. "builtins",
  908. "bz2",
  909. "cProfile",
  910. "calendar",
  911. "cgi",
  912. "cgitb",
  913. "chunk",
  914. "cmath",
  915. "cmd",
  916. "code",
  917. "codecs",
  918. "codeop",
  919. "collections",
  920. "colorsys",
  921. "compileall",
  922. "concurrent",
  923. "configparser",
  924. "contextlib",
  925. "contextvars",
  926. "copy",
  927. "copyreg",
  928. "crypt",
  929. "csv",
  930. "ctypes",
  931. "curses",
  932. "dataclasses",
  933. "datetime",
  934. "dbm",
  935. "decimal",
  936. "difflib",
  937. "dis",
  938. "distutils",
  939. "doctest",
  940. "email",
  941. "encodings",
  942. "ensurepip",
  943. "enum",
  944. "errno",
  945. "faulthandler",
  946. "fcntl",
  947. "filecmp",
  948. "fileinput",
  949. "fnmatch",
  950. "fractions",
  951. "ftplib",
  952. "functools",
  953. "gc",
  954. "getopt",
  955. "getpass",
  956. "gettext",
  957. "glob",
  958. "graphlib",
  959. "grp",
  960. "gzip",
  961. "hashlib",
  962. "heapq",
  963. "hmac",
  964. "html",
  965. "http",
  966. "imaplib",
  967. "imghdr",
  968. "imp",
  969. "importlib",
  970. "inspect",
  971. "io",
  972. "ipaddress",
  973. "itertools",
  974. "json",
  975. "keyword",
  976. "lib2to3",
  977. "linecache",
  978. "locale",
  979. "logging",
  980. "lzma",
  981. "mailbox",
  982. "mailcap",
  983. "marshal",
  984. "math",
  985. "mimetypes",
  986. "mmap",
  987. "modulefinder",
  988. "msilib",
  989. "msvcrt",
  990. "multiprocessing",
  991. "netrc",
  992. "nis",
  993. "nntplib",
  994. "ntpath",
  995. "numbers",
  996. "operator",
  997. "optparse",
  998. "os",
  999. "ossaudiodev",
  1000. "pathlib",
  1001. "pdb",
  1002. "pickle",
  1003. "pickletools",
  1004. "pipes",
  1005. "pkgutil",
  1006. "platform",
  1007. "plistlib",
  1008. "poplib",
  1009. "posix",
  1010. "posixpath",
  1011. "pprint",
  1012. "profile",
  1013. "pstats",
  1014. "pty",
  1015. "pwd",
  1016. "py_compile",
  1017. "pyclbr",
  1018. "pydoc",
  1019. "queue",
  1020. "quopri",
  1021. "random",
  1022. "re",
  1023. "readline",
  1024. "reprlib",
  1025. "resource",
  1026. "rlcompleter",
  1027. "runpy",
  1028. "sched",
  1029. "secrets",
  1030. "select",
  1031. "selectors",
  1032. "shelve",
  1033. "shlex",
  1034. "shutil",
  1035. "signal",
  1036. "site",
  1037. "smtpd",
  1038. "smtplib",
  1039. "sndhdr",
  1040. "socket",
  1041. "socketserver",
  1042. "spwd",
  1043. "sqlite3",
  1044. "sre",
  1045. "sre_compile",
  1046. "sre_constants",
  1047. "sre_parse",
  1048. "ssl",
  1049. "stat",
  1050. "statistics",
  1051. "string",
  1052. "stringprep",
  1053. "struct",
  1054. "subprocess",
  1055. "sunau",
  1056. "symtable",
  1057. "sys",
  1058. "sysconfig",
  1059. "syslog",
  1060. "tabnanny",
  1061. "tarfile",
  1062. "telnetlib",
  1063. "tempfile",
  1064. "termios",
  1065. "test",
  1066. "textwrap",
  1067. "threading",
  1068. "time",
  1069. "timeit",
  1070. "tkinter",
  1071. "token",
  1072. "tokenize",
  1073. "trace",
  1074. "traceback",
  1075. "tracemalloc",
  1076. "tty",
  1077. "turtle",
  1078. "turtledemo",
  1079. "types",
  1080. "typing",
  1081. "unicodedata",
  1082. "unittest",
  1083. "urllib",
  1084. "uu",
  1085. "uuid",
  1086. "venv",
  1087. "warnings",
  1088. "wave",
  1089. "weakref",
  1090. "webbrowser",
  1091. "winreg",
  1092. "winsound",
  1093. "wsgiref",
  1094. "xdrlib",
  1095. "xml",
  1096. "xmlrpc",
  1097. "zipapp",
  1098. "zipfile",
  1099. "zipimport",
  1100. "zlib",
  1101. "zoneinfo",
  1102. }