aio-libs / aiobotocore

asyncio support for botocore library using aiohttp

Home Page:https://aiobotocore.rtfd.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

datetime.utcnow is deprecated in Python 3.12

tirkarthi opened this issue · comments

datetime_now = datetime.datetime.utcnow()

Ref : python/cpython#103857

datetime.datetime’s utcnow() and utcfromtimestamp() are deprecated and will be removed in a future version. Instead, use timezone-aware objects to represent datetimes in UTC: respectively, call now() and fromtimestamp() with the tz parameter set to datetime.UTC. (Contributed by Paul Ganssle in gh-103857.)

btw, didn't follow the instructions in logging an issue :)

Sorry, I right clicked on the code line in GitHub UI and selected reference in new issue which seems to not show any template. I will check on the other repo. Thanks.