chore(tooling): enforce python >=3.13 requirement and align uv lockfile

- Declare project.requires-python = ">=3.13" in pyproject.toml
- Lock dependencies and virtual package in uv.lock
- Update datetime.timezone.utc usages to datetime.UTC across scripts
This commit is contained in:
kiskaadee committed 2026-10-14 13:41:17 -05:00
1 parent ecacb1cc39
commit 298ae728e1
5 files changed
+18 -6

No files matched your search

+2 -2
View File
@@ -17,7 +17,7 @@ import subprocess
import sys import sys
import urllib.error import urllib.error
import urllib.request import urllib.request
from datetime import datetime, timezone from datetime import UTC, datetime
# History file location storing the transition log of public IP states. # History file location storing the transition log of public IP states.
# Defaults to a state directory managed securely by the systemd service unit. # Defaults to a state directory managed securely by the systemd service unit.
@@ -133,7 +133,7 @@ def record_ip(ip, status, details=None):
""" """
os.makedirs(os.path.dirname(HISTORY_FILE), exist_ok=True) os.makedirs(os.path.dirname(HISTORY_FILE), exist_ok=True)
entry = { entry = {
"timestamp": datetime.now(tz=timezone.utc).isoformat(), "timestamp": datetime.now(tz=UTC).isoformat(),
"ip": ip, "ip": ip,
"status": status "status": status
} }
+7
View File
@@ -1,3 +1,10 @@
[project]
name = "homelab-core"
version = "0.1.0"
description = "Homelab Core platform and orchestration"
requires-python = ">=3.13"
dependencies = []
[tool.pyright] [tool.pyright]
extraPaths = ["scripts"] extraPaths = ["scripts"]
exclude = [ exclude = [
+2 -2
View File
@@ -520,9 +520,9 @@ def check_ssl_cert(domain: str, port: int = 443, timeout: float = 3.0) -> dict[s
formatted_expiry = "-" formatted_expiry = "-"
if not_after_str: if not_after_str:
expiry_dt = datetime.datetime.strptime(not_after_str, "%b %d %H:%M:%S %Y %Z").replace( expiry_dt = datetime.datetime.strptime(not_after_str, "%b %d %H:%M:%S %Y %Z").replace(
tzinfo=datetime.timezone.utc tzinfo=datetime.UTC
) )
now_dt = datetime.datetime.now(datetime.timezone.utc) now_dt = datetime.datetime.now(datetime.UTC)
days_remaining = (expiry_dt - now_dt).days days_remaining = (expiry_dt - now_dt).days
formatted_expiry = expiry_dt.strftime("%Y-%m-%d") formatted_expiry = expiry_dt.strftime("%Y-%m-%d")
+2 -2
View File
@@ -652,7 +652,7 @@ def enqueue_deployment(
"deployment_config": deployment_config, "deployment_config": deployment_config,
"branch": branch, "branch": branch,
"commit_sha": commit_sha, "commit_sha": commit_sha,
"queued_at": datetime.datetime.now(datetime.timezone.utc).isoformat(), "queued_at": datetime.datetime.now(datetime.UTC).isoformat(),
} }
temp_file.write_text(json.dumps(data), encoding="utf-8") temp_file.write_text(json.dumps(data), encoding="utf-8")
@@ -706,7 +706,7 @@ def run_target_worker(target_name: str) -> bool:
"branch": branch, "branch": branch,
"commit_sha": commit_sha, "commit_sha": commit_sha,
"success": success, "success": success,
"timestamp": datetime.datetime.now(datetime.timezone.utc).isoformat(), "timestamp": datetime.datetime.now(datetime.UTC).isoformat(),
} }
status_file.write_text(json.dumps(status_data, indent=2), encoding="utf-8") status_file.write_text(json.dumps(status_data, indent=2), encoding="utf-8")
except OSError as e: except OSError as e:
Generated
+5
View File
@@ -1,3 +1,8 @@
version = 1 version = 1
revision = 5 revision = 5
requires-python = ">=3.13" requires-python = ">=3.13"
[[package]]
name = "homelab-core"
version = "0.1.0"
source = { virtual = "." }