#1084945 utils.py:201: DeprecationWarning: datetime.datetime.utcnow()

#1084945#5
Date:
2024-10-11 14:42:52 UTC
From:
To:
pytest_benchmark emits a warning to stderr

/usr/lib/python3/dist-packages/pytest_benchmark/utils.py:201: 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).
  return datetime.utcnow().strftime("%Y%m%d_%H%M%S")

Since the error goes to stderr, it causes other packages to fail
autopkgtest (debci), unless they reconfigure with "allow-stderr".
It's better to not need to set that.

The problem was reported and fixed upstream by MR#253
https://github.com/ionelmc/pytest-benchmark/pull/253
(and updated further in later commits)