Skip to content

Commit 7920050

Browse files
Restore support for Python 3.7
1 parent 83ac43e commit 7920050

4 files changed

Lines changed: 12 additions & 3 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
strategy:
2424
matrix:
25-
python-version: [3.8, 3.9, "3.10", "3.11"]
25+
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
2626

2727
steps:
2828
- uses: actions/checkout@v1

neoteroi/di/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.0.2"
1+
__version__ = "0.0.3"

neoteroi/di/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
Dict,
1212
Mapping,
1313
Optional,
14-
Protocol,
1514
Set,
1615
Type,
1716
TypeVar,
@@ -20,6 +19,12 @@
2019
get_type_hints,
2120
)
2221

22+
try:
23+
from typing import Protocol
24+
except ImportError: # pragma: no cover
25+
from typing_extensions import Protocol
26+
27+
2328
T = TypeVar("T")
2429

2530

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,17 @@ classifiers = [
1515
"Development Status :: 3 - Alpha",
1616
"License :: OSI Approved :: MIT License",
1717
"Programming Language :: Python :: 3",
18+
"Programming Language :: Python :: 3.7",
1819
"Programming Language :: Python :: 3.8",
1920
"Programming Language :: Python :: 3.9",
2021
"Programming Language :: Python :: 3.10",
2122
"Programming Language :: Python :: 3.11",
2223
"Operating System :: OS Independent",
2324
]
2425
keywords = ["dependency", "injection", "type", "hints", "typing"]
26+
dependencies = [
27+
"typing_extensions; python_version < '3.8'"
28+
]
2529

2630
[tool.hatch.build.targets.sdist]
2731
exclude = [

0 commit comments

Comments
 (0)