Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop Python 3.8 support #525

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
strategy:
matrix:
python-version:
- 3.8
- 3.9
- '3.10'
- '3.11'
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ repos:
rev: v3.17.0
hooks:
- id: pyupgrade
args: [--py38-plus]
args: [--py39-plus]
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.8.0
hooks:
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Changelog

* Support Python 3.13.

* Drop Python 3.8 support.

2.18.0 (2023-07-03)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Use **pip**:

python -m pip install apig-wsgi

Python 3.8 to 3.13 supported.
Python 3.9 to 3.13 supported.

Usage
=====
Expand Down
6 changes: 1 addition & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,21 @@ keywords = [
authors = [
{ name = "Adam Johnson", email = "me@adamj.eu" },
]
requires-python = ">=3.8"
requires-python = ">=3.9"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"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",
"Typing :: Typed",
]
dependencies = [
"typing-extensions; python_version<'3.8'",
]
urls.Changelog = "https://github.com/adamchainz/apig-wsgi/blob/main/CHANGELOG.rst"
urls.Funding = "https://adamj.eu/books/"
urls.Repository = "https://github.com/adamchainz/apig-wsgi"
Expand Down
10 changes: 4 additions & 6 deletions src/apig_wsgi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@
from base64 import b64decode
from base64 import b64encode
from collections import defaultdict
from collections.abc import Iterable
from collections.abc import Sequence
from io import BytesIO
from types import TracebackType
from typing import Any
from typing import Callable
from typing import Iterable
from typing import Sequence
from typing import Tuple
from typing import Type
from typing import Union
from urllib.parse import urlencode

Expand All @@ -29,8 +27,8 @@
RESERVED_URI_CHARACTERS = r"!#$&'()*+,/:;=?@[]%"

_ExcInfoType = Union[
Tuple[Type[BaseException], BaseException, TracebackType],
Tuple[None, None, None],
tuple[type[BaseException], BaseException, TracebackType],
tuple[None, None, None],
None,
]

Expand Down
11 changes: 4 additions & 7 deletions src/apig_wsgi/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,15 @@
from wsgiref.types import WSGIApplication
else:
# Partial backport of wsgiref.types
from collections.abc import Iterable
from types import TracebackType
from typing import Any
from typing import Callable
from typing import Dict
from typing import Iterable
from typing import Protocol
from typing import Tuple
from typing import Type
from typing import Union

_ExcInfo = Tuple[Type[BaseException], BaseException, TracebackType]
_OptExcInfo = Union[_ExcInfo, Tuple[None, None, None]]
_ExcInfo = tuple[type[BaseException], BaseException, TracebackType]
_OptExcInfo = Union[_ExcInfo, tuple[None, None, None]]

class StartResponse(Protocol):
"""start_response() callable as defined in PEP 3333"""
Expand All @@ -32,5 +29,5 @@ def __call__(
# /,
) -> Callable[[bytes], object]: ... # pragma: no cover

WSGIEnvironment = Dict[str, Any]
WSGIEnvironment = dict[str, Any]
WSGIApplication = Callable[[WSGIEnvironment, StartResponse], Iterable[bytes]]
1 change: 0 additions & 1 deletion tests/requirements/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*sys.argv[1:],
]
run = partial(subprocess.run, check=True)
run([*common_args, "--python", "3.8", "--output-file", "py38.txt"])
run([*common_args, "--python", "3.9", "--output-file", "py39.txt"])
run([*common_args, "--python", "3.10", "--output-file", "py310.txt"])
run([*common_args, "--python", "3.11", "--output-file", "py311.txt"])
Expand Down
116 changes: 0 additions & 116 deletions tests/requirements/py38.txt

This file was deleted.

4 changes: 2 additions & 2 deletions tests/test_apig_wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import sys
from base64 import b64encode
from collections.abc import Generator
from collections.abc import Iterable
from io import BytesIO
from typing import Any
from typing import Callable
from typing import Generator
from typing import Iterable

import pytest

Expand Down