Avoid using PyDictObject when compiling for RustPython
#6057
+24
−6
PyDictObject when compiling for RustPython
#6057