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

TypeError: Passing coroutines is forbidden, use tasks explicitly. #49

Closed
Seirdy opened this issue Jan 4, 2023 · 2 comments · Fixed by #50
Closed

TypeError: Passing coroutines is forbidden, use tasks explicitly. #49

Seirdy opened this issue Jan 4, 2023 · 2 comments · Fixed by #50

Comments

@Seirdy
Copy link

Seirdy commented Jan 4, 2023

Running from commit a13a2e7, installed with pipx and without system-site-packages, I get the following errror:

$ pushl -vc "${XDG_CACHE_HOME-$HOME/.cache}/pushl" -e "https://seirdy.one/notes/2023/01/04/against-chasing-growth/"
Traceback (most recent call last):
  File "/path/to/pipx/bin/pushl", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/path/to/pipx/venvs/pushl/lib64/python3.11/site-packages/pushl/__main__.py", line 128, in main
    loop.run_until_complete(_run(args))
  File "/usr/lib64/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/path/to/pipx/venvs/pushl/lib64/python3.11/site-packages/pushl/__main__.py", line 163, in _run
    _, timed_out = await asyncio.wait(tasks, timeout=args.max_time)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/asyncio/tasks.py", line 415, in wait
    raise TypeError("Passing coroutines is forbidden, use tasks explicitly.")
TypeError: Passing coroutines is forbidden, use tasks explicitly.
sys:1: RuntimeWarning: coroutine 'Pushl.process_entry' was never awaited

System info: Fedora 37, python 3.11.1.

@fluffy-critter
Copy link
Contributor

This looks like a new behavior (or at least enforcement) in Python 3.11. This will probably need some refactoring.

@fluffy-critter
Copy link
Contributor

Okay, the change was pretty straightforward, and is tested working on 3.8. I'm installing Python 3.11 to verify the fix.

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

Successfully merging a pull request may close this issue.

2 participants