Skip to content
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

Flask-BabelEx incompatible with latest werkzeug #270

Closed
ammaraskar opened this issue Feb 7, 2020 · 3 comments
Closed

Flask-BabelEx incompatible with latest werkzeug #270

ammaraskar opened this issue Feb 7, 2020 · 3 comments

Comments

@ammaraskar
Copy link

ammaraskar commented Feb 7, 2020

Upstream issue: mrjoes/flask-babelex#18

    from flask_security import Security, SQLAlchemyUserDatastore
venv\lib\site-packages\flask_security\__init__.py:16: in <module>
    from .core import Security, RoleMixin, UserMixin, AnonymousUser, current_user
venv\lib\site-packages\flask_security\core.py:21: in <module>
    from flask_babelex import Domain
venv\lib\site-packages\flask_babelex\__init__.py:23: in <module>
    from werkzeug import ImmutableDict
E   ImportError: cannot import name 'ImmutableDict'

It'd be nice to switch to Flask-Babel which is (slightly) more maintained, but they lack certain features we need as you've pointed out here: python-babel/flask-babel#148 (comment) Can we use this issue to track maybe migrating to a different i18n plugin?

As a temporary workaround for anyone who stumbles onto this, you can pin your werkzeug to the last version with top-level exports: werkzeug==0.16.1

@jwag956
Copy link
Collaborator

jwag956 commented Feb 7, 2020

Thanks for the heads-up. Looks like many folks are running around trying to patch/release old extensions - Flask-Babel has been patched.

Do you have any ideas on alternative packages? Of course this is an entire ecosystem issue - since major packages such as flask-admin also use Flask-Babelex...

@mrjoes
Copy link

mrjoes commented Feb 7, 2020

The Flask-BabelEx fix was merged and a new version was released.

@jwag956
Copy link
Collaborator

jwag956 commented Feb 10, 2020

The latest babelex fixes this. There is ongoing discussion around backporting to babel - outside scope of this issue (but would be great!)

@jwag956 jwag956 closed this as completed Feb 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants