webrecorder / pywb

Core Python Web Archiving Toolkit for replay and recording of web archives
https://pypi.python.org/pypi/pywb
GNU General Public License v3.0
1.42k stars 217 forks source link

`datetime.datetime.utcnow()` is deprecated since Python 3.12 #913

Open Lisias opened 3 months ago

Lisias commented 3 months ago

I'm running pywb on Python 3.12 nowadays, and I had noticed the following message on the logs now and then:

Deprecated since version 3.12: Use datetime.now() with UTC instead.

Researching about, I learnt that datetime.datetime.utcnow() is being deprecated - if I understood correctly, naive datetimes are going to be avoided.

Since is unavoidable that utcnow() will be removed from the Python's library, I consider prudent to prevent users from being caught by surprise in the foreseeable future.