Open rmk135 opened 2 years ago
We have the same problem 😬
Created a fix here but would need some feedback
The events system was overhauled in https://github.com/sanic-org/sanic/pull/2160
So you'll need to also add
await self.app._server_event("init", "before")
# Trigger after_start events
await self.app._server_event("init", "after")
after await self.app._startup()
This is a showstopper for me. This package is unusable without a fix for sanic 21 (working addition to changes)
await self.app._startup()
await self.app._server_event("init", "before", loop=self.loop)
# Trigger after_start events
await self.app._server_event("init", "after", loop=self.loop)
I've ported the fix from @wochinge to here https://github.com/yunstanford/pytest-sanic/pull/66 and added the changes you mentioned @autumnjolitz
Hi @melindaloubser1 , I managed to rederive the same fixes you made lol
Wasn't paying attention till Google's auth libraries made me upgrade and jesus christ wow the internal fiddling is awful
Im having this issue with signals -> find_route func is None, when running a test REST call using pytest-sanic 19, sanic-testing
Sanic version is 22.6.1
If Im trying to run with simply app.asgin_client.get(...) find_route is not None but im failing on
sanic.exceptions.SanicException: Loop can only be retrieved after the app has started running. Not supported with create_server
function
Can someone suggest a solution - im very blocked with Sanic version upgrade
Hey,
Thanks for the great library!
Seems like there is an error on
sanic > 21.6
. The failure I see looks like that:The failure occurs all the time, but if you need an example, take a look at: https://github.com/ets-labs/python-dependency-injector/tree/master/examples/miniapps/sanic
Thanks, Roman