Cloud routes: use timezone.utc, not datetime.UTC
Playwright Tests / test-playwright (1, 2) (push) Canceled after 0s
Playwright Tests / test-playwright (2, 2) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Compose Smoke Test / test-compose (push) Canceled after 0s
Playwright Tests / merge-reports (push) Canceled after 0s
Playwright Tests / test-playwright (1, 2) (push) Canceled after 0s
Playwright Tests / test-playwright (2, 2) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Compose Smoke Test / test-compose (push) Canceled after 0s
Playwright Tests / merge-reports (push) Canceled after 0s
The app supports Python 3.10 (requires-python, and the base image is python:3.10); datetime.UTC only exists from 3.11. Every other module already uses timezone.utc — this was the one file out of step, and it only passed locally because the dev venv is 3.13. The container would not import at all. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XtBzdDyLsmDaF1W7DLYtYM
This commit is contained in:
@@ -9,7 +9,7 @@ from __future__ import annotations
|
|||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
import logging
|
import logging
|
||||||
from datetime import UTC, datetime
|
from datetime import datetime, timezone
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
import httpx
|
import httpx
|
||||||
@@ -105,7 +105,7 @@ async def enroll(
|
|||||||
# talking to. Nothing refreshes this.
|
# talking to. Nothing refreshes this.
|
||||||
jwks=data["jwks"],
|
jwks=data["jwks"],
|
||||||
local_user_id=str(current_user.id),
|
local_user_id=str(current_user.id),
|
||||||
enrolled_at=datetime.now(UTC).isoformat(),
|
enrolled_at=datetime.now(timezone.utc).isoformat(),
|
||||||
portal_account=current_user.email,
|
portal_account=current_user.email,
|
||||||
)
|
)
|
||||||
cloud_config.save(config)
|
cloud_config.save(config)
|
||||||
|
|||||||
Reference in New Issue
Block a user