Skip to content

Commit 0e47fc7

Browse files
committed
feat: remove support for python 3.9
1 parent cb1e5e6 commit 0e47fc7

File tree

11 files changed

+17
-41
lines changed

11 files changed

+17
-41
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
pytest:
4343
strategy:
4444
matrix:
45-
py_version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
45+
py_version: ["3.10", "3.11", "3.12", "3.13"]
4646
pydantic_ver: ["<2", ">=2.5,<3"]
4747
os: [ubuntu-latest, windows-latest, macos-latest]
4848
runs-on: "${{ matrix.os }}"

.python-version

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22
3.12.8
33
3.11.11
44
3.10.16
5-
3.9.21

poetry.lock

Lines changed: 4 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ classifiers = [
1919
"Programming Language :: Python",
2020
"Programming Language :: Python :: 3",
2121
"Programming Language :: Python :: 3 :: Only",
22-
"Programming Language :: Python :: 3.9",
2322
"Programming Language :: Python :: 3.10",
2423
"Programming Language :: Python :: 3.11",
2524
"Programming Language :: Python :: 3.12",
@@ -30,7 +29,7 @@ classifiers = [
3029
"Development Status :: 3 - Alpha",
3130
]
3231
keywords = ["taskiq", "tasks", "distributed", "async"]
33-
requires-python = ">=3.9,<4"
32+
requires-python = ">=3.10,<4"
3433
dependencies = [
3534
"typing-extensions>=3.10.0.0; python_version < '3.11'",
3635
"pydantic>=1.0,<=3.0",
@@ -99,6 +98,7 @@ worker = "taskiq.cli.worker.cmd:WorkerCMD"
9998
scheduler = "taskiq.cli.scheduler.cmd:SchedulerCMD"
10099

101100
[tool.mypy]
101+
python_version = "3.10"
102102
strict = true
103103
ignore_missing_imports = true
104104
allow_subclassing_any = true
@@ -135,7 +135,7 @@ requires = ["poetry-core>=1.0.0"]
135135
build-backend = "poetry.core.masonry.api"
136136

137137
[tool.ruff]
138-
target-version="py39"
138+
target-version="py310"
139139
# List of enabled rulsets.
140140
# See https://docs.astral.sh/ruff/rules/ for more information.
141141
lint.select = [

taskiq/abc/broker.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
Dict,
1717
List,
1818
Optional,
19+
ParamSpec,
20+
TypeAlias,
1921
TypeVar,
2022
Union,
2123
get_type_hints,
@@ -38,13 +40,9 @@
3840
from taskiq.warnings import TaskiqDeprecationWarning
3941

4042
if sys.version_info >= (3, 11):
41-
from typing import ParamSpec, Self, TypeAlias
42-
elif sys.version_info >= (3, 10):
43-
from typing import ParamSpec, TypeAlias
44-
45-
from typing_extensions import Self
43+
from typing import Self
4644
else:
47-
from typing_extensions import ParamSpec, Self, TypeAlias
45+
from typing_extensions import Self
4846

4947

5048
if TYPE_CHECKING: # pragma: no cover

taskiq/brokers/shared_broker.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
1-
import sys
2-
from typing import Any, AsyncGenerator, Optional, TypeVar
1+
from typing import Any, AsyncGenerator, Optional, ParamSpec, TypeVar
32

43
from taskiq.abc.broker import AsyncBroker
54
from taskiq.decor import AsyncTaskiqDecoratedTask
65
from taskiq.exceptions import SharedBrokerListenError, SharedBrokerSendTaskError
76
from taskiq.kicker import AsyncKicker
87
from taskiq.message import BrokerMessage
98

10-
if sys.version_info >= (3, 10):
11-
from typing import ParamSpec
12-
else:
13-
from typing_extensions import ParamSpec
14-
15-
169
_ReturnType = TypeVar("_ReturnType")
1710
_Params = ParamSpec("_Params")
1811

taskiq/cli/scheduler/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ async def get_all_schedules(
7171
schedules = await asyncio.gather(
7272
*[get_schedules(source) for source in scheduler.sources],
7373
)
74-
return list(zip(scheduler.sources, schedules))
74+
return list(zip(scheduler.sources, schedules, strict=False))
7575

7676

7777
def get_task_delay(task: ScheduledTask) -> Optional[int]:

taskiq/cli/worker/process_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def prepare_workers(self) -> None:
210210
events.append(event)
211211

212212
# Wait for workers startup
213-
for worker, event in zip(self.workers, events):
213+
for worker, event in zip(self.workers, events, strict=False):
214214
_wait_for_worker_startup(worker, event)
215215

216216
def start(self) -> Optional[int]: # noqa: C901

taskiq/decor.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
Dict,
1010
Generic,
1111
Optional,
12+
ParamSpec,
1213
Type,
1314
TypeVar,
1415
Union,
@@ -19,11 +20,6 @@
1920
from taskiq.scheduler.created_schedule import CreatedSchedule
2021
from taskiq.task import AsyncTaskiqTask
2122

22-
if sys.version_info >= (3, 10):
23-
from typing import ParamSpec
24-
else:
25-
from typing_extensions import ParamSpec
26-
2723
if TYPE_CHECKING: # pragma: no cover
2824
from taskiq.abc.broker import AsyncBroker
2925
from taskiq.abc.schedule_source import ScheduleSource

taskiq/kicker.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import sys
21
from collections.abc import Coroutine
32
from dataclasses import asdict, is_dataclass
43
from datetime import datetime
@@ -10,6 +9,7 @@
109
Dict,
1110
Generic,
1211
Optional,
12+
ParamSpec,
1313
Type,
1414
TypeVar,
1515
Union,
@@ -28,11 +28,6 @@
2828
from taskiq.task import AsyncTaskiqTask
2929
from taskiq.utils import maybe_awaitable
3030

31-
if sys.version_info >= (3, 10):
32-
from typing import ParamSpec
33-
else:
34-
from typing_extensions import ParamSpec
35-
3631
if TYPE_CHECKING: # pragma: no cover
3732
from taskiq.abc.broker import AsyncBroker
3833
from taskiq.abc.schedule_source import ScheduleSource

0 commit comments

Comments
 (0)