From dd1f60cf298761f6e884664177892cff7fa5a87f Mon Sep 17 00:00:00 2001 From: Nikita Zavadin Date: Mon, 25 Mar 2024 16:27:24 +0100 Subject: [PATCH] support python 3.9+ --- .github/workflows/test.yml | 2 +- src/magic_di/_injector.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4a7c0f2..bf3df12 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,7 +38,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 - uses: ./.github/actions/python-poetry-env diff --git a/src/magic_di/_injector.py b/src/magic_di/_injector.py index cd5404a..4f2cda5 100644 --- a/src/magic_di/_injector.py +++ b/src/magic_di/_injector.py @@ -11,7 +11,6 @@ Callable, Iterable, Iterator, - Self, TypeVar, cast, get_origin, @@ -166,7 +165,7 @@ async def disconnect(self) -> None: except Exception: self.logger.exception("Failed to disconnect %s", cls.__name__) - async def __aenter__(self) -> Self: + async def __aenter__(self) -> DependencyInjector: # noqa: PYI034 await self.connect() return self