From 4f0f0e30c9d2e4c8890a8850e296ced048237824 Mon Sep 17 00:00:00 2001 From: Karel van Klink <karel.vanklink@geant.org> Date: Wed, 29 Nov 2023 10:34:46 +0100 Subject: [PATCH] update classifiers in setup.py, use py3.11 StrEnum in playbook.py --- lso/playbook.py | 9 ++++----- setup.py | 5 ++++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lso/playbook.py b/lso/playbook.py index 5d81681..51320f3 100644 --- a/lso/playbook.py +++ b/lso/playbook.py @@ -1,10 +1,10 @@ """Module that gathers common API responses and data models.""" -import enum import json import logging import threading import uuid +from enum import StrEnum, auto from pathlib import Path from typing import Any @@ -21,14 +21,13 @@ from lso.config import DEFAULT_REQUEST_TIMEOUT logger = logging.getLogger(__name__) -# enum.StrEnum is only available in python 3.11 -class PlaybookJobStatus(str, enum.Enum): +class PlaybookJobStatus(StrEnum): """Enumerator for status codes of a playbook job that's running.""" #: All is well. - OK = "ok" + OK = auto() #: An error has occurred. - ERROR = "error" + ERROR = auto() class PlaybookLaunchResponse(BaseModel): diff --git a/setup.py b/setup.py index 6a4551e..f5fe093 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,10 @@ setup( "Programming Language :: Python :: 3.11", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", - "Development Status :: 2 - Pre-Alpha", + "Development Status :: 3 - Alpha", + "Framework :: FastAPI", + "Intended Audience :: System Administrators", + "Intended Audience :: Telecommunications Industry", ], python_requires=">=3.11", ) -- GitLab