-
Notifications
You must be signed in to change notification settings - Fork 9
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
Incompatible with Sanic-21.12.0 #25
Comments
I am also experiencing issues with this when trying to use the sanic-cors extension. Minimal reproducible code below:
Results in:
|
Hi @eric-spitler and @damianj Unfortunately it looks like the methods that Sanic-Plugin-Toolkit uses to hook into Sanic will no longer be supported, and a new mechanism will need to be developed to work on Sanic 21.12 and above. I am currently working on that. In the meantime, I am going to modify popular plugins (eg, Sanic-CORS) to no longer use Sanic-Plugin-Toolkit, and use the new Sanic features including the new extension mechanism, app context, request context, directly without needing the toolkit. |
@eric-spitler and @damianj |
Hi @ashleysommer appreciate your work, this issue is also in sanic-restplus as well |
Hi @notzippy Besides that, there are some other reasons that Sanic-Restplus will not work on Sanic 21.12 yet. Sanic Restplus has a very low install base, so it's not high on my priority like like eg. Sanic-CORS. I suggest stay on Sanic v21.9.x if you need to use Sanic-Restplus, that's what I have running in my prod deployments. |
Sanic 21.12.0 was release on 12/26/2021 and has breaking changes.
Specifically, it makes setting of attributes on
Sanic
orBlueprint
instances an error where it was previously aDeprecationWarning
. The plugin toolkit tries to wrapSanic._startup
but setting its value, which raises anAttributeError
.Here is a sample section that will raise the
AttributeError
. This line is reached because in 21.12 theSanic.__fake_slots__
becameSanic.__slots__
.sanic-plugin-toolkit/sanic_plugin_toolkit/realm.py
Lines 999 to 1001 in 646820c
Furthermore,
Blueprint
objects no longer have__fake_slots__
either, so this section also raisesAttributeError
sanic-plugin-toolkit/sanic_plugin_toolkit/realm.py
Lines 927 to 932 in 646820c
The text was updated successfully, but these errors were encountered: