15
0
Files
python-WTForms/python-WTForms.spec
Steve Kowalik ac6c53b3c0 - 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
2020-07-30 07:00:48 +00:00

92 lines
2.9 KiB
RPMSpec

#
# spec file for package python-WTForms
#
# 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-WTForms
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
Recommends: python-python-dateutil
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module Babel}
BuildRequires: %{python_module SQLAlchemy}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module python-dateutil}
# /SECTION
Provides: python-WTForms-lang
Obsoletes: python-WTForms-lang
%python_subpackages
%description
WTForms is a forms validation and rendering library for Python web development.
With WTForms, form field HTML can be generated and be customized with templates.
This allows to maintain separation of code and presentation, and keep those parameters out of Python code.
Because of this loose coupling, any template engine may be used for this.
%package -n %{name}-doc
Summary: Documentation for WTForms
Group: Documentation/HTML
Requires: %{name} = %{version}
%description -n %{name}-doc
Documentation for WTForms, which is a forms validation and rendering library for Python web development.
%prep
%setup -q -n WTForms-%{version}
%build
%python_build
# Fix wrong EOL-encoding
sed -i "s/\r//" CHANGES.rst
# remove reference to ../CHANGES.rst
rm docs/changes.rst
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
pushd tests
%python_expand $python runtests.py
popd
%files %{python_files}
%license LICENSE.rst
%doc CHANGES.rst README.rst
%{python_sitelib}/*
%files -n %{name}-doc
%doc docs/*.rst
%changelog