Why cannot I override the context for bpy.ops.object.origin_set() I ran the following code to reset the origin of Cube:

import bpy
# set selection
bpy.data.objects["Cube"].select = False
bpy.data.objects["Plane"].select = True

# override context
override = bpy.context.copy()
override["selected_bases"] = [bpy.data.scenes[0].object_bases["Cube"]]
override["active_base"] = bpy.data.scenes[0].object_bases["Cube"]

bpy.ops.object.origin_set(override)  # works on Plane
bpy.ops.transform.translate(override, value=(1,1,1))  # works on Cube


However this resets the origin of the Plane instead. What am I doing wrong ?
from the blender bug tracker https://developer.blender.org/T57572


  operator origin_set relies on selected_editable_objects afaict, so adding override["selected_editable_objects"] = [bpy.data.objects["Cube"]] should do the trick: