Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot call an async function with rye run #1377

Open
haplo opened this issue Sep 9, 2024 · 0 comments
Open

Cannot call an async function with rye run #1377

haplo opened this issue Sep 9, 2024 · 0 comments

Comments

@haplo
Copy link

haplo commented Sep 9, 2024

Steps to Reproduce

  1. rye init async_call
  2. cd async_call
  3. echo -e 'async def hello():\n print("Hi!")' > src/async_call/main.py
  4. echo -e '[tool.rye.scripts]\nhello = { call = "src.async_call.main:hello" }' >> pyproject.toml
  5. 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: [email protected]
symlink support: true
uv enabled: true

Stacktrace

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant