There seems to be a problem with Flask-Babel==0.11.1 in multithreaded Flask app.
It can be revealed (even in threaded werkzeug, but first encountered in mod_wsgi env) by adding debug point to https://github.com/python-babel/flask-babel/blob/master/flask_babel/__init__.py#L337 (just after "temporarily" changing babel's locale_selector_func). Then application, accessed from another thread, is stuck with lambda: locale, whatever locale happened to be.
If it's not easy to fix, it should be properly indicated, that context manager in question is not thread-safe.
Flask is 0.10.1.
(also:
http://stackoverflow.com/questions/43470984/flask-babel-not-thread-safe
)
There seems to be a problem with Flask-Babel==0.11.1 in multithreaded Flask app.
It can be revealed (even in threaded werkzeug, but first encountered in mod_wsgi env) by adding debug point to https://github.com/python-babel/flask-babel/blob/master/flask_babel/__init__.py#L337 (just after "temporarily" changing babel's
locale_selector_func). Then application, accessed from another thread, is stuck withlambda: locale, whatever locale happened to be.If it's not easy to fix, it should be properly indicated, that context manager in question is not thread-safe.
Flask is 0.10.1.
(also:
http://stackoverflow.com/questions/43470984/flask-babel-not-thread-safe
)