Bug 57108

Summary: Не работает CLI aiohttp-asgi: Can not import module 'test_app'
Product: Sisyphus Reporter: Dmitry Maksimenkov <maksimenkovda>
Component: python3-module-aiohttp-asgiAssignee: Alexandr Shashkin <dutyrok>
Status: ASSIGNED --- QA Contact: qa-sisyphus
Severity: normal    
Priority: P5 CC: dutyrok, dutyrok
Version: unstable   
Hardware: x86_64   
OS: Linux   

Description Dmitry Maksimenkov 2025-12-03 14:41:30 MSK
Версия:
python3-module-aiohttp-asgi-0.6.1-alt1

Система:
ALT Server 11.1 (обновлено до Sisyphus)

Шаги воспроизвдения:
# Установить пакеты:
    # apt-get install python3-module-aiohttp-asgi python3-module-starlette
# Создать файл test_app.py:
    $ cat > test_app.py << EOF
from starlette.applications import Starlette
from starlette.responses import JSONResponse
from starlette.routing import Route


async def homepage(request):
    return JSONResponse({'hello': 'world'})

routes = [
    Route("/", endpoint=homepage)
]

application = Starlette(debug=True, routes=routes)
EOF
# Запустить cli aiohttp-asgi:
    $ aiohttp-asgi \
    --address "[::1]" \
    --port 8080 \
    test_app:application

Реальный результат:
usage: aiohttp-asgi [-h] [-a ADDRESS] [-p PORT] [--reuse-addr] [--reuse-port] [--log-level {debug,info,warning,error,critical}] application
aiohttp-asgi: error: argument application: Can not import module 'test_app'

Ожидаемый результат: Запуск сервера через CLI

Дополнительно:
* Воспроизводится в p11 на версии python3-module-aiohttp-asgi-0.5.2-alt1
* Пример test_app.py и запуск cli взять с README апстрима
Comment 1 Alexandr Shashkin 2025-12-16 18:37:18 MSK
Проверил воспроизведение ошибки на docker образе python:3.13. Тоже воспроизвелась.

Создал тикет в upstream - https://github.com/mosquito/aiohttp-asgi/issues/15