Commit fb495a5

benny-dou <60535774+benny-dou@users.noreply.github.com>
2025-04-30 08:20:25
fix: fix deprecation warning for `datetime.utcnow()` in `boto3`
1 parent 7ed8330
Changed files (1)
src/database.py
@@ -7,6 +7,7 @@ Note: Memory Cache is always enabled.
 
 import json
 import os
+import warnings
 from urllib.parse import quote_plus, unquote_plus
 
 from aioboto3 import Session
@@ -21,6 +22,8 @@ from utils import bare_url, stringfy
 os.environ["AWS_REQUEST_CHECKSUM_CALCULATION"] = "when_required"
 os.environ["AWS_RESPONSE_CHECKSUM_VALIDATION"] = "when_required"
 
+warnings.filterwarnings("ignore", category=DeprecationWarning)
+
 
 async def get_db(key: str) -> dict:
     """Get KV."""