From 253c66a9c2985ffc14defa647de830a3d9880a9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=9Clgen=20Sar=C4=B1kavak?= Date: Fri, 6 Jun 2025 22:19:44 +0300 Subject: [PATCH 1/2] Remove support for Python 3.8 Its EOL was Oct 2024 https://discuss.python.org/t/python-3-8-is-now-officially-eol/66983 --- .github/workflows/ci.yml | 2 +- setup.py | 1 - tox.ini | 3 +-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a7154460..8d3c897c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12"] os: [ubuntu-24.04] runs-on: ${{ matrix.os }} name: "${{ matrix.os }} Python: ${{ matrix.python-version }}" diff --git a/setup.py b/setup.py index f3365719..2500ed78 100644 --- a/setup.py +++ b/setup.py @@ -51,7 +51,6 @@ def get_version(): "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", diff --git a/tox.ini b/tox.ini index 6b2abd13..a2052e26 100644 --- a/tox.ini +++ b/tox.ini @@ -1,13 +1,12 @@ [tox] min_version = 4.4 envlist = - {py38,py39,py310,py311,py312}-django420-{end2end,unittests} + {py39,py310,py311,py312}-django420-{end2end,unittests} {py310,py311,py312}-django{500,510}-{end2end,unittests} py39-lint [gh-actions] python = - 3.8: py38 3.9: py39, py39-lint 3.10: py310 3.11: py311 From 25c242eb9451b8db8b29574b1ed76ad9fc4c4d24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=9Clgen=20Sar=C4=B1kavak?= Date: Fri, 6 Jun 2025 22:20:17 +0300 Subject: [PATCH 2/2] Modernize the code for Python 3.9 Applied via pyupgrade --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 2500ed78..54298dca 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ def get_version(): - version_file = open("django_prometheus/__init__.py", "r").read() + version_file = open("django_prometheus/__init__.py").read() version_match = re.search( r'^__version__ = [\'"]([^\'"]*)[\'"]', version_file, re.MULTILINE )