datetime.datetime.utcnow() is deprecated since Python 3.12 and scheduled for removal in Python 3.14. Running the test suite on Python 3.13 produces 518 deprecation warnings from this call across the codebase.
Affected files (first-party code only):
montage/rdb.py — ~25 occurrences
montage/mw/__init__.py — 3 occurrences
montage/admin_endpoints.py — 1 occurrence
montage/public_endpoints.py — 1 occurrence
montage/meta_endpoints.py — 1 occurrence
Fix: Replace all occurrences with datetime.datetime.now(datetime.timezone.utc). This is a mechanical substitution — behaviour is identical (UTC timestamps), it's just the new preferred API.
Note: some third-party deps (boltons, clastic, sqlalchemy) also produce this warning. Those are upstream issues and out of scope here.
datetime.datetime.utcnow()is deprecated since Python 3.12 and scheduled for removal in Python 3.14. Running the test suite on Python 3.13 produces 518 deprecation warnings from this call across the codebase.Affected files (first-party code only):
montage/rdb.py— ~25 occurrencesmontage/mw/__init__.py— 3 occurrencesmontage/admin_endpoints.py— 1 occurrencemontage/public_endpoints.py— 1 occurrencemontage/meta_endpoints.py— 1 occurrenceFix: Replace all occurrences with
datetime.datetime.now(datetime.timezone.utc). This is a mechanical substitution — behaviour is identical (UTC timestamps), it's just the new preferred API.Note: some third-party deps (
boltons,clastic,sqlalchemy) also produce this warning. Those are upstream issues and out of scope here.