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

Upgrade dependency version constraint specification for uvloop #2496

Closed
ancalita opened this issue Jul 11, 2022 · 0 comments · Fixed by #2598
Closed

Upgrade dependency version constraint specification for uvloop #2496

ancalita opened this issue Jul 11, 2022 · 0 comments · Fixed by #2598

Comments

@ancalita
Copy link

Describe the bug
A manual integration test of a Rasa HTTP API endpoint was failing with this traceback:

[1] [ERROR] Exception occurred while handling uri: 'http://rasa-worker:5005/model/train?force=true&save_to_default_model_directory=true&callback_url=http://rasa-x:5002/api/projects/default/models/jobs/7/result?token%3Drasaxtoken&token=rasatoken'
Traceback (most recent call last):
  File "handle_request", line 83, in handle_request
    )
  File "/opt/venv/lib/python3.8/site-packages/rasa/server.py", line 238, in decorated
    result = await result
  File "/opt/venv/lib/python3.8/site-packages/rasa/server.py", line 600, in decorated_function
    request.app.add_task(wrapped())
  File "/opt/venv/lib/python3.8/site-packages/sanic/app.py", line 1609, in add_task
    return self._loop_add_task(
  File "/opt/venv/lib/python3.8/site-packages/sanic/app.py", line 1565, in _loop_add_task
    task = loop.create_task(prepped, name=name)
TypeError: create_task() takes no keyword arguments

Investigating further we discovered that this is because the version of uvloop that rasa is constrained to have was below 0.15.0 while Sanic 21.12 LTS requires uvloop above 0.15.0 to handle the name keyword argument given to loop.create_task method. This dependency version solving problem would have been flagged by poetry if Sanic had required uvloop to be above 0.15.0. In setup.py I see that uvloop is at >=0.5.3.

I'm submitting this issue to raise awareness about the potential issues the lower bound constraint on uvloop could have for Sanic users.

Code snippet
Relevant source code, make sure to remove what is not necessary.

Expected behavior
A clear and concise description of what you expected to happen.

Sanic 21.12 LTS requires uvloop to be >=0.15.0 version.

Environment (please complete the following information):

  • OS: Mac
  • Version [e.g. 0.8.3]: 21.12 LTS

Additional context
Add any other context about the problem here.

@ChihweiLHBird ChihweiLHBird linked a pull request Nov 8, 2022 that will close this issue
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.

1 participant