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
parent 0181f1c08c
commit 6c8e208ef3
81 changed files with 271 additions and 300 deletions

View File

@@ -77,7 +77,7 @@ class FileService:
mime_type=mimetype,
created_by_role=(CreatedByRole.ACCOUNT if isinstance(user, Account) else CreatedByRole.END_USER),
created_by=user.id,
created_at=datetime.datetime.now(datetime.timezone.utc).replace(tzinfo=None),
created_at=datetime.datetime.now(datetime.UTC).replace(tzinfo=None),
used=False,
hash=hashlib.sha3_256(content).hexdigest(),
source_url=source_url,
@@ -123,10 +123,10 @@ class FileService:
mime_type="text/plain",
created_by=current_user.id,
created_by_role=CreatedByRole.ACCOUNT,
created_at=datetime.datetime.now(datetime.timezone.utc).replace(tzinfo=None),
created_at=datetime.datetime.now(datetime.UTC).replace(tzinfo=None),
used=True,
used_by=current_user.id,
used_at=datetime.datetime.now(datetime.timezone.utc).replace(tzinfo=None),
used_at=datetime.datetime.now(datetime.UTC).replace(tzinfo=None),
)
db.session.add(upload_file)