You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python 3.12 deprecates the use of datetime.datetime.utcnow, suggesting instead to use datetime.datetime.now(datetime.UTC).
Example from the humanize method:
File "/root/project/my_project/libs/utils.py", line 54, in arrow_humanize
return time.humanize()
^^^^^^^^^^^^^^^
File "/root/project/.tox/py312/lib/python3.12/site-packages/arrow/arrow.py", line 1150, in humanize
utc = dt_datetime.utcnow().replace(tzinfo=dateutil_tz.tzutc())
^^^^^^^^^^^^^^^^^^^^
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).
The text was updated successfully, but these errors were encountered:
Python 3.12 deprecates the use of
datetime.datetime.utcnow
, suggesting instead to usedatetime.datetime.now(datetime.UTC)
.Example from the
humanize
method:The text was updated successfully, but these errors were encountered: