diff --git a/Flask-WTF-0.14.3.tar.gz b/Flask-WTF-0.14.3.tar.gz deleted file mode 100644 index 3484a7b..0000000 --- a/Flask-WTF-0.14.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d417e3a0008b5ba583da1763e4db0f55a1269d9dd91dcc3eb3c026d3c5dbd720 -size 44507 diff --git a/Flask-WTF-0.15.1.tar.gz b/Flask-WTF-0.15.1.tar.gz new file mode 100644 index 0000000..4c3bfc2 --- /dev/null +++ b/Flask-WTF-0.15.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ff177185f891302dc253437fe63081e7a46a4e99aca61dfe086fb23e54fff2dc +size 45540 diff --git a/fix-ModuleNotFoundError-wtforms-compat.patch b/fix-ModuleNotFoundError-wtforms-compat.patch new file mode 100644 index 0000000..4f357b2 --- /dev/null +++ b/fix-ModuleNotFoundError-wtforms-compat.patch @@ -0,0 +1,16 @@ + +--- a/tests/test_form.py ++++ b/tests/test_form.py +@@ -2,7 +2,11 @@ from io import BytesIO + + from flask import json, request + from wtforms import FileField, HiddenField, IntegerField, StringField +-from wtforms.compat import with_metaclass ++try: ++ from wtforms.compat import with_metaclass ++except ImportError: ++ def with_metaclass(meta, base=object): ++ return meta("NewBase", (base,), {}) + from wtforms.form import FormMeta + from wtforms.validators import DataRequired + from wtforms.widgets import HiddenInput diff --git a/fix-ModuleNotFoundError-wtforms-widgets-html5.patch b/fix-ModuleNotFoundError-wtforms-widgets-html5.patch new file mode 100644 index 0000000..5366f85 --- /dev/null +++ b/fix-ModuleNotFoundError-wtforms-widgets-html5.patch @@ -0,0 +1,15 @@ + +--- a/flask_wtf/html5.py ++++ b/flask_wtf/html5.py +@@ -8,5 +8,9 @@ warnings.warn(FlaskWTFDeprecationWarning + 'and "wtforms.widgets.html5".' + ), stacklevel=2) + +-from wtforms.widgets.html5 import * +-from wtforms.fields.html5 import * ++try: ++ from wtforms.widgets.html5 import * ++ from wtforms.fields.html5 import * ++except ImportError: ++ from wtforms.widgets.core import * ++ from wtforms.fields.core import * diff --git a/python-Flask-WTF.changes b/python-Flask-WTF.changes index 827cab8..2d3e70f 100644 --- a/python-Flask-WTF.changes +++ b/python-Flask-WTF.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Sat Aug 14 11:30:16 UTC 2021 - Fusion Future + +- Update to 0.15.1 + * Add python_requires metadata to avoid installing on unsupported + Python versions. +- Changes from 0.15.0 + * Drop support for Python < 3.6. + * FileSize validator. + * Extra requirement email installs the email_validator package. + * Fixed Flask 2.0 warnings. + * Various documentation fixes. + * Various CI fixes. +- Add fix-ModuleNotFoundError-wtforms-compat.patch to fix + ModuleNotFoundError in tests/test_form.py. +- Add fix-ModuleNotFoundError-wtforms-widgets-html5.patch to fix + ModuleNotFoundError in flask_wtf/html5.py. +- Skip test_set_default_message_language and test_i18n because of + gh#wtforms/wtforms#697. + ------------------------------------------------------------------- Thu Jan 28 09:43:12 UTC 2021 - Antonio Larrosa diff --git a/python-Flask-WTF.spec b/python-Flask-WTF.spec index 11ff61c..96327de 100644 --- a/python-Flask-WTF.spec +++ b/python-Flask-WTF.spec @@ -20,13 +20,17 @@ %define skip_python2 1 %bcond_without test Name: python-Flask-WTF -Version: 0.14.3 +Version: 0.15.1 Release: 0 Summary: WTForms support for Flask License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/lepture/flask-wtf Source: https://files.pythonhosted.org/packages/source/F/Flask-WTF/Flask-WTF-%{version}.tar.gz +# PATCH-FIX-OPENSUSE fix-ModuleNotFoundError-wtforms-compat.patch https://github.com/wtforms/wtforms/commit/a34eb532d3b96ed216f204ed3d22fc9962241446 +Patch0: fix-ModuleNotFoundError-wtforms-compat.patch +# PATCH-FIX-OPENSUSE fix-ModuleNotFoundError-wtforms-widgets-html5.patch https://github.com/wtforms/wtforms/commit/44a1cecc071cfaec4ff60c9e28935d136cc232ca +Patch1: fix-ModuleNotFoundError-wtforms-widgets-html5.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -34,6 +38,7 @@ Requires: python-Flask Requires: python-WTForms Requires: python-Werkzeug Requires: python-itsdangerous +Recommends: python-email_validator BuildArch: noarch %if %{with test} BuildRequires: %{python_module Flask-BabelEx} @@ -51,6 +56,8 @@ Adds WTForms support to your Flask application %prep %setup -q -n Flask-WTF-%{version} +%patch0 -p1 +%patch1 -p1 %build %python_build @@ -62,7 +69,8 @@ Adds WTForms support to your Flask application %if %{with test} %check export LANG=en_US.UTF-8 -%pytest tests +# Excluded tests because of gh#wtforms/wtforms#697 +%pytest -k 'not (test_set_default_message_language or test_i18n)' tests %endif %files %{python_files}