@@ -24,11 +24,11 @@ classifiers = [
2424 " Intended Audience :: Developers" ,
2525 " License :: OSI Approved :: MIT License" ,
2626 " Programming Language :: Python :: 3 :: Only" ,
27- " Programming Language :: Python :: 3.7" ,
2827 " Programming Language :: Python :: 3.8" ,
2928 " Programming Language :: Python :: 3.9" ,
3029 " Programming Language :: Python :: 3.10" ,
3130 " Programming Language :: Python :: 3.11" ,
31+ " Programming Language :: Python :: 3.12" ,
3232]
3333dependencies = []
3434description = " Simple and lightweight async console runner."
@@ -37,42 +37,42 @@ keywords = ["asyncio", "async", "aio", "cli", "console"]
3737license = { text = " MIT" }
3838name = " aiocli"
3939readme = " README.md"
40- requires-python = " >=3.7 "
40+ requires-python = " >=3.8 "
4141
4242[project .optional-dependencies ]
4343dev = [
44- " pre-commit==2.20.0 " ,
45- ' tomli= =2.0.1; python_version<"3.11"' ,
46- ' types-toml== 0.10.8.1 ; python_version<"3.11"' ,
44+ ' pre-commit>=3.3.3 ' ,
45+ ' tomli> =2.0.1; python_version<"3.11"' ,
46+ ' types-toml>= 0.10.8.7 ; python_version<"3.11"' ,
4747]
4848deploy = [
49- " build==0.9 .0" ,
50- " setuptools==65.6.0 " ,
51- " twine== 4.0.1 " ,
52- " wheel==0.38.4 " ,
49+ " build>=0.10 .0" ,
50+ ' setuptools>=68.1.2 ' ,
51+ " twine>= 4.0.2 " ,
52+ " wheel>=0.41.1 " ,
5353]
5454docs = [
55- " mkdocs==1.4 .2" ,
56- " mkdocs-material==8.5.10 " ,
55+ " mkdocs>=1.5 .2" ,
56+ " mkdocs-material>=9.1.21 " ,
5757]
5858fmt = [
59- " black==22.10.0 " ,
60- " isort==5.10.1 " ,
59+ ' black>=23.7.0 ' ,
60+ ' isort>=5.12.0 ' ,
6161]
6262security-analysis = [
63- " bandit== 1.7.4 " ,
64- " liccheck==0.7.3 " ,
63+ " bandit>= 1.7.5 " ,
64+ " liccheck>=0.9.1 " ,
6565]
6666static-analysis = [
67- " mypy==0.991 " ,
68- " pylint==2.15.6 " ,
67+ ' mypy>=1.5.1 ' ,
68+ " pylint>=2.17.5 " ,
6969]
7070test = [
71- " psutil== 5.9.4 " ,
72- " pytest==7.2 .0" ,
73- " pytest-asyncio==0.20.2 " ,
74- " pytest-cov==4.0 .0" ,
75- " pytest-xdist==3.0.2 " ,
71+ " psutil>= 5.9.5 " ,
72+ " pytest>=7.4 .0" ,
73+ " pytest-asyncio>=0.21.1 " ,
74+ " pytest-cov>=4.1 .0" ,
75+ " pytest-xdist>=3.3.1 " ,
7676]
7777
7878[project .urls ]
@@ -152,23 +152,54 @@ for pathname in ['./build', './*.egg-info', './dist', './var', '**/__pycache__']
152152 for path in iglob(pathname, recursive=True):
153153 rmtree(path, ignore_errors=True)
154154\" """
155+ dev-server = """ python3 -c \"
156+ from asyncio import CancelledError, TimeoutError as AsyncTimeoutError, get_event_loop, sleep, wait_for
157+ from contextlib import suppress
158+ from signal import SIGHUP, SIGINT, SIGTERM
159+
160+ async def development_server(timeout: int) -> None:
161+ retry = True
162+ async def _check() -> None:
163+ if not retry:
164+ return
165+ while retry:
166+ await sleep(1)
167+ try:
168+ print('Development server running...', '')
169+ await wait_for(fut=_check(), timeout=timeout)
170+ except (TimeoutError, AsyncTimeoutError):
171+ pass
172+ finally:
173+ retry = False
174+
175+ async def run_development_server(timeout: int) -> None:
176+ loop = get_event_loop() # lazy
177+ coro = development_server(timeout)
178+ task = loop.create_task(coro)
179+ _ = [loop.add_signal_handler(sig, task.cancel) for sig in (SIGHUP, SIGTERM, SIGINT)]
180+ with suppress(CancelledError):
181+ await task
182+
183+ if __name__ >= '__main__':
184+ get_event_loop().run_until_complete(run_development_server(timeout=3600)) # 1h
185+ \" """
155186
156187[tool .tox ]
157188legacy_tox_ini = """
158189[tox]
159- envlist = py37, py38, py39, py310, py311
190+ envlist = py38, py39, py310, py311, py312
160191isolated_build = True
161192skipsdist = True
162193skip_missing_interpreters = True
163194toxworkdir = var/tox
164195
165196[gh-actions]
166197python =
167- 3.7: py37
168198 3.8: py38
169199 3.9: py39
170200 3.10: py310
171201 3.11: py311
202+ 3.12: py312
172203
173204[testenv]
174205deps = .[dev,deploy,docs,fmt,security-analysis,static-analysis,test]
0 commit comments