singingwolfboy / flask-dance

Doing the OAuth dance with style using Flask, requests, and oauthlib.
https://pypi.python.org/pypi/Flask-Dance/
MIT License
1.01k stars 158 forks source link

datetime.datetime.utc is deprecated in python 3.12 #436

Open chrisroat opened 3 months ago

chrisroat commented 3 months ago

The following line gives an error:

https://github.com/singingwolfboy/flask-dance/blob/70f79fd9b633cea7b9742219888fac08069edc22/flask_dance/consumer/storage/sqla.py#L41

When this was originally written, was there a reason to pass a python function instead of sqlalchemy func, like the following?

from sqlalchemy.sql import func
...
created_at = Column(DateTime, default=func.now(), nullable=False) 

(or even using server_default instead, but that requires a schema change to implement now)