chore: bump minimum supported Python version to 3.11 (#10386)

This commit is contained in:
Bowen Liang 2024-11-24 13:28:46 +08:00 • committed by GitHub
commit 6c8e208ef3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
81 changed files with 271 additions and 300 deletions

View file

@ -1,4 +1,4 @@
from datetime import datetime, timezone
from datetime import UTC, datetime
from typing import Optional, Union
from sqlalchemy import asc, desc, or_
@ -104,7 +104,7 @@ class ConversationService:
return cls.auto_generate_name(app_model, conversation)
else:
conversation.name = name
conversation.updated_at = datetime.now(timezone.utc).replace(tzinfo=None)
conversation.updated_at = datetime.now(UTC).replace(tzinfo=None)
db.session.commit()
return conversation