Accepting request 912377 from devel:languages:python:flask
OBS-URL: https://build.opensuse.org/request/show/912377 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Flask-WTF?expand=0&rev=9
This commit is contained in:
commit
509eb1d0f2
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:d417e3a0008b5ba583da1763e4db0f55a1269d9dd91dcc3eb3c026d3c5dbd720
|
|
||||||
size 44507
|
|
3
Flask-WTF-0.15.1.tar.gz
Normal file
3
Flask-WTF-0.15.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:ff177185f891302dc253437fe63081e7a46a4e99aca61dfe086fb23e54fff2dc
|
||||||
|
size 45540
|
16
fix-ModuleNotFoundError-wtforms-compat.patch
Normal file
16
fix-ModuleNotFoundError-wtforms-compat.patch
Normal file
@ -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
|
15
fix-ModuleNotFoundError-wtforms-widgets-html5.patch
Normal file
15
fix-ModuleNotFoundError-wtforms-widgets-html5.patch
Normal file
@ -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 *
|
@ -1,3 +1,23 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Aug 14 11:30:16 UTC 2021 - Fusion Future <qydwhotmail@gmail.com>
|
||||||
|
|
||||||
|
- 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 <alarrosa@suse.com>
|
Thu Jan 28 09:43:12 UTC 2021 - Antonio Larrosa <alarrosa@suse.com>
|
||||||
|
|
||||||
|
@ -20,13 +20,17 @@
|
|||||||
%define skip_python2 1
|
%define skip_python2 1
|
||||||
%bcond_without test
|
%bcond_without test
|
||||||
Name: python-Flask-WTF
|
Name: python-Flask-WTF
|
||||||
Version: 0.14.3
|
Version: 0.15.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: WTForms support for Flask
|
Summary: WTForms support for Flask
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/lepture/flask-wtf
|
URL: https://github.com/lepture/flask-wtf
|
||||||
Source: https://files.pythonhosted.org/packages/source/F/Flask-WTF/Flask-WTF-%{version}.tar.gz
|
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: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
@ -34,6 +38,7 @@ Requires: python-Flask
|
|||||||
Requires: python-WTForms
|
Requires: python-WTForms
|
||||||
Requires: python-Werkzeug
|
Requires: python-Werkzeug
|
||||||
Requires: python-itsdangerous
|
Requires: python-itsdangerous
|
||||||
|
Recommends: python-email_validator
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
BuildRequires: %{python_module Flask-BabelEx}
|
BuildRequires: %{python_module Flask-BabelEx}
|
||||||
@ -51,6 +56,8 @@ Adds WTForms support to your Flask application
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n Flask-WTF-%{version}
|
%setup -q -n Flask-WTF-%{version}
|
||||||
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
@ -62,7 +69,8 @@ Adds WTForms support to your Flask application
|
|||||||
%if %{with test}
|
%if %{with test}
|
||||||
%check
|
%check
|
||||||
export LANG=en_US.UTF-8
|
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
|
%endif
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user