pallets-eco / flask-sqlalchemy

Adds SQLAlchemy support to Flask
https://flask-sqlalchemy.palletsprojects.com
BSD 3-Clause "New" or "Revised" License
4.18k stars 896 forks source link

Python 3.12 changes cause test failures due to deprecation warning #1303

Open s-t-e-v-e-n-k opened 5 months ago

s-t-e-v-e-n-k commented 5 months ago

Running the test suite under Python 3.12 has multiple failures that all stem from:

DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).

Since warnings are treated as errors, this causes a failure.