-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fix typo in Asyncio example #1510
Conversation
On a related note, when trying to run this on Python 3.7.1, Sanic 18.12.0, I get an error when doing srv_coro = app.create_server(
sock=sock,
return_asyncio_server=True,
asyncio_server_args=dict(
start_serving=False
)
) ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-7-114731fc73ad> in <module>
4 return_asyncio_server=True,
5 asyncio_server_args=dict(
----> 6 start_serving=False
7 )
8 )
TypeError: create_server() got an unexpected keyword argument 'return_asyncio_server' |
@sam-qordoba this error is due to a change on Sanic that is scheduled to be released with version 19.03 ... Are you sure you're running 18.12 from PyPI? EDIT: yes, this error should be thrown if using version 18.12 because these changes will only work with Sanic 19.03 onwards. |
I see, that is why pip installing directly from GitHub fixed the issue. Also, even when installing with
|
That's strange. I think you should open a new issue related to this if you installed using
Well, if you don't want
And it'll probably use the Python default loop implementation 😉 |
Codecov Report
@@ Coverage Diff @@
## master #1510 +/- ##
=======================================
Coverage 91.35% 91.35%
=======================================
Files 18 18
Lines 1781 1781
Branches 337 337
=======================================
Hits 1627 1627
Misses 130 130
Partials 24 24 Continue to review full report at Codecov.
|
@vltr pip enables wheel install by default, which is bdist (built dist). it doesn't run setup.py. You can disable binary install. |
@vltr I used a virtualenv and that worked. For the example to work, you need to make sure |
@yunstanford you're right, I forgot that "simple" detail ... So, how would we install Sanic without |
@sam-qordoba I think |
Sorry, I am confused. Sanic does indeed work with uvloop in general, but for this fancy Asyncio demo, it does not. For reference, I am trying to figure out how to have a server which exposes a REST API, but doesn't block, so that it can also connect to Google PubSub via the SDK |
@sam-qordoba oh, ok. Do you mind on bringing that question to the community forums ? It's easier to follow there 😄 |
We need to identify the actual issue and fix it so this can get merged. |
@sjsadowski - do you need anything from me? |
@sam-qordoba nope, this was fixed with another PR. Thanks. |
No description provided.