From ea5ff1979165281ac7663da63a56d89adf0b2007 Mon Sep 17 00:00:00 2001 From: jo Date: Tue, 22 Oct 2024 15:44:11 +0200 Subject: [PATCH 1/2] feat: drop support for python 3.8 Python 3.8 is EOL since 07 Oct 2024. --- .github/workflows/test.yml | 2 +- .gitlab-ci.yml | 2 +- .pre-commit-config.yaml | 2 +- pyproject.toml | 2 +- setup.py | 3 +-- tox.ini | 3 +-- 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1110c62..ff4ccc6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] name: Python ${{ matrix.python-version }} steps: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6dda2f9..4cef073 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,7 +26,7 @@ test: parallel: matrix: - - python_version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] + - python_version: ["3.9", "3.10", "3.11", "3.12", "3.13"] image: python:${python_version}-alpine before_script: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a3e73cb..1175070 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,7 +33,7 @@ repos: rev: v3.19.0 hooks: - id: pyupgrade - args: [--py38-plus] + args: [--py39-plus] - repo: https://github.com/pycqa/isort rev: 5.13.2 diff --git a/pyproject.toml b/pyproject.toml index f88f9b2..d1bf2ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ requires = ["setuptools"] build-backend = "setuptools.build_meta" [tool.pylint.main] -py-version = "3.8" +py-version = "3.9" recursive = true jobs = 0 diff --git a/setup.py b/setup.py index 5a26ebf..7272e1d 100644 --- a/setup.py +++ b/setup.py @@ -28,14 +28,13 @@ "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3", - "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", ], - python_requires=">=3.8", + python_requires=">=3.9", install_requires=[ "python-dateutil>=2.7.5", "requests>=2.20", diff --git a/tox.ini b/tox.ini index aa65921..5e316e4 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py38, py39, py310, py311, py312, py313 +envlist = py39, py310, py311, py312, py313 [testenv] passenv = FAKE_API_ENDPOINT @@ -10,7 +10,6 @@ commands = [gh-actions] python = - 3.8: py38 3.9: py39 3.10: py310 3.11: py311 From ebcdeacb131c8e3befa93b3ef737b025b4f888ee Mon Sep 17 00:00:00 2001 From: jo Date: Tue, 22 Oct 2024 15:47:04 +0200 Subject: [PATCH 2/2] refactor: upgrade code --- hcloud/metrics/domain.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hcloud/metrics/domain.py b/hcloud/metrics/domain.py index cf65571..c7e1f55 100644 --- a/hcloud/metrics/domain.py +++ b/hcloud/metrics/domain.py @@ -1,13 +1,13 @@ from __future__ import annotations from datetime import datetime -from typing import Dict, List, Literal, Tuple +from typing import Literal from dateutil.parser import isoparse from ..core import BaseDomain -TimeSeries = Dict[str, Dict[Literal["values"], List[Tuple[float, str]]]] +TimeSeries = dict[str, dict[Literal["values"], list[tuple[float, str]]]] class Metrics(BaseDomain):