From f31d19f59235ae411b1870d3f286cee8e6b9f90b Mon Sep 17 00:00:00 2001 From: Rob Rodriguez Date: Wed, 11 Oct 2023 09:18:53 -0700 Subject: [PATCH] feat: Added Python 3.11 support (#316) Resolving string representation of enum for EchoLevel Edited TOML file --------- Co-authored-by: Rob Rodriguez Co-authored-by: Rob Rodriguez --- .github/workflows/build_and_test.yml | 8 ++++---- .github/workflows/publish.yml | 4 ++-- Dockerfile_secureli | 2 +- pyproject.toml | 2 +- secureli/repositories/settings.py | 6 ++++++ 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index f05ada22..94e9c030 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -18,11 +18,11 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python 3.9 + - name: Set up Python 3.11 id: setup-python uses: actions/setup-python@v4 with: - python-version: "3.9" + python-version: "3.11" - name: Set Up Project run: | @@ -48,11 +48,11 @@ jobs: - name: Validate Branch name run: ./scripts/get-current-branch.sh - - name: Set up Python 3.9 + - name: Set up Python 3.11 id: setup-python uses: actions/setup-python@v4 with: - python-version: "3.9" + python-version: "3.11" - name: Set Up Project run: | diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8f63dcff..25c12460 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -88,11 +88,11 @@ jobs: ref: main fetch-depth: 0 - - name: Set up Python 3.9 + - name: Set up Python 3.11 id: setup-python uses: actions/setup-python@v4 with: - python-version: "3.9" + python-version: "3.11" - run: | pip install poetry diff --git a/Dockerfile_secureli b/Dockerfile_secureli index 341be647..90d97242 100644 --- a/Dockerfile_secureli +++ b/Dockerfile_secureli @@ -1,7 +1,7 @@ # A basic dockerfile for mimicking/testing ci commands # docker build -t secureli . or poe docker-build -FROM python:3.9 +FROM python:3.11 WORKDIR /app COPY . /app RUN cp /app/ca-certificates/*.crt /usr/local/share/ca-certificates | true && update-ca-certificates diff --git a/pyproject.toml b/pyproject.toml index 62094e17..d05f1009 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ test = ["init", "lint", "coverage_run", "coverage_report"] e2e = "bats tests/end-to-end/test.bats" [tool.poetry.dependencies] -python = "^3.9" +python = "^3.11" typer = {version = ">=0.6.1,<0.10.0", extras = ["all"]} pygments = "^2.13.0" dependency-injector = {version = "^4.40.0", extras = ["yaml"]} diff --git a/secureli/repositories/settings.py b/secureli/repositories/settings.py index 0cfcfda5..1b326aae 100644 --- a/secureli/repositories/settings.py +++ b/secureli/repositories/settings.py @@ -74,6 +74,12 @@ class EchoLevel(str, Enum): warn = "WARN" error = "ERROR" + def __str__(self) -> str: + return self.value + + def __repr__(self) -> str: + return self.__str__() + class EchoSettings(BaseSettings): """