Skip to content

Commit f042b98

Browse files
Drop Python 3.7 (#770)
1 parent 9aa164d commit f042b98

File tree

4 files changed

+7
-26
lines changed

4 files changed

+7
-26
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
name: Test
5151
strategy:
5252
matrix:
53-
pyver: ['3.7', '3.8', '3.9', '3.10', '3.11']
53+
pyver: ['3.8', '3.9', '3.10', '3.11']
5454
os: [ubuntu, macos, windows]
5555
include:
5656
- pyver: pypy-3.8

aiohttp_jinja2/__init__.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import functools
2-
import sys
32
from typing import (
43
Any,
54
Awaitable,
65
Callable,
76
Dict,
87
Mapping,
98
Optional,
9+
Protocol,
1010
Sequence,
1111
Tuple,
1212
TypeVar,
@@ -19,11 +19,6 @@
1919
from aiohttp import web
2020
from aiohttp.abc import AbstractView
2121

22-
if sys.version_info >= (3, 8):
23-
from typing import Protocol
24-
else:
25-
from typing_extensions import Protocol
26-
2722
from .helpers import GLOBAL_HELPERS
2823
from .typedefs import Filters
2924

aiohttp_jinja2/helpers.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,15 @@
22
useful context functions, see
33
http://jinja.pocoo.org/docs/dev/api/#jinja2.contextfunction
44
"""
5-
import sys
6-
from typing import Any, Dict, Optional, Union
5+
from typing import Dict, Optional, TypedDict, Union
76

87
import jinja2
98
from aiohttp import web
109
from yarl import URL
1110

12-
if sys.version_info >= (3, 8):
13-
from typing import TypedDict
1411

15-
class _Context(TypedDict, total=False):
16-
app: web.Application
17-
18-
else:
19-
_Context = Dict[str, Any]
12+
class _Context(TypedDict, total=False):
13+
app: web.Application
2014

2115

2216
@jinja2.pass_context

setup.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,6 @@ def read(f):
2727
return Path(__file__).with_name(f).read_text()
2828

2929

30-
install_requires = [
31-
"aiohttp>=3.6.3",
32-
"jinja2>=3.0.0",
33-
'typing_extensions>=3.7.4; python_version<"3.8"',
34-
]
35-
36-
3730
setup(
3831
name="aiohttp-jinja2",
3932
version=version,
@@ -44,7 +37,6 @@ def read(f):
4437
"Intended Audience :: Developers",
4538
"Programming Language :: Python",
4639
"Programming Language :: Python :: 3",
47-
"Programming Language :: Python :: 3.7",
4840
"Programming Language :: Python :: 3.8",
4941
"Programming Language :: Python :: 3.9",
5042
"Programming Language :: Python :: 3.10",
@@ -59,7 +51,7 @@ def read(f):
5951
url="https://github.com/aio-libs/aiohttp_jinja2/",
6052
license="Apache 2",
6153
packages=["aiohttp_jinja2"],
62-
python_requires=">=3.7",
63-
install_requires=install_requires,
54+
python_requires=">=3.8",
55+
install_requires=("aiohttp>=3.6.3", "jinja2>=3.0.0"),
6456
include_package_data=True,
6557
)

0 commit comments

Comments
 (0)