Python: Selecting object by name in 2.8

The following: bpy.data.objects['Cube'].select = True bpy.context.scene.objects.active = bpy.data.objects['Sphere.017'] don't work in Blender 2.8, they did in 2.79 though. How should I select (