mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-09-05 14:22:59 +00:00
- Filter Python stdlib modules at scan time to prevent false positives when the runtime checker fails (e.g. pip:argparse, pip:sys) - Install pip/npm packages one-by-one instead of batch so partial success is preserved when one package fails - Persist missing deps to DB after install via StoreMissingDeps() so reload reflects actual state instead of stale data - Use explicit master tenant context in handleInstallDeps for consistency with rescanAndUpdate()
233 lines
6.1 KiB
Go
233 lines
6.1 KiB
Go
package skills
|
||
|
||
// pythonStdlib contains top-level public module names from Python 3.10–3.14 stdlib.
|
||
// Includes deprecated modules (removed in 3.12+) for backward compatibility.
|
||
// Filtered at scan time to prevent false positives when the runtime checker
|
||
// fails (timeout, env issue) — without this, stdlib modules get reported
|
||
// as pip deps with wrong names (e.g. "pip:argparse", "pip:sys").
|
||
//
|
||
// Source: Python 3.14 sys.stdlib_module_names + deprecated modules from 3.11
|
||
var pythonStdlib = map[string]bool{
|
||
"__future__": true,
|
||
"_thread": true,
|
||
"abc": true,
|
||
"aifc": true,
|
||
"annotationlib": true,
|
||
"antigravity": true,
|
||
"argparse": true,
|
||
"array": true,
|
||
"ast": true,
|
||
"asynchat": true,
|
||
"asyncio": true,
|
||
"asyncore": true,
|
||
"atexit": true,
|
||
"audioop": true,
|
||
"base64": true,
|
||
"bdb": true,
|
||
"binascii": true,
|
||
"binhex": true,
|
||
"bisect": true,
|
||
"builtins": true,
|
||
"bz2": true,
|
||
"calendar": true,
|
||
"cgi": true,
|
||
"cgitb": true,
|
||
"chunk": true,
|
||
"cmath": true,
|
||
"cmd": true,
|
||
"code": true,
|
||
"codecs": true,
|
||
"codeop": true,
|
||
"collections": true,
|
||
"colorsys": true,
|
||
"compileall": true,
|
||
"compression": true,
|
||
"concurrent": true,
|
||
"configparser": true,
|
||
"contextlib": true,
|
||
"contextvars": true,
|
||
"copy": true,
|
||
"copyreg": true,
|
||
"cProfile": true,
|
||
"crypt": true,
|
||
"csv": true,
|
||
"ctypes": true,
|
||
"curses": true,
|
||
"dataclasses": true,
|
||
"datetime": true,
|
||
"dbm": true,
|
||
"decimal": true,
|
||
"difflib": true,
|
||
"dis": true,
|
||
"distutils": true,
|
||
"doctest": true,
|
||
"email": true,
|
||
"encodings": true,
|
||
"ensurepip": true,
|
||
"enum": true,
|
||
"errno": true,
|
||
"faulthandler": true,
|
||
"fcntl": true,
|
||
"filecmp": true,
|
||
"fileinput": true,
|
||
"fnmatch": true,
|
||
"fractions": true,
|
||
"ftplib": true,
|
||
"functools": true,
|
||
"gc": true,
|
||
"genericpath": true,
|
||
"getopt": true,
|
||
"getpass": true,
|
||
"gettext": true,
|
||
"glob": true,
|
||
"graphlib": true,
|
||
"grp": true,
|
||
"gzip": true,
|
||
"hashlib": true,
|
||
"heapq": true,
|
||
"hmac": true,
|
||
"html": true,
|
||
"http": true,
|
||
"idlelib": true,
|
||
"imaplib": true,
|
||
"imghdr": true,
|
||
"imp": true,
|
||
"importlib": true,
|
||
"inspect": true,
|
||
"io": true,
|
||
"ipaddress": true,
|
||
"itertools": true,
|
||
"json": true,
|
||
"keyword": true,
|
||
"lib2to3": true,
|
||
"linecache": true,
|
||
"locale": true,
|
||
"logging": true,
|
||
"lzma": true,
|
||
"mailbox": true,
|
||
"mailcap": true,
|
||
"marshal": true,
|
||
"math": true,
|
||
"mimetypes": true,
|
||
"mmap": true,
|
||
"modulefinder": true,
|
||
"msvcrt": true,
|
||
"multiprocessing": true,
|
||
"netrc": true,
|
||
"nis": true,
|
||
"nt": true,
|
||
"ntpath": true,
|
||
"nturl2path": true,
|
||
"nntplib": true,
|
||
"numbers": true,
|
||
"opcode": true,
|
||
"operator": true,
|
||
"optparse": true,
|
||
"os": true,
|
||
"ossaudiodev": true,
|
||
"pathlib": true,
|
||
"pdb": true,
|
||
"pickle": true,
|
||
"pickletools": true,
|
||
"pipes": true,
|
||
"pkgutil": true,
|
||
"platform": true,
|
||
"plistlib": true,
|
||
"poplib": true,
|
||
"posix": true,
|
||
"posixpath": true,
|
||
"pprint": true,
|
||
"profile": true,
|
||
"pstats": true,
|
||
"pty": true,
|
||
"pwd": true,
|
||
"py_compile": true,
|
||
"pyclbr": true,
|
||
"pydoc": true,
|
||
"pydoc_data": true,
|
||
"pyexpat": true,
|
||
"queue": true,
|
||
"quopri": true,
|
||
"random": true,
|
||
"re": true,
|
||
"readline": true,
|
||
"reprlib": true,
|
||
"resource": true,
|
||
"rlcompleter": true,
|
||
"runpy": true,
|
||
"sched": true,
|
||
"secrets": true,
|
||
"select": true,
|
||
"selectors": true,
|
||
"shelve": true,
|
||
"shlex": true,
|
||
"shutil": true,
|
||
"signal": true,
|
||
"site": true,
|
||
"smtpd": true,
|
||
"smtplib": true,
|
||
"sndhdr": true,
|
||
"socket": true,
|
||
"socketserver": true,
|
||
"sqlite3": true,
|
||
"sre_compile": true,
|
||
"sre_constants": true,
|
||
"sre_parse": true,
|
||
"ssl": true,
|
||
"stat": true,
|
||
"statistics": true,
|
||
"string": true,
|
||
"stringprep": true,
|
||
"struct": true,
|
||
"subprocess": true,
|
||
"sunau": true,
|
||
"symtable": true,
|
||
"sys": true,
|
||
"sysconfig": true,
|
||
"syslog": true,
|
||
"tabnanny": true,
|
||
"tarfile": true,
|
||
"telnetlib": true,
|
||
"tempfile": true,
|
||
"termios": true,
|
||
"test": true,
|
||
"textwrap": true,
|
||
"this": true,
|
||
"threading": true,
|
||
"time": true,
|
||
"timeit": true,
|
||
"tkinter": true,
|
||
"token": true,
|
||
"tokenize": true,
|
||
"tomllib": true,
|
||
"trace": true,
|
||
"traceback": true,
|
||
"tracemalloc": true,
|
||
"tty": true,
|
||
"turtle": true,
|
||
"turtledemo": true,
|
||
"types": true,
|
||
"typing": true,
|
||
"unicodedata": true,
|
||
"unittest": true,
|
||
"urllib": true,
|
||
"uu": true,
|
||
"uuid": true,
|
||
"venv": true,
|
||
"warnings": true,
|
||
"wave": true,
|
||
"weakref": true,
|
||
"webbrowser": true,
|
||
"winreg": true,
|
||
"winsound": true,
|
||
"wsgiref": true,
|
||
"xdrlib": true,
|
||
"xml": true,
|
||
"xmlrpc": true,
|
||
"zipapp": true,
|
||
"zipfile": true,
|
||
"zipimport": true,
|
||
"zlib": true,
|
||
"zoneinfo": true,
|
||
}
|