python-poetry/tomlkit

datetime.utcnow and datetime.utcfromtimestamp are deprecated in Python 3.12

Closed this issue · 0 comments

https://github.com/sdispater/tomlkit/blob/a3cb8a2b71bd70001d13e5455177d5fe96208256/tests/test_items.py#L106

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 python/cpython#103857.)