Skip to content
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
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: '3.10'
python-version: '3.11'
enable-cache: true
- name: Set up Python
run: uv python install
Expand All @@ -44,11 +44,11 @@ jobs:
fail-fast: false
matrix:
include:
- {name: '3.15', python: '3.15', os: ubuntu-latest}
- {name: '3.14', python: '3.14', os: ubuntu-latest}
- {name: '3.13', python: '3.13', os: ubuntu-latest}
- {name: '3.12', python: '3.12', os: ubuntu-latest}
- {name: '3.11', python: '3.11', os: ubuntu-latest}
- {name: '3.10', python: '3.10', os: ubuntu-latest}

steps:
- name: Checkout
Expand All @@ -66,7 +66,7 @@ jobs:
uv run pytest -vv tests/ext/test_pytest_plugin.py --cov=anydi --cov-append --cov-report=xml -p anydi -p pytester
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
if: matrix.python == '3.10'
if: matrix.python == '3.11'

floors:
name: Run unit tests on the oldest dependencies
Expand All @@ -77,7 +77,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: '3.10'
python-version: '3.11'
enable-cache: true
- name: Install the oldest dependencies
run: uv sync --all-extras --dev --resolution lowest-direct --upgrade
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: '3.10'
python-version: '3.11'
enable-cache: true
- name: Set up Python
run: uv python install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: '3.10'
python-version: '3.11'
enable-cache: true
- name: Check the tag against the version
run: |
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ http://anydi.readthedocs.io/

---

`AnyDI` is a simple Dependency Injection library for Python 3.10+. It works with sync and async applications and uses type annotations ([PEP 484](https://peps.python.org/pep-0484/)).
`AnyDI` is a simple Dependency Injection library for Python 3.11+. It works with sync and async applications and uses type annotations ([PEP 484](https://peps.python.org/pep-0484/)).

Main features:

Expand Down
3 changes: 1 addition & 2 deletions anydi/_async_lock.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from types import TracebackType
from typing import Any
from typing import Any, Self

import anyio
from typing_extensions import Self


class AsyncRLock:
Expand Down
14 changes: 12 additions & 2 deletions anydi/_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,19 @@
from collections import defaultdict
from collections.abc import Callable, Iterable, Iterator, Sequence
from contextvars import ContextVar
from typing import Any, Literal, TypeVar, cast, get_args, get_origin, overload
from typing import (
Any,
Literal,
ParamSpec,
Self,
TypeVar,
cast,
get_args,
get_origin,
overload,
)

from typing_extensions import ParamSpec, Self, TypeForm, type_repr
from typing_extensions import TypeForm, type_repr

from ._context import InstanceContext, ScopedContext
from ._decorators import is_provided
Expand Down
3 changes: 1 addition & 2 deletions anydi/_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
from collections.abc import Iterator
from contextvars import Token
from types import TracebackType
from typing import TYPE_CHECKING, Any
from typing import TYPE_CHECKING, Any, Self

import anyio.to_thread
from typing_extensions import Self

from ._async_lock import AsyncRLock
from ._types import NOT_SET, is_event_type
Expand Down
3 changes: 1 addition & 2 deletions anydi/_decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Any,
ClassVar,
Concatenate,
NotRequired,
ParamSpec,
Protocol,
TypedDict,
Expand All @@ -13,8 +14,6 @@
overload,
)

from typing_extensions import NotRequired

if TYPE_CHECKING:
from ._module import Module

Expand Down
3 changes: 2 additions & 1 deletion anydi/_injector.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@
TYPE_CHECKING,
Annotated,
Any,
ParamSpec,
TypeVar,
cast,
get_args,
get_origin,
)

from typing_extensions import ParamSpec, type_repr
from typing_extensions import type_repr

from ._marker import Marker, is_marker

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Simple Dependency Injection library that uses Python type annotations.

---

`AnyDI` is a simple Dependency Injection library for Python 3.10+. It works with sync and async applications and uses type annotations ([PEP 484](https://peps.python.org/pep-0484/)).
`AnyDI` is a simple Dependency Injection library for Python 3.11+. It works with sync and async applications and uses type annotations ([PEP 484](https://peps.python.org/pep-0484/)).

Main features:

Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "anydi"
version = "0.81.0"
description = "Dependency Injection library"
authors = [{ name = "Anton Ruhlov", email = "antonruhlov@gmail.com" }]
requires-python = ">=3.10.0, <3.15"
requires-python = ">=3.11.0, <3.16"
readme = "README.md"
license = "MIT"
keywords = [
Expand All @@ -29,11 +29,11 @@ classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Programming Language :: Python :: 3 :: Only",
]
dependencies = [
Expand Down Expand Up @@ -100,7 +100,7 @@ invalid-assignment = "ignore"

[tool.ruff]
line-length = 88
target-version = "py310"
target-version = "py311"
include = [
"anydi/**/*.py",
"tests/**/*.py",
Expand Down
3 changes: 1 addition & 2 deletions tests/test_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
import warnings
from collections.abc import AsyncIterator, Iterator
from dataclasses import dataclass
from typing import Annotated, Any, Generic, TypeVar
from typing import Annotated, Any, Generic, Self, TypeVar
from unittest import mock

import pytest
from typing_extensions import Self

from anydi import (
Container,
Expand Down
Loading
Loading