├── .gitignore ├── LICENSE ├── README.md ├── aggregate.py ├── binder ├── requirements.txt └── runtime.txt ├── categories.json ├── categories.py ├── category_usage.csv ├── commit_stats.json ├── commit_stats.py ├── file_map.json ├── file_map.py ├── module_names.json ├── module_names.py ├── pr_files.graphql ├── private_modules.json ├── private_modules.py ├── pull_requests.graphql ├── pull_requests.json ├── pull_requests.py ├── release_dates.json ├── required.json ├── required.py ├── stats.ipynb ├── stdlib.csv ├── top-pypi-packages-365-days.json ├── usage.json └── usage.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | pip-wheel-metadata/ 24 | share/python-wheels/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | MANIFEST 29 | 30 | # PyInstaller 31 | # Usually these files are written by a python script from a template 32 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 33 | *.manifest 34 | *.spec 35 | 36 | # Installer logs 37 | pip-log.txt 38 | pip-delete-this-directory.txt 39 | 40 | # Unit test / coverage reports 41 | htmlcov/ 42 | .tox/ 43 | .nox/ 44 | .coverage 45 | .coverage.* 46 | .cache 47 | nosetests.xml 48 | coverage.xml 49 | *.cover 50 | *.py,cover 51 | .hypothesis/ 52 | .pytest_cache/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | target/ 76 | 77 | # Jupyter Notebook 78 | .ipynb_checkpoints 79 | 80 | # IPython 81 | profile_default/ 82 | ipython_config.py 83 | 84 | # pyenv 85 | .python-version 86 | 87 | # pipenv 88 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 89 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 90 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 91 | # install all needed dependencies. 92 | #Pipfile.lock 93 | 94 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 95 | __pypackages__/ 96 | 97 | # Celery stuff 98 | celerybeat-schedule 99 | celerybeat.pid 100 | 101 | # SageMath parsed files 102 | *.sage.py 103 | 104 | # Environments 105 | .env 106 | .venv 107 | env/ 108 | venv/ 109 | ENV/ 110 | env.bak/ 111 | venv.bak/ 112 | 113 | # Spyder project settings 114 | .spyderproject 115 | .spyproject 116 | 117 | # Rope project settings 118 | .ropeproject 119 | 120 | # mkdocs documentation 121 | /site 122 | 123 | # mypy 124 | .mypy_cache/ 125 | .dmypy.json 126 | dmypy.json 127 | 128 | # Pyre type checker 129 | .pyre/ 130 | 131 | .vscode/ 132 | cpython/ 133 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Brett Cannon 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # stdlib-stats 2 | 3 | Various statistics on Python's standard library. 4 | 5 | See `stats.ipynb` for charts that show the data in various ways. 6 | 7 | You can also run an interactive Jupyter session using Binder: 8 | 9 | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/brettcannon/stdlib-stats/main?filepath=stats.ipynb) 10 | 11 | ## Organized data 12 | 13 | `stdlib.csv` contains various details about the modules in the stdlib. The table 14 | is built using various JSON files found in this repository (discussed below). 15 | To tweak how various things are treated, you can edit the JSON files and 16 | run `aggregate.py` to update it accordingly. 17 | 18 | The `category_usage.csv` counts the number of projects which use a specify 19 | module category. It also tallies all the commits the category is made up of. 20 | 21 | The `stats.ipynb` is a Jupyter notebook which contains various charts that try 22 | to analyze the data from the CSV in various ways. 23 | 24 | ## Raw data 25 | 26 | ### Map module to public module 27 | Public availability is (mostly) determined by documentation existing in 28 | `Doc/library/`. 29 | 30 | `private_modules.json` maps public modules to any private modules they depend 31 | on. For modules that are "cheating" and using private modules directly instead 32 | of their equivalent public API, they not listed as a dependent 33 | (e.g. `multiprocessing` directly using `_weakrefset` instead of going through 34 | `weakref`). 35 | 36 | ### Map file to module 37 | Ignores Argument Clinic files and tests, but includes header files. 38 | 39 | `file_map.json` maps module name to relative file paths in a git clone. 40 | 41 | ### Modules required to start Python 42 | `required.json` lists the modules required to start Python (based on 43 | `python -v -S -c pass`). 44 | 45 | ### Usage of a module in the public 46 | `usage.json` lists the modules used by the 4000 most downloaded projects 47 | over the past year on PyPI. 48 | 49 | The list of projects is listed in `top-pypi-packages-365-days.json` as fetched 50 | from [Top PyPI Packages](https://hugovk.github.io/top-pypi-packages/). The 51 | projects are downloaded by 52 | [isidentical/syntax_test_suite](https://github.com/isidentical/syntax_test_suite). 53 | 54 | 55 | ### Grouped by category 56 | `categories.json` groups modules by category accoring to the 57 | [library index](https://docs.python.org/3/library/index.html). 58 | 59 | The `__future__` module is specially treated and put in its own category. 60 | 61 | ### Commit stats per file 62 | `commit_stats.json` tracks the oldest, newest, and SHA hashes of all the commits 63 | made on a specific file. 64 | -------------------------------------------------------------------------------- /aggregate.py: -------------------------------------------------------------------------------- 1 | import csv 2 | import json 3 | import pathlib 4 | 5 | 6 | PATH = pathlib.Path("stdlib.csv") 7 | CATEGORY_USAGE_PATH = pathlib.Path("category_usage.csv") 8 | 9 | def main(): 10 | 11 | with open("private_modules.json", "rb") as file: 12 | visibility = json.load(file) 13 | 14 | data = {module: {"name": module} for module in visibility} 15 | 16 | # For algorithmic simplicity, have every public module include itself as 17 | # "private". 18 | private_to_public = {} 19 | for module, private_modules in visibility.items(): 20 | private_to_public[module] = module 21 | for private_module in private_modules: 22 | private_to_public[private_module] = module 23 | 24 | with open("categories.json", "rb") as file: 25 | categories = json.load(file) 26 | for category, modules in categories.items(): 27 | for module in modules: 28 | data[module]["category"] = category 29 | category_data = {category: {"name": category} for category in categories} 30 | 31 | module_commit_stats = {} 32 | category_commit_stats = {} 33 | with open("file_map.json", "rb") as file: 34 | file_map = json.load(file) 35 | with open("commit_stats.json", "rb") as file: 36 | file_commit_stats = json.load(file) 37 | for module, files in file_map.items(): 38 | public_module = private_to_public[module] 39 | category = data[public_module]["category"] 40 | module_stats = module_commit_stats.setdefault(public_module, {}) 41 | for path in files: 42 | file_stats = file_commit_stats[path] 43 | module_stats.setdefault("sha", set()).update(file_stats["sha"]) 44 | category_commit_stats.setdefault(category, set()).update(file_stats["sha"]) 45 | if (newest := file_stats["newest"]) > module_stats.get("newest", "1900-01-01"): 46 | module_stats["newest"] = newest 47 | if (oldest := file_stats["oldest"]) < module_stats.get("oldest", "9999-01-01"): 48 | module_stats["oldest"] = oldest 49 | for module, stats in module_commit_stats.items(): 50 | data[module]["oldest_commit"] = stats["oldest"] 51 | data[module]["newest_commit"] = stats["newest"] 52 | data[module]["commit_count"] = len(stats["sha"]) 53 | for category, sha in category_commit_stats.items(): 54 | category_data[category]["commits"] = len(sha) 55 | 56 | with open("pull_requests.json", "rb") as file: 57 | pull_requests = json.load(file) 58 | path_to_module = {} 59 | for module, paths in file_map.items(): 60 | public_module = private_to_public[module] 61 | for path in paths: 62 | path_to_module[path] = public_module 63 | module_prs = {module: set() for module in data} 64 | category_prs = {category: set() for category in categories} 65 | for pr, paths in pull_requests.items(): 66 | for path in paths: 67 | try: 68 | module = path_to_module[path] 69 | except KeyError: 70 | continue 71 | category = data[module]["category"] 72 | module_prs[module].add(pr) 73 | category_prs[category].add(pr) 74 | for module, prs in module_prs.items(): 75 | data[module]["pr_count"] = len(prs) 76 | for category, prs in category_prs.items(): 77 | category_data[category]["pr_count"] = len(prs) 78 | 79 | with open("required.json", "rb") as file: 80 | required_modules = json.load(file) 81 | for module in required_modules: 82 | public_module = private_to_public[module] 83 | data[public_module]["required"] = True 84 | for module_data in data.values(): 85 | if "required" not in module_data: 86 | module_data["required"] = False 87 | 88 | used_by = {module: set() for module in data} 89 | category_used_by = {category: set() for category in categories} 90 | with open("usage.json", "rb") as file: 91 | usage = json.load(file) 92 | for project, modules in usage.items(): 93 | for module in modules: 94 | public_name = private_to_public[module] 95 | used_by[public_name].add(project) 96 | category_used_by[data[public_name]["category"]].add(project) 97 | for module, projects in used_by.items(): 98 | data[module]["project_count"] = len(projects) 99 | for category, projects in category_used_by.items(): 100 | category_data[category]["project_count"] = len(projects) 101 | 102 | 103 | with PATH.open("w", newline="", encoding="utf-8") as file: 104 | columns = ["name", "required", "category", "project_count", 105 | "oldest_commit", "newest_commit", "commit_count", "pr_count"] 106 | writer = csv.DictWriter(file, fieldnames=columns) 107 | writer.writeheader() 108 | writer.writerows(data.values()) 109 | 110 | with CATEGORY_USAGE_PATH.open("w", newline="", encoding="utf-8") as file: 111 | columns = ["name", "project_count", "commits", "pr_count"] 112 | writer = csv.DictWriter(file, fieldnames=columns) 113 | writer.writeheader() 114 | writer.writerows(category_data.values()) 115 | 116 | 117 | if __name__ == "__main__": 118 | main() 119 | -------------------------------------------------------------------------------- /binder/requirements.txt: -------------------------------------------------------------------------------- 1 | pandas==1.2.4 2 | altair==4.1.0 3 | -------------------------------------------------------------------------------- /binder/runtime.txt: -------------------------------------------------------------------------------- 1 | python-3.9 2 | -------------------------------------------------------------------------------- /categories.json: -------------------------------------------------------------------------------- 1 | { 2 | "__future__": [ 3 | "__future__" 4 | ], 5 | "allos": [ 6 | "argparse", 7 | "ctypes", 8 | "curses", 9 | "errno", 10 | "getopt", 11 | "getpass", 12 | "io", 13 | "logging", 14 | "os", 15 | "platform", 16 | "time" 17 | ], 18 | "archiving": [ 19 | "bz2", 20 | "gzip", 21 | "lzma", 22 | "tarfile", 23 | "zipfile", 24 | "zlib" 25 | ], 26 | "binary": [ 27 | "codecs", 28 | "encodings", 29 | "struct" 30 | ], 31 | "concurrency": [ 32 | "_thread", 33 | "concurrent", 34 | "contextvars", 35 | "multiprocessing", 36 | "queue", 37 | "sched", 38 | "subprocess", 39 | "threading" 40 | ], 41 | "crypto": [ 42 | "hashlib", 43 | "hmac", 44 | "secrets" 45 | ], 46 | "custominterp": [ 47 | "code", 48 | "codeop" 49 | ], 50 | "datatypes": [ 51 | "array", 52 | "bisect", 53 | "calendar", 54 | "collections", 55 | "copy", 56 | "datetime", 57 | "enum", 58 | "graphlib", 59 | "heapq", 60 | "pprint", 61 | "reprlib", 62 | "types", 63 | "weakref", 64 | "zoneinfo" 65 | ], 66 | "debug": [ 67 | "bdb", 68 | "cProfile", 69 | "faulthandler", 70 | "pdb", 71 | "profile", 72 | "pstats", 73 | "timeit", 74 | "trace", 75 | "tracemalloc" 76 | ], 77 | "development": [ 78 | "doctest", 79 | "lib2to3", 80 | "pydoc", 81 | "typing", 82 | "unittest" 83 | ], 84 | "distribution": [ 85 | "distutils", 86 | "ensurepip", 87 | "venv", 88 | "zipapp" 89 | ], 90 | "eastereggs": [ 91 | "antigravity", 92 | "this" 93 | ], 94 | "fileformats": [ 95 | "configparser", 96 | "csv", 97 | "netrc", 98 | "plistlib", 99 | "xdrlib" 100 | ], 101 | "filesys": [ 102 | "filecmp", 103 | "fileinput", 104 | "fnmatch", 105 | "glob", 106 | "linecache", 107 | "os", 108 | "pathlib", 109 | "shutil", 110 | "stat", 111 | "tempfile" 112 | ], 113 | "frameworks": [ 114 | "cmd", 115 | "shlex", 116 | "turtle", 117 | "turtledemo" 118 | ], 119 | "functional": [ 120 | "functools", 121 | "itertools", 122 | "operator" 123 | ], 124 | "i18n": [ 125 | "gettext", 126 | "locale" 127 | ], 128 | "internet": [ 129 | "cgi", 130 | "cgitb", 131 | "ftplib", 132 | "http", 133 | "imaplib", 134 | "ipaddress", 135 | "nntplib", 136 | "poplib", 137 | "smtpd", 138 | "smtplib", 139 | "socketserver", 140 | "telnetlib", 141 | "urllib", 142 | "uuid", 143 | "webbrowser", 144 | "wsgiref", 145 | "xmlrpc" 146 | ], 147 | "ipc": [ 148 | "asynchat", 149 | "asyncio", 150 | "asyncore", 151 | "mmap", 152 | "select", 153 | "selectors", 154 | "signal", 155 | "socket", 156 | "ssl" 157 | ], 158 | "language": [ 159 | "ast", 160 | "compileall", 161 | "dis", 162 | "keyword", 163 | "pickletools", 164 | "py_compile", 165 | "pyclbr", 166 | "symtable", 167 | "tabnanny", 168 | "token", 169 | "tokenize" 170 | ], 171 | "markup": [ 172 | "html", 173 | "xml" 174 | ], 175 | "mm": [ 176 | "aifc", 177 | "audioop", 178 | "chunk", 179 | "colorsys", 180 | "imghdr", 181 | "ossaudiodev", 182 | "sndhdr", 183 | "sunau", 184 | "wave" 185 | ], 186 | "modules": [ 187 | "importlib", 188 | "modulefinder", 189 | "pkgutil", 190 | "runpy", 191 | "zipimport" 192 | ], 193 | "netdata": [ 194 | "base64", 195 | "binascii", 196 | "binhex", 197 | "email", 198 | "json", 199 | "mailbox", 200 | "mailcap", 201 | "mimetypes", 202 | "quopri", 203 | "uu" 204 | ], 205 | "numeric": [ 206 | "cmath", 207 | "decimal", 208 | "fractions", 209 | "math", 210 | "numbers", 211 | "random", 212 | "statistics" 213 | ], 214 | "persistence": [ 215 | "copyreg", 216 | "dbm", 217 | "marshal", 218 | "pickle", 219 | "shelve", 220 | "sqlite3" 221 | ], 222 | "python": [ 223 | "abc", 224 | "atexit", 225 | "builtins", 226 | "contextlib", 227 | "dataclasses", 228 | "gc", 229 | "inspect", 230 | "site", 231 | "sys", 232 | "sysconfig", 233 | "traceback", 234 | "warnings" 235 | ], 236 | "superseded": [ 237 | "imp", 238 | "optparse" 239 | ], 240 | "text": [ 241 | "difflib", 242 | "re", 243 | "readline", 244 | "rlcompleter", 245 | "string", 246 | "stringprep", 247 | "textwrap", 248 | "unicodedata" 249 | ], 250 | "tk": [ 251 | "idlelib", 252 | "tkinter" 253 | ], 254 | "unix": [ 255 | "crypt", 256 | "fcntl", 257 | "grp", 258 | "nis", 259 | "pipes", 260 | "posix", 261 | "pty", 262 | "pwd", 263 | "resource", 264 | "spwd", 265 | "syslog", 266 | "termios", 267 | "tty" 268 | ], 269 | "windows": [ 270 | "msilib", 271 | "msvcrt", 272 | "winreg", 273 | "winsound" 274 | ] 275 | } 276 | -------------------------------------------------------------------------------- /categories.py: -------------------------------------------------------------------------------- 1 | import json 2 | import pathlib 3 | import sys 4 | 5 | repo = pathlib.Path(sys.argv[1]) 6 | library_docs = repo / "Doc" / "library" 7 | index_file = library_docs / "index.rst" 8 | 9 | with (library_docs / "index.rst").open("r", encoding="UTF-8") as file: 10 | index_lines = file.readlines() 11 | 12 | category_filenames = [] 13 | for line in index_lines: 14 | cleaned_line = line.strip() 15 | if cleaned_line.endswith(".rst"): 16 | category_filenames.append(cleaned_line) 17 | 18 | with open("module_names.json", "rb") as file: 19 | module_names = frozenset(json.load(file)) 20 | 21 | categories = {} 22 | found = set() 23 | for category_filename in category_filenames: 24 | category_file = library_docs / category_filename 25 | category_name = category_filename.removesuffix(".rst") 26 | print("Category:", category_name) 27 | with category_file.open("r", encoding="UTF-8") as file: 28 | category_lines = file.readlines() 29 | members = set() 30 | for line in category_lines: 31 | cleaned_line = line.strip() 32 | if not cleaned_line.endswith(".rst"): 33 | continue 34 | # Handles both suffix and submodules. 35 | doc_name = cleaned_line.partition(".")[0] 36 | if doc_name not in module_names: 37 | print(doc_name, "?") 38 | else: 39 | members.add(doc_name) 40 | found.add(doc_name) 41 | if doc_name == "profile": 42 | for name in ["cProfile", "pstats"]: 43 | members.add(name) 44 | found.add(name) 45 | elif doc_name == "codecs": 46 | members.add("encodings") 47 | found.add("encodings") 48 | elif doc_name == "typing": 49 | members.add("lib2to3") 50 | found.add("lib2to3") 51 | elif doc_name == "tkinter": 52 | members.add("idlelib") 53 | found.add("idlelib") 54 | elif doc_name == "turtle": 55 | members.add("turtledemo") 56 | found.add("turtledemo") 57 | if members: 58 | categories[category_name] = sorted(members) 59 | 60 | with open("private_modules.json", "rb") as file: 61 | module_visibility = json.load(file) 62 | private_modules = {name for modules in module_visibility.values() for name in modules} 63 | 64 | categories["eastereggs"] = ["antigravity", "this"] 65 | found.update(categories["eastereggs"]) 66 | 67 | if diff := module_names - private_modules - found: 68 | print("Public modules with no category:", sorted(diff)) 69 | 70 | with open("categories.json", "w", encoding="UTF-8") as file: 71 | json.dump(categories, file, sort_keys=True, indent=2) 72 | -------------------------------------------------------------------------------- /category_usage.csv: -------------------------------------------------------------------------------- 1 | name,project_count,commits,pr_count 2 | __future__,1547,28,2 3 | allos,2772,2587,97 4 | archiving,632,801,35 5 | binary,1143,574,16 6 | concurrency,1692,1289,67 7 | crypto,724,303,13 8 | custominterp,69,59,1 9 | datatypes,2679,1501,42 10 | debug,284,762,39 11 | development,2057,1309,64 12 | distribution,1178,1708,40 13 | eastereggs,3,10,0 14 | fileformats,549,349,18 15 | filesys,3211,1101,80 16 | frameworks,363,187,9 17 | functional,1841,491,18 18 | i18n,245,288,8 19 | internet,1408,1928,108 20 | ipc,1001,2913,105 21 | language,446,888,27 22 | markup,436,938,21 23 | mm,64,392,20 24 | modules,715,625,19 25 | netdata,1751,1019,54 26 | numeric,1442,1014,12 27 | persistence,630,1118,43 28 | python,3295,2344,89 29 | superseded,421,847,5 30 | text,2459,2631,32 31 | tk,48,1389,60 32 | unix,309,1496,39 33 | windows,147,220,5 34 | -------------------------------------------------------------------------------- /commit_stats.py: -------------------------------------------------------------------------------- 1 | import json 2 | import operator 3 | import sys 4 | 5 | import git # gitpython 6 | 7 | 8 | with open("file_map.json", "rb") as file: 9 | file_map = json.load(file) 10 | 11 | file_paths = [] 12 | for paths in file_map.values(): 13 | file_paths.extend(paths) 14 | file_paths.sort() 15 | 16 | file_stats = {} 17 | repo = git.Repo(sys.argv[1]) 18 | for path in file_paths: 19 | print(path) 20 | commits = list(repo.iter_commits(paths=path)) 21 | commits.sort(key=operator.attrgetter("committed_date")) 22 | file_stats[path] = { 23 | "oldest": commits[0].committed_datetime.date().isoformat(), 24 | "newest": commits[-1].committed_datetime.date().isoformat(), 25 | "sha": [commit.hexsha for commit in commits] 26 | } 27 | 28 | 29 | with open("commit_stats.json", "w", encoding="utf-8") as file: 30 | json.dump(file_stats, file, indent=2, sort_keys=True) 31 | -------------------------------------------------------------------------------- /file_map.json: -------------------------------------------------------------------------------- 1 | { 2 | "__future__": [ 3 | "Lib/__future__.py" 4 | ], 5 | "_abc": [ 6 | "Modules/_abc.c" 7 | ], 8 | "_aix_support": [ 9 | "Lib/_aix_support.py", 10 | "Modules/ld_so_aix.in", 11 | "Modules/makexp_aix" 12 | ], 13 | "_ast": [ 14 | "Python/Python-ast.c" 15 | ], 16 | "_asyncio": [ 17 | "Modules/_asynciomodule.c" 18 | ], 19 | "_bisect": [ 20 | "Modules/_bisectmodule.c" 21 | ], 22 | "_blake2": [ 23 | "Modules/_blake2/blake2b2s.py", 24 | "Modules/_blake2/blake2b_impl.c", 25 | "Modules/_blake2/blake2module.c", 26 | "Modules/_blake2/blake2ns.h", 27 | "Modules/_blake2/blake2s_impl.c", 28 | "Modules/_blake2/impl/blake2-config.h", 29 | "Modules/_blake2/impl/blake2-dispatch.c", 30 | "Modules/_blake2/impl/blake2-impl.h", 31 | "Modules/_blake2/impl/blake2-kat.h", 32 | "Modules/_blake2/impl/blake2.h", 33 | "Modules/_blake2/impl/blake2b-load-sse2.h", 34 | "Modules/_blake2/impl/blake2b-load-sse41.h", 35 | "Modules/_blake2/impl/blake2b-ref.c", 36 | "Modules/_blake2/impl/blake2b-round.h", 37 | "Modules/_blake2/impl/blake2b-test.c", 38 | "Modules/_blake2/impl/blake2b.c", 39 | "Modules/_blake2/impl/blake2bp-test.c", 40 | "Modules/_blake2/impl/blake2bp.c", 41 | "Modules/_blake2/impl/blake2s-load-sse2.h", 42 | "Modules/_blake2/impl/blake2s-load-sse41.h", 43 | "Modules/_blake2/impl/blake2s-load-xop.h", 44 | "Modules/_blake2/impl/blake2s-ref.c", 45 | "Modules/_blake2/impl/blake2s-round.h", 46 | "Modules/_blake2/impl/blake2s-test.c", 47 | "Modules/_blake2/impl/blake2s.c", 48 | "Modules/_blake2/impl/blake2sp-test.c", 49 | "Modules/_blake2/impl/blake2sp.c" 50 | ], 51 | "_bootsubprocess": [ 52 | "Lib/_bootsubprocess.py" 53 | ], 54 | "_bz2": [ 55 | "Modules/_bz2module.c" 56 | ], 57 | "_codecs": [ 58 | "Modules/_codecsmodule.c" 59 | ], 60 | "_codecs_cn": [ 61 | "Modules/cjkcodecs/_codecs_cn.c" 62 | ], 63 | "_codecs_hk": [ 64 | "Modules/cjkcodecs/_codecs_hk.c" 65 | ], 66 | "_codecs_iso2022": [ 67 | "Modules/cjkcodecs/_codecs_iso2022.c" 68 | ], 69 | "_codecs_jp": [ 70 | "Modules/cjkcodecs/_codecs_jp.c" 71 | ], 72 | "_codecs_kr": [ 73 | "Modules/cjkcodecs/_codecs_kr.c" 74 | ], 75 | "_codecs_tw": [ 76 | "Modules/cjkcodecs/_codecs_tw.c" 77 | ], 78 | "_collections": [ 79 | "Modules/_collectionsmodule.c" 80 | ], 81 | "_collections_abc": [ 82 | "Lib/_collections_abc.py" 83 | ], 84 | "_compat_pickle": [ 85 | "Lib/_compat_pickle.py" 86 | ], 87 | "_compression": [ 88 | "Lib/_compression.py" 89 | ], 90 | "_contextvars": [ 91 | "Modules/_contextvarsmodule.c" 92 | ], 93 | "_crypt": [ 94 | "Modules/_cryptmodule.c" 95 | ], 96 | "_csv": [ 97 | "Modules/_csv.c" 98 | ], 99 | "_ctypes": [ 100 | "Modules/_ctypes/_ctypes.c", 101 | "Modules/_ctypes/_ctypes_test.c", 102 | "Modules/_ctypes/_ctypes_test.h", 103 | "Modules/_ctypes/callbacks.c", 104 | "Modules/_ctypes/callproc.c", 105 | "Modules/_ctypes/cfield.c", 106 | "Modules/_ctypes/ctypes.h", 107 | "Modules/_ctypes/ctypes_dlfcn.h", 108 | "Modules/_ctypes/darwin/LICENSE", 109 | "Modules/_ctypes/darwin/README", 110 | "Modules/_ctypes/darwin/README.ctypes", 111 | "Modules/_ctypes/darwin/dlfcn.h", 112 | "Modules/_ctypes/darwin/dlfcn_simple.c", 113 | "Modules/_ctypes/libffi_osx/LICENSE", 114 | "Modules/_ctypes/libffi_osx/README", 115 | "Modules/_ctypes/libffi_osx/README.pyobjc", 116 | "Modules/_ctypes/libffi_osx/ffi.c", 117 | "Modules/_ctypes/libffi_osx/include/ffi.h", 118 | "Modules/_ctypes/libffi_osx/include/ffi_common.h", 119 | "Modules/_ctypes/libffi_osx/include/fficonfig.h", 120 | "Modules/_ctypes/libffi_osx/include/ffitarget.h", 121 | "Modules/_ctypes/libffi_osx/include/ppc-ffitarget.h", 122 | "Modules/_ctypes/libffi_osx/include/x86-ffitarget.h", 123 | "Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.S", 124 | "Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.h", 125 | "Modules/_ctypes/libffi_osx/powerpc/ppc-darwin_closure.S", 126 | "Modules/_ctypes/libffi_osx/powerpc/ppc-ffi_darwin.c", 127 | "Modules/_ctypes/libffi_osx/powerpc/ppc64-darwin_closure.S", 128 | "Modules/_ctypes/libffi_osx/types.c", 129 | "Modules/_ctypes/libffi_osx/x86/darwin64.S", 130 | "Modules/_ctypes/libffi_osx/x86/x86-darwin.S", 131 | "Modules/_ctypes/libffi_osx/x86/x86-ffi64.c", 132 | "Modules/_ctypes/libffi_osx/x86/x86-ffi_darwin.c", 133 | "Modules/_ctypes/malloc_closure.c", 134 | "Modules/_ctypes/stgdict.c" 135 | ], 136 | "_curses": [ 137 | "Modules/_cursesmodule.c" 138 | ], 139 | "_curses_panel": [ 140 | "Modules/_curses_panel.c" 141 | ], 142 | "_datetime": [ 143 | "Modules/_datetimemodule.c" 144 | ], 145 | "_dbm": [ 146 | "Modules/_dbmmodule.c" 147 | ], 148 | "_decimal": [ 149 | "Modules/_decimal/README.txt", 150 | "Modules/_decimal/_decimal.c", 151 | "Modules/_decimal/docstrings.h", 152 | "Modules/_decimal/libmpdec/README.txt", 153 | "Modules/_decimal/libmpdec/basearith.c", 154 | "Modules/_decimal/libmpdec/basearith.h", 155 | "Modules/_decimal/libmpdec/bits.h", 156 | "Modules/_decimal/libmpdec/constants.c", 157 | "Modules/_decimal/libmpdec/constants.h", 158 | "Modules/_decimal/libmpdec/context.c", 159 | "Modules/_decimal/libmpdec/convolute.c", 160 | "Modules/_decimal/libmpdec/convolute.h", 161 | "Modules/_decimal/libmpdec/crt.c", 162 | "Modules/_decimal/libmpdec/crt.h", 163 | "Modules/_decimal/libmpdec/difradix2.c", 164 | "Modules/_decimal/libmpdec/difradix2.h", 165 | "Modules/_decimal/libmpdec/fnt.c", 166 | "Modules/_decimal/libmpdec/fnt.h", 167 | "Modules/_decimal/libmpdec/fourstep.c", 168 | "Modules/_decimal/libmpdec/fourstep.h", 169 | "Modules/_decimal/libmpdec/io.c", 170 | "Modules/_decimal/libmpdec/io.h", 171 | "Modules/_decimal/libmpdec/literature/REFERENCES.txt", 172 | "Modules/_decimal/libmpdec/literature/bignum.txt", 173 | "Modules/_decimal/libmpdec/literature/fnt.py", 174 | "Modules/_decimal/libmpdec/literature/matrix-transform.txt", 175 | "Modules/_decimal/libmpdec/literature/mulmod-64.txt", 176 | "Modules/_decimal/libmpdec/literature/mulmod-ppro.txt", 177 | "Modules/_decimal/libmpdec/literature/six-step.txt", 178 | "Modules/_decimal/libmpdec/literature/umodarith.lisp", 179 | "Modules/_decimal/libmpdec/mpalloc.c", 180 | "Modules/_decimal/libmpdec/mpalloc.h", 181 | "Modules/_decimal/libmpdec/mpdecimal.c", 182 | "Modules/_decimal/libmpdec/mpdecimal.h", 183 | "Modules/_decimal/libmpdec/numbertheory.c", 184 | "Modules/_decimal/libmpdec/numbertheory.h", 185 | "Modules/_decimal/libmpdec/sixstep.c", 186 | "Modules/_decimal/libmpdec/sixstep.h", 187 | "Modules/_decimal/libmpdec/transpose.c", 188 | "Modules/_decimal/libmpdec/transpose.h", 189 | "Modules/_decimal/libmpdec/typearith.h", 190 | "Modules/_decimal/libmpdec/umodarith.h", 191 | "Modules/_decimal/libmpdec/vccompat.h", 192 | "Modules/_decimal/libmpdec/vcdiv64.asm" 193 | ], 194 | "_elementtree": [ 195 | "Modules/_elementtree.c" 196 | ], 197 | "_functools": [ 198 | "Modules/_functoolsmodule.c" 199 | ], 200 | "_gdbm": [ 201 | "Modules/_gdbmmodule.c" 202 | ], 203 | "_hashlib": [ 204 | "Modules/_hashopenssl.c" 205 | ], 206 | "_heapq": [ 207 | "Modules/_heapqmodule.c" 208 | ], 209 | "_imp": [ 210 | "Python/import.c" 211 | ], 212 | "_io": [ 213 | "Modules/_io/_iomodule.c", 214 | "Modules/_io/_iomodule.h", 215 | "Modules/_io/bufferedio.c", 216 | "Modules/_io/bytesio.c", 217 | "Modules/_io/fileio.c", 218 | "Modules/_io/iobase.c", 219 | "Modules/_io/stringio.c", 220 | "Modules/_io/textio.c", 221 | "Modules/_io/winconsoleio.c" 222 | ], 223 | "_json": [ 224 | "Modules/_json.c" 225 | ], 226 | "_locale": [ 227 | "Modules/_localemodule.c" 228 | ], 229 | "_lsprof": [ 230 | "Modules/_lsprof.c", 231 | "Modules/rotatingtree.c", 232 | "Modules/rotatingtree.h" 233 | ], 234 | "_lzma": [ 235 | "Modules/_lzmamodule.c" 236 | ], 237 | "_markupbase": [ 238 | "Lib/_markupbase.py" 239 | ], 240 | "_md5": [ 241 | "Modules/md5module.c" 242 | ], 243 | "_msi": [ 244 | "PC/_msi.c" 245 | ], 246 | "_multibytecodec": [ 247 | "Modules/cjkcodecs/multibytecodec.c", 248 | "Modules/cjkcodecs/multibytecodec.h" 249 | ], 250 | "_multiprocessing": [ 251 | "Modules/_multiprocessing/multiprocessing.c", 252 | "Modules/_multiprocessing/multiprocessing.h", 253 | "Modules/_multiprocessing/semaphore.c" 254 | ], 255 | "_opcode": [ 256 | "Modules/_opcode.c" 257 | ], 258 | "_operator": [ 259 | "Modules/_operator.c" 260 | ], 261 | "_osx_support": [ 262 | "Lib/_osx_support.py" 263 | ], 264 | "_pickle": [ 265 | "Modules/_pickle.c" 266 | ], 267 | "_posixshmem": [ 268 | "Modules/_multiprocessing/posixshmem.c" 269 | ], 270 | "_posixsubprocess": [ 271 | "Modules/_posixsubprocess.c" 272 | ], 273 | "_py_abc": [ 274 | "Lib/_py_abc.py" 275 | ], 276 | "_pydecimal": [ 277 | "Lib/_pydecimal.py" 278 | ], 279 | "_pyio": [ 280 | "Lib/_pyio.py" 281 | ], 282 | "_queue": [ 283 | "Modules/_queuemodule.c" 284 | ], 285 | "_random": [ 286 | "Modules/_randommodule.c" 287 | ], 288 | "_sha1": [ 289 | "Modules/sha1module.c" 290 | ], 291 | "_sha256": [ 292 | "Modules/sha256module.c" 293 | ], 294 | "_sha3": [ 295 | "Modules/_sha3/README.txt", 296 | "Modules/_sha3/cleanup.py", 297 | "Modules/_sha3/kcp/KeccakHash.c", 298 | "Modules/_sha3/kcp/KeccakHash.h", 299 | "Modules/_sha3/kcp/KeccakP-1600-64.macros", 300 | "Modules/_sha3/kcp/KeccakP-1600-SnP-opt32.h", 301 | "Modules/_sha3/kcp/KeccakP-1600-SnP-opt64.h", 302 | "Modules/_sha3/kcp/KeccakP-1600-SnP.h", 303 | "Modules/_sha3/kcp/KeccakP-1600-inplace32BI.c", 304 | "Modules/_sha3/kcp/KeccakP-1600-opt64-config.h", 305 | "Modules/_sha3/kcp/KeccakP-1600-opt64.c", 306 | "Modules/_sha3/kcp/KeccakP-1600-unrolling.macros", 307 | "Modules/_sha3/kcp/KeccakSponge.c", 308 | "Modules/_sha3/kcp/KeccakSponge.h", 309 | "Modules/_sha3/kcp/KeccakSponge.inc", 310 | "Modules/_sha3/kcp/PlSnP-Fallback.inc", 311 | "Modules/_sha3/kcp/SnP-Relaned.h", 312 | "Modules/_sha3/kcp/align.h", 313 | "Modules/_sha3/sha3module.c" 314 | ], 315 | "_sha512": [ 316 | "Modules/sha512module.c" 317 | ], 318 | "_signal": [ 319 | "Modules/signalmodule.c" 320 | ], 321 | "_sitebuiltins": [ 322 | "Lib/_sitebuiltins.py" 323 | ], 324 | "_socket": [ 325 | "Modules/addrinfo.h", 326 | "Modules/getaddrinfo.c", 327 | "Modules/getnameinfo.c", 328 | "Modules/socketmodule.c", 329 | "Modules/socketmodule.h" 330 | ], 331 | "_sqlite3": [ 332 | "Modules/_sqlite/cache.c", 333 | "Modules/_sqlite/cache.h", 334 | "Modules/_sqlite/connection.c", 335 | "Modules/_sqlite/connection.h", 336 | "Modules/_sqlite/cursor.c", 337 | "Modules/_sqlite/cursor.h", 338 | "Modules/_sqlite/microprotocols.c", 339 | "Modules/_sqlite/microprotocols.h", 340 | "Modules/_sqlite/module.c", 341 | "Modules/_sqlite/module.h", 342 | "Modules/_sqlite/prepare_protocol.c", 343 | "Modules/_sqlite/prepare_protocol.h", 344 | "Modules/_sqlite/row.c", 345 | "Modules/_sqlite/row.h", 346 | "Modules/_sqlite/statement.c", 347 | "Modules/_sqlite/statement.h", 348 | "Modules/_sqlite/util.c", 349 | "Modules/_sqlite/util.h" 350 | ], 351 | "_sre": [ 352 | "Modules/_sre.c", 353 | "Modules/sre.h", 354 | "Modules/sre_lib.h" 355 | ], 356 | "_ssl": [ 357 | "Modules/_ssl.c", 358 | "Modules/_ssl/debughelpers.c", 359 | "Modules/_ssl_data.h" 360 | ], 361 | "_stat": [ 362 | "Modules/_stat.c" 363 | ], 364 | "_statistics": [ 365 | "Modules/_statisticsmodule.c" 366 | ], 367 | "_string": [ 368 | "Objects/unicodeobject.c" 369 | ], 370 | "_strptime": [ 371 | "Lib/_strptime.py" 372 | ], 373 | "_struct": [ 374 | "Modules/_struct.c" 375 | ], 376 | "_symtable": [ 377 | "Modules/symtablemodule.c" 378 | ], 379 | "_thread": [ 380 | "Modules/_threadmodule.c" 381 | ], 382 | "_threading_local": [ 383 | "Lib/_threading_local.py" 384 | ], 385 | "_tkinter": [ 386 | "Modules/_tkinter.c", 387 | "Modules/tkappinit.c" 388 | ], 389 | "_tracemalloc": [ 390 | "Modules/_tracemalloc.c" 391 | ], 392 | "_uuid": [ 393 | "Modules/_uuidmodule.c" 394 | ], 395 | "_warnings": [ 396 | "Python/_warnings.c" 397 | ], 398 | "_weakref": [ 399 | "Modules/_weakref.c" 400 | ], 401 | "_weakrefset": [ 402 | "Lib/_weakrefset.py" 403 | ], 404 | "_winapi": [ 405 | "Modules/_winapi.c", 406 | "Modules/overlapped.c", 407 | "Modules/winreparse.h" 408 | ], 409 | "_zoneinfo": [ 410 | "Modules/_zoneinfo.c" 411 | ], 412 | "abc": [ 413 | "Lib/abc.py" 414 | ], 415 | "aifc": [ 416 | "Lib/aifc.py" 417 | ], 418 | "antigravity": [ 419 | "Lib/antigravity.py" 420 | ], 421 | "argparse": [ 422 | "Lib/argparse.py" 423 | ], 424 | "array": [ 425 | "Modules/arraymodule.c" 426 | ], 427 | "ast": [ 428 | "Lib/ast.py" 429 | ], 430 | "asynchat": [ 431 | "Lib/asynchat.py" 432 | ], 433 | "asyncio": [ 434 | "Lib/asyncio/__init__.py", 435 | "Lib/asyncio/__main__.py", 436 | "Lib/asyncio/base_events.py", 437 | "Lib/asyncio/base_futures.py", 438 | "Lib/asyncio/base_subprocess.py", 439 | "Lib/asyncio/base_tasks.py", 440 | "Lib/asyncio/constants.py", 441 | "Lib/asyncio/coroutines.py", 442 | "Lib/asyncio/events.py", 443 | "Lib/asyncio/exceptions.py", 444 | "Lib/asyncio/format_helpers.py", 445 | "Lib/asyncio/futures.py", 446 | "Lib/asyncio/locks.py", 447 | "Lib/asyncio/log.py", 448 | "Lib/asyncio/mixins.py", 449 | "Lib/asyncio/proactor_events.py", 450 | "Lib/asyncio/protocols.py", 451 | "Lib/asyncio/queues.py", 452 | "Lib/asyncio/runners.py", 453 | "Lib/asyncio/selector_events.py", 454 | "Lib/asyncio/sslproto.py", 455 | "Lib/asyncio/staggered.py", 456 | "Lib/asyncio/streams.py", 457 | "Lib/asyncio/subprocess.py", 458 | "Lib/asyncio/tasks.py", 459 | "Lib/asyncio/threads.py", 460 | "Lib/asyncio/transports.py", 461 | "Lib/asyncio/trsock.py", 462 | "Lib/asyncio/unix_events.py", 463 | "Lib/asyncio/windows_events.py", 464 | "Lib/asyncio/windows_utils.py", 465 | "Modules/overlapped.c" 466 | ], 467 | "asyncore": [ 468 | "Lib/asyncore.py" 469 | ], 470 | "atexit": [ 471 | "Modules/atexitmodule.c" 472 | ], 473 | "audioop": [ 474 | "Modules/audioop.c" 475 | ], 476 | "base64": [ 477 | "Lib/base64.py" 478 | ], 479 | "bdb": [ 480 | "Lib/bdb.py" 481 | ], 482 | "binascii": [ 483 | "Modules/binascii.c" 484 | ], 485 | "binhex": [ 486 | "Lib/binhex.py" 487 | ], 488 | "bisect": [ 489 | "Lib/bisect.py" 490 | ], 491 | "builtins": [ 492 | "Python/bltinmodule.c" 493 | ], 494 | "bz2": [ 495 | "Lib/bz2.py" 496 | ], 497 | "cProfile": [ 498 | "Lib/cProfile.py" 499 | ], 500 | "calendar": [ 501 | "Lib/calendar.py" 502 | ], 503 | "cgi": [ 504 | "Lib/cgi.py" 505 | ], 506 | "cgitb": [ 507 | "Lib/cgitb.py" 508 | ], 509 | "chunk": [ 510 | "Lib/chunk.py" 511 | ], 512 | "cmath": [ 513 | "Modules/_math.c", 514 | "Modules/_math.h", 515 | "Modules/cmathmodule.c" 516 | ], 517 | "cmd": [ 518 | "Lib/cmd.py" 519 | ], 520 | "code": [ 521 | "Lib/code.py" 522 | ], 523 | "codecs": [ 524 | "Lib/codecs.py" 525 | ], 526 | "codeop": [ 527 | "Lib/codeop.py" 528 | ], 529 | "collections": [ 530 | "Lib/collections/__init__.py", 531 | "Lib/collections/abc.py" 532 | ], 533 | "colorsys": [ 534 | "Lib/colorsys.py" 535 | ], 536 | "compileall": [ 537 | "Lib/compileall.py" 538 | ], 539 | "concurrent": [ 540 | "Lib/concurrent/__init__.py", 541 | "Lib/concurrent/futures/__init__.py", 542 | "Lib/concurrent/futures/_base.py", 543 | "Lib/concurrent/futures/process.py", 544 | "Lib/concurrent/futures/thread.py" 545 | ], 546 | "configparser": [ 547 | "Lib/configparser.py" 548 | ], 549 | "contextlib": [ 550 | "Lib/contextlib.py" 551 | ], 552 | "contextvars": [ 553 | "Lib/contextvars.py" 554 | ], 555 | "copy": [ 556 | "Lib/copy.py" 557 | ], 558 | "copyreg": [ 559 | "Lib/copyreg.py" 560 | ], 561 | "crypt": [ 562 | "Lib/crypt.py" 563 | ], 564 | "csv": [ 565 | "Lib/csv.py" 566 | ], 567 | "ctypes": [ 568 | "Lib/ctypes/__init__.py", 569 | "Lib/ctypes/_aix.py", 570 | "Lib/ctypes/_endian.py", 571 | "Lib/ctypes/macholib/README.ctypes", 572 | "Lib/ctypes/macholib/__init__.py", 573 | "Lib/ctypes/macholib/dyld.py", 574 | "Lib/ctypes/macholib/dylib.py", 575 | "Lib/ctypes/macholib/fetch_macholib", 576 | "Lib/ctypes/macholib/fetch_macholib.bat", 577 | "Lib/ctypes/macholib/framework.py", 578 | "Lib/ctypes/util.py", 579 | "Lib/ctypes/wintypes.py" 580 | ], 581 | "curses": [ 582 | "Lib/curses/__init__.py", 583 | "Lib/curses/ascii.py", 584 | "Lib/curses/has_key.py", 585 | "Lib/curses/panel.py", 586 | "Lib/curses/textpad.py" 587 | ], 588 | "dataclasses": [ 589 | "Lib/dataclasses.py" 590 | ], 591 | "datetime": [ 592 | "Lib/datetime.py" 593 | ], 594 | "dbm": [ 595 | "Lib/dbm/__init__.py", 596 | "Lib/dbm/dumb.py", 597 | "Lib/dbm/gnu.py", 598 | "Lib/dbm/ndbm.py" 599 | ], 600 | "decimal": [ 601 | "Lib/decimal.py" 602 | ], 603 | "difflib": [ 604 | "Lib/difflib.py" 605 | ], 606 | "dis": [ 607 | "Lib/dis.py" 608 | ], 609 | "distutils": [ 610 | "Lib/distutils/README", 611 | "Lib/distutils/__init__.py", 612 | "Lib/distutils/_msvccompiler.py", 613 | "Lib/distutils/archive_util.py", 614 | "Lib/distutils/bcppcompiler.py", 615 | "Lib/distutils/ccompiler.py", 616 | "Lib/distutils/cmd.py", 617 | "Lib/distutils/command/__init__.py", 618 | "Lib/distutils/command/bdist.py", 619 | "Lib/distutils/command/bdist_dumb.py", 620 | "Lib/distutils/command/bdist_msi.py", 621 | "Lib/distutils/command/bdist_rpm.py", 622 | "Lib/distutils/command/build.py", 623 | "Lib/distutils/command/build_clib.py", 624 | "Lib/distutils/command/build_ext.py", 625 | "Lib/distutils/command/build_py.py", 626 | "Lib/distutils/command/build_scripts.py", 627 | "Lib/distutils/command/check.py", 628 | "Lib/distutils/command/clean.py", 629 | "Lib/distutils/command/command_template", 630 | "Lib/distutils/command/config.py", 631 | "Lib/distutils/command/install.py", 632 | "Lib/distutils/command/install_data.py", 633 | "Lib/distutils/command/install_egg_info.py", 634 | "Lib/distutils/command/install_headers.py", 635 | "Lib/distutils/command/install_lib.py", 636 | "Lib/distutils/command/install_scripts.py", 637 | "Lib/distutils/command/register.py", 638 | "Lib/distutils/command/sdist.py", 639 | "Lib/distutils/command/upload.py", 640 | "Lib/distutils/config.py", 641 | "Lib/distutils/core.py", 642 | "Lib/distutils/cygwinccompiler.py", 643 | "Lib/distutils/debug.py", 644 | "Lib/distutils/dep_util.py", 645 | "Lib/distutils/dir_util.py", 646 | "Lib/distutils/dist.py", 647 | "Lib/distutils/errors.py", 648 | "Lib/distutils/extension.py", 649 | "Lib/distutils/fancy_getopt.py", 650 | "Lib/distutils/file_util.py", 651 | "Lib/distutils/filelist.py", 652 | "Lib/distutils/log.py", 653 | "Lib/distutils/msvc9compiler.py", 654 | "Lib/distutils/msvccompiler.py", 655 | "Lib/distutils/spawn.py", 656 | "Lib/distutils/sysconfig.py", 657 | "Lib/distutils/text_file.py", 658 | "Lib/distutils/unixccompiler.py", 659 | "Lib/distutils/util.py", 660 | "Lib/distutils/version.py", 661 | "Lib/distutils/versionpredicate.py" 662 | ], 663 | "doctest": [ 664 | "Lib/doctest.py" 665 | ], 666 | "email": [ 667 | "Lib/email/__init__.py", 668 | "Lib/email/_encoded_words.py", 669 | "Lib/email/_header_value_parser.py", 670 | "Lib/email/_parseaddr.py", 671 | "Lib/email/_policybase.py", 672 | "Lib/email/architecture.rst", 673 | "Lib/email/base64mime.py", 674 | "Lib/email/charset.py", 675 | "Lib/email/contentmanager.py", 676 | "Lib/email/encoders.py", 677 | "Lib/email/errors.py", 678 | "Lib/email/feedparser.py", 679 | "Lib/email/generator.py", 680 | "Lib/email/header.py", 681 | "Lib/email/headerregistry.py", 682 | "Lib/email/iterators.py", 683 | "Lib/email/message.py", 684 | "Lib/email/mime/__init__.py", 685 | "Lib/email/mime/application.py", 686 | "Lib/email/mime/audio.py", 687 | "Lib/email/mime/base.py", 688 | "Lib/email/mime/image.py", 689 | "Lib/email/mime/message.py", 690 | "Lib/email/mime/multipart.py", 691 | "Lib/email/mime/nonmultipart.py", 692 | "Lib/email/mime/text.py", 693 | "Lib/email/parser.py", 694 | "Lib/email/policy.py", 695 | "Lib/email/quoprimime.py", 696 | "Lib/email/utils.py" 697 | ], 698 | "encodings": [ 699 | "Lib/encodings/__init__.py", 700 | "Lib/encodings/aliases.py", 701 | "Lib/encodings/ascii.py", 702 | "Lib/encodings/base64_codec.py", 703 | "Lib/encodings/big5.py", 704 | "Lib/encodings/big5hkscs.py", 705 | "Lib/encodings/bz2_codec.py", 706 | "Lib/encodings/charmap.py", 707 | "Lib/encodings/cp037.py", 708 | "Lib/encodings/cp1006.py", 709 | "Lib/encodings/cp1026.py", 710 | "Lib/encodings/cp1125.py", 711 | "Lib/encodings/cp1140.py", 712 | "Lib/encodings/cp1250.py", 713 | "Lib/encodings/cp1251.py", 714 | "Lib/encodings/cp1252.py", 715 | "Lib/encodings/cp1253.py", 716 | "Lib/encodings/cp1254.py", 717 | "Lib/encodings/cp1255.py", 718 | "Lib/encodings/cp1256.py", 719 | "Lib/encodings/cp1257.py", 720 | "Lib/encodings/cp1258.py", 721 | "Lib/encodings/cp273.py", 722 | "Lib/encodings/cp424.py", 723 | "Lib/encodings/cp437.py", 724 | "Lib/encodings/cp500.py", 725 | "Lib/encodings/cp720.py", 726 | "Lib/encodings/cp737.py", 727 | "Lib/encodings/cp775.py", 728 | "Lib/encodings/cp850.py", 729 | "Lib/encodings/cp852.py", 730 | "Lib/encodings/cp855.py", 731 | "Lib/encodings/cp856.py", 732 | "Lib/encodings/cp857.py", 733 | "Lib/encodings/cp858.py", 734 | "Lib/encodings/cp860.py", 735 | "Lib/encodings/cp861.py", 736 | "Lib/encodings/cp862.py", 737 | "Lib/encodings/cp863.py", 738 | "Lib/encodings/cp864.py", 739 | "Lib/encodings/cp865.py", 740 | "Lib/encodings/cp866.py", 741 | "Lib/encodings/cp869.py", 742 | "Lib/encodings/cp874.py", 743 | "Lib/encodings/cp875.py", 744 | "Lib/encodings/cp932.py", 745 | "Lib/encodings/cp949.py", 746 | "Lib/encodings/cp950.py", 747 | "Lib/encodings/euc_jis_2004.py", 748 | "Lib/encodings/euc_jisx0213.py", 749 | "Lib/encodings/euc_jp.py", 750 | "Lib/encodings/euc_kr.py", 751 | "Lib/encodings/gb18030.py", 752 | "Lib/encodings/gb2312.py", 753 | "Lib/encodings/gbk.py", 754 | "Lib/encodings/hex_codec.py", 755 | "Lib/encodings/hp_roman8.py", 756 | "Lib/encodings/hz.py", 757 | "Lib/encodings/idna.py", 758 | "Lib/encodings/iso2022_jp.py", 759 | "Lib/encodings/iso2022_jp_1.py", 760 | "Lib/encodings/iso2022_jp_2.py", 761 | "Lib/encodings/iso2022_jp_2004.py", 762 | "Lib/encodings/iso2022_jp_3.py", 763 | "Lib/encodings/iso2022_jp_ext.py", 764 | "Lib/encodings/iso2022_kr.py", 765 | "Lib/encodings/iso8859_1.py", 766 | "Lib/encodings/iso8859_10.py", 767 | "Lib/encodings/iso8859_11.py", 768 | "Lib/encodings/iso8859_13.py", 769 | "Lib/encodings/iso8859_14.py", 770 | "Lib/encodings/iso8859_15.py", 771 | "Lib/encodings/iso8859_16.py", 772 | "Lib/encodings/iso8859_2.py", 773 | "Lib/encodings/iso8859_3.py", 774 | "Lib/encodings/iso8859_4.py", 775 | "Lib/encodings/iso8859_5.py", 776 | "Lib/encodings/iso8859_6.py", 777 | "Lib/encodings/iso8859_7.py", 778 | "Lib/encodings/iso8859_8.py", 779 | "Lib/encodings/iso8859_9.py", 780 | "Lib/encodings/johab.py", 781 | "Lib/encodings/koi8_r.py", 782 | "Lib/encodings/koi8_t.py", 783 | "Lib/encodings/koi8_u.py", 784 | "Lib/encodings/kz1048.py", 785 | "Lib/encodings/latin_1.py", 786 | "Lib/encodings/mac_arabic.py", 787 | "Lib/encodings/mac_croatian.py", 788 | "Lib/encodings/mac_cyrillic.py", 789 | "Lib/encodings/mac_farsi.py", 790 | "Lib/encodings/mac_greek.py", 791 | "Lib/encodings/mac_iceland.py", 792 | "Lib/encodings/mac_latin2.py", 793 | "Lib/encodings/mac_roman.py", 794 | "Lib/encodings/mac_romanian.py", 795 | "Lib/encodings/mac_turkish.py", 796 | "Lib/encodings/mbcs.py", 797 | "Lib/encodings/oem.py", 798 | "Lib/encodings/palmos.py", 799 | "Lib/encodings/ptcp154.py", 800 | "Lib/encodings/punycode.py", 801 | "Lib/encodings/quopri_codec.py", 802 | "Lib/encodings/raw_unicode_escape.py", 803 | "Lib/encodings/rot_13.py", 804 | "Lib/encodings/shift_jis.py", 805 | "Lib/encodings/shift_jis_2004.py", 806 | "Lib/encodings/shift_jisx0213.py", 807 | "Lib/encodings/tis_620.py", 808 | "Lib/encodings/undefined.py", 809 | "Lib/encodings/unicode_escape.py", 810 | "Lib/encodings/utf_16.py", 811 | "Lib/encodings/utf_16_be.py", 812 | "Lib/encodings/utf_16_le.py", 813 | "Lib/encodings/utf_32.py", 814 | "Lib/encodings/utf_32_be.py", 815 | "Lib/encodings/utf_32_le.py", 816 | "Lib/encodings/utf_7.py", 817 | "Lib/encodings/utf_8.py", 818 | "Lib/encodings/utf_8_sig.py", 819 | "Lib/encodings/uu_codec.py", 820 | "Lib/encodings/zlib_codec.py", 821 | "Modules/cjkcodecs/README", 822 | "Modules/cjkcodecs/_codecs_cn.c", 823 | "Modules/cjkcodecs/_codecs_hk.c", 824 | "Modules/cjkcodecs/_codecs_iso2022.c", 825 | "Modules/cjkcodecs/_codecs_jp.c", 826 | "Modules/cjkcodecs/_codecs_kr.c", 827 | "Modules/cjkcodecs/_codecs_tw.c", 828 | "Modules/cjkcodecs/alg_jisx0201.h", 829 | "Modules/cjkcodecs/cjkcodecs.h", 830 | "Modules/cjkcodecs/emu_jisx0213_2000.h", 831 | "Modules/cjkcodecs/mappings_cn.h", 832 | "Modules/cjkcodecs/mappings_hk.h", 833 | "Modules/cjkcodecs/mappings_jisx0213_pair.h", 834 | "Modules/cjkcodecs/mappings_jp.h", 835 | "Modules/cjkcodecs/mappings_kr.h", 836 | "Modules/cjkcodecs/mappings_tw.h", 837 | "Modules/cjkcodecs/multibytecodec.c", 838 | "Modules/cjkcodecs/multibytecodec.h" 839 | ], 840 | "ensurepip": [ 841 | "Lib/ensurepip/__init__.py", 842 | "Lib/ensurepip/__main__.py", 843 | "Lib/ensurepip/_bundled/__init__.py", 844 | "Lib/ensurepip/_bundled/pip-21.0.1-py3-none-any.whl", 845 | "Lib/ensurepip/_bundled/setuptools-52.0.0-py3-none-any.whl", 846 | "Lib/ensurepip/_uninstall.py" 847 | ], 848 | "enum": [ 849 | "Lib/enum.py" 850 | ], 851 | "errno": [ 852 | "Modules/errnomodule.c" 853 | ], 854 | "faulthandler": [ 855 | "Modules/faulthandler.c" 856 | ], 857 | "fcntl": [ 858 | "Modules/fcntlmodule.c" 859 | ], 860 | "filecmp": [ 861 | "Lib/filecmp.py" 862 | ], 863 | "fileinput": [ 864 | "Lib/fileinput.py" 865 | ], 866 | "fnmatch": [ 867 | "Lib/fnmatch.py" 868 | ], 869 | "fractions": [ 870 | "Lib/fractions.py" 871 | ], 872 | "ftplib": [ 873 | "Lib/ftplib.py" 874 | ], 875 | "functools": [ 876 | "Lib/functools.py" 877 | ], 878 | "gc": [ 879 | "Modules/gcmodule.c" 880 | ], 881 | "genericpath": [ 882 | "Lib/genericpath.py" 883 | ], 884 | "getopt": [ 885 | "Lib/getopt.py" 886 | ], 887 | "getpass": [ 888 | "Lib/getpass.py" 889 | ], 890 | "gettext": [ 891 | "Lib/gettext.py" 892 | ], 893 | "glob": [ 894 | "Lib/glob.py" 895 | ], 896 | "graphlib": [ 897 | "Lib/graphlib.py" 898 | ], 899 | "grp": [ 900 | "Modules/grpmodule.c" 901 | ], 902 | "gzip": [ 903 | "Lib/gzip.py" 904 | ], 905 | "hashlib": [ 906 | "Lib/hashlib.py", 907 | "Modules/hashlib.h" 908 | ], 909 | "heapq": [ 910 | "Lib/heapq.py" 911 | ], 912 | "hmac": [ 913 | "Lib/hmac.py" 914 | ], 915 | "html": [ 916 | "Lib/html/__init__.py", 917 | "Lib/html/entities.py", 918 | "Lib/html/parser.py" 919 | ], 920 | "http": [ 921 | "Lib/http/__init__.py", 922 | "Lib/http/client.py", 923 | "Lib/http/cookiejar.py", 924 | "Lib/http/cookies.py", 925 | "Lib/http/server.py" 926 | ], 927 | "idlelib": [ 928 | "Lib/idlelib/CREDITS.txt", 929 | "Lib/idlelib/ChangeLog", 930 | "Lib/idlelib/HISTORY.txt", 931 | "Lib/idlelib/Icons/README.txt", 932 | "Lib/idlelib/Icons/folder.gif", 933 | "Lib/idlelib/Icons/idle.ico", 934 | "Lib/idlelib/Icons/idle_16.gif", 935 | "Lib/idlelib/Icons/idle_16.png", 936 | "Lib/idlelib/Icons/idle_256.png", 937 | "Lib/idlelib/Icons/idle_32.gif", 938 | "Lib/idlelib/Icons/idle_32.png", 939 | "Lib/idlelib/Icons/idle_48.gif", 940 | "Lib/idlelib/Icons/idle_48.png", 941 | "Lib/idlelib/Icons/minusnode.gif", 942 | "Lib/idlelib/Icons/openfolder.gif", 943 | "Lib/idlelib/Icons/plusnode.gif", 944 | "Lib/idlelib/Icons/python.gif", 945 | "Lib/idlelib/Icons/tk.gif", 946 | "Lib/idlelib/NEWS.txt", 947 | "Lib/idlelib/NEWS2x.txt", 948 | "Lib/idlelib/README.txt", 949 | "Lib/idlelib/TODO.txt", 950 | "Lib/idlelib/__init__.py", 951 | "Lib/idlelib/__main__.py", 952 | "Lib/idlelib/autocomplete.py", 953 | "Lib/idlelib/autocomplete_w.py", 954 | "Lib/idlelib/autoexpand.py", 955 | "Lib/idlelib/browser.py", 956 | "Lib/idlelib/calltip.py", 957 | "Lib/idlelib/calltip_w.py", 958 | "Lib/idlelib/codecontext.py", 959 | "Lib/idlelib/colorizer.py", 960 | "Lib/idlelib/config-extensions.def", 961 | "Lib/idlelib/config-highlight.def", 962 | "Lib/idlelib/config-keys.def", 963 | "Lib/idlelib/config-main.def", 964 | "Lib/idlelib/config.py", 965 | "Lib/idlelib/config_key.py", 966 | "Lib/idlelib/configdialog.py", 967 | "Lib/idlelib/debugger.py", 968 | "Lib/idlelib/debugger_r.py", 969 | "Lib/idlelib/debugobj.py", 970 | "Lib/idlelib/debugobj_r.py", 971 | "Lib/idlelib/delegator.py", 972 | "Lib/idlelib/dynoption.py", 973 | "Lib/idlelib/editor.py", 974 | "Lib/idlelib/extend.txt", 975 | "Lib/idlelib/filelist.py", 976 | "Lib/idlelib/format.py", 977 | "Lib/idlelib/grep.py", 978 | "Lib/idlelib/help.html", 979 | "Lib/idlelib/help.py", 980 | "Lib/idlelib/help_about.py", 981 | "Lib/idlelib/history.py", 982 | "Lib/idlelib/hyperparser.py", 983 | "Lib/idlelib/idle.bat", 984 | "Lib/idlelib/idle.py", 985 | "Lib/idlelib/idle.pyw", 986 | "Lib/idlelib/iomenu.py", 987 | "Lib/idlelib/macosx.py", 988 | "Lib/idlelib/mainmenu.py", 989 | "Lib/idlelib/multicall.py", 990 | "Lib/idlelib/outwin.py", 991 | "Lib/idlelib/parenmatch.py", 992 | "Lib/idlelib/pathbrowser.py", 993 | "Lib/idlelib/percolator.py", 994 | "Lib/idlelib/pyparse.py", 995 | "Lib/idlelib/pyshell.py", 996 | "Lib/idlelib/query.py", 997 | "Lib/idlelib/redirector.py", 998 | "Lib/idlelib/replace.py", 999 | "Lib/idlelib/rpc.py", 1000 | "Lib/idlelib/run.py", 1001 | "Lib/idlelib/runscript.py", 1002 | "Lib/idlelib/scrolledlist.py", 1003 | "Lib/idlelib/search.py", 1004 | "Lib/idlelib/searchbase.py", 1005 | "Lib/idlelib/searchengine.py", 1006 | "Lib/idlelib/sidebar.py", 1007 | "Lib/idlelib/squeezer.py", 1008 | "Lib/idlelib/stackviewer.py", 1009 | "Lib/idlelib/statusbar.py", 1010 | "Lib/idlelib/textview.py", 1011 | "Lib/idlelib/tooltip.py", 1012 | "Lib/idlelib/tree.py", 1013 | "Lib/idlelib/undo.py", 1014 | "Lib/idlelib/window.py", 1015 | "Lib/idlelib/zoomheight.py", 1016 | "Lib/idlelib/zzdummy.py" 1017 | ], 1018 | "imaplib": [ 1019 | "Lib/imaplib.py" 1020 | ], 1021 | "imghdr": [ 1022 | "Lib/imghdr.py" 1023 | ], 1024 | "imp": [ 1025 | "Lib/imp.py" 1026 | ], 1027 | "importlib": [ 1028 | "Lib/importlib/__init__.py", 1029 | "Lib/importlib/_abc.py", 1030 | "Lib/importlib/_bootstrap.py", 1031 | "Lib/importlib/_bootstrap_external.py", 1032 | "Lib/importlib/_common.py", 1033 | "Lib/importlib/abc.py", 1034 | "Lib/importlib/machinery.py", 1035 | "Lib/importlib/metadata.py", 1036 | "Lib/importlib/readers.py", 1037 | "Lib/importlib/resources.py", 1038 | "Lib/importlib/util.py" 1039 | ], 1040 | "inspect": [ 1041 | "Lib/inspect.py" 1042 | ], 1043 | "io": [ 1044 | "Lib/io.py" 1045 | ], 1046 | "ipaddress": [ 1047 | "Lib/ipaddress.py" 1048 | ], 1049 | "itertools": [ 1050 | "Modules/itertoolsmodule.c" 1051 | ], 1052 | "json": [ 1053 | "Lib/json/__init__.py", 1054 | "Lib/json/decoder.py", 1055 | "Lib/json/encoder.py", 1056 | "Lib/json/scanner.py", 1057 | "Lib/json/tool.py" 1058 | ], 1059 | "keyword": [ 1060 | "Lib/keyword.py" 1061 | ], 1062 | "lib2to3": [ 1063 | "Lib/lib2to3/Grammar.txt", 1064 | "Lib/lib2to3/PatternGrammar.txt", 1065 | "Lib/lib2to3/__init__.py", 1066 | "Lib/lib2to3/__main__.py", 1067 | "Lib/lib2to3/btm_matcher.py", 1068 | "Lib/lib2to3/btm_utils.py", 1069 | "Lib/lib2to3/fixer_base.py", 1070 | "Lib/lib2to3/fixer_util.py", 1071 | "Lib/lib2to3/fixes/__init__.py", 1072 | "Lib/lib2to3/fixes/fix_apply.py", 1073 | "Lib/lib2to3/fixes/fix_asserts.py", 1074 | "Lib/lib2to3/fixes/fix_basestring.py", 1075 | "Lib/lib2to3/fixes/fix_buffer.py", 1076 | "Lib/lib2to3/fixes/fix_dict.py", 1077 | "Lib/lib2to3/fixes/fix_except.py", 1078 | "Lib/lib2to3/fixes/fix_exec.py", 1079 | "Lib/lib2to3/fixes/fix_execfile.py", 1080 | "Lib/lib2to3/fixes/fix_exitfunc.py", 1081 | "Lib/lib2to3/fixes/fix_filter.py", 1082 | "Lib/lib2to3/fixes/fix_funcattrs.py", 1083 | "Lib/lib2to3/fixes/fix_future.py", 1084 | "Lib/lib2to3/fixes/fix_getcwdu.py", 1085 | "Lib/lib2to3/fixes/fix_has_key.py", 1086 | "Lib/lib2to3/fixes/fix_idioms.py", 1087 | "Lib/lib2to3/fixes/fix_import.py", 1088 | "Lib/lib2to3/fixes/fix_imports.py", 1089 | "Lib/lib2to3/fixes/fix_imports2.py", 1090 | "Lib/lib2to3/fixes/fix_input.py", 1091 | "Lib/lib2to3/fixes/fix_intern.py", 1092 | "Lib/lib2to3/fixes/fix_isinstance.py", 1093 | "Lib/lib2to3/fixes/fix_itertools.py", 1094 | "Lib/lib2to3/fixes/fix_itertools_imports.py", 1095 | "Lib/lib2to3/fixes/fix_long.py", 1096 | "Lib/lib2to3/fixes/fix_map.py", 1097 | "Lib/lib2to3/fixes/fix_metaclass.py", 1098 | "Lib/lib2to3/fixes/fix_methodattrs.py", 1099 | "Lib/lib2to3/fixes/fix_ne.py", 1100 | "Lib/lib2to3/fixes/fix_next.py", 1101 | "Lib/lib2to3/fixes/fix_nonzero.py", 1102 | "Lib/lib2to3/fixes/fix_numliterals.py", 1103 | "Lib/lib2to3/fixes/fix_operator.py", 1104 | "Lib/lib2to3/fixes/fix_paren.py", 1105 | "Lib/lib2to3/fixes/fix_print.py", 1106 | "Lib/lib2to3/fixes/fix_raise.py", 1107 | "Lib/lib2to3/fixes/fix_raw_input.py", 1108 | "Lib/lib2to3/fixes/fix_reduce.py", 1109 | "Lib/lib2to3/fixes/fix_reload.py", 1110 | "Lib/lib2to3/fixes/fix_renames.py", 1111 | "Lib/lib2to3/fixes/fix_repr.py", 1112 | "Lib/lib2to3/fixes/fix_set_literal.py", 1113 | "Lib/lib2to3/fixes/fix_standarderror.py", 1114 | "Lib/lib2to3/fixes/fix_sys_exc.py", 1115 | "Lib/lib2to3/fixes/fix_throw.py", 1116 | "Lib/lib2to3/fixes/fix_tuple_params.py", 1117 | "Lib/lib2to3/fixes/fix_types.py", 1118 | "Lib/lib2to3/fixes/fix_unicode.py", 1119 | "Lib/lib2to3/fixes/fix_urllib.py", 1120 | "Lib/lib2to3/fixes/fix_ws_comma.py", 1121 | "Lib/lib2to3/fixes/fix_xrange.py", 1122 | "Lib/lib2to3/fixes/fix_xreadlines.py", 1123 | "Lib/lib2to3/fixes/fix_zip.py", 1124 | "Lib/lib2to3/main.py", 1125 | "Lib/lib2to3/patcomp.py", 1126 | "Lib/lib2to3/pgen2/__init__.py", 1127 | "Lib/lib2to3/pgen2/conv.py", 1128 | "Lib/lib2to3/pgen2/driver.py", 1129 | "Lib/lib2to3/pgen2/grammar.py", 1130 | "Lib/lib2to3/pgen2/literals.py", 1131 | "Lib/lib2to3/pgen2/parse.py", 1132 | "Lib/lib2to3/pgen2/pgen.py", 1133 | "Lib/lib2to3/pgen2/token.py", 1134 | "Lib/lib2to3/pgen2/tokenize.py", 1135 | "Lib/lib2to3/pygram.py", 1136 | "Lib/lib2to3/pytree.py", 1137 | "Lib/lib2to3/refactor.py" 1138 | ], 1139 | "linecache": [ 1140 | "Lib/linecache.py" 1141 | ], 1142 | "locale": [ 1143 | "Lib/locale.py" 1144 | ], 1145 | "logging": [ 1146 | "Lib/logging/__init__.py", 1147 | "Lib/logging/config.py", 1148 | "Lib/logging/handlers.py" 1149 | ], 1150 | "lzma": [ 1151 | "Lib/lzma.py" 1152 | ], 1153 | "mailbox": [ 1154 | "Lib/mailbox.py" 1155 | ], 1156 | "mailcap": [ 1157 | "Lib/mailcap.py" 1158 | ], 1159 | "marshal": [ 1160 | "Python/marshal.c" 1161 | ], 1162 | "math": [ 1163 | "Modules/_math.c", 1164 | "Modules/_math.h", 1165 | "Modules/mathmodule.c" 1166 | ], 1167 | "mimetypes": [ 1168 | "Lib/mimetypes.py" 1169 | ], 1170 | "mmap": [ 1171 | "Modules/mmapmodule.c" 1172 | ], 1173 | "modulefinder": [ 1174 | "Lib/modulefinder.py" 1175 | ], 1176 | "msilib": [ 1177 | "Lib/msilib/__init__.py", 1178 | "Lib/msilib/schema.py", 1179 | "Lib/msilib/sequence.py", 1180 | "Lib/msilib/text.py" 1181 | ], 1182 | "msvcrt": [ 1183 | "PC/msvcrtmodule.c" 1184 | ], 1185 | "multiprocessing": [ 1186 | "Lib/multiprocessing/__init__.py", 1187 | "Lib/multiprocessing/connection.py", 1188 | "Lib/multiprocessing/context.py", 1189 | "Lib/multiprocessing/dummy/__init__.py", 1190 | "Lib/multiprocessing/dummy/connection.py", 1191 | "Lib/multiprocessing/forkserver.py", 1192 | "Lib/multiprocessing/heap.py", 1193 | "Lib/multiprocessing/managers.py", 1194 | "Lib/multiprocessing/pool.py", 1195 | "Lib/multiprocessing/popen_fork.py", 1196 | "Lib/multiprocessing/popen_forkserver.py", 1197 | "Lib/multiprocessing/popen_spawn_posix.py", 1198 | "Lib/multiprocessing/popen_spawn_win32.py", 1199 | "Lib/multiprocessing/process.py", 1200 | "Lib/multiprocessing/queues.py", 1201 | "Lib/multiprocessing/reduction.py", 1202 | "Lib/multiprocessing/resource_sharer.py", 1203 | "Lib/multiprocessing/resource_tracker.py", 1204 | "Lib/multiprocessing/shared_memory.py", 1205 | "Lib/multiprocessing/sharedctypes.py", 1206 | "Lib/multiprocessing/spawn.py", 1207 | "Lib/multiprocessing/synchronize.py", 1208 | "Lib/multiprocessing/util.py" 1209 | ], 1210 | "netrc": [ 1211 | "Lib/netrc.py" 1212 | ], 1213 | "nis": [ 1214 | "Modules/nismodule.c" 1215 | ], 1216 | "nntplib": [ 1217 | "Lib/nntplib.py" 1218 | ], 1219 | "nt": [ 1220 | "Modules/winreparse.h" 1221 | ], 1222 | "ntpath": [ 1223 | "Lib/ntpath.py" 1224 | ], 1225 | "nturl2path": [ 1226 | "Lib/nturl2path.py" 1227 | ], 1228 | "numbers": [ 1229 | "Lib/numbers.py" 1230 | ], 1231 | "opcode": [ 1232 | "Lib/opcode.py" 1233 | ], 1234 | "operator": [ 1235 | "Lib/operator.py" 1236 | ], 1237 | "optparse": [ 1238 | "Lib/optparse.py" 1239 | ], 1240 | "os": [ 1241 | "Lib/os.py" 1242 | ], 1243 | "ossaudiodev": [ 1244 | "Modules/ossaudiodev.c" 1245 | ], 1246 | "pathlib": [ 1247 | "Lib/pathlib.py" 1248 | ], 1249 | "pdb": [ 1250 | "Lib/pdb.py" 1251 | ], 1252 | "pickle": [ 1253 | "Lib/pickle.py" 1254 | ], 1255 | "pickletools": [ 1256 | "Lib/pickletools.py" 1257 | ], 1258 | "pipes": [ 1259 | "Lib/pipes.py" 1260 | ], 1261 | "pkgutil": [ 1262 | "Lib/pkgutil.py" 1263 | ], 1264 | "platform": [ 1265 | "Lib/platform.py" 1266 | ], 1267 | "plistlib": [ 1268 | "Lib/plistlib.py" 1269 | ], 1270 | "poplib": [ 1271 | "Lib/poplib.py" 1272 | ], 1273 | "posix": [ 1274 | "Modules/posixmodule.c", 1275 | "Modules/posixmodule.h" 1276 | ], 1277 | "posixpath": [ 1278 | "Lib/posixpath.py" 1279 | ], 1280 | "pprint": [ 1281 | "Lib/pprint.py" 1282 | ], 1283 | "profile": [ 1284 | "Lib/profile.py" 1285 | ], 1286 | "pstats": [ 1287 | "Lib/pstats.py" 1288 | ], 1289 | "pty": [ 1290 | "Lib/pty.py" 1291 | ], 1292 | "pwd": [ 1293 | "Modules/pwdmodule.c" 1294 | ], 1295 | "py_compile": [ 1296 | "Lib/py_compile.py" 1297 | ], 1298 | "pyclbr": [ 1299 | "Lib/pyclbr.py" 1300 | ], 1301 | "pydoc": [ 1302 | "Lib/pydoc.py" 1303 | ], 1304 | "pydoc_data": [ 1305 | "Lib/pydoc_data/__init__.py", 1306 | "Lib/pydoc_data/_pydoc.css", 1307 | "Lib/pydoc_data/topics.py" 1308 | ], 1309 | "pyexpat": [ 1310 | "Modules/pyexpat.c" 1311 | ], 1312 | "queue": [ 1313 | "Lib/queue.py" 1314 | ], 1315 | "quopri": [ 1316 | "Lib/quopri.py" 1317 | ], 1318 | "random": [ 1319 | "Lib/random.py" 1320 | ], 1321 | "re": [ 1322 | "Lib/re.py" 1323 | ], 1324 | "readline": [ 1325 | "Modules/readline.c" 1326 | ], 1327 | "reprlib": [ 1328 | "Lib/reprlib.py" 1329 | ], 1330 | "resource": [ 1331 | "Modules/resource.c" 1332 | ], 1333 | "rlcompleter": [ 1334 | "Lib/rlcompleter.py" 1335 | ], 1336 | "runpy": [ 1337 | "Lib/runpy.py" 1338 | ], 1339 | "sched": [ 1340 | "Lib/sched.py" 1341 | ], 1342 | "secrets": [ 1343 | "Lib/secrets.py" 1344 | ], 1345 | "select": [ 1346 | "Modules/selectmodule.c" 1347 | ], 1348 | "selectors": [ 1349 | "Lib/selectors.py" 1350 | ], 1351 | "shelve": [ 1352 | "Lib/shelve.py" 1353 | ], 1354 | "shlex": [ 1355 | "Lib/shlex.py" 1356 | ], 1357 | "shutil": [ 1358 | "Lib/shutil.py" 1359 | ], 1360 | "signal": [ 1361 | "Lib/signal.py" 1362 | ], 1363 | "site": [ 1364 | "Lib/site.py" 1365 | ], 1366 | "smtpd": [ 1367 | "Lib/smtpd.py" 1368 | ], 1369 | "smtplib": [ 1370 | "Lib/smtplib.py" 1371 | ], 1372 | "sndhdr": [ 1373 | "Lib/sndhdr.py" 1374 | ], 1375 | "socket": [ 1376 | "Lib/socket.py" 1377 | ], 1378 | "socketserver": [ 1379 | "Lib/socketserver.py" 1380 | ], 1381 | "spwd": [ 1382 | "Modules/spwdmodule.c" 1383 | ], 1384 | "sqlite3": [ 1385 | "Lib/sqlite3/__init__.py", 1386 | "Lib/sqlite3/dbapi2.py", 1387 | "Lib/sqlite3/dump.py" 1388 | ], 1389 | "sre_compile": [ 1390 | "Lib/sre_compile.py" 1391 | ], 1392 | "sre_constants": [ 1393 | "Lib/sre_constants.py", 1394 | "Modules/sre_constants.h" 1395 | ], 1396 | "sre_parse": [ 1397 | "Lib/sre_parse.py" 1398 | ], 1399 | "ssl": [ 1400 | "Lib/ssl.py" 1401 | ], 1402 | "stat": [ 1403 | "Lib/stat.py" 1404 | ], 1405 | "statistics": [ 1406 | "Lib/statistics.py" 1407 | ], 1408 | "string": [ 1409 | "Lib/string.py" 1410 | ], 1411 | "stringprep": [ 1412 | "Lib/stringprep.py" 1413 | ], 1414 | "struct": [ 1415 | "Lib/struct.py" 1416 | ], 1417 | "subprocess": [ 1418 | "Lib/subprocess.py" 1419 | ], 1420 | "sunau": [ 1421 | "Lib/sunau.py" 1422 | ], 1423 | "symtable": [ 1424 | "Lib/symtable.py" 1425 | ], 1426 | "sys": [ 1427 | "Python/sysmodule.c" 1428 | ], 1429 | "sysconfig": [ 1430 | "Lib/sysconfig.py" 1431 | ], 1432 | "syslog": [ 1433 | "Modules/syslogmodule.c" 1434 | ], 1435 | "tabnanny": [ 1436 | "Lib/tabnanny.py" 1437 | ], 1438 | "tarfile": [ 1439 | "Lib/tarfile.py" 1440 | ], 1441 | "telnetlib": [ 1442 | "Lib/telnetlib.py" 1443 | ], 1444 | "tempfile": [ 1445 | "Lib/tempfile.py" 1446 | ], 1447 | "termios": [ 1448 | "Modules/termios.c" 1449 | ], 1450 | "textwrap": [ 1451 | "Lib/textwrap.py" 1452 | ], 1453 | "this": [ 1454 | "Lib/this.py" 1455 | ], 1456 | "threading": [ 1457 | "Lib/threading.py" 1458 | ], 1459 | "time": [ 1460 | "Modules/timemodule.c" 1461 | ], 1462 | "timeit": [ 1463 | "Lib/timeit.py" 1464 | ], 1465 | "tkinter": [ 1466 | "Lib/tkinter/__init__.py", 1467 | "Lib/tkinter/__main__.py", 1468 | "Lib/tkinter/colorchooser.py", 1469 | "Lib/tkinter/commondialog.py", 1470 | "Lib/tkinter/constants.py", 1471 | "Lib/tkinter/dialog.py", 1472 | "Lib/tkinter/dnd.py", 1473 | "Lib/tkinter/filedialog.py", 1474 | "Lib/tkinter/font.py", 1475 | "Lib/tkinter/messagebox.py", 1476 | "Lib/tkinter/scrolledtext.py", 1477 | "Lib/tkinter/simpledialog.py", 1478 | "Lib/tkinter/tix.py", 1479 | "Lib/tkinter/ttk.py", 1480 | "Modules/tkinter.h" 1481 | ], 1482 | "token": [ 1483 | "Lib/token.py" 1484 | ], 1485 | "tokenize": [ 1486 | "Lib/tokenize.py" 1487 | ], 1488 | "trace": [ 1489 | "Lib/trace.py" 1490 | ], 1491 | "traceback": [ 1492 | "Lib/traceback.py" 1493 | ], 1494 | "tracemalloc": [ 1495 | "Lib/tracemalloc.py" 1496 | ], 1497 | "tty": [ 1498 | "Lib/tty.py" 1499 | ], 1500 | "turtle": [ 1501 | "Lib/turtle.py" 1502 | ], 1503 | "turtledemo": [ 1504 | "Lib/turtledemo/__init__.py", 1505 | "Lib/turtledemo/__main__.py", 1506 | "Lib/turtledemo/bytedesign.py", 1507 | "Lib/turtledemo/chaos.py", 1508 | "Lib/turtledemo/clock.py", 1509 | "Lib/turtledemo/colormixer.py", 1510 | "Lib/turtledemo/forest.py", 1511 | "Lib/turtledemo/fractalcurves.py", 1512 | "Lib/turtledemo/lindenmayer.py", 1513 | "Lib/turtledemo/minimal_hanoi.py", 1514 | "Lib/turtledemo/nim.py", 1515 | "Lib/turtledemo/paint.py", 1516 | "Lib/turtledemo/peace.py", 1517 | "Lib/turtledemo/penrose.py", 1518 | "Lib/turtledemo/planet_and_moon.py", 1519 | "Lib/turtledemo/rosette.py", 1520 | "Lib/turtledemo/round_dance.py", 1521 | "Lib/turtledemo/sorting_animate.py", 1522 | "Lib/turtledemo/tree.py", 1523 | "Lib/turtledemo/turtle.cfg", 1524 | "Lib/turtledemo/two_canvases.py", 1525 | "Lib/turtledemo/yinyang.py" 1526 | ], 1527 | "types": [ 1528 | "Lib/types.py" 1529 | ], 1530 | "typing": [ 1531 | "Lib/typing.py" 1532 | ], 1533 | "unicodedata": [ 1534 | "Modules/unicodedata.c", 1535 | "Modules/unicodedata_db.h", 1536 | "Modules/unicodename_db.h" 1537 | ], 1538 | "unittest": [ 1539 | "Lib/unittest/__init__.py", 1540 | "Lib/unittest/__main__.py", 1541 | "Lib/unittest/_log.py", 1542 | "Lib/unittest/async_case.py", 1543 | "Lib/unittest/case.py", 1544 | "Lib/unittest/loader.py", 1545 | "Lib/unittest/main.py", 1546 | "Lib/unittest/mock.py", 1547 | "Lib/unittest/result.py", 1548 | "Lib/unittest/runner.py", 1549 | "Lib/unittest/signals.py", 1550 | "Lib/unittest/suite.py", 1551 | "Lib/unittest/util.py" 1552 | ], 1553 | "urllib": [ 1554 | "Lib/urllib/__init__.py", 1555 | "Lib/urllib/error.py", 1556 | "Lib/urllib/parse.py", 1557 | "Lib/urllib/request.py", 1558 | "Lib/urllib/response.py", 1559 | "Lib/urllib/robotparser.py", 1560 | "Modules/_scproxy.c" 1561 | ], 1562 | "uu": [ 1563 | "Lib/uu.py" 1564 | ], 1565 | "uuid": [ 1566 | "Lib/uuid.py" 1567 | ], 1568 | "venv": [ 1569 | "Lib/venv/__init__.py", 1570 | "Lib/venv/__main__.py", 1571 | "Lib/venv/scripts/common/Activate.ps1", 1572 | "Lib/venv/scripts/common/activate", 1573 | "Lib/venv/scripts/nt/activate.bat", 1574 | "Lib/venv/scripts/nt/deactivate.bat", 1575 | "Lib/venv/scripts/posix/activate.csh", 1576 | "Lib/venv/scripts/posix/activate.fish" 1577 | ], 1578 | "warnings": [ 1579 | "Lib/warnings.py" 1580 | ], 1581 | "wave": [ 1582 | "Lib/wave.py" 1583 | ], 1584 | "weakref": [ 1585 | "Lib/weakref.py" 1586 | ], 1587 | "webbrowser": [ 1588 | "Lib/webbrowser.py" 1589 | ], 1590 | "winreg": [ 1591 | "PC/winreg.c" 1592 | ], 1593 | "winsound": [ 1594 | "PC/winsound.c" 1595 | ], 1596 | "wsgiref": [ 1597 | "Lib/wsgiref/__init__.py", 1598 | "Lib/wsgiref/handlers.py", 1599 | "Lib/wsgiref/headers.py", 1600 | "Lib/wsgiref/simple_server.py", 1601 | "Lib/wsgiref/util.py", 1602 | "Lib/wsgiref/validate.py" 1603 | ], 1604 | "xdrlib": [ 1605 | "Lib/xdrlib.py" 1606 | ], 1607 | "xml": [ 1608 | "Lib/xml/__init__.py", 1609 | "Lib/xml/dom/NodeFilter.py", 1610 | "Lib/xml/dom/__init__.py", 1611 | "Lib/xml/dom/domreg.py", 1612 | "Lib/xml/dom/expatbuilder.py", 1613 | "Lib/xml/dom/minicompat.py", 1614 | "Lib/xml/dom/minidom.py", 1615 | "Lib/xml/dom/pulldom.py", 1616 | "Lib/xml/dom/xmlbuilder.py", 1617 | "Lib/xml/etree/ElementInclude.py", 1618 | "Lib/xml/etree/ElementPath.py", 1619 | "Lib/xml/etree/ElementTree.py", 1620 | "Lib/xml/etree/__init__.py", 1621 | "Lib/xml/etree/cElementTree.py", 1622 | "Lib/xml/parsers/__init__.py", 1623 | "Lib/xml/parsers/expat.py", 1624 | "Lib/xml/sax/__init__.py", 1625 | "Lib/xml/sax/_exceptions.py", 1626 | "Lib/xml/sax/expatreader.py", 1627 | "Lib/xml/sax/handler.py", 1628 | "Lib/xml/sax/saxutils.py", 1629 | "Lib/xml/sax/xmlreader.py", 1630 | "Modules/expat/COPYING", 1631 | "Modules/expat/ascii.h", 1632 | "Modules/expat/asciitab.h", 1633 | "Modules/expat/expat.h", 1634 | "Modules/expat/expat_config.h", 1635 | "Modules/expat/expat_external.h", 1636 | "Modules/expat/iasciitab.h", 1637 | "Modules/expat/internal.h", 1638 | "Modules/expat/latin1tab.h", 1639 | "Modules/expat/nametab.h", 1640 | "Modules/expat/pyexpatns.h", 1641 | "Modules/expat/siphash.h", 1642 | "Modules/expat/utf8tab.h", 1643 | "Modules/expat/winconfig.h", 1644 | "Modules/expat/xmlparse.c", 1645 | "Modules/expat/xmlrole.c", 1646 | "Modules/expat/xmlrole.h", 1647 | "Modules/expat/xmltok.c", 1648 | "Modules/expat/xmltok.h", 1649 | "Modules/expat/xmltok_impl.c", 1650 | "Modules/expat/xmltok_impl.h", 1651 | "Modules/expat/xmltok_ns.c" 1652 | ], 1653 | "xmlrpc": [ 1654 | "Lib/xmlrpc/__init__.py", 1655 | "Lib/xmlrpc/client.py", 1656 | "Lib/xmlrpc/server.py" 1657 | ], 1658 | "zipapp": [ 1659 | "Lib/zipapp.py" 1660 | ], 1661 | "zipfile": [ 1662 | "Lib/zipfile.py" 1663 | ], 1664 | "zipimport": [ 1665 | "Lib/zipimport.py" 1666 | ], 1667 | "zlib": [ 1668 | "Modules/zlibmodule.c" 1669 | ], 1670 | "zoneinfo": [ 1671 | "Lib/zoneinfo/__init__.py", 1672 | "Lib/zoneinfo/_common.py", 1673 | "Lib/zoneinfo/_tzpath.py", 1674 | "Lib/zoneinfo/_zoneinfo.py" 1675 | ] 1676 | } 1677 | -------------------------------------------------------------------------------- /file_map.py: -------------------------------------------------------------------------------- 1 | """Create file_map.json. 2 | 3 | The keys are module names and the values are a list of files that make up that 4 | module. 5 | """ 6 | 7 | import json 8 | import os 9 | import pathlib 10 | import sys 11 | 12 | 13 | REPO = repo = pathlib.Path(sys.argv[1]) 14 | with open("module_names.json", "rb") as file: 15 | MAPPING = {name: [] for name in json.load(file)} 16 | 17 | 18 | def relative_path(path): 19 | return path.relative_to(REPO).as_posix() 20 | 21 | 22 | def add_path(module, path): 23 | MAPPING[module].append(relative_path(path)) 24 | 25 | 26 | def add_directory(module, path): 27 | """Add files founds in *path* with *extensions* to *found*.""" 28 | for item in path.iterdir(): 29 | if item.is_file(): 30 | add_path(module, item) 31 | elif item.is_dir() and item.name not in { 32 | "clinic", 33 | "test", 34 | "tests", 35 | "idle_test", 36 | }: 37 | add_directory(module, item) 38 | 39 | 40 | if __name__ == "__main__": 41 | for item in (repo / "Lib").iterdir(): 42 | if item.is_file(): 43 | if item.suffix != ".py" or item.name == "__phello__.foo.py": 44 | continue 45 | add_path(item.stem, item) 46 | elif item.is_dir(): 47 | if item.name in {"test", "site-packages"}: 48 | continue 49 | else: 50 | add_directory(item.name, item) 51 | else: 52 | raise ValueError(f"don't recognize what {item!r} is") 53 | 54 | for item in (REPO / "Modules").iterdir(): 55 | if item.is_file(): 56 | if item.name in { 57 | "README", 58 | "Setup", 59 | "makesetup", 60 | "getpath.c", 61 | "config.c.in", 62 | "getbuildinfo.c", 63 | "main.c", 64 | "gc_weakref.txt", 65 | "testcapi_long.h", 66 | }: 67 | continue 68 | if item.name.startswith("xx") or item.name.startswith("_test"): 69 | continue 70 | elif item.name in { 71 | "addrinfo.h", 72 | "getaddrinfo.c", 73 | "getnameinfo.c", 74 | "socketmodule.c", 75 | "socketmodule.h", 76 | }: 77 | add_path("_socket", item) 78 | elif item.stem == "sre_lib": 79 | add_path("_sre", item) 80 | elif item.stem == "rotatingtree": 81 | add_path("_lsprof", item) 82 | elif item.stem == "_hashopenssl": 83 | add_path("_hashlib", item) 84 | elif item.name in {"ld_so_aix.in", "makexp_aix"}: 85 | add_path("_aix_support", item) 86 | elif item.stem == "_math": 87 | for module in ["math", "cmath"]: 88 | add_path(module, item) 89 | elif item.name == "_ssl_data.h": 90 | add_path("_ssl", item) 91 | elif item.name == "_scproxy.c": 92 | add_path("urllib", item) 93 | elif item.name in {"unicodedata_db.h", "unicodename_db.h"}: 94 | add_path("unicodedata", item) 95 | elif item.name == "tkappinit.c": 96 | add_path("_tkinter", item) 97 | elif item.name == "overlapped.c": 98 | for module in ["_winapi", "asyncio"]: 99 | add_path(module, item) 100 | elif item.name == "winreparse.h": 101 | for module in ["_winapi", "nt"]: 102 | add_path(module, item) 103 | elif item.name == "sre.h": 104 | add_path("_sre", item) 105 | elif item.stem == "signalmodule": 106 | add_path("_signal", item) 107 | elif item.name == "symtablemodule.c": 108 | add_path("_symtable", item) 109 | elif item.stem in MAPPING: 110 | add_path(item.stem, item) 111 | elif item.stem.endswith("module"): 112 | name = item.stem.removesuffix("module") 113 | if name in MAPPING: 114 | module = name 115 | elif f"_{name}" in MAPPING: 116 | module = f"_{name}" 117 | else: 118 | raise ValueError(item) 119 | add_path(module, item) 120 | else: 121 | raise ValueError(f"don't know what to do with {item!r}") 122 | elif item.is_dir(): 123 | if item.name in {"_xxtestfuzz", "clinic"}: 124 | continue 125 | elif item.name == "expat": 126 | add_directory("xml", item) 127 | elif item.name == "_sqlite": 128 | add_directory("_sqlite3", item) 129 | elif item.name == "cjkcodecs": 130 | for subitem in item.iterdir(): 131 | if subitem.stem in MAPPING: 132 | add_path(subitem.stem, subitem) 133 | elif f"_{subitem.stem}" in MAPPING: 134 | add_path(f"_{subitem.stem}", subitem) 135 | add_directory("encodings", item) 136 | elif item.name in MAPPING: 137 | add_directory(item.name, item) 138 | else: 139 | raise ValueError(f"don't know what to do with {item!r}") 140 | else: 141 | raise ValueError(f"don't recognize what {item!r} is") 142 | 143 | for module, paths in MAPPING.items(): 144 | if module == "_ast": 145 | paths.append("Python/Python-ast.c") 146 | elif module == "_imp": 147 | paths.append("Python/import.c") 148 | elif module == "_msi": 149 | paths.append("PC/_msi.c") 150 | elif module == "_string": 151 | paths.append("Objects/unicodeobject.c") 152 | elif module == "_warnings": 153 | paths.append("Python/_warnings.c") 154 | elif module == "builtins": 155 | paths.append("Python/bltinmodule.c") 156 | elif module == "marshal": 157 | paths.append("Python/marshal.c") 158 | elif module == "msvcrt": 159 | paths.append("PC/msvcrtmodule.c") 160 | elif module == "sys": 161 | paths.append("Python/sysmodule.c") 162 | elif module == "winreg": 163 | paths.append("PC/winreg.c") 164 | elif module == "winsound": 165 | paths.append("PC/winsound.c") 166 | elif module == "_posixshmem": 167 | rel_path = "Modules/_multiprocessing/posixshmem.c" 168 | paths.append(rel_path) 169 | MAPPING["_multiprocessing"].remove(rel_path) 170 | elif not paths: 171 | raise ValueError("not paths for", module) 172 | 173 | for file_paths in MAPPING.values(): 174 | file_paths.sort() 175 | 176 | with open("file_map.json", "w", encoding="utf-8") as file: 177 | json.dump(MAPPING, file, sort_keys=True, indent=2) 178 | -------------------------------------------------------------------------------- /module_names.json: -------------------------------------------------------------------------------- 1 | [ 2 | "__future__", 3 | "_abc", 4 | "_aix_support", 5 | "_ast", 6 | "_asyncio", 7 | "_bisect", 8 | "_blake2", 9 | "_bootsubprocess", 10 | "_bz2", 11 | "_codecs", 12 | "_codecs_cn", 13 | "_codecs_hk", 14 | "_codecs_iso2022", 15 | "_codecs_jp", 16 | "_codecs_kr", 17 | "_codecs_tw", 18 | "_collections", 19 | "_collections_abc", 20 | "_compat_pickle", 21 | "_compression", 22 | "_contextvars", 23 | "_crypt", 24 | "_csv", 25 | "_ctypes", 26 | "_curses", 27 | "_curses_panel", 28 | "_datetime", 29 | "_dbm", 30 | "_decimal", 31 | "_elementtree", 32 | "_functools", 33 | "_gdbm", 34 | "_hashlib", 35 | "_heapq", 36 | "_imp", 37 | "_io", 38 | "_json", 39 | "_locale", 40 | "_lsprof", 41 | "_lzma", 42 | "_markupbase", 43 | "_md5", 44 | "_msi", 45 | "_multibytecodec", 46 | "_multiprocessing", 47 | "_opcode", 48 | "_operator", 49 | "_osx_support", 50 | "_pickle", 51 | "_posixshmem", 52 | "_posixsubprocess", 53 | "_py_abc", 54 | "_pydecimal", 55 | "_pyio", 56 | "_queue", 57 | "_random", 58 | "_sha1", 59 | "_sha256", 60 | "_sha3", 61 | "_sha512", 62 | "_signal", 63 | "_sitebuiltins", 64 | "_socket", 65 | "_sqlite3", 66 | "_sre", 67 | "_ssl", 68 | "_stat", 69 | "_statistics", 70 | "_string", 71 | "_strptime", 72 | "_struct", 73 | "_symtable", 74 | "_thread", 75 | "_threading_local", 76 | "_tkinter", 77 | "_tracemalloc", 78 | "_uuid", 79 | "_warnings", 80 | "_weakref", 81 | "_weakrefset", 82 | "_winapi", 83 | "_zoneinfo", 84 | "abc", 85 | "aifc", 86 | "antigravity", 87 | "argparse", 88 | "array", 89 | "ast", 90 | "asynchat", 91 | "asyncio", 92 | "asyncore", 93 | "atexit", 94 | "audioop", 95 | "base64", 96 | "bdb", 97 | "binascii", 98 | "binhex", 99 | "bisect", 100 | "builtins", 101 | "bz2", 102 | "cProfile", 103 | "calendar", 104 | "cgi", 105 | "cgitb", 106 | "chunk", 107 | "cmath", 108 | "cmd", 109 | "code", 110 | "codecs", 111 | "codeop", 112 | "collections", 113 | "colorsys", 114 | "compileall", 115 | "concurrent", 116 | "configparser", 117 | "contextlib", 118 | "contextvars", 119 | "copy", 120 | "copyreg", 121 | "crypt", 122 | "csv", 123 | "ctypes", 124 | "curses", 125 | "dataclasses", 126 | "datetime", 127 | "dbm", 128 | "decimal", 129 | "difflib", 130 | "dis", 131 | "distutils", 132 | "doctest", 133 | "email", 134 | "encodings", 135 | "ensurepip", 136 | "enum", 137 | "errno", 138 | "faulthandler", 139 | "fcntl", 140 | "filecmp", 141 | "fileinput", 142 | "fnmatch", 143 | "fractions", 144 | "ftplib", 145 | "functools", 146 | "gc", 147 | "genericpath", 148 | "getopt", 149 | "getpass", 150 | "gettext", 151 | "glob", 152 | "graphlib", 153 | "grp", 154 | "gzip", 155 | "hashlib", 156 | "heapq", 157 | "hmac", 158 | "html", 159 | "http", 160 | "idlelib", 161 | "imaplib", 162 | "imghdr", 163 | "imp", 164 | "importlib", 165 | "inspect", 166 | "io", 167 | "ipaddress", 168 | "itertools", 169 | "json", 170 | "keyword", 171 | "lib2to3", 172 | "linecache", 173 | "locale", 174 | "logging", 175 | "lzma", 176 | "mailbox", 177 | "mailcap", 178 | "marshal", 179 | "math", 180 | "mimetypes", 181 | "mmap", 182 | "modulefinder", 183 | "msilib", 184 | "msvcrt", 185 | "multiprocessing", 186 | "netrc", 187 | "nis", 188 | "nntplib", 189 | "nt", 190 | "ntpath", 191 | "nturl2path", 192 | "numbers", 193 | "opcode", 194 | "operator", 195 | "optparse", 196 | "os", 197 | "ossaudiodev", 198 | "pathlib", 199 | "pdb", 200 | "pickle", 201 | "pickletools", 202 | "pipes", 203 | "pkgutil", 204 | "platform", 205 | "plistlib", 206 | "poplib", 207 | "posix", 208 | "posixpath", 209 | "pprint", 210 | "profile", 211 | "pstats", 212 | "pty", 213 | "pwd", 214 | "py_compile", 215 | "pyclbr", 216 | "pydoc", 217 | "pydoc_data", 218 | "pyexpat", 219 | "queue", 220 | "quopri", 221 | "random", 222 | "re", 223 | "readline", 224 | "reprlib", 225 | "resource", 226 | "rlcompleter", 227 | "runpy", 228 | "sched", 229 | "secrets", 230 | "select", 231 | "selectors", 232 | "shelve", 233 | "shlex", 234 | "shutil", 235 | "signal", 236 | "site", 237 | "smtpd", 238 | "smtplib", 239 | "sndhdr", 240 | "socket", 241 | "socketserver", 242 | "spwd", 243 | "sqlite3", 244 | "sre_compile", 245 | "sre_constants", 246 | "sre_parse", 247 | "ssl", 248 | "stat", 249 | "statistics", 250 | "string", 251 | "stringprep", 252 | "struct", 253 | "subprocess", 254 | "sunau", 255 | "symtable", 256 | "sys", 257 | "sysconfig", 258 | "syslog", 259 | "tabnanny", 260 | "tarfile", 261 | "telnetlib", 262 | "tempfile", 263 | "termios", 264 | "textwrap", 265 | "this", 266 | "threading", 267 | "time", 268 | "timeit", 269 | "tkinter", 270 | "token", 271 | "tokenize", 272 | "trace", 273 | "traceback", 274 | "tracemalloc", 275 | "tty", 276 | "turtle", 277 | "turtledemo", 278 | "types", 279 | "typing", 280 | "unicodedata", 281 | "unittest", 282 | "urllib", 283 | "uu", 284 | "uuid", 285 | "venv", 286 | "warnings", 287 | "wave", 288 | "weakref", 289 | "webbrowser", 290 | "winreg", 291 | "winsound", 292 | "wsgiref", 293 | "xdrlib", 294 | "xml", 295 | "xmlrpc", 296 | "zipapp", 297 | "zipfile", 298 | "zipimport", 299 | "zlib", 300 | "zoneinfo" 301 | ] 302 | -------------------------------------------------------------------------------- /module_names.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3.10 2 | """Dump `sys.stdlib_module_names` to `module_names.json`.""" 3 | 4 | import json 5 | import sys 6 | 7 | module_names = set(sys.stdlib_module_names) 8 | # https://bugs.python.org/issue43456 9 | module_names.remove("_xxsubinterpreters") 10 | 11 | with open("module_names.json", "w", encoding="utf-8") as file: 12 | json.dump(sorted(module_names), file, indent=2) 13 | -------------------------------------------------------------------------------- /pr_files.graphql: -------------------------------------------------------------------------------- 1 | query MoreFiles($node: ID!, $cursor: String) { 2 | node(id: $node) { 3 | ... on PullRequest { 4 | number 5 | files(after: $cursor, first: 100) { 6 | pageInfo { 7 | hasNextPage 8 | } 9 | edges { 10 | cursor 11 | node { 12 | path 13 | } 14 | } 15 | } 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /private_modules.json: -------------------------------------------------------------------------------- 1 | { 2 | "__future__": [], 3 | "_thread": [], 4 | "abc": ["_abc", "_py_abc"], 5 | "aifc": [], 6 | "antigravity": [], 7 | "argparse": [], 8 | "array": [], 9 | "ast": ["_ast"], 10 | "asynchat": [], 11 | "asyncio": ["_asyncio", "_winapi"], 12 | "asyncore": [], 13 | "atexit": [], 14 | "audioop": [], 15 | "base64": [], 16 | "bdb": [], 17 | "binascii": [], 18 | "binhex": [], 19 | "bisect": ["_bisect"], 20 | "builtins": [], 21 | "bz2": ["_bz2", "_compression"], 22 | "cProfile": ["_lsprof"], 23 | "calendar": [], 24 | "cgi": [], 25 | "cgitb": [], 26 | "chunk": [], 27 | "cmath": [], 28 | "cmd": [], 29 | "code": [], 30 | "codecs": ["_codecs"], 31 | "codeop": [], 32 | "collections": ["_collections", "_collections_abc"], 33 | "colorsys": [], 34 | "compileall": [], 35 | "concurrent": [], 36 | "configparser": [], 37 | "contextlib": [], 38 | "contextvars": ["_contextvars"], 39 | "copy": [], 40 | "copyreg": [], 41 | "crypt": ["_crypt"], 42 | "csv": ["_csv"], 43 | "ctypes": ["_ctypes"], 44 | "curses": ["_curses", "_curses_panel"], 45 | "dataclasses": [], 46 | "datetime": ["_datetime"], 47 | "dbm": ["_dbm", "_gdbm"], 48 | "decimal": ["_decimal", "_pydecimal"], 49 | "difflib": [], 50 | "dis": ["opcode", "_opcode"], 51 | "distutils": [], 52 | "doctest": [], 53 | "email": [], 54 | "encodings": [ 55 | "_codecs_cn", 56 | "_codecs_hk", 57 | "_codecs_iso2022", 58 | "_codecs_jp", 59 | "_codecs_kr", 60 | "_codecs_tw", 61 | "_multibytecodec" 62 | ], 63 | "ensurepip": [], 64 | "enum": [], 65 | "errno": [], 66 | "faulthandler": [], 67 | "fcntl": [], 68 | "filecmp": [], 69 | "fileinput": [], 70 | "fnmatch": [], 71 | "fractions": [], 72 | "ftplib": [], 73 | "functools": ["_functools"], 74 | "gc": [], 75 | "getopt": [], 76 | "getpass": [], 77 | "gettext": [], 78 | "glob": [], 79 | "graphlib": [], 80 | "grp": [], 81 | "gzip": ["_compression"], 82 | "hashlib": [ 83 | "_blake2", 84 | "_hashlib", 85 | "_md5", 86 | "_sha1", 87 | "_sha3", 88 | "_sha256", 89 | "_sha512" 90 | ], 91 | "heapq": ["_heapq"], 92 | "hmac": [], 93 | "html": ["_markupbase"], 94 | "http": [], 95 | "idlelib": [], 96 | "imaplib": [], 97 | "imghdr": [], 98 | "imp": ["_imp"], 99 | "importlib": [], 100 | "inspect": [], 101 | "io": ["_io", "_pyio"], 102 | "ipaddress": [], 103 | "itertools": [], 104 | "json": ["_json"], 105 | "keyword": [], 106 | "lib2to3": [], 107 | "linecache": [], 108 | "locale": ["_locale"], 109 | "logging": [], 110 | "lzma": ["_compression", "_lzma"], 111 | "mailbox": [], 112 | "mailcap": [], 113 | "marshal": [], 114 | "math": [], 115 | "mimetypes": [], 116 | "mmap": [], 117 | "modulefinder": [], 118 | "msilib": ["_msi"], 119 | "msvcrt": [], 120 | "multiprocessing": [ 121 | "_multiprocessing", 122 | "_posixshmem", 123 | "_posixsubprocess", 124 | "_winapi" 125 | ], 126 | "netrc": [], 127 | "nis": [], 128 | "nntplib": [], 129 | "numbers": [], 130 | "operator": ["_operator"], 131 | "optparse": [], 132 | "os": ["genericpath", "nt", "ntpath", "posixpath"], 133 | "ossaudiodev": [], 134 | "pathlib": [], 135 | "pdb": [], 136 | "pickle": ["_compat_pickle", "_pickle"], 137 | "pickletools": [], 138 | "pipes": [], 139 | "pkgutil": [], 140 | "platform": [], 141 | "plistlib": [], 142 | "poplib": [], 143 | "posix": [], 144 | "pprint": [], 145 | "profile": [], 146 | "pstats": [], 147 | "pty": [], 148 | "pwd": [], 149 | "py_compile": [], 150 | "pyclbr": [], 151 | "pydoc": ["pydoc_data"], 152 | "queue": ["_queue"], 153 | "quopri": [], 154 | "random": ["_random"], 155 | "re": ["_sre", "sre_compile", "sre_constants", "sre_parse"], 156 | "readline": [], 157 | "reprlib": [], 158 | "resource": [], 159 | "rlcompleter": [], 160 | "runpy": [], 161 | "sched": [], 162 | "secrets": [], 163 | "select": [], 164 | "selectors": [], 165 | "shelve": [], 166 | "shlex": [], 167 | "shutil": [], 168 | "signal": ["_signal"], 169 | "site": ["_sitebuiltins"], 170 | "smtpd": [], 171 | "smtplib": [], 172 | "sndhdr": [], 173 | "socket": ["_socket"], 174 | "socketserver": [], 175 | "spwd": [], 176 | "sqlite3": ["_sqlite3"], 177 | "ssl": ["_ssl"], 178 | "stat": ["_stat"], 179 | "statistics": ["_statistics"], 180 | "string": ["_string"], 181 | "stringprep": [], 182 | "struct": ["_struct"], 183 | "subprocess": ["_posixsubprocess", "_winapi"], 184 | "sunau": [], 185 | "symtable": ["_symtable"], 186 | "sys": [], 187 | "sysconfig": ["_aix_support", "_bootsubprocess", "_osx_support"], 188 | "syslog": [], 189 | "tabnanny": [], 190 | "tarfile": [], 191 | "telnetlib": [], 192 | "tempfile": [], 193 | "termios": [], 194 | "textwrap": [], 195 | "this": [], 196 | "threading": ["_threading_local"], 197 | "time": ["_strptime"], 198 | "timeit": [], 199 | "tkinter": ["_tkinter"], 200 | "token": [], 201 | "tokenize": [], 202 | "trace": [], 203 | "traceback": [], 204 | "tracemalloc": ["_tracemalloc"], 205 | "tty": [], 206 | "turtle": [], 207 | "turtledemo": [], 208 | "types": [], 209 | "typing": [], 210 | "unicodedata": [], 211 | "unittest": [], 212 | "urllib": ["nturl2path"], 213 | "uu": [], 214 | "uuid": ["_uuid"], 215 | "venv": [], 216 | "warnings": ["_warnings"], 217 | "wave": [], 218 | "weakref": ["_weakref", "_weakrefset"], 219 | "webbrowser": [], 220 | "winreg": [], 221 | "winsound": [], 222 | "wsgiref": [], 223 | "xdrlib": [], 224 | "xml": ["_elementtree", "pyexpat"], 225 | "xmlrpc": [], 226 | "zipapp": [], 227 | "zipfile": [], 228 | "zipimport": [], 229 | "zlib": [], 230 | "zoneinfo": ["_zoneinfo"] 231 | } 232 | -------------------------------------------------------------------------------- /private_modules.py: -------------------------------------------------------------------------------- 1 | """Validate data in private_modules.json. 2 | 3 | Keys are a list of all public/documented modules. The values are the lists of 4 | private/non-public modules that the public module relies on. 5 | """ 6 | 7 | import json 8 | import pathlib 9 | import sys 10 | 11 | with open("module_names.json", "rb") as file: 12 | module_names = frozenset(json.load(file)) 13 | 14 | 15 | repo_location = pathlib.Path(sys.argv[1]) 16 | library_docs = repo_location / "Doc" / "library" 17 | public_modules = { 18 | "lib2to3", # In 2to3.rst 19 | "this", # Easter egg 20 | "antigravity", # Easter egg 21 | "cProfile", # In profile.rst 22 | "pstats", # In profile.rst 23 | "turtledemo", # In turtle.rst 24 | "encodings", # In codecs.rst 25 | "idlelib", # For IDLE 26 | "_xxsubinterpreters", # For testing subinterpreters 27 | } 28 | 29 | for item in library_docs.iterdir(): 30 | filename = item.name 31 | if not filename.endswith(".rst") or filename == "pyexpat.rst": 32 | continue 33 | 34 | name = filename.partition(".")[0] 35 | if name in module_names: 36 | public_modules.add(name) 37 | 38 | public_modules = frozenset(public_modules) 39 | private_modules = module_names - public_modules 40 | 41 | with open("private_modules.json", "rb") as file: 42 | module_mapping = json.load(file) 43 | written_public_modules = frozenset(module_mapping.keys()) 44 | if diff := written_public_modules - public_modules: 45 | print("Modules recorded as public but are private:", diff) 46 | sys.exit(1) 47 | elif diff := public_modules - written_public_modules: 48 | print("Public modules not recorded:", diff) 49 | 50 | written_private_modules = frozenset( 51 | name for names in module_mapping.values() for name in names 52 | ) 53 | if diff := private_modules - written_private_modules: 54 | print("Private modules not recorded:", diff) 55 | elif diff := written_private_modules - private_modules: 56 | print("Modules misclassified as private:", diff) 57 | -------------------------------------------------------------------------------- /pull_requests.graphql: -------------------------------------------------------------------------------- 1 | query ($cursor: String) { 2 | repository(owner: "python", name: "cpython") { 3 | pullRequests(after: $cursor, first: 100, states: [OPEN], baseRefName: "master") { 4 | pageInfo { 5 | hasNextPage 6 | } 7 | edges { 8 | cursor 9 | node { 10 | number 11 | id 12 | files(first: 100) { 13 | pageInfo { 14 | hasNextPage 15 | } 16 | edges { 17 | cursor 18 | node { 19 | path 20 | } 21 | } 22 | } 23 | } 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /pull_requests.py: -------------------------------------------------------------------------------- 1 | import itertools 2 | import json 3 | import sys 4 | 5 | import curio 6 | import gidgethub.httpx 7 | import httpx 8 | 9 | 10 | with open("pull_requests.graphql", "r", encoding="utf-8") as file: 11 | PR_QUERY = file.read() 12 | 13 | 14 | with open("pr_files.graphql", "r", encoding="utf-8") as file: 15 | FILES_QUERY = file.read() 16 | 17 | 18 | def grouper(iterable, n, fillvalue=None): 19 | "Collect data into fixed-length chunks or blocks." 20 | # grouper('ABCDEFG', 3, 'x') --> ABC DEF Gxx" 21 | # From itertools docs. 22 | args = [iter(iterable)] * n 23 | return itertools.zip_longest(*args, fillvalue=fillvalue) 24 | 25 | 26 | async def changed_files(gh, pr_id, cursor, paths): 27 | """Append file paths for the changed PR to `paths`.""" 28 | has_more_files = True 29 | cursor = None 30 | while has_more_files: 31 | result = await gh.graphql(FILES_QUERY, node=pr_id, cursor=cursor) 32 | pr_node = result["node"] 33 | files_node = pr_node["files"] 34 | has_more_files = files_node["pageInfo"]["hasNextPage"] 35 | for path_edge in files_node["edges"]: 36 | cursor = path_edge["cursor"] 37 | paths.append(path_edge["node"]["path"]) 38 | 39 | 40 | async def main(): 41 | oauth_token = sys.argv[1] 42 | async with httpx.AsyncClient(timeout=None) as client: 43 | gh = gidgethub.httpx.GitHubAPI(client, "brettcannon/stdlib-stats", 44 | oauth_token=oauth_token) 45 | pr_to_files = {} 46 | more_files = [] 47 | has_more_prs = True 48 | cursor = None 49 | print("Getting PR IDs ...", end="", flush=True) 50 | while has_more_prs: 51 | result = await gh.graphql(PR_QUERY, cursor=cursor) 52 | pull_requests = result["repository"]["pullRequests"] 53 | has_more_prs = pull_requests["pageInfo"]["hasNextPage"] 54 | for pr in pull_requests["edges"]: 55 | # Will naturally end on the appropriate cursor for the next query. 56 | cursor = pr["cursor"] 57 | pr_node = pr["node"] 58 | pr_number = pr_node["number"] 59 | pr_id = pr_node["id"] 60 | files_connection = pr_node["files"] 61 | files = [] 62 | files_cursor = None 63 | for files_edge in files_connection["edges"]: 64 | files_cursor = files_edge["cursor"] 65 | files.append(files_edge["node"]["path"]) 66 | pr_to_files[pr_number] = files 67 | if files_connection["pageInfo"]["hasNextPage"]: 68 | more_files.append((gh, pr_id, files_cursor, files)) 69 | print(len(pr_to_files), "PRs found") 70 | 71 | print(len(more_files), "PRs have more files", end="", flush=True) 72 | # Throttling to 10 concurrent requests every 5 seconds is a total guess, 73 | # but it seems to not trigger GitHub's abuse defenses. 74 | for pr_chunk in grouper(more_files, 10): 75 | async with curio.TaskGroup() as g: 76 | for args in filter(None, pr_chunk): 77 | await g.spawn(changed_files, *args) 78 | await g.spawn(curio.sleep, 5) 79 | print(".", end="", flush=True) 80 | 81 | with open("pull_requests.json", "w", encoding="utf-8") as file: 82 | json.dump(pr_to_files, file) 83 | 84 | 85 | if __name__ == "__main__": 86 | curio.run(main) 87 | -------------------------------------------------------------------------------- /release_dates.json: -------------------------------------------------------------------------------- 1 | { 2 | "0.9": "1991-02-20", 3 | "1.0": "1994-01-26", 4 | "1.1": "1994-10-11", 5 | "1.2": "1995-04-13", 6 | "1.3": "1995-10-13", 7 | "1.4": "1996-10-25", 8 | "1.5": "1998-01-03", 9 | "1.6": "2000-09-05", 10 | "2.0": "2000-10-16", 11 | "2.1": "2001-04-15", 12 | "2.2": "2001-12-21", 13 | "2.3": "2003-06-29", 14 | "2.4": "2004-11-30", 15 | "2.5": "2006-09-19", 16 | "2.6": "2008-10-01", 17 | "3.0": "2008-12-03", 18 | "3.1": "2009-06-27", 19 | "3.2": "2011-02-20", 20 | "3.3": "2012-09-29", 21 | "3.4": "2014-03-16", 22 | "3.5": "2015-09-13", 23 | "3.6": "2016-12-23", 24 | "3.7": "2018-06-27", 25 | "3.8": "2019-10-14", 26 | "3.9": "2020-10-05" 27 | } 28 | -------------------------------------------------------------------------------- /required.json: -------------------------------------------------------------------------------- 1 | [ 2 | "_abc", 3 | "_codecs", 4 | "_imp", 5 | "_io", 6 | "_signal", 7 | "_thread", 8 | "_warnings", 9 | "_weakref", 10 | "abc", 11 | "codecs", 12 | "encodings", 13 | "importlib", 14 | "io", 15 | "marshal", 16 | "posix", 17 | "time", 18 | "zipimport" 19 | ] -------------------------------------------------------------------------------- /required.py: -------------------------------------------------------------------------------- 1 | import json 2 | import re 3 | import subprocess 4 | import sys 5 | 6 | IMPORT_RE = re.compile(r"^import '?([^\s\.']+)'? #") 7 | 8 | call = subprocess.run([sys.executable, "-v", "-S", "-c", "pass"], 9 | capture_output=True, encoding="utf-8", check=True) 10 | 11 | module_names = set() 12 | for line in call.stderr.splitlines(): 13 | if match := IMPORT_RE.match(line): 14 | name = match.groups()[0] 15 | if name.startswith("_frozen_importlib"): 16 | name = "importlib" 17 | module_names.add(name) 18 | print(name) 19 | 20 | with open("required.json", "w", encoding="UTF-8") as file: 21 | json.dump(sorted(module_names), file, indent=2) 22 | -------------------------------------------------------------------------------- /stdlib.csv: -------------------------------------------------------------------------------- 1 | name,required,category,project_count,oldest_commit,newest_commit,commit_count,pr_count 2 | __future__,False,__future__,1547,2001-02-26,2020-07-25,28,2 3 | _thread,True,concurrency,80,2008-05-25,2021-02-19,119,10 4 | abc,True,python,604,2007-06-14,2020-10-26,50,2 5 | aifc,False,mm,2,1993-01-22,2019-06-18,82,3 6 | antigravity,False,eastereggs,0,2008-10-19,2020-04-14,5,0 7 | argparse,False,allos,703,2010-03-02,2020-12-23,87,30 8 | array,False,datatypes,183,1993-02-19,2021-01-03,290,3 9 | ast,False,language,336,2005-10-20,2021-02-26,256,9 10 | asynchat,False,ipc,5,1999-01-12,2019-11-19,53,1 11 | asyncio,False,ipc,298,2013-10-17,2020-12-18,864,50 12 | asyncore,False,ipc,19,1999-01-12,2020-11-22,123,3 13 | atexit,False,python,256,2007-03-21,2021-02-19,25,0 14 | audioop,False,mm,3,1992-06-01,2020-03-19,118,2 15 | base64,False,netdata,676,1995-06-14,2020-12-31,65,5 16 | bdb,False,debug,7,1992-01-22,2020-02-23,87,9 17 | binascii,False,netdata,321,1995-08-07,2020-03-24,137,2 18 | binhex,False,netdata,0,1995-08-07,2020-11-01,48,0 19 | bisect,False,datatypes,125,1992-09-02,2020-10-19,42,0 20 | builtins,False,python,334,1990-12-20,2021-02-19,719,16 21 | bz2,False,archiving,89,2011-04-03,2020-10-24,73,4 22 | cProfile,False,debug,80,2006-02-08,2021-01-20,73,5 23 | calendar,False,datatypes,202,1990-10-13,2020-06-02,67,1 24 | cgi,False,internet,124,1995-01-12,2021-02-14,150,5 25 | cgitb,False,internet,4,2001-08-18,2018-05-09,30,5 26 | chunk,False,mm,0,1999-06-09,2017-04-05,20,0 27 | cmath,False,numeric,11,1996-01-12,2020-09-10,77,2 28 | cmd,False,frameworks,24,1992-01-24,2013-07-04,51,3 29 | code,False,custominterp,66,1997-07-18,2020-01-15,40,1 30 | codecs,True,binary,767,2000-03-10,2021-01-06,175,2 31 | codeop,False,custominterp,9,1998-10-22,2021-02-13,23,0 32 | collections,False,datatypes,1752,2007-04-27,2021-02-26,421,10 33 | colorsys,False,mm,34,1992-09-07,2020-11-28,10,0 34 | compileall,False,language,11,1994-08-29,2021-02-08,68,4 35 | concurrent,False,concurrency,195,2010-09-18,2021-02-08,89,13 36 | configparser,False,fileformats,303,2008-05-14,2019-03-03,79,5 37 | contextlib,False,python,864,2006-02-28,2020-11-17,68,2 38 | contextvars,False,concurrency,39,2018-01-22,2020-11-04,5,0 39 | copy,False,datatypes,1002,1995-01-10,2020-05-28,78,0 40 | copyreg,False,persistence,47,2008-05-11,2020-10-24,7,1 41 | crypt,False,unix,12,2011-02-22,2020-02-17,22,0 42 | csv,False,fileformats,207,2003-03-20,2020-12-15,177,7 43 | ctypes,False,allos,365,2006-03-08,2021-02-28,559,21 44 | curses,False,allos,45,1994-08-30,2021-02-02,305,11 45 | dataclasses,False,python,64,2017-12-04,2021-02-26,51,10 46 | datetime,False,datatypes,1449,2010-07-23,2021-02-03,217,14 47 | dbm,False,persistence,20,2008-05-26,2020-06-17,98,1 48 | decimal,False,numeric,345,2004-07-01,2021-01-06,361,3 49 | difflib,False,text,147,2001-02-10,2020-04-29,91,1 50 | dis,False,language,39,1990-12-26,2021-02-26,163,6 51 | distutils,False,distribution,1176,1998-12-18,2021-03-04,1550,31 52 | doctest,False,development,227,2001-01-16,2021-03-02,240,8 53 | email,False,netdata,182,2001-09-23,2021-02-24,368,21 54 | encodings,True,binary,36,2000-03-10,2021-01-08,307,9 55 | ensurepip,False,distribution,1,2013-11-11,2021-01-30,66,4 56 | enum,False,datatypes,509,2013-06-14,2021-03-03,101,2 57 | errno,False,allos,550,1996-07-24,2020-05-07,31,2 58 | faulthandler,False,debug,17,2011-03-31,2021-02-19,120,1 59 | fcntl,False,unix,156,1992-08-17,2020-10-19,95,1 60 | filecmp,False,filesys,43,1999-10-26,2020-11-23,42,4 61 | fileinput,False,filesys,30,1997-11-21,2020-04-09,60,2 62 | fnmatch,False,filesys,247,1991-01-01,2020-12-18,33,1 63 | fractions,False,numeric,53,2008-02-11,2020-02-07,35,2 64 | ftplib,False,internet,27,1992-11-04,2020-04-14,164,2 65 | functools,False,functional,1424,2006-06-08,2020-12-30,240,12 66 | gc,False,python,280,2000-06-30,2021-02-19,239,2 67 | getopt,False,allos,94,1990-10-13,2015-11-02,34,0 68 | getpass,False,allos,183,1998-04-09,2019-11-19,36,0 69 | gettext,False,i18n,56,2000-08-25,2020-05-14,68,2 70 | glob,False,filesys,518,1991-01-01,2020-10-20,43,0 71 | graphlib,False,datatypes,0,2020-06-01,2020-10-12,2,0 72 | grp,False,unix,48,1994-06-23,2020-11-18,61,0 73 | gzip,False,archiving,234,1997-04-30,2021-02-26,128,2 74 | hashlib,False,crypto,708,1992-12-14,2021-02-14,265,12 75 | heapq,False,datatypes,113,2002-08-02,2020-09-27,121,1 76 | hmac,False,crypto,204,2001-09-11,2020-05-27,35,1 77 | html,False,markup,155,2007-12-07,2021-02-01,62,4 78 | http,False,internet,265,2008-05-26,2020-12-21,378,30 79 | idlelib,False,tk,4,2000-08-15,2021-02-23,838,44 80 | imaplib,False,internet,8,1998-04-09,2020-06-02,152,5 81 | imghdr,False,mm,18,1992-05-27,2020-06-20,24,7 82 | imp,True,superseded,202,1990-10-14,2021-02-19,799,5 83 | importlib,True,modules,600,2009-01-18,2021-03-04,490,11 84 | inspect,False,python,883,2001-02-27,2021-01-12,327,22 85 | io,True,allos,1542,2007-02-27,2021-02-22,719,27 86 | ipaddress,False,internet,89,2012-05-20,2020-08-11,82,10 87 | itertools,False,functional,1043,2003-02-01,2020-12-04,243,4 88 | json,False,netdata,1460,2008-05-08,2021-02-01,194,10 89 | keyword,False,language,80,1997-03-20,2021-02-26,32,0 90 | lib2to3,False,development,26,2008-03-19,2020-12-14,180,11 91 | linecache,False,filesys,65,1992-01-10,2020-11-06,40,5 92 | locale,False,i18n,209,1997-11-18,2020-12-01,224,6 93 | logging,False,allos,1395,2002-11-13,2020-12-16,429,7 94 | lzma,False,archiving,40,2011-11-30,2020-10-24,63,4 95 | mailbox,False,netdata,5,1994-04-28,2020-04-14,130,5 96 | mailcap,False,netdata,0,1995-09-30,2020-04-02,22,0 97 | marshal,True,persistence,49,1991-06-04,2020-12-01,243,7 98 | math,False,numeric,765,1990-10-14,2021-03-03,257,4 99 | mimetypes,False,netdata,158,1997-09-30,2021-03-02,86,12 100 | mmap,False,ipc,57,2000-03-30,2020-11-21,216,7 101 | modulefinder,False,modules,4,2002-12-31,2020-04-30,57,4 102 | msilib,False,windows,3,2006-03-05,2020-12-01,80,1 103 | msvcrt,False,windows,96,1997-08-07,2020-06-10,50,3 104 | multiprocessing,False,concurrency,412,2008-06-11,2021-02-08,393,32 105 | netrc,False,fileformats,18,1998-12-22,2017-11-25,30,2 106 | nis,False,unix,0,1992-08-12,2020-06-12,44,2 107 | nntplib,False,internet,2,1992-11-05,2020-05-16,86,0 108 | numbers,False,numeric,242,2007-08-30,2020-10-07,21,0 109 | operator,False,functional,613,2013-04-20,2020-11-21,36,2 110 | optparse,False,superseded,284,2002-11-14,2018-09-07,53,0 111 | os,False,filesys,3180,1990-10-13,2020-12-17,469,12 112 | ossaudiodev,False,mm,1,2002-11-30,2020-12-01,92,5 113 | pathlib,False,filesys,418,2013-11-22,2020-11-23,96,27 114 | pdb,False,debug,87,1992-01-10,2021-01-21,178,19 115 | pickle,False,persistence,564,1995-01-10,2020-12-01,545,14 116 | pickletools,False,language,10,2003-01-27,2019-05-26,101,2 117 | pipes,False,unix,56,1992-10-18,2011-09-02,21,0 118 | pkgutil,False,modules,199,2002-12-23,2020-06-17,61,2 119 | platform,False,allos,743,2003-04-24,2021-01-02,175,1 120 | plistlib,False,fileformats,84,2008-01-21,2020-11-03,40,4 121 | poplib,False,internet,1,1998-04-06,2020-01-10,66,0 122 | posix,True,unix,12,1990-10-14,2021-02-04,1171,31 123 | pprint,False,datatypes,329,1997-04-16,2020-11-23,68,4 124 | profile,False,debug,31,1992-04-21,2021-01-20,88,1 125 | pstats,False,debug,58,1994-06-23,2020-09-19,87,4 126 | pty,False,unix,31,1994-09-12,2020-02-05,32,3 127 | pwd,False,unix,83,1991-04-10,2020-11-18,77,0 128 | py_compile,False,language,20,1994-08-29,2020-07-25,62,0 129 | pyclbr,False,language,0,1995-07-28,2021-02-01,53,1 130 | pydoc,False,development,42,2001-02-27,2021-03-01,414,9 131 | queue,False,concurrency,248,2008-05-11,2020-12-28,28,0 132 | quopri,False,netdata,4,1995-06-14,2019-09-01,32,0 133 | random,False,numeric,881,1994-03-09,2021-02-04,264,2 134 | re,False,text,2310,1997-07-10,2021-01-25,552,12 135 | readline,False,text,49,1997-08-05,2021-02-16,201,0 136 | reprlib,False,datatypes,23,2008-05-16,2017-09-07,14,2 137 | resource,False,unix,75,1996-12-18,2021-02-18,62,1 138 | rlcompleter,False,text,12,1997-09-26,2020-06-30,45,1 139 | runpy,False,modules,52,2006-04-21,2020-03-31,41,2 140 | sched,False,concurrency,5,1991-04-07,2020-10-19,44,2 141 | secrets,False,crypto,30,2016-04-15,2020-04-17,6,1 142 | select,False,ipc,191,1992-06-23,2020-12-01,234,6 143 | selectors,False,ipc,27,2013-09-04,2020-07-22,48,2 144 | shelve,False,persistence,21,1995-01-10,2020-10-29,47,1 145 | shlex,False,frameworks,349,1998-12-22,2020-04-01,48,2 146 | shutil,False,filesys,958,1990-10-13,2021-03-02,205,21 147 | signal,True,ipc,354,1994-05-11,2021-03-05,247,2 148 | site,False,python,84,1996-08-17,2020-12-20,186,12 149 | smtpd,False,internet,6,2001-01-31,2020-11-22,64,1 150 | smtplib,False,internet,32,1998-01-29,2021-01-02,184,8 151 | sndhdr,False,mm,1,1994-01-14,2020-06-20,17,2 152 | socket,False,ipc,616,1991-06-25,2021-01-06,870,20 153 | socketserver,False,internet,60,2008-05-12,2020-12-31,70,4 154 | spwd,False,unix,4,2005-01-23,2020-11-19,23,0 155 | sqlite3,False,persistence,86,2006-04-21,2021-03-04,266,22 156 | ssl,False,ipc,283,2002-02-16,2020-12-02,539,23 157 | stat,False,filesys,240,1990-10-21,2020-05-19,29,4 158 | statistics,False,numeric,21,2013-10-19,2021-02-07,65,1 159 | string,False,text,553,1990-10-13,2021-02-26,1674,14 160 | stringprep,False,text,11,2003-04-18,2007-05-07,8,0 161 | struct,False,binary,572,2006-05-27,2020-12-28,158,7 162 | subprocess,False,concurrency,1101,2004-10-12,2021-03-04,511,13 163 | sunau,False,mm,1,1993-12-13,2019-06-18,39,1 164 | symtable,False,language,2,2001-02-02,2020-11-18,53,3 165 | sys,False,python,2975,1990-10-14,2021-02-28,504,9 166 | sysconfig,False,python,145,1996-08-08,2021-01-31,128,9 167 | syslog,False,unix,11,1994-07-14,2020-05-05,48,1 168 | tabnanny,False,language,1,1998-03-31,2017-05-04,33,1 169 | tarfile,False,archiving,196,2003-01-05,2020-12-12,213,12 170 | telnetlib,False,internet,12,1997-12-24,2019-06-24,51,1 171 | tempfile,False,filesys,1081,1991-11-12,2021-03-03,178,9 172 | termios,False,unix,88,1994-09-12,2020-10-18,57,2 173 | textwrap,False,text,516,2002-06-07,2020-10-18,71,3 174 | this,False,eastereggs,3,2002-02-08,2007-02-09,5,0 175 | threading,False,concurrency,930,1998-04-09,2021-02-02,216,7 176 | time,True,allos,1587,1990-10-14,2021-03-03,454,8 177 | timeit,False,debug,137,2003-03-05,2020-09-22,60,4 178 | tkinter,False,tk,46,1994-06-20,2021-01-21,574,16 179 | token,False,language,24,1993-11-11,2019-03-07,39,0 180 | tokenize,False,language,118,1992-01-01,2021-01-24,138,2 181 | trace,False,debug,9,2003-02-18,2021-02-01,93,0 182 | traceback,False,python,630,1994-07-01,2021-02-23,97,4 183 | tracemalloc,False,debug,17,2013-11-23,2020-12-16,116,1 184 | tty,False,unix,35,1994-09-12,2001-03-01,5,1 185 | turtle,False,frameworks,3,1998-12-04,2020-09-07,55,4 186 | turtledemo,False,frameworks,0,2010-11-01,2020-04-29,39,0 187 | types,False,datatypes,701,1994-06-23,2021-01-25,77,2 188 | typing,False,development,721,2015-05-22,2021-01-10,126,8 189 | unicodedata,False,text,191,2000-03-10,2021-01-20,157,4 190 | unittest,False,development,1580,2009-07-19,2021-01-15,385,30 191 | urllib,False,internet,938,1996-06-26,2021-02-15,420,25 192 | uu,False,netdata,1,1994-09-09,2019-12-02,38,0 193 | uuid,False,internet,670,2006-08-11,2020-07-22,80,5 194 | venv,False,distribution,7,2012-05-26,2020-07-28,88,5 195 | warnings,True,python,1409,2000-12-15,2021-02-19,223,6 196 | wave,False,mm,11,1994-02-15,2019-11-04,55,2 197 | weakref,True,datatypes,342,2001-02-01,2020-04-13,124,2 198 | webbrowser,False,internet,108,2000-07-09,2020-11-08,102,4 199 | winreg,False,windows,60,2000-03-28,2021-02-04,84,2 200 | winsound,False,windows,0,1999-02-04,2017-11-05,34,0 201 | wsgiref,False,internet,74,2006-08-11,2019-05-24,54,3 202 | xdrlib,False,fileformats,2,1996-08-19,2014-10-10,30,0 203 | xml,False,markup,342,2000-03-31,2021-02-24,877,17 204 | xmlrpc,False,internet,51,2008-05-26,2019-11-13,105,3 205 | zipapp,False,distribution,2,2015-03-13,2017-09-29,8,1 206 | zipfile,False,archiving,273,2000-03-31,2020-12-15,218,16 207 | zipimport,True,modules,28,2018-09-18,2020-12-18,10,0 208 | zlib,False,archiving,247,1997-04-29,2020-12-01,193,4 209 | zoneinfo,False,datatypes,7,2020-05-16,2021-03-03,23,7 210 | -------------------------------------------------------------------------------- /usage.py: -------------------------------------------------------------------------------- 1 | import ast 2 | import json 3 | import os 4 | import pathlib 5 | import sys 6 | from typing import Any, Container 7 | 8 | 9 | class ImportVisitor(ast.NodeVisitor): 10 | def __init__(self, looking_for: Container[str]): 11 | self._looking_for = looking_for 12 | self.found = set() 13 | 14 | def _handle_name(self, full_name: str): 15 | name = full_name.partition(".")[0] 16 | if name in self._looking_for: 17 | self.found.add(name) 18 | 19 | def visit_Import(self, node: ast.Import) -> Any: 20 | for alias in node.names: 21 | self._handle_name(alias.name) 22 | 23 | def visit_ImportFrom(self, node: ast.ImportFrom) -> Any: 24 | if not node.level and node.module: 25 | self._handle_name(node.module) 26 | 27 | 28 | with open("module_names.json", "rb") as file: 29 | module_names = frozenset(json.load(file)) 30 | 31 | 32 | found_in_projects = {} 33 | # Directory containing project directories. 34 | project_count = 0 35 | for project_dir in pathlib.Path(sys.argv[1]).iterdir(): 36 | if not project_dir.is_dir() or "-" not in project_dir.name: 37 | continue 38 | found_modules = set() 39 | # Traverse through project directory. 40 | for dirpath, dirnames, filenames in os.walk(project_dir): 41 | directory = pathlib.Path(dirpath) 42 | for filename in filenames: 43 | file_path = directory / filename 44 | if file_path.suffix == ".py": 45 | with file_path.open("rb") as source_file: 46 | raw_source = source_file.read() 47 | try: 48 | nodes = ast.parse(raw_source) 49 | except (SyntaxError, ValueError): 50 | continue 51 | visitor = ImportVisitor(module_names) 52 | try: 53 | visitor.visit(nodes) 54 | except RecursionError: 55 | pass 56 | found_modules |= visitor.found 57 | found_in_projects[project_dir.name] = frozenset(found_modules) 58 | project_count += 1 59 | if not project_count % 100: 60 | print(project_count) 61 | 62 | project_results = { 63 | project: sorted(modules) for project, modules in found_in_projects.items() 64 | } 65 | 66 | with open("usage.json", "w", encoding="UTF-8") as file: 67 | json.dump(project_results, file, sort_keys=True, indent=2) 68 | --------------------------------------------------------------------------------