Actions log of Run ci with Python3.12 print the following warning:
tests/fields/test_time.py::TestDatetimeFields::test_get_utcnow
/home/runner/work/tortoise-orm/tortoise-orm/tests/fields/test_time.py:78: 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).
now = datetime.utcnow().replace(tzinfo=get_default_timezone())
Motivation and Context
While fixing the warning above, I found that test_time.py can be refactor to reduce duplicated code.
How Has This Been Tested?
make ci
Checklist:
[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
Description
Actions log of Run ci with Python3.12 print the following warning:
Motivation and Context
While fixing the warning above, I found that test_time.py can be refactor to reduce duplicated code.
How Has This Been Tested?
make ci
Checklist: