As mentioned previously, index.commit() modifies the object store. Perhaps you want index.changes_from_tree() ?