Import from collections.abc instead of _collections_abc

Co-authored-by: Jim Fasarakis-Hilliard <d.f.hilliard@gmail.com>
This commit is contained in:
Lee DogeonandJim Fasarakis-Hilliard authored and Moreal committed 2023-01-24 15:51:47 +09:00
1 parent 03f0e717a7
commit 8284a7cb89
1 file changed
+6 -5
+6 -5
View File
@@ -7,12 +7,13 @@ pub(crate) fn make_module(vm: &VirtualMachine) -> PyObjectRef {
.get_attr("array", vm)
.expect("Expect array has array type.");
// TODO: RUSTPYTHON
// FIXME: it should import 'collections.abc' instead of '_collection_abc'
let collections_abc = vm
.import("_collections_abc", None, 0)
.expect("Expect collections.abc exist.");
let mutable_sequence = collections_abc
.import("collections.abc", None, 0)
.expect("Expect collections exist.");
let abc = collections_abc
.get_attr("abc", vm)
.expect("Expect collections has abc submodule.");
let mutable_sequence = abc
.get_attr("MutableSequence", vm)
.expect("Expect collections.abc has MutableSequence type.");