diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index e8c6ae3..32daef6 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -17,7 +17,7 @@ jobs: name: python test strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v2 diff --git a/dev-requirements.txt b/dev-requirements.txt index 2f0d7fb..019520d 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,7 +1,7 @@ -mypy==1.6.0 -black==22.3.0 -isort==5.10.1 -flake8==6.1.0 -coverage==6.3.2 -pytest==7.1.2 -pytest-asyncio==0.18.3 +mypy==1.14.1 +black==24.10.0 +isort==5.13.2 +flake8==7.1.1 +coverage==7.6.10 +pytest==8.3.4 +pytest-asyncio==0.25.2 diff --git a/enochecker3/chaindb.py b/enochecker3/chaindb.py index c51d1a7..7f70d19 100644 --- a/enochecker3/chaindb.py +++ b/enochecker3/chaindb.py @@ -14,7 +14,7 @@ async def get(self, key: str) -> Any: "task_chain_id": self.task_chain_id, "key": key, } - ) # type: ignore + ) if val is None: raise KeyError(f"Key {key} not found") return val["value"] diff --git a/enochecker3/enochecker.py b/enochecker3/enochecker.py index 80e7d3f..80737e6 100644 --- a/enochecker3/enochecker.py +++ b/enochecker3/enochecker.py @@ -553,7 +553,7 @@ async def checker(task: CheckerTaskMessage) -> CheckerResultMessage: cast(ExploitCheckerTaskMessage, _task) ) else: - return CheckerResultMessage( + return CheckerResultMessage( # type: ignore result=CheckerTaskResult.INTERNAL_ERROR, message=f"Unsupported method: {task.method}", ) diff --git a/enochecker3/logging.py b/enochecker3/logging.py index 5f35ad4..6463595 100644 --- a/enochecker3/logging.py +++ b/enochecker3/logging.py @@ -16,7 +16,9 @@ def format(self, record: logging.LogRecord) -> str: record, "checker_task", None ) - timestamp: str = datetime.datetime.utcnow().strftime("%H:%M:%S.%f")[:-3] + timestamp: str = datetime.datetime.now(datetime.UTC).strftime("%H:%M:%S.%f")[ + :-3 + ] method: str = getattr(checker_task, "method", None) or "" levelname: str = getattr(record, "levelname", None) or "" task_id: str = getattr(checker_task, "task_id", None) or "" @@ -67,7 +69,9 @@ def create_message(self, record: logging.LogRecord) -> EnoLogMessage: type="infrastructure", severity=record.levelname, severity_level=self.to_level(record.levelname), - timestamp=datetime.datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%S.%fZ"), + timestamp=datetime.datetime.now(datetime.UTC).strftime( + "%Y-%m-%dT%H:%M:%S.%fZ" + ), message=record.msg, module=record.module, function=record.funcName, diff --git a/requirements.txt b/requirements.txt index 7c54154..5104248 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ -httpx>=0.23.0,<0.24.0 -motor>=3.1.2,<4.0.0 -fastapi>=0.75.2,<0.76.0 -uvicorn>=0.17.6,<0.18.0 +httpx>=0.28.0,<0.29.0 +motor>=3.6.1,<4.0.0 +fastapi>=0.115.6,<0.116.0 +uvicorn>=0.34.0,<0.35.0 gunicorn==20.1.0 diff --git a/setup.py b/setup.py index e341766..af08473 100755 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ setuptools.setup( name="enochecker3", - version="0.8.1", + version="0.9.0", author="ldruschk", author_email="ldruschk@posteo.de", description="FastAPI based library for building async python checkers for the EnoEngine A/D CTF Framework", @@ -31,12 +31,12 @@ "License :: OSI Approved :: MIT License", # Specify the Python versions you support here. In particular, ensure # that you indicate whether you support Python 2, Python 3 or both. - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ], zip_safe=False, # This might be needed for requirements.txt - python_requires=">=3.8", + python_requires=">=3.9", )