From 35224882184af46ddf10857086c8662ce0df6e7e Mon Sep 17 00:00:00 2001 From: Chris Williams Date: Thu, 9 Sep 2021 12:07:58 -0500 Subject: [PATCH] No longer omit stdlib dependencies from dependency inference. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Omitting these packages would break backport libraries (such as dataclasses). Performance impact is negligible since the dependency graph has already been gathered. Benchmarks using `$ hyperfine --warmup=1 --runs=10 './pants --no-remote-cache-{read,write} --no-pantsd dependencies ::'` Before these changes (omitting stdlib dependencies): ```bash Benchmark #1: ./pants --no-remote-cache-{read,write} --no-pantsd dependencies :: Time (mean ± σ): 8.852 s ± 0.105 s [User: 8.612 s, System: 5.314 s] Range (min … max): 8.702 s … 9.107 s 10 runs ``` After changes (with stdlib dependency inference) ```bash Benchmark #1: ./pants --no-remote-cache-{read,write} --no-pantsd dependencies :: Time (mean ± σ): 8.854 s ± 0.123 s [User: 8.619 s, System: 5.333 s] Range (min … max): 8.682 s … 9.111 s 10 runs ``` [ci skip-rust] [ci skip-build-wheels] --- .../dependency_inference/python_stdlib/BUILD | 4 - .../python_stdlib/__init__.py | 0 .../python_stdlib/combined.py | 6 - .../python_stdlib/py27.py | 292 ------------------ .../python_stdlib/py35.py | 214 ------------- .../python_stdlib/py36.py | 215 ------------- .../python_stdlib/py37.py | 216 ------------- .../python_stdlib/py38.py | 215 ------------- .../python/dependency_inference/rules.py | 6 +- 9 files changed, 2 insertions(+), 1166 deletions(-) delete mode 100644 src/python/pants/backend/python/dependency_inference/python_stdlib/BUILD delete mode 100644 src/python/pants/backend/python/dependency_inference/python_stdlib/__init__.py delete mode 100644 src/python/pants/backend/python/dependency_inference/python_stdlib/combined.py delete mode 100644 src/python/pants/backend/python/dependency_inference/python_stdlib/py27.py delete mode 100644 src/python/pants/backend/python/dependency_inference/python_stdlib/py35.py delete mode 100644 src/python/pants/backend/python/dependency_inference/python_stdlib/py36.py delete mode 100644 src/python/pants/backend/python/dependency_inference/python_stdlib/py37.py delete mode 100644 src/python/pants/backend/python/dependency_inference/python_stdlib/py38.py diff --git a/src/python/pants/backend/python/dependency_inference/python_stdlib/BUILD b/src/python/pants/backend/python/dependency_inference/python_stdlib/BUILD deleted file mode 100644 index e255db96c8d..00000000000 --- a/src/python/pants/backend/python/dependency_inference/python_stdlib/BUILD +++ /dev/null @@ -1,4 +0,0 @@ -# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). -# Licensed under the Apache License, Version 2.0 (see LICENSE). - -python_library() diff --git a/src/python/pants/backend/python/dependency_inference/python_stdlib/__init__.py b/src/python/pants/backend/python/dependency_inference/python_stdlib/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/python/pants/backend/python/dependency_inference/python_stdlib/combined.py b/src/python/pants/backend/python/dependency_inference/python_stdlib/combined.py deleted file mode 100644 index f6fad0d381c..00000000000 --- a/src/python/pants/backend/python/dependency_inference/python_stdlib/combined.py +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). -# Licensed under the Apache License, Version 2.0 (see LICENSE). - -from pants.backend.python.dependency_inference.python_stdlib import py27, py35, py36, py37, py38 - -combined_stdlib = py27.stdlib | py35.stdlib | py36.stdlib | py37.stdlib | py38.stdlib diff --git a/src/python/pants/backend/python/dependency_inference/python_stdlib/py27.py b/src/python/pants/backend/python/dependency_inference/python_stdlib/py27.py deleted file mode 100644 index 568ad12245a..00000000000 --- a/src/python/pants/backend/python/dependency_inference/python_stdlib/py27.py +++ /dev/null @@ -1,292 +0,0 @@ -# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). -# Licensed under the Apache License, Version 2.0 (see LICENSE). - -"""Refer to https://github.com/timothycrosley/isort/blob/develop/isort/stdlibs/py27.py.""" - -stdlib = { - "AL", - "BaseHTTPServer", - "Bastion", - "CGIHTTPServer", - "Carbon", - "ColorPicker", - "ConfigParser", - "Cookie", - "DEVICE", - "DocXMLRPCServer", - "EasyDialogs", - "FL", - "FrameWork", - "GL", - "HTMLParser", - "MacOS", - "MimeWriter", - "MiniAEFrame", - "Nav", - "PixMapWrapper", - "Queue", - "SUNAUDIODEV", - "ScrolledText", - "SimpleHTTPServer", - "SimpleXMLRPCServer", - "SocketServer", - "StringIO", - "Tix", - "Tkinter", - "UserDict", - "UserList", - "UserString", - "W", - "__builtin__", - "_winreg", - "abc", - "aepack", - "aetools", - "aetypes", - "aifc", - "al", - "anydbm", - "applesingle", - "argparse", - "array", - "ast", - "asynchat", - "asyncore", - "atexit", - "audioop", - "autoGIL", - "base64", - "bdb", - "binascii", - "binhex", - "bisect", - "bsddb", - "buildtools", - "bz2", - "cPickle", - "cProfile", - "cStringIO", - "calendar", - "cd", - "cfmfile", - "cgi", - "cgitb", - "chunk", - "cmath", - "cmd", - "code", - "codecs", - "codeop", - "collections", - "colorsys", - "commands", - "compileall", - "compiler", - "contextlib", - "cookielib", - "copy", - "copy_reg", - "crypt", - "csv", - "ctypes", - "curses", - "datetime", - "dbhash", - "dbm", - "decimal", - "difflib", - "dircache", - "dis", - "distutils", - "dl", - "doctest", - "dumbdbm", - "dummy_thread", - "dummy_threading", - "email", - "encodings", - "ensurepip", - "errno", - "exceptions", - "fcntl", - "filecmp", - "fileinput", - "findertools", - "fl", - "flp", - "fm", - "fnmatch", - "formatter", - "fpectl", - "fpformat", - "fractions", - "ftplib", - "functools", - "future_builtins", - "gc", - "gdbm", - "gensuitemodule", - "getopt", - "getpass", - "gettext", - "gl", - "glob", - "grp", - "gzip", - "hashlib", - "heapq", - "hmac", - "hotshot", - "htmlentitydefs", - "htmllib", - "httplib", - "ic", - "icopen", - "imageop", - "imaplib", - "imgfile", - "imghdr", - "imp", - "importlib", - "imputil", - "inspect", - "io", - "itertools", - "jpeg", - "json", - "keyword", - "lib2to3", - "linecache", - "locale", - "logging", - "macerrors", - "macostools", - "macpath", - "macresource", - "mailbox", - "mailcap", - "marshal", - "math", - "md5", - "mhlib", - "mimetools", - "mimetypes", - "mimify", - "mmap", - "modulefinder", - "msilib", - "msvcrt", - "multifile", - "multiprocessing", - "mutex", - "netrc", - "new", - "nis", - "nntplib", - "numbers", - "operator", - "optparse", - "os", - "ossaudiodev", - "parser", - "pdb", - "pickle", - "pickletools", - "pipes", - "pkgutil", - "platform", - "plistlib", - "popen2", - "poplib", - "posix", - "posixfile", - "pprint", - "profile", - "pstats", - "pty", - "pwd", - "py_compile", - "pyclbr", - "pydoc", - "quopri", - "random", - "re", - "readline", - "resource", - "rexec", - "rfc822", - "rlcompleter", - "robotparser", - "runpy", - "sched", - "select", - "sets", - "sgmllib", - "sha", - "shelve", - "shlex", - "shutil", - "signal", - "site", - "smtpd", - "smtplib", - "sndhdr", - "socket", - "spwd", - "sqlite3", - "ssl", - "stat", - "statvfs", - "string", - "stringprep", - "struct", - "subprocess", - "sunau", - "sunaudiodev", - "symbol", - "symtable", - "sys", - "sysconfig", - "syslog", - "tabnanny", - "tarfile", - "telnetlib", - "tempfile", - "termios", - "test", - "textwrap", - "thread", - "threading", - "time", - "timeit", - "token", - "tokenize", - "trace", - "traceback", - "ttk", - "tty", - "turtle", - "types", - "unicodedata", - "unittest", - "urllib", - "urllib2", - "urlparse", - "user", - "uu", - "uuid", - "videoreader", - "warnings", - "wave", - "weakref", - "webbrowser", - "whichdb", - "winsound", - "wsgiref", - "xdrlib", - "xml", - "xmlrpclib", - "zipfile", - "zipimport", - "zlib", -} diff --git a/src/python/pants/backend/python/dependency_inference/python_stdlib/py35.py b/src/python/pants/backend/python/dependency_inference/python_stdlib/py35.py deleted file mode 100644 index 1346cfcd7bf..00000000000 --- a/src/python/pants/backend/python/dependency_inference/python_stdlib/py35.py +++ /dev/null @@ -1,214 +0,0 @@ -# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). -# Licensed under the Apache License, Version 2.0 (see LICENSE). - -"""Refer to https://github.com/timothycrosley/isort/blob/develop/isort/stdlibs/py35.py.""" - -stdlib = { - "_dummy_thread", - "_thread", - "abc", - "aifc", - "argparse", - "array", - "ast", - "asynchat", - "asyncio", - "asyncore", - "atexit", - "audioop", - "base64", - "bdb", - "binascii", - "binhex", - "bisect", - "builtins", - "bz2", - "cProfile", - "calendar", - "cgi", - "cgitb", - "chunk", - "cmath", - "cmd", - "code", - "codecs", - "codeop", - "collections", - "colorsys", - "compileall", - "concurrent", - "configparser", - "contextlib", - "copy", - "copyreg", - "crypt", - "csv", - "ctypes", - "curses", - "datetime", - "dbm", - "decimal", - "difflib", - "dis", - "distutils", - "doctest", - "dummy_threading", - "email", - "encodings", - "ensurepip", - "enum", - "errno", - "faulthandler", - "fcntl", - "filecmp", - "fileinput", - "fnmatch", - "formatter", - "fpectl", - "fractions", - "ftplib", - "functools", - "gc", - "getopt", - "getpass", - "gettext", - "glob", - "grp", - "gzip", - "hashlib", - "heapq", - "hmac", - "html", - "http", - "imaplib", - "imghdr", - "imp", - "importlib", - "inspect", - "io", - "ipaddress", - "itertools", - "json", - "keyword", - "lib2to3", - "linecache", - "locale", - "logging", - "lzma", - "macpath", - "mailbox", - "mailcap", - "marshal", - "math", - "mimetypes", - "mmap", - "modulefinder", - "msilib", - "msvcrt", - "multiprocessing", - "netrc", - "nis", - "nntplib", - "numbers", - "operator", - "optparse", - "os", - "ossaudiodev", - "parser", - "pathlib", - "pdb", - "pickle", - "pickletools", - "pipes", - "pkgutil", - "platform", - "plistlib", - "poplib", - "posix", - "pprint", - "profile", - "pstats", - "pty", - "pwd", - "py_compile", - "pyclbr", - "pydoc", - "queue", - "quopri", - "random", - "re", - "readline", - "reprlib", - "resource", - "rlcompleter", - "runpy", - "sched", - "select", - "selectors", - "shelve", - "shlex", - "shutil", - "signal", - "site", - "smtpd", - "smtplib", - "sndhdr", - "socket", - "socketserver", - "spwd", - "sqlite3", - "ssl", - "stat", - "statistics", - "string", - "stringprep", - "struct", - "subprocess", - "sunau", - "symbol", - "symtable", - "sys", - "sysconfig", - "syslog", - "tabnanny", - "tarfile", - "telnetlib", - "tempfile", - "termios", - "test", - "textwrap", - "threading", - "time", - "timeit", - "tkinter", - "token", - "tokenize", - "trace", - "traceback", - "tracemalloc", - "tty", - "turtle", - "turtledemo", - "types", - "typing", - "unicodedata", - "unittest", - "urllib", - "uu", - "uuid", - "venv", - "warnings", - "wave", - "weakref", - "webbrowser", - "winreg", - "winsound", - "wsgiref", - "xdrlib", - "xml", - "xmlrpc", - "zipapp", - "zipfile", - "zipimport", - "zlib", -} diff --git a/src/python/pants/backend/python/dependency_inference/python_stdlib/py36.py b/src/python/pants/backend/python/dependency_inference/python_stdlib/py36.py deleted file mode 100644 index 3bf3aa073fb..00000000000 --- a/src/python/pants/backend/python/dependency_inference/python_stdlib/py36.py +++ /dev/null @@ -1,215 +0,0 @@ -# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). -# Licensed under the Apache License, Version 2.0 (see LICENSE). - -"""Refer to https://github.com/timothycrosley/isort/blob/develop/isort/stdlibs/py36.py.""" - -stdlib = { - "_dummy_thread", - "_thread", - "abc", - "aifc", - "argparse", - "array", - "ast", - "asynchat", - "asyncio", - "asyncore", - "atexit", - "audioop", - "base64", - "bdb", - "binascii", - "binhex", - "bisect", - "builtins", - "bz2", - "cProfile", - "calendar", - "cgi", - "cgitb", - "chunk", - "cmath", - "cmd", - "code", - "codecs", - "codeop", - "collections", - "colorsys", - "compileall", - "concurrent", - "configparser", - "contextlib", - "copy", - "copyreg", - "crypt", - "csv", - "ctypes", - "curses", - "datetime", - "dbm", - "decimal", - "difflib", - "dis", - "distutils", - "doctest", - "dummy_threading", - "email", - "encodings", - "ensurepip", - "enum", - "errno", - "faulthandler", - "fcntl", - "filecmp", - "fileinput", - "fnmatch", - "formatter", - "fpectl", - "fractions", - "ftplib", - "functools", - "gc", - "getopt", - "getpass", - "gettext", - "glob", - "grp", - "gzip", - "hashlib", - "heapq", - "hmac", - "html", - "http", - "imaplib", - "imghdr", - "imp", - "importlib", - "inspect", - "io", - "ipaddress", - "itertools", - "json", - "keyword", - "lib2to3", - "linecache", - "locale", - "logging", - "lzma", - "macpath", - "mailbox", - "mailcap", - "marshal", - "math", - "mimetypes", - "mmap", - "modulefinder", - "msilib", - "msvcrt", - "multiprocessing", - "netrc", - "nis", - "nntplib", - "numbers", - "operator", - "optparse", - "os", - "ossaudiodev", - "parser", - "pathlib", - "pdb", - "pickle", - "pickletools", - "pipes", - "pkgutil", - "platform", - "plistlib", - "poplib", - "posix", - "pprint", - "profile", - "pstats", - "pty", - "pwd", - "py_compile", - "pyclbr", - "pydoc", - "queue", - "quopri", - "random", - "re", - "readline", - "reprlib", - "resource", - "rlcompleter", - "runpy", - "sched", - "secrets", - "select", - "selectors", - "shelve", - "shlex", - "shutil", - "signal", - "site", - "smtpd", - "smtplib", - "sndhdr", - "socket", - "socketserver", - "spwd", - "sqlite3", - "ssl", - "stat", - "statistics", - "string", - "stringprep", - "struct", - "subprocess", - "sunau", - "symbol", - "symtable", - "sys", - "sysconfig", - "syslog", - "tabnanny", - "tarfile", - "telnetlib", - "tempfile", - "termios", - "test", - "textwrap", - "threading", - "time", - "timeit", - "tkinter", - "token", - "tokenize", - "trace", - "traceback", - "tracemalloc", - "tty", - "turtle", - "turtledemo", - "types", - "typing", - "unicodedata", - "unittest", - "urllib", - "uu", - "uuid", - "venv", - "warnings", - "wave", - "weakref", - "webbrowser", - "winreg", - "winsound", - "wsgiref", - "xdrlib", - "xml", - "xmlrpc", - "zipapp", - "zipfile", - "zipimport", - "zlib", -} diff --git a/src/python/pants/backend/python/dependency_inference/python_stdlib/py37.py b/src/python/pants/backend/python/dependency_inference/python_stdlib/py37.py deleted file mode 100644 index 8305a9c12af..00000000000 --- a/src/python/pants/backend/python/dependency_inference/python_stdlib/py37.py +++ /dev/null @@ -1,216 +0,0 @@ -# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). -# Licensed under the Apache License, Version 2.0 (see LICENSE). - -"""Refer to https://github.com/timothycrosley/isort/blob/develop/isort/stdlibs/py37.py.""" - -stdlib = { - "_dummy_thread", - "_thread", - "abc", - "aifc", - "argparse", - "array", - "ast", - "asynchat", - "asyncio", - "asyncore", - "atexit", - "audioop", - "base64", - "bdb", - "binascii", - "binhex", - "bisect", - "builtins", - "bz2", - "cProfile", - "calendar", - "cgi", - "cgitb", - "chunk", - "cmath", - "cmd", - "code", - "codecs", - "codeop", - "collections", - "colorsys", - "compileall", - "concurrent", - "configparser", - "contextlib", - "contextvars", - "copy", - "copyreg", - "crypt", - "csv", - "ctypes", - "curses", - "dataclasses", - "datetime", - "dbm", - "decimal", - "difflib", - "dis", - "distutils", - "doctest", - "dummy_threading", - "email", - "encodings", - "ensurepip", - "enum", - "errno", - "faulthandler", - "fcntl", - "filecmp", - "fileinput", - "fnmatch", - "formatter", - "fractions", - "ftplib", - "functools", - "gc", - "getopt", - "getpass", - "gettext", - "glob", - "grp", - "gzip", - "hashlib", - "heapq", - "hmac", - "html", - "http", - "imaplib", - "imghdr", - "imp", - "importlib", - "inspect", - "io", - "ipaddress", - "itertools", - "json", - "keyword", - "lib2to3", - "linecache", - "locale", - "logging", - "lzma", - "macpath", - "mailbox", - "mailcap", - "marshal", - "math", - "mimetypes", - "mmap", - "modulefinder", - "msilib", - "msvcrt", - "multiprocessing", - "netrc", - "nis", - "nntplib", - "numbers", - "operator", - "optparse", - "os", - "ossaudiodev", - "parser", - "pathlib", - "pdb", - "pickle", - "pickletools", - "pipes", - "pkgutil", - "platform", - "plistlib", - "poplib", - "posix", - "pprint", - "profile", - "pstats", - "pty", - "pwd", - "py_compile", - "pyclbr", - "pydoc", - "queue", - "quopri", - "random", - "re", - "readline", - "reprlib", - "resource", - "rlcompleter", - "runpy", - "sched", - "secrets", - "select", - "selectors", - "shelve", - "shlex", - "shutil", - "signal", - "site", - "smtpd", - "smtplib", - "sndhdr", - "socket", - "socketserver", - "spwd", - "sqlite3", - "ssl", - "stat", - "statistics", - "string", - "stringprep", - "struct", - "subprocess", - "sunau", - "symbol", - "symtable", - "sys", - "sysconfig", - "syslog", - "tabnanny", - "tarfile", - "telnetlib", - "tempfile", - "termios", - "test", - "textwrap", - "threading", - "time", - "timeit", - "tkinter", - "token", - "tokenize", - "trace", - "traceback", - "tracemalloc", - "tty", - "turtle", - "turtledemo", - "types", - "typing", - "unicodedata", - "unittest", - "urllib", - "uu", - "uuid", - "venv", - "warnings", - "wave", - "weakref", - "webbrowser", - "winreg", - "winsound", - "wsgiref", - "xdrlib", - "xml", - "xmlrpc", - "zipapp", - "zipfile", - "zipimport", - "zlib", -} diff --git a/src/python/pants/backend/python/dependency_inference/python_stdlib/py38.py b/src/python/pants/backend/python/dependency_inference/python_stdlib/py38.py deleted file mode 100644 index aab4b208b44..00000000000 --- a/src/python/pants/backend/python/dependency_inference/python_stdlib/py38.py +++ /dev/null @@ -1,215 +0,0 @@ -# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). -# Licensed under the Apache License, Version 2.0 (see LICENSE). - -"""Refer to https://github.com/timothycrosley/isort/blob/develop/isort/stdlibs/py38.py.""" - -stdlib = { - "_dummy_thread", - "_thread", - "abc", - "aifc", - "argparse", - "array", - "ast", - "asynchat", - "asyncio", - "asyncore", - "atexit", - "audioop", - "base64", - "bdb", - "binascii", - "binhex", - "bisect", - "builtins", - "bz2", - "cProfile", - "calendar", - "cgi", - "cgitb", - "chunk", - "cmath", - "cmd", - "code", - "codecs", - "codeop", - "collections", - "colorsys", - "compileall", - "concurrent", - "configparser", - "contextlib", - "contextvars", - "copy", - "copyreg", - "crypt", - "csv", - "ctypes", - "curses", - "dataclasses", - "datetime", - "dbm", - "decimal", - "difflib", - "dis", - "distutils", - "doctest", - "dummy_threading", - "email", - "encodings", - "ensurepip", - "enum", - "errno", - "faulthandler", - "fcntl", - "filecmp", - "fileinput", - "fnmatch", - "formatter", - "fractions", - "ftplib", - "functools", - "gc", - "getopt", - "getpass", - "gettext", - "glob", - "grp", - "gzip", - "hashlib", - "heapq", - "hmac", - "html", - "http", - "imaplib", - "imghdr", - "imp", - "importlib", - "inspect", - "io", - "ipaddress", - "itertools", - "json", - "keyword", - "lib2to3", - "linecache", - "locale", - "logging", - "lzma", - "mailbox", - "mailcap", - "marshal", - "math", - "mimetypes", - "mmap", - "modulefinder", - "msilib", - "msvcrt", - "multiprocessing", - "netrc", - "nis", - "nntplib", - "numbers", - "operator", - "optparse", - "os", - "ossaudiodev", - "parser", - "pathlib", - "pdb", - "pickle", - "pickletools", - "pipes", - "pkgutil", - "platform", - "plistlib", - "poplib", - "posix", - "pprint", - "profile", - "pstats", - "pty", - "pwd", - "py_compile", - "pyclbr", - "pydoc", - "queue", - "quopri", - "random", - "re", - "readline", - "reprlib", - "resource", - "rlcompleter", - "runpy", - "sched", - "secrets", - "select", - "selectors", - "shelve", - "shlex", - "shutil", - "signal", - "site", - "smtpd", - "smtplib", - "sndhdr", - "socket", - "socketserver", - "spwd", - "sqlite3", - "ssl", - "stat", - "statistics", - "string", - "stringprep", - "struct", - "subprocess", - "sunau", - "symbol", - "symtable", - "sys", - "sysconfig", - "syslog", - "tabnanny", - "tarfile", - "telnetlib", - "tempfile", - "termios", - "test", - "textwrap", - "threading", - "time", - "timeit", - "tkinter", - "token", - "tokenize", - "trace", - "traceback", - "tracemalloc", - "tty", - "turtle", - "turtledemo", - "types", - "typing", - "unicodedata", - "unittest", - "urllib", - "uu", - "uuid", - "venv", - "warnings", - "wave", - "weakref", - "webbrowser", - "winreg", - "winsound", - "wsgiref", - "xdrlib", - "xml", - "xmlrpc", - "zipapp", - "zipfile", - "zipimport", - "zlib", -} diff --git a/src/python/pants/backend/python/dependency_inference/rules.py b/src/python/pants/backend/python/dependency_inference/rules.py index f4f04456d3a..726246be2aa 100644 --- a/src/python/pants/backend/python/dependency_inference/rules.py +++ b/src/python/pants/backend/python/dependency_inference/rules.py @@ -11,7 +11,6 @@ ParsePythonImportsRequest, ) from pants.backend.python.dependency_inference.module_mapper import PythonModule, PythonModuleOwners -from pants.backend.python.dependency_inference.python_stdlib.combined import combined_stdlib from pants.backend.python.target_types import PythonSources, PythonTestsSources from pants.backend.python.util_rules import ancestor_files, pex from pants.backend.python.util_rules.ancestor_files import AncestorFiles, AncestorFilesRequest @@ -144,14 +143,13 @@ async def infer_python_dependencies_via_imports( ), ), ) - relevant_imports = detected_imports - combined_stdlib owners_per_import = await MultiGet( Get(PythonModuleOwners, PythonModule(imported_module)) - for imported_module in relevant_imports + for imported_module in detected_imports ) merged_result: set[Address] = set() - for owners, imp in zip(owners_per_import, relevant_imports): + for owners, imp in zip(owners_per_import, detected_imports): merged_result.update(owners.unambiguous) address = wrapped_tgt.target.address explicitly_provided_deps.maybe_warn_of_ambiguous_dependency_inference(