Skip to content

Commit 45e0dca

Browse files
Drop Python 3.7 (#507)
1 parent fb98feb commit 45e0dca

File tree

6 files changed

+3
-25
lines changed

6 files changed

+3
-25
lines changed

.github/workflows/ci.yml

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

aiohttp_debugtoolbar/main.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
import secrets
2-
import sys
32
from pathlib import Path
4-
from typing import Iterable, Sequence, Tuple, Type, Union
5-
6-
if sys.version_info >= (3, 8):
7-
from typing import Literal, TypedDict
8-
else:
9-
from typing_extensions import Literal, TypedDict
3+
from typing import Iterable, Literal, Sequence, Tuple, Type, TypedDict, Union
104

115
import aiohttp_jinja2
126
import jinja2

aiohttp_debugtoolbar/panels/versions.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
11
import platform
22
import sys
3+
from importlib.metadata import Distribution, version
34
from operator import itemgetter
45
from typing import ClassVar, Dict, List, Optional
56

67
from .base import DebugPanel
78

8-
if sys.version_info >= (3, 8):
9-
from importlib.metadata import Distribution, version
10-
else:
11-
Distribution = None
12-
13-
def version(_v):
14-
return ""
15-
169

1710
__all__ = ("VersionDebugPanel",)
1811
aiohttp_version = version("aiohttp")
@@ -44,9 +37,6 @@ def get_packages(cls) -> List[Dict[str, str]]:
4437
if VersionDebugPanel.packages:
4538
return VersionDebugPanel.packages
4639

47-
if Distribution is None:
48-
return () # type: ignore[unreachable]
49-
5040
packages = []
5141
for distribution in Distribution.discover():
5242
name = distribution.metadata["Name"]

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,4 @@ pytest-aiohttp==1.0.5
1414
pytest-cov==4.1.0
1515
pytest-sugar==0.9.7
1616
pytest-timeout==2.2.0
17-
typing_extensions>=3.8; python_version<"3.8"
1817
yarl==1.9.2

setup.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ def read(fname):
2626
"Intended Audience :: Developers",
2727
"Programming Language :: Python",
2828
"Programming Language :: Python :: 3",
29-
"Programming Language :: Python :: 3.7",
3029
"Programming Language :: Python :: 3.8",
3130
"Programming Language :: Python :: 3.9",
3231
"Programming Language :: Python :: 3.10",
@@ -41,7 +40,6 @@ def read(fname):
4140
install_requires=(
4241
"aiohttp>=3.8",
4342
"aiohttp_jinja2",
44-
'typing_extensions>=3.8; python_version<"3.8"',
4543
),
4644
include_package_data=True,
4745
)

tests/test_panels_versions.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
import sys
21
from unittest.mock import create_autospec
32

4-
import pytest
53
from aiohttp import web
64

75
from aiohttp_debugtoolbar.panels import VersionDebugPanel
86

97

10-
@pytest.mark.skipif(sys.version_info < (3, 8), reason="Missing importlib.metadata")
118
async def test_packages():
129
request_mock = create_autospec(web.Request)
1310
panel = VersionDebugPanel(request_mock)

0 commit comments

Comments
 (0)