use std::collections::HashSet;
use std::sync::OnceLock;
pub(crate) fn python_stdlib_set() -> &'static HashSet<String> {
static STDLIB: OnceLock<HashSet<String>> = OnceLock::new();
STDLIB.get_or_init(|| {
[
"abc",
"argparse",
"array",
"asyncio",
"base64",
"binascii",
"bisect",
"cmath",
"collections",
"concurrent",
"contextlib",
"copy",
"crypt",
"csv",
"ctypes",
"dataclasses",
"datetime",
"decimal",
"difflib",
"email",
"errno",
"functools",
"gc",
"getpass",
"glob",
"hashlib",
"heapq",
"html",
"http",
"importlib",
"inspect",
"io",
"ipaddress",
"itertools",
"json",
"logging",
"lzma",
"math",
"multiprocessing",
"numbers",
"operator",
"os",
"pathlib",
"pickle",
"platform",
"plistlib",
"queue",
"random",
"re",
"sched",
"secrets",
"select",
"shlex",
"shutil",
"signal",
"socket",
"sqlite3",
"ssl",
"statistics",
"string",
"struct",
"subprocess",
"sys",
"tempfile",
"textwrap",
"threading",
"time",
"timeit",
"tkinter",
"traceback",
"types",
"typing",
"typing_extensions",
"unicodedata",
"urllib",
"uuid",
"xml",
"xmlrpc",
"zipfile",
"zlib",
]
.iter()
.map(|s| s.to_string())
.collect()
})
}
pub(super) const THREAD_SAFE_CONSTRUCTORS: &[&str] = &[
"queue.Queue",
"queue.LifoQueue",
"queue.PriorityQueue",
"queue.SimpleQueue",
"Queue(", "LifoQueue(",
"PriorityQueue(",
"SimpleQueue(",
"multiprocessing.Queue",
"multiprocessing.JoinableQueue",
"multiprocessing.Manager",
"multiprocessing.Value",
"multiprocessing.Array",
"threading.Lock",
"threading.RLock",
"threading.Condition",
"threading.Semaphore",
"threading.BoundedSemaphore",
"threading.Event",
"threading.Barrier",
"concurrent.futures.ThreadPoolExecutor",
"concurrent.futures.ProcessPoolExecutor",
"ThreadPoolExecutor(",
"ProcessPoolExecutor(",
"collections.deque",
"deque(",
"asyncio.Queue",
"asyncio.PriorityQueue",
"asyncio.LifoQueue",
];