betcode-org / flumine

flūmine - Betting trading framework
MIT License
177 stars 60 forks source link

datetime.utcnow() deprecated in Python 3.12 #751

Open petercoles opened 7 months ago

petercoles commented 7 months ago

No solution proposed at this point (as it would need to be explicitly tested against older versions of Python).

This is just a marker that users will start to run into problems with Flumine's use of naive datetime objects at some time in an as yet unknown future version of Python.

mzaja commented 6 months ago

datetime.datetime.utcnow() calls need to be replaced with datetime.datetime.now(datetime.timezone.utc). This is backwards compatible with Python 3.8, the earliest supported version: https://docs.python.org/3.8/library/datetime.html#datetime.datetime.utcnow