Skip to content

Commit 2f71d37

Browse files
committed
Fix deps and tests_tasks to drop support for 3.7 and fix issues for 3.8
1 parent 0014281 commit 2f71d37

File tree

3 files changed

+55
-51
lines changed

3 files changed

+55
-51
lines changed

poetry.lock

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

pyproject.toml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,27 @@ psutil = "^5"
4949
pydantic-settings = { version= "^2.0.1", optional = true }
5050
typing-inspect = { version = "^0.9.0", optional = true}
5151

52-
[tool.poetry.dev-dependencies]
52+
[tool.poetry.group.dev.dependencies]
5353
# Starlette features
5454
aiofiles = "*" # Serving static files
5555
httpx = "*" # TestClient
5656

5757
# Testing
5858
pytest = "^7.0"
5959
pytest-cov = "*"
60-
pytest-asyncio = "*"
60+
pytest-asyncio = [
61+
{version = "^0.21.1", python = "<3.9"},
62+
{version = "*", python = ">=3.9"}
63+
]
6164
coverage = "*"
6265
codecov = "^2.1.13"
63-
mock = { version = "*", python = "<3.8" }
64-
types-mock = { version = "*", python = "<3.8" }
66+
pytest-timeout = "^2.3.1"
6567

68+
# Documentation
69+
mkdocs = "*"
70+
mkdocs-material = "*"
71+
markdown-include = "*"
72+
autoflake = "^1.4"
6673

6774
# Static
6875
ruff = ">0.3"
@@ -71,20 +78,10 @@ mypy = "*"
7178
sqlalchemy-stubs = "*"
7279
types-setuptools = "*" # for pkg_resources import
7380

74-
# Documentation
75-
mkdocs = "*"
76-
mkdocs-material = "*"
77-
markdown-include = "*"
78-
autoflake = "^1.4"
79-
8081
[tool.poetry.extras]
8182
all = ["sqlalchemy", "pydantic-settings", "typing-inspect"]
8283
session = ["sqlalchemy"]
8384

84-
[tool.poetry.group.dev.dependencies]
85-
codecov = "^2.1.13"
86-
pytest-timeout = "^2.3.1"
87-
8885
[tool.black]
8986
line-length = 120
9087
target_version = ['py39']

tests/test_tasks.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
11
import asyncio
2-
import sys
3-
from typing import TYPE_CHECKING, NoReturn
4-
5-
if TYPE_CHECKING:
6-
if sys.version_info >= (3, 8):
7-
from unittest.mock import AsyncMock, call, patch
8-
else:
9-
from mock import AsyncMock, call, patch
10-
else:
11-
try:
12-
from unittest.mock import AsyncMock, call, patch
13-
except ImportError:
14-
from mock import AsyncMock, call, patch
2+
from typing import NoReturn
3+
from unittest.mock import AsyncMock, call, patch
154

165
import pytest
176

0 commit comments

Comments
 (0)