Skip to content

Commit

Permalink
Drop Python 3.7 (#770)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamsorcerer committed Nov 11, 2023
1 parent 9aa164d commit f042b98
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
name: Test
strategy:
matrix:
pyver: ['3.7', '3.8', '3.9', '3.10', '3.11']
pyver: ['3.8', '3.9', '3.10', '3.11']
os: [ubuntu, macos, windows]
include:
- pyver: pypy-3.8
Expand Down
7 changes: 1 addition & 6 deletions aiohttp_jinja2/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import functools
import sys
from typing import (
Any,
Awaitable,
Callable,
Dict,
Mapping,
Optional,
Protocol,
Sequence,
Tuple,
TypeVar,
Expand All @@ -19,11 +19,6 @@
from aiohttp import web
from aiohttp.abc import AbstractView

if sys.version_info >= (3, 8):
from typing import Protocol
else:
from typing_extensions import Protocol

from .helpers import GLOBAL_HELPERS
from .typedefs import Filters

Expand Down
12 changes: 3 additions & 9 deletions aiohttp_jinja2/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,15 @@
useful context functions, see
http://jinja.pocoo.org/docs/dev/api/#jinja2.contextfunction
"""
import sys
from typing import Any, Dict, Optional, Union
from typing import Dict, Optional, TypedDict, Union

import jinja2
from aiohttp import web
from yarl import URL

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

class _Context(TypedDict, total=False):
app: web.Application

else:
_Context = Dict[str, Any]
class _Context(TypedDict, total=False):
app: web.Application


@jinja2.pass_context
Expand Down
12 changes: 2 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@ def read(f):
return Path(__file__).with_name(f).read_text()


install_requires = [
"aiohttp>=3.6.3",
"jinja2>=3.0.0",
'typing_extensions>=3.7.4; python_version<"3.8"',
]


setup(
name="aiohttp-jinja2",
version=version,
Expand All @@ -44,7 +37,6 @@ def read(f):
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand All @@ -59,7 +51,7 @@ def read(f):
url="https://github.com/aio-libs/aiohttp_jinja2/",
license="Apache 2",
packages=["aiohttp_jinja2"],
python_requires=">=3.7",
install_requires=install_requires,
python_requires=">=3.8",
install_requires=("aiohttp>=3.6.3", "jinja2>=3.0.0"),
include_package_data=True,
)

0 comments on commit f042b98

Please sign in to comment.