Summary of What Needs to be Done
Replace usage of the deprecated datetime.utcnow() in src/utils/testing_utils.py with the timezone-aware datetime.now(timezone.utc).
Changes that Need to be Made
In src/utils/testing_utils.py:
- Add
timezone to the import: from datetime import datetime, timezone
- Replace both occurrences of
datetime.utcnow() with datetime.now(timezone.utc) in record_test_result and record_ci_run methods
Impact that it Would Provide
- Fixes Python 3.12+ deprecation warning for
datetime.utcnow()
- Uses the recommended timezone-aware datetime approach
- Correct timestamp generation for test metrics and CI run records
Note: Please assign this issue to the tmdeveloper007 account.
Summary of What Needs to be Done
Replace usage of the deprecated
datetime.utcnow()insrc/utils/testing_utils.pywith the timezone-awaredatetime.now(timezone.utc).Changes that Need to be Made
In
src/utils/testing_utils.py:timezoneto the import:from datetime import datetime, timezonedatetime.utcnow()withdatetime.now(timezone.utc)inrecord_test_resultandrecord_ci_runmethodsImpact that it Would Provide
datetime.utcnow()Note: Please assign this issue to the
tmdeveloper007account.