Bug 57108 - Не работает CLI aiohttp-asgi: Can not import module 'test_app'
Summary: Не работает CLI aiohttp-asgi: Can not import module 'test_app'
Status: NEW
Alias: None
Product: Sisyphus
Classification: Development
Component: python3-module-aiohttp-asgi (show other bugs)
Version: unstable
Hardware: x86_64 Linux
: P5 normal
Assignee: Alexandr Shashkin
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-12-03 14:41 MSK by Dmitry Maksimenkov
Modified: 2025-12-03 14:41 MSK (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 апстрима