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.7 #770

Merged
merged 3 commits into from
Nov 11, 2023
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
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,
)