From 3fac2145758474f57c4290b4e4035b87c68e43d1 Mon Sep 17 00:00:00 2001 From: Marti Raudsepp Date: Tue, 21 Jan 2025 23:30:45 +0200 Subject: [PATCH] CI: Drop Python 3.7 testing (#20) Python 3.7 has had no security support since 2023 June. Fixes CI: 3.7 is no longer supported in latest GitHub Actions Ubuntu images: https://github.com/intgr/dogslow-sentry/actions/runs/12768757352/job/35589792433 --- .github/workflows/tests.yml | 2 +- README.rst | 6 +++++- dogslow_sentry/__init__.py | 1 - setup.py | 3 +-- tox.ini | 6 ++++-- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2c091c5..9b789f2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 diff --git a/README.rst b/README.rst index e85205c..c2c7f4d 100644 --- a/README.rst +++ b/README.rst @@ -14,7 +14,7 @@ Overview -------- Dogslow is a Django watchdog middleware that logs tracebacks of slow -requests. Dogslow-sentry requires Python 3.7+, Django 2.2+. +requests. Dogslow-sentry requires Python 3.8+, Django 2.2+. It started as an `internal project inside Bitbucket`_ to help trace operational problems. @@ -87,6 +87,10 @@ therefore safe to use in production. Changelog --------- +Unreleased + +* Dropped Python 3.7 support, now requires Python 3.8+. + 2.0.1 (2023-12-08) * Use ISO 8601-like YYYY-MM-DD date format for email/file logging. diff --git a/dogslow_sentry/__init__.py b/dogslow_sentry/__init__.py index c6debdf..32ea5ec 100644 --- a/dogslow_sentry/__init__.py +++ b/dogslow_sentry/__init__.py @@ -108,7 +108,6 @@ def frames_to_traceback( tb = None while frame is not None: # No point to trace further than the middleware itself - # Note: TracebackType() constructor requires Python >= 3.7 tb = TracebackType(tb, frame, frame.f_lasti, frame.f_lineno) if ( frame.f_code.co_filename == until_file diff --git a/setup.py b/setup.py index 3ff7593..1f28186 100755 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ def long_description(): setup( author="Marti Raudsepp", author_email="marti@juffo.org", - python_requires=">=3.7", + python_requires=">=3.8", classifiers=[ "Development Status :: 6 - Mature", "Framework :: Django", @@ -33,7 +33,6 @@ def long_description(): ), "Natural Language :: English", "Operating System :: OS Independent", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", diff --git a/tox.ini b/tox.ini index 2332b66..1e9de59 100644 --- a/tox.ini +++ b/tox.ini @@ -1,10 +1,12 @@ [tox] # NB! Don't forget to update `.github/workflows/tests.yml` -envlist = py{37,38,39,310,311}-dj{22,30,32},py{38,39,310,311,312}-dj{40,41,42},py{310,311,312}-dj50 +envlist = + py{38,39,310,311}-dj{22,30,32} + py{38,39,310,311,312}-dj{40,41,42} + py{310,311,312}-dj50 [gh-actions] python = - 3.7: py37-dj{22,30,32} 3.8: py38-dj{22,30,32,40,41,42} 3.9: py39-dj{22,30,32,40,41,42} 3.10: py310-dj{22,30,32,40,41,42,50}