feat: Upgrade to Python 3.12 (#4675)

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
This commit is contained in:
Michael Genson
2024-12-04 22:31:26 -06:00
committed by GitHub
parent 0e6a40e210
commit 87504fbb05
43 changed files with 128 additions and 163 deletions

View File

@@ -3,7 +3,7 @@ from functools import lru_cache
import requests
_LAST_RESET = None
_LAST_RESET: datetime.datetime | None = None
@lru_cache(maxsize=1)
@@ -32,7 +32,7 @@ def get_latest_version() -> str:
global _LAST_RESET
now = datetime.datetime.now(datetime.timezone.utc)
now = datetime.datetime.now(datetime.UTC)
if not _LAST_RESET or now - _LAST_RESET > datetime.timedelta(days=MAX_DAYS_OLD):
_LAST_RESET = now