tp-libvirt icon indicating copy to clipboard operation
tp-libvirt copied to clipboard

Fix SoftwareManager import

Open harihare opened this issue 2 years ago • 3 comments

avocado-framework > 94 clear init.py file url:avocado-framework/avocado@1b8360c Ref : https://github.com/avocado-framework-tests/avocado-misc-tests/pull/2347 patch fixes the import issue.

Signed-off-by: Hariharan T S [email protected]

harihare avatar Dec 07 '22 15:12 harihare

We may need use try ... except when import since tp-libvirt also need keep compatibility with lower avocado version, eg. 92lts

try :
  from avocado.utils.software_manager import SoftwareManager
except:
   from avocado.utils.software_manager.manager import SoftwareManager

chunfuwen avatar Dec 14 '22 07:12 chunfuwen

We may need use try ... except when import since tp-libvirt also need keep compatibility with lower avocado version, eg. 92lts

try :
  from avocado.utils.software_manager import SoftwareManager
except:
   from avocado.utils.software_manager.manager import SoftwareManager

IIUC, avocado-vt and tp-libvirt are intended to be aligned with latest master in other projects. If we want to fix usage on a specific avocado version I think we should introduce releases ourselves instead of adding complexity trying to make the import backwards compatible.

smitterl avatar Feb 28 '23 12:02 smitterl

We may need use try ... except when import since tp-libvirt also need keep compatibility with lower avocado version, eg. 92lts

try :
  from avocado.utils.software_manager import SoftwareManager
except:
   from avocado.utils.software_manager.manager import SoftwareManager

IIUC, avocado-vt and tp-libvirt are intended to be aligned with latest master in other projects. If we want to fix usage on a specific avocado version I think we should introduce releases ourselves instead of adding complexity trying to make the import backwards compatible.

@smitterl , To make our test stable, we do use avocado lts branch (like lts 92.0) instead of master branch. And we will upgrade to new lts in future.

dzhengfy avatar Mar 21 '23 02:03 dzhengfy