Open cpaulik opened 4 years ago
This is a problem for me too. I solved this temporarily by pinning WTForms
to 2.2.1
in my own requirements.txt
:
WTForms==2.2.1
flask-wtf
does not pin the WTForm
version, so this could keep happening if Flask-User
does not pin the dependencies of flask-wtf
. From https://github.com/lepture/flask-wtf/blob/master/setup.py
install_requires=[
'Flask',
'WTForms',
'itsdangerous',
],
An alternative to pinning in Flask-User
might be to advise the user in the docs or during startup to pin the sub-dependencies.
Yep, I encountered this too, and there isn't much I can do about it. Other than installing the email_validator
package, which I won't use. The app I am building does not handle emails at all.
This happens because user_manager
imports all forms. And the AddEmailForm
calls the validator upon setup. In my opinion the cleanest way to fix this is by requiring the wtforms[email]
package, which includes the email_validator
as a sub-dependency. This was suggested by @cpaulik as well.
There is a duplicate for this at #313.
The issue is that Flask-User uses the WTForms validators.Email
validator, and so should either depend on the wtforms[email]
extra. Or it should make the dependency optional as well.
For now, you can work around this by directly depending on wtforms[email]
, no downgrade necessary.
You might want to consider adding
wtforms[email]
as a dependency.