[Pkg-linaro-lava-devel] Bug#1102298: lavacli: deprecation warnings in lavacli 2.2.0-2

Yang, Lei Lei.Yang at windriver.com
Mon Apr 7 13:37:35 BST 2025


Package: lavacli
Version: 2.2.0-2
Severity: normal
Tags: patch

Dear Maintainer,

When I run lavacli, I got the following warning message:

  /usr/lib/python3/dist-packages/lavacli/commands/jobs.py:686: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
"dt": datetime.datetime.utcnow().isoformat(),

It's related to datetime.datetime.utcnow() introduced in Python 3.12 by replacing with datetime.datetime.now(datetime.timezone.utc).

The fix I attached maintain the same functionality while addressing the deprecation warnings and works for older and newer python

Please help to look.

Thanks

Lei


More information about the Pkg-linaro-lava-devel mailing list