From 0429402855e3f2e015c40e1d6429306ca8d329436cb3e9b60e9d7d47b87b73b9 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Thu, 30 Jul 2020 07:00:48 +0000 Subject: [PATCH] - Update to 2.3.1: * All modules in ``wtforms.ext`` show a deprecation warning on import. * Fixed a bug when :class:`~fields.SelectField` choices is ``None``. * Restored ``HTMLString`` and ``escape_html`` as aliases for MarkupSafe functions. Their use shows a ``DeprecationWarning``. * ``Form.validate`` takes an ``extra_validators`` parameter, mapping field names to lists of extra validator functions. This matches ``BaseForm.validate``. * Update locale catalogs. * Drop support for Python 2.6, 3.3, and 3.4. * :class:`~fields.SelectField` uses ``list()`` to construct a new list of choices. * Permitted underscores in ``HostnameValidation``. * :class:`~validators.URL` validator now allows query parameters in the URL. * Updated ``false_values`` param in ``BooleanField`` docs. * Fixed broken format string in Arabic translation * Updated French and Japanese translations. * Updated Ukrainian translation. * ``FieldList`` error list keeps entries in order for easier identification of which fields had errors. * :class:`~validators.Length` gives a more helpful error message when ``min`` and ``max`` are the same value. * :class:`~fields.SelectField` no longer coerces ``None`` to ``"None"`` allowing use of ``"None"`` as an option. * The :class:`~widgets.TextArea` widget prepends a ``\r\n`` newline when rendering to account for browsers stripping an initial line for display. This does not affect the value. * HTML5 :class:`~fields.html5.IntegerField` and :class:`~fields.html5.RangeInput` don't render the ``step="1"`` attribute by default. * ``aria_`` args are rendered the same way as ``data_`` args, by converting underscores to hyphens. ``aria_describedby="name*help"`` becomes ``aria*describedby="name-help"``. * Added a ``check_validators`` method to :class:`~fields.Field` which checks if the given validators are both callable, and not classes. * ``form.errors`` is not cached and will update if an error is appended to a field after access. * :class:`~wtforms.validators.NumberRange` correctly handle NaN values. * :class:`~fields.IntegerField` checks input type when processing data. * Added a parameter to :class:`~fields.SelectField` to skip choice validation. * Choices which name and data are the same do not need to use tuples. * Added more documentation on HTML5 fields. * HTML is escaped using MarkupSafe instead of the previous internal implementation. :func:`~widgets.core.escape_html` is removed, replaced by :func:`markupsafe.escape`. :class:`~widgets.core.HTMLString` is removed, replaced by :class:`markupsafe.Markup`. * Fixed broken IPv6 validator, validation now uses the ``ipaddress`` package. * :class:`~fields.core.Label` text is escaped before rendering. * Email validation is now handled by an optional library, ``email_validator``. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-WTForms?expand=0&rev=17 --- WTForms-2.2.1.tar.gz | 3 --- WTForms-2.3.1.tar.gz | 3 +++ python-WTForms.changes | 59 ++++++++++++++++++++++++++++++++++++++++++ python-WTForms.spec | 10 ++++--- 4 files changed, 69 insertions(+), 6 deletions(-) delete mode 100644 WTForms-2.2.1.tar.gz create mode 100644 WTForms-2.3.1.tar.gz diff --git a/WTForms-2.2.1.tar.gz b/WTForms-2.2.1.tar.gz deleted file mode 100644 index 82b1711..0000000 --- a/WTForms-2.2.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0cdbac3e7f6878086c334aa25dc5a33869a3954e9d1e015130d65a69309b3b61 -size 156904 diff --git a/WTForms-2.3.1.tar.gz b/WTForms-2.3.1.tar.gz new file mode 100644 index 0000000..03b67ed --- /dev/null +++ b/WTForms-2.3.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:861a13b3ae521d6700dac3b2771970bd354a63ba7043ecc3a82b5288596a1972 +size 162773 diff --git a/python-WTForms.changes b/python-WTForms.changes index e3ab696..d0a81d6 100644 --- a/python-WTForms.changes +++ b/python-WTForms.changes @@ -1,3 +1,62 @@ +------------------------------------------------------------------- +Thu Jul 30 06:57:03 UTC 2020 - Steve Kowalik + +- Update to 2.3.1: + * All modules in ``wtforms.ext`` show a deprecation warning on import. + * Fixed a bug when :class:`~fields.SelectField` choices is ``None``. + * Restored ``HTMLString`` and ``escape_html`` as aliases for + MarkupSafe functions. Their use shows a ``DeprecationWarning``. + * ``Form.validate`` takes an ``extra_validators`` parameter, mapping + field names to lists of extra validator functions. This matches + ``BaseForm.validate``. + * Update locale catalogs. + * Drop support for Python 2.6, 3.3, and 3.4. + * :class:`~fields.SelectField` uses ``list()`` to construct a new list + of choices. + * Permitted underscores in ``HostnameValidation``. + * :class:`~validators.URL` validator now allows query parameters in + the URL. + * Updated ``false_values`` param in ``BooleanField`` docs. + * Fixed broken format string in Arabic translation + * Updated French and Japanese translations. + * Updated Ukrainian translation. + * ``FieldList`` error list keeps entries in order for easier + identification of which fields had errors. + * :class:`~validators.Length` gives a more helpful error message when + ``min`` and ``max`` are the same value. + * :class:`~fields.SelectField` no longer coerces ``None`` to + ``"None"`` allowing use of ``"None"`` as an option. + * The :class:`~widgets.TextArea` widget prepends a ``\r\n`` newline + when rendering to account for browsers stripping an initial line for + display. This does not affect the value. + * HTML5 :class:`~fields.html5.IntegerField` and + :class:`~fields.html5.RangeInput` don't render the ``step="1"`` + attribute by default. + * ``aria_`` args are rendered the same way as ``data_`` args, by + converting underscores to hyphens. ``aria_describedby="name*help"`` + becomes ``aria*describedby="name-help"``. + * Added a ``check_validators`` method to :class:`~fields.Field` which + checks if the given validators are both callable, and not classes. + * ``form.errors`` is not cached and will update if an error is + appended to a field after access. + * :class:`~wtforms.validators.NumberRange` correctly handle NaN + values. + * :class:`~fields.IntegerField` checks input type when processing data. + * Added a parameter to :class:`~fields.SelectField` to skip choice + validation. + * Choices which name and data are the same do not need to use tuples. + * Added more documentation on HTML5 fields. + * HTML is escaped using MarkupSafe instead of the previous internal + implementation. :func:`~widgets.core.escape_html` is removed, + replaced by :func:`markupsafe.escape`. + :class:`~widgets.core.HTMLString` is removed, replaced by + :class:`markupsafe.Markup`. + * Fixed broken IPv6 validator, validation now uses the ``ipaddress`` + package. + * :class:`~fields.core.Label` text is escaped before rendering. + * Email validation is now handled by an optional library, + ``email_validator``. + ------------------------------------------------------------------- Mon Jul 29 12:02:19 UTC 2019 - pgajdos@suse.com diff --git a/python-WTForms.spec b/python-WTForms.spec index 1fed82a..78f27cd 100644 --- a/python-WTForms.spec +++ b/python-WTForms.spec @@ -1,7 +1,7 @@ # # spec file for package python-WTForms # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,16 +18,20 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-WTForms -Version: 2.2.1 +Version: 2.3.1 Release: 0 Summary: A flexible forms validation and rendering library for Python web development License: BSD-3-Clause Group: Development/Languages/Python URL: http://wtforms.simplecodes.com/ Source: https://files.pythonhosted.org/packages/source/W/WTForms/WTForms-%{version}.tar.gz +BuildRequires: %{python_module MarkupSafe} +BuildRequires: %{python_module email_validator} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: python-MarkupSafe +Requires: python-email_validator Recommends: python-Babel Recommends: python-Django Recommends: python-SQLAlchemy @@ -78,7 +82,7 @@ popd %files %{python_files} %license LICENSE.rst -%doc AUTHORS.rst CHANGES.rst README.rst +%doc CHANGES.rst README.rst %{python_sitelib}/* %files -n %{name}-doc