Update texture after setting image clamp

After setting:

bpy.data.images[‘my_image’].use_clamp_x = True
bpy.data.images[‘my_image’].use_clamp_y = True

I’m trying to figure out a way to get the 3d viewport to update the display of the tiling inside the script without having to physically right click the mouse on something in the vewport.

Here are some things that don’t work:

bpy.data.images[‘my_image’].buffers_free()
bpy.data.images[‘my_image’].gl_free()
bpy.data.images[‘my_image’].gl_load()
bpy.data.images[‘my_image’].gl_touch()
bpy.data.images[‘my_image’].update()
bpy.data.images[‘my_image’].update_tag()
bpy.context.window.screen.areas[3].tag_redraw()
bpy.context.window.screen.areas[3].regions[4].tag_redraw()
bpy.context.scene.update_tag(refresh=set())
bpy.context.scene.update()
bpy.ops.wm.redraw_timer(type=‘DRAW’, iterations=1)
bpy.context.window.screen.areas[3].regions[4].tag_redraw()
bpy.context.scene.update()
bpy.ops.object.mode_set(mode=“WEIGHT_PAINT”)
bpy.ops.object.mode_set(mode=“OBJECT”)
bpy.ops.wm.redraw_timer(type = ‘DRAW_WIN_SWAP’)
for area in bpy.context.screen.areas:
if area.type in [‘IMAGE_EDITOR’, ‘VIEW_3D’]:
area.tag_redraw()
bpy.context.scene.update_tag()
bpy.context.scene.update()

Thanks in advance