diff --git a/py/modio.c b/py/modio.c
index e75432b28d23217e94c81fbf806dc1c39e50239b..b4d033238fb0fc6c4b7ce0f09c353dddba148b9d 100644
--- a/py/modio.c
+++ b/py/modio.c
@@ -44,7 +44,7 @@ extern const mp_obj_type_t mp_type_textio;
 
 STATIC const mp_obj_type_t mp_type_iobase;
 
-STATIC mp_obj_base_t iobase_singleton = {&mp_type_iobase};
+STATIC const mp_obj_base_t iobase_singleton = {&mp_type_iobase};
 
 STATIC mp_obj_t iobase_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
     (void)type;