json-logging-python icon indicating copy to clipboard operation
json-logging-python copied to clipboard

datetime.utcnow() is deprecated in Python 3.12

Open DrGFreeman opened this issue 11 months ago • 3 comments

When running in Python 3.12 and above, the following warning is issued:

.../site-packages/json_logging/__init__.py:247: DeprecationWarning: datetime
is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.
    utcnow = datetime.utcnow()

Ref. https://docs.python.org/3.12/library/datetime.html#datetime.datetime.utcnow

DrGFreeman avatar Dec 12 '24 13:12 DrGFreeman

Looks like #107 addresses this issue.

DrGFreeman avatar Dec 12 '24 13:12 DrGFreeman

this fix is now merged.

donbowman avatar Jul 01 '25 20:07 donbowman

@bobbui Could you pehaps close this issue?

As this project is quite usefull, would you be willing to share repsonsibility for closing issues with more persons? It seems maybe @donbowman and me (@dwt) for example might be willing to help?

dwt avatar Jul 05 '25 18:07 dwt