Cannot call an async function with rye run
haplo opened this issue · 0 comments
haplo commented
Steps to Reproduce
rye init async_call
cd async_call
echo -e 'async def hello():\n print("Hi!")' > src/async_call/main.py
echo -e '[tool.rye.scripts]\nhello = { call = "src.async_call.main:hello" }' >> pyproject.toml
rye run hello
Expected Result
$ rye run hello
Hi!
Actual Result
$ rye run hello
<coroutine object hello at 0x7c7ac106cac0>
sys:1: RuntimeWarning: coroutine 'hello' was never awaited
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Version Info
rye 0.39.0
commit: 0.39.0 (bf3ccf818 2024-08-21)
platform: linux (x86_64)
self-python: cpython@3.12.5
symlink support: true
uv enabled: true
Stacktrace
No response