Skip to content

Commit 6241065

Browse files
authored
Support for Python 3.14
1 parent 2ab1857 commit 6241065

6 files changed

Lines changed: 157 additions & 137 deletions

File tree

.github/actions/environment/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ runs:
1010
using: "composite"
1111
steps:
1212
- name: Install UV
13-
uses: astral-sh/setup-uv@v6
13+
uses: astral-sh/setup-uv@v7
1414
with:
1515
python-version: ${{ inputs.python-version }}
1616

.github/workflows/cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
steps:
1515
- name: Run checkout
16-
uses: actions/checkout@v4
16+
uses: actions/checkout@v5
1717

1818
- name: Set up environment
1919
uses: ./.github/actions/environment

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
ci:
1212
strategy:
1313
matrix:
14-
python-version: ["3.12", "3.13"]
14+
python-version: ["3.12", "3.13", "3.14"]
1515

1616
name: Continuous Integration ・ Python ${{ matrix.python-version }}
1717
runs-on: ubuntu-latest
@@ -20,7 +20,7 @@ jobs:
2020

2121
steps:
2222
- name: Run checkout
23-
uses: actions/checkout@v4
23+
uses: actions/checkout@v5
2424

2525
- name: Set up environment
2626
uses: ./.github/actions/environment

injection/_core/common/type.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
AsyncIterator,
55
Awaitable,
66
Callable,
7+
Collection,
78
Generator,
89
Iterable,
910
Iterator,
10-
Sequence,
1111
)
1212
from inspect import isfunction
1313
from types import GenericAlias, UnionType
@@ -27,15 +27,13 @@
2727
InputType[T]
2828
| Callable[..., T]
2929
| Callable[..., Awaitable[T]]
30-
| Sequence[TypeInfo[T]]
30+
| Collection[TypeInfo[T]]
3131
)
3232

3333

3434
def get_return_types(*args: TypeInfo[Any]) -> Iterator[InputType[Any]]:
3535
for arg in args:
36-
if isinstance(arg, Iterable) and not (
37-
isinstance(arg, type | str) or isinstance(get_origin(arg), type)
38-
):
36+
if isinstance(arg, Collection):
3937
inner_args = arg
4038

4139
elif isfunction(arg) and (return_type := get_return_hint(arg)):

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ description = "Fast and easy dependency injection framework."
3535
license = "MIT"
3636
license-files = ["LICENSE"]
3737
readme = "README.md"
38-
requires-python = ">=3.12, <4"
38+
requires-python = ">=3.12, <3.15"
3939
authors = [{ name = "remimd" }]
4040
keywords = ["dependencies", "dependency", "inject", "injection"]
4141
classifiers = [
@@ -49,6 +49,7 @@ classifiers = [
4949
"Programming Language :: Python :: 3 :: Only",
5050
"Programming Language :: Python :: 3.12",
5151
"Programming Language :: Python :: 3.13",
52+
"Programming Language :: Python :: 3.14",
5253
"Operating System :: OS Independent",
5354
"Intended Audience :: Developers",
5455
"Natural Language :: English",

0 commit comments

Comments
 (0)