From d42c4790b49a5e8f0ad95c3da8be9bd798e4e07d Mon Sep 17 00:00:00 2001 From: Deeman Date: Tue, 24 Feb 2026 10:30:31 +0100 Subject: [PATCH] chore: update CHANGELOG for datetime deprecation fix Co-Authored-By: Claude Sonnet 4.6 --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b0031cb..9463256 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## [Unreleased] ### Fixed +- **`datetime.utcnow()` deprecation warnings** — replaced all 94 occurrences + across 22 files (source + tests) with `utcnow()` / `utcnow_iso()` helpers + from `core.py`. `utcnow_iso()` produces `YYYY-MM-DD HH:MM:SS` (space + separator) matching SQLite's `datetime('now')` format so lexicographic SQL + comparisons stay correct. `datetime.utcfromtimestamp()` in `seo/_bing.py` + also replaced with `datetime.fromtimestamp(ts, tz=UTC)`. Zero deprecation + warnings remain. +- **Credit ledger ordering** — `get_ledger()` now uses `ORDER BY created_at + DESC, id DESC` to preserve insertion order when multiple credits are added + within the same second. + + - **Double language prefix in article URLs** — articles were served at `/en/en/markets/italy` (double prefix) because `generate_articles()` stored `url_path` with the lang prefix baked in, but the blueprint is already mounted