From 45d8f7fb54a11d195854ce2b92bf744c0e9c33d0 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Sun, 19 Jan 2025 00:49:52 +0100 Subject: [PATCH] Chore: Remove support for EOL Python 3.6 --- .github/workflows/test.yaml | 11 +++-------- CHANGELOG.md | 1 + README.md | 2 +- docs/source/index.rst | 2 +- responder/api.py | 10 +--------- setup.py | 3 +-- 6 files changed, 8 insertions(+), 21 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 56b321b..da91c89 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -40,6 +40,8 @@ jobs: exclude: # Exclude test matrix slots that are no longer supported by GHA runners. + - os: 'ubuntu-20.04' + python-version: '3.6' - os: 'macos-latest' python-version: '3.6' - os: 'macos-latest' @@ -88,14 +90,7 @@ jobs: cache-dependency-glob: | pyproject.toml - - name: Install and validate package (Python 3.6) - if: matrix.python-version == '3.6' - run: | - pip install '.[full,develop,test]' - poe test - - - name: Install and validate package (Python >=3.6) - if: matrix.python-version != '3.6' + - name: Install and validate package run: | uv pip install '.[full,develop,test]' poe check diff --git a/CHANGELOG.md b/CHANGELOG.md index aa5d38d..1beab67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -66,6 +66,7 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm the `` argument of `responder run`, but is semantically different, as the former accepts a filesystem directory to the `package.json` file, but the latter expects a Python entrypoint specification. +- Platform: Removed support for EOL Python 3.6 ### Fixed diff --git a/README.md b/README.md index 16032fa..c140be8 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ Alternatively, install directly from the repository: pip install 'responder[full] @ git+https://github.com/kennethreitz/responder.git' -Responder supports **Python 3.6+**. +Responder supports **Python 3.7+**. # The Basic Idea diff --git a/docs/source/index.rst b/docs/source/index.rst index 9f97518..9ddbe91 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -118,7 +118,7 @@ Or use standard pip where ``uv`` is not available. pip install --upgrade 'responder' -Responder supports **Python 3.6+**. If you are looking at installing Responder +Responder supports **Python 3.7+**. If you are looking at installing Responder for hacking on it, please refer to the :ref:`sandbox` documentation. .. toctree:: diff --git a/responder/api.py b/responder/api.py index ab75aed..6d4046f 100644 --- a/responder/api.py +++ b/responder/api.py @@ -4,21 +4,13 @@ import uvicorn from starlette.middleware.cors import CORSMiddleware from starlette.middleware.errors import ServerErrorMiddleware +from starlette.middleware.exceptions import ExceptionMiddleware from starlette.middleware.gzip import GZipMiddleware from starlette.middleware.httpsredirect import HTTPSRedirectMiddleware from starlette.middleware.sessions import SessionMiddleware from starlette.middleware.trustedhost import TrustedHostMiddleware from starlette.testclient import TestClient -# Python 3.7+ -try: - from starlette.middleware.exceptions import ExceptionMiddleware -# Python 3.6 -except ImportError: - from starlette.exceptions import ( # type: ignore[attr-defined,no-redef] - ExceptionMiddleware, - ) - from . import status_codes from .background import BackgroundQueue from .formats import get_formats diff --git a/setup.py b/setup.py index 03e3449..244059f 100644 --- a/setup.py +++ b/setup.py @@ -115,7 +115,7 @@ def run(self): packages=find_packages(exclude=["tests"]), package_data={}, entry_points={"console_scripts": ["responder=responder.ext.cli:cli"]}, - python_requires=">=3.6", + python_requires=">=3.7", setup_requires=[], install_requires=required, extras_require={ @@ -164,7 +164,6 @@ def run(self): "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9",