Selecting object show nothing in info pane
To set active object as parent armature deform with Automatic Weights for selected objects, you need to:


select objects include active:

object.select_set(True)

set active object:

view_layer.objects.active = object

call operator:

bpy.ops.object.parent_set(type='ARMATURE_AUTO')



Code example from scene:

import bpy

objects = [
    'Armature',
    'Cylinder',
    'Cylinder.001',
    'Cylinder.002'
    ]

context = bpy.context
view_layer = context.view_layer
scene = context.scene

# select objects include active
for ob in objects:
    scene.objects[ob].select_set(True)

# set active object
view_layer.objects.active = scene.objects[objects[0]]

# call operator
bpy.ops.object.parent_set(type='ARMATURE_AUTO')