<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>57108</bug_id>
          
          <creation_ts>2025-12-03 14:41:30 +0300</creation_ts>
          <short_desc>Не работает CLI aiohttp-asgi: Can not import module &apos;test_app&apos;</short_desc>
          <delta_ts>2026-09-25 23:03:30 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>python3-module-aiohttp-asgi</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dmitry Maksimenkov">maksimenkovda</reporter>
          <assigned_to name="Alexandr Shashkin">dutyrok</assigned_to>
          <cc>dutyrok</cc>
    
    <cc>dutyrok</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>278364</commentid>
    <comment_count>0</comment_count>
    <who name="Dmitry Maksimenkov">maksimenkovda</who>
    <bug_when>2025-12-03 14:41:30 +0300</bug_when>
    <thetext>Версия:
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 &gt; test_app.py &lt;&lt; EOF
from starlette.applications import Starlette
from starlette.responses import JSONResponse
from starlette.routing import Route


async def homepage(request):
    return JSONResponse({&apos;hello&apos;: &apos;world&apos;})

routes = [
    Route(&quot;/&quot;, endpoint=homepage)
]

application = Starlette(debug=True, routes=routes)
EOF
# Запустить cli aiohttp-asgi:
    $ aiohttp-asgi \
    --address &quot;[::1]&quot; \
    --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 &apos;test_app&apos;

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

Дополнительно:
* Воспроизводится в p11 на версии python3-module-aiohttp-asgi-0.5.2-alt1
* Пример test_app.py и запуск cli взять с README апстрима</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>279151</commentid>
    <comment_count>1</comment_count>
    <who name="Alexandr Shashkin">dutyrok</who>
    <bug_when>2025-12-16 18:37:18 +0300</bug_when>
    <thetext>Проверил воспроизведение ошибки на docker образе python:3.13. Тоже воспроизвелась.

Создал тикет в upstream - https://github.com/mosquito/aiohttp-asgi/issues/15</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>300254</commentid>
    <comment_count>2</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2026-09-25 23:03:30 +0300</bug_when>
    <thetext>python3-module-aiohttp-asgi-0.6.1-alt2 -&gt; sisyphus:

Fri Sep 25 2026 Alexandr Shashkin &lt;dutyrok@altlinux&gt; 0.6.1-alt2
- Fixed importing an ASGI application module from the current working
  directory in the CLI (Closes: #57108).
- Fixed --port option of the CLI to be parsed as integer.
- Fixed --address option to accept bracketed IPv6 literals.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>