feat: add tomllib module

This commit is contained in:
Shunsuke Shibayama 2023-10-16 13:31:05 +09:00
parent 55f24ae5a6
commit 0fea05a9b4
2 changed files with 8 additions and 3 deletions

View file

@ -14,7 +14,7 @@ use crate::random::random;
use crate::serialize::get_magic_num_from_bytes; use crate::serialize::get_magic_num_from_bytes;
#[cfg(unix)] #[cfg(unix)]
pub const BUILTIN_PYTHON_MODS: [&str; 176] = [ pub const BUILTIN_PYTHON_MODS: [&str; 177] = [
"abc", "abc",
"argparse", "argparse",
"array", "array",
@ -166,6 +166,7 @@ pub const BUILTIN_PYTHON_MODS: [&str; 176] = [
"tkinter", "tkinter",
"token", "token",
"tokenize", "tokenize",
"tomllib",
"trace", "trace",
"traceback", "traceback",
"tracemalloc", "tracemalloc",
@ -193,7 +194,7 @@ pub const BUILTIN_PYTHON_MODS: [&str; 176] = [
"zoneinfo", "zoneinfo",
]; ];
#[cfg(windows)] #[cfg(windows)]
pub const BUILTIN_PYTHON_MODS: [&str; 171] = [ pub const BUILTIN_PYTHON_MODS: [&str; 172] = [
"abc", "abc",
"argparse", "argparse",
"array", "array",
@ -339,6 +340,7 @@ pub const BUILTIN_PYTHON_MODS: [&str; 171] = [
"tkinter", "tkinter",
"token", "token",
"tokenize", "tokenize",
"tomllib",
"trace", "trace",
"traceback", "traceback",
"tracemalloc", "tracemalloc",
@ -367,7 +369,7 @@ pub const BUILTIN_PYTHON_MODS: [&str; 171] = [
"zoneinfo", "zoneinfo",
]; ];
#[cfg(not(any(windows, unix)))] #[cfg(not(any(windows, unix)))]
pub const BUILTIN_PYTHON_MODS: [&str; 165] = [ pub const BUILTIN_PYTHON_MODS: [&str; 166] = [
"abc", "abc",
"argparse", "argparse",
"array", "array",
@ -509,6 +511,7 @@ pub const BUILTIN_PYTHON_MODS: [&str; 165] = [
"tkinter", "tkinter",
"token", "token",
"tokenize", "tokenize",
"tomllib",
"trace", "trace",
"traceback", "traceback",
"tracemalloc", "tracemalloc",

View file

@ -0,0 +1,2 @@
.load: Bytes -> {Str: Obj}
.loads: Str -> {Str: Obj}