Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions tests/snippets/sysmod.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

assert sys.platform == "linux" or sys.platform == "darwin" or sys.platform == "win32" or sys.platform == "unknown"

if hasattr(sys, "_framework"):
assert type(sys._framework) is str

assert isinstance(sys.builtin_module_names, tuple)
assert 'sys' in sys.builtin_module_names

Expand Down
3 changes: 3 additions & 0 deletions vm/src/sysmodule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ pub fn make_module(vm: &VirtualMachine, module: PyObjectRef, builtins: PyObjectR
"unknown".to_string()
};

let framework = "".to_string();

// https://doc.rust-lang.org/reference/conditional-compilation.html#target_endian
let bytorder = if cfg!(target_endian = "little") {
"little".to_string()
Expand Down Expand Up @@ -347,6 +349,7 @@ settrace() -- set the global debug tracing function
"modules" => modules.clone(),
"warnoptions" => ctx.new_list(vec![]),
"platform" => ctx.new_str(platform),
"_framework" => ctx.new_str(framework),
"meta_path" => ctx.new_list(vec![]),
"path_hooks" => ctx.new_list(vec![]),
"path_importer_cache" => ctx.new_dict(),
Expand Down