NicolasLM / spinach

Modern Redis task queue for Python 3
https://spinach.readthedocs.io
BSD 2-Clause "Simplified" License
63 stars 4 forks source link

Flask >= 2.2 breaks the Spinach extension #24

Closed juledwar closed 1 year ago

juledwar commented 1 year ago

Flask's context stack has been deprecated in favour of a Python ContextVar and all use of push/pop/top on the context stack is also deprecated.

Flask is maintaining a fake stack over the top of the ContextVar, however this seems to break Spinach. I'm not sure why yet but it may be because there's actually only one value, not a stack, and using a pop will unset the context completely.

juledwar commented 1 year ago

I have a fix in flight; it should work for old and new Flask.

0xDEC0DE commented 1 year ago

We will also need another Spinach release to properly make use of this.

NicolasLM commented 1 year ago

@0xDEC0DE Done.

bigjools commented 1 year ago

Thanks for the quick release @NicolasLM !