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

Import error because of requests_async #1592

Closed
chenjr0719 opened this issue May 27, 2019 · 3 comments
Closed

Import error because of requests_async #1592

chenjr0719 opened this issue May 27, 2019 · 3 comments
Assignees

Comments

@chenjr0719
Copy link
Member

Describe the bug
Import error after install Sanic. The requests_async does not be included in setup.py's install_requires. All tests can be passed because the requests_async is installed by tox.

Code snippet
Related source in testing.py:
https://github.com/huge-success/sanic/blob/e36f398aa689cb1852a171f9e6e60f78d8fa21d5/sanic/testing.py#L1-L4

Related source in setup.py:
https://github.com/huge-success/sanic/blob/e36f398aa689cb1852a171f9e6e60f78d8fa21d5/setup.py#L78-L85

Expected behavior
Import without any error.

Environment (please complete the following information):

  • OS: Ubuntu 18.04
  • Version master(e36f398)

Additional context

Two possible fixes:

  1. Add requests_async in setup.py's install_requires.
  2. As the old implementation, only import in _local_request().
    https://github.com/huge-success/sanic/blob/ef6d78c580ed4f3410e029ed514d2d5ee3380ce3/sanic/testing.py#L13-L20
@ahopkins
Copy link
Member

Yes, I noticed this the other day. There's a discussion about it on the forums? I'll push a fix using strategy 1 you outlined.

@ahopkins ahopkins self-assigned this May 27, 2019
@harshanarayana
Copy link
Contributor

@chenjr0719 @ahopkins Working on a PR for this and #1591 together. Give me a few hours.

@ahopkins
Copy link
Member

@harshanarayana I was just about to..., but I will hold off on it and just push another little change that has been annoying me.

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

3 participants