commit 9c422e9579e143acc0e8fa9ab3d7a02bbb3173242eb7455664aeb69f2b471934 Author: Sascha Peilicke Date: Thu Sep 1 08:46:49 2011 +0000 - Renamed to python-FormEncode to match upstream name - Properly package documentation - disable runtime dependency to python-setuptools - update to 1.2.2 - remove FormEncode-1.2-svn-fixes.patch - added rpmlintrc - Apply some fixes from SVN - Update to 1.2 * Added :class:`formencode.validators.IPAddress`, validating IP addresses, from Leandro Lucarella. * Added :meth:`formencode.api.Invalid.__unicode__` * In :mod:`formencode.htmlfill` use a default encoding of utf8 when handling mixed ``str``/``unicode`` content. Also do not modify ```` tags (previously ``src`` would be overwritten, for no good reason). * In :class:`formencode.validators.Email` allow single-character domain names (like x.com). * Make :class:`formencode.validators.FieldsMatch` give a normal ``Invalid`` exception if you pass it a non-dictionary. Also treat all missing keys as the empty string (previously the first key was required and would raise KeyError). * :class:`formencode.validators.Number` works with ``inf`` float values (before it would raise a OverflowError). * The ``tw`` locale has been renamed to the more standard ``zh_TW``. * Added Japanese and Turkish translations. * Fixed some outdated translations and errors in Spanish and Greek OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-FormEncode?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/FormEncode-1.2.4.tar.gz b/FormEncode-1.2.4.tar.gz new file mode 100644 index 0000000..c1f98c4 --- /dev/null +++ b/FormEncode-1.2.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8270840ee832055463b3d3328f8ae4b881e1fbe84353c97af1d913df3401feb9 +size 240034 diff --git a/python-FormEncode.changes b/python-FormEncode.changes new file mode 100644 index 0000000..b31abe5 --- /dev/null +++ b/python-FormEncode.changes @@ -0,0 +1,196 @@ +------------------------------------------------------------------- +Thu Sep 1 08:38:45 UTC 2011 - saschpe@suse.de + +- Renamed to python-FormEncode to match upstream name +- Properly package documentation + +------------------------------------------------------------------- +Sun Jun 7 00:01:01 CEST 2009 - lars@linux-schulserver.de + +- disable runtime dependency to python-setuptools + +------------------------------------------------------------------- +Mon Apr 27 17:51:38 CEST 2009 - lars@linux-schulserver.de + +- update to 1.2.2 +- remove FormEncode-1.2-svn-fixes.patch +- added rpmlintrc + +------------------------------------------------------------------- +Sun Dec 14 00:00:00 CET 2008 - jfunk@funktronics.ca + +- Apply some fixes from SVN + +------------------------------------------------------------------- +Wed Dec 03 00:00:00 CET 2008 - jfunk@funktronics.ca + +- Update to 1.2 + * Added :class:`formencode.validators.IPAddress`, validating IP + addresses, from Leandro Lucarella. + * Added :meth:`formencode.api.Invalid.__unicode__` + * In :mod:`formencode.htmlfill` use a default encoding of utf8 when + handling mixed ``str``/``unicode`` content. Also do not modify + ```` tags (previously ``src`` would be + overwritten, for no good reason). + * In :class:`formencode.validators.Email` allow single-character + domain names (like x.com). + * Make :class:`formencode.validators.FieldsMatch` give a normal + ``Invalid`` exception if you pass it a non-dictionary. Also treat + all missing keys as the empty string (previously the first key was + required and would raise KeyError). + * :class:`formencode.validators.Number` works with ``inf`` float + values (before it would raise a OverflowError). + * The ``tw`` locale has been renamed to the more standard ``zh_TW``. + * Added Japanese and Turkish translations. + * Fixed some outdated translations and errors in Spanish and Greek + translations. Translations now managed with `Babel + `_. +- 1.1 + * Fixed the ``is_empty()`` method in + :class:`formencode.validators.FieldStorageUploadConverter`; + previously it returned the opposite of the intended result. + * Added a parameter to ``htmlfill.render()``: ``prefix_error``. If + this parameter is true (the default) then errors automatically go + before the input field; if false then they go after the input field. + * Remove deprecated modules: ``fields``, ``formgen``, ``htmlform``, + ``sqlformgen``, and ``sqlschema``. + * Added ``formencode.htmlrename``, which renames HTML inputs. + * In ``formencode.htmlfill``, non-string values are compared usefully + (e.g., a select box with integer values). + * The validators ``Int`` and ``Number`` both take min/max arguments + (from Shannon Behrens). + * Validators based on ``formencode.validators.FormValidator`` will not + treat ``{}`` as an empty (unvalidated) value. + * Some adjustments to the URL validator. + * :class:`formencode.compound.All` does not handle empty values, + instead relying on sub-validators to check for emptiness. + * Fixed the ``if_missing`` attribute in + :class:`formencode.foreach.ForEach`; previously it would be the same + list instance, so if you modified it then it would effect future + ``if_missing`` values (reported by Felix Schwarz). + * Added formatter to :mod:`formencode.htmlfill`, so you can use + ```` -- this will + cause the error to be swallowed, not shown to the user. + * Added :class:`formencode.validators.XRI` for validation i-names, + i-numbers, URLs, etc (as used in OpenID). + * Look in ``/usr/share/locale`` for locale files, in addition to the + normal locations. + * Quiet Python 2.6 deprecation warnings. + * Fix :class:`formencode.validators.URL`, which was accepting illegal + characters (like newlines) and did not accept http://domain:PORT/ +- 1.0.1 + * ``chained_validators`` were removed from Schema somehow; now + replaced and working. + * Put in missing ``htmlfill.render(error_class=...)`` parameter (was + documented and implemented, but ``render()`` did not pass it + through). + +------------------------------------------------------------------- +Tue Nov 11 00:00:00 CET 2008 - cfarrell1980@gmail.com + +- try building with --record-rpm instead of --record - 1.0-1 + +------------------------------------------------------------------- +Wed Mar 19 00:00:00 CET 2008 - jfunk@funktronics.ca + +- Update to 1.0 + +------------------------------------------------------------------- +Thu Dec 27 00:00:00 CET 2007 - jfunk@funktronics.ca + +- Fix bad python interpreter path + +------------------------------------------------------------------- +Tue Dec 18 00:00:00 CET 2007 - jfunk@funktronics.ca + +- Update to 0.9: + - Backward incompatible changes + * The notion of "empty" has changed to include empty lists, + dictionaries, and tuples. If you get one of these values passed + into (or generated by) a validator with ``not_empty=True`` you can + get exceptions where you didn't previously. + - Enhancements + * Added support for Paste's MultiDict dictionary as input to + Schema.to_python, by converting it to a normal dict via MultiDict.mixed. + Previously MultiDicts wouldn't work with CompoundValidators (like + ForEach) + * Added encoding parameter to htmlfill, which will handle cases when mixed + str and unicode objects are used (turning all str objects into unicode) + * Include ``formencode.validators.InternationalPhoneNumber`` from + W-Mark Kubacki. + * ``validators.Int`` takes ``min`` and ``max`` options (from Felix + Schwarz). + * You can control the missing message (which by default is just + "Missing Value") using the message ``"missing"`` in a validator + (also from James Gardner). + * Added ``validators.CADR`` (for IP addresses with an optional range) + and ``validators.MACAddress`` (from Christoph Haas). + - Bug Fixes + * Be friendlier when loaded from a zip file (as with py2exe); + previously only egg zip files would work. + * Fixed bug in htmlfill when a document ends with no trailing text + after the last tag. + * Fix problem with HTMLParser's default unescaping routing, which only + understood a very limited number of entities in attribute values. + * Fix problem with looking up A records for email addresses. + * ``validators.String`` now always returns strings. It also converts + lists to comma-separated strings (no ``[...]``), and can encode + unicode if an ``encoding`` parameter is given. Empty values are + handled better. + * ``validators.UnicodeString`` properly handles non-Unicode inputs. + * Make ``validators.DateConverter`` serialize dates properly + (from James Gardner). + * Minor fix to setup.py to make FormEncode more friendly with + zc.buildout. + +------------------------------------------------------------------- +Mon Apr 23 00:00:00 CET 2007 - jfunk@funktronics.ca + +- Update to 0.7.1: + From 0.7.1: + * Set ``if_missing=()`` on ``validators.Set``, as a missing value + usually means empty for this value. + * Fix for ``Email`` validator that searches A records in addition to + MX records (from Jacob Smullyan). + * Fixes for the ``es`` locale. + From 0.7: + * **Backward compatibility issue**: Due to the addition of i18n + (internationalization) to FormEncode, Invalid exceptions now have + unicode messages. You may encounter unicode-related errors if you + are mixing these messages with non-ASCII ``str`` strings. + * gettext-enabled branch merged in + * Fixes `#1457145: Fails on URLs with port numbers + `_ + * Fixes `#1559918 Schema fails to accept unicode errors + `_ + * ``from formencode.validators import *`` will import the ``Invalid`` + exception now. + * ``Invalid().unpack_errors(encode_variables=True)`` now filters out + None values (which ``ForEach`` can produce even for keys with no + errors). + +------------------------------------------------------------------- +Mon Jan 08 00:00:00 CET 2007 - - poeml@suse.de + +- update to 0.6 + +------------------------------------------------------------------- +Mon Jun 26 00:00:00 CET 2006 - jfunk@funktronics.ca + +- Remove noarch + +------------------------------------------------------------------- +Fri Jun 23 00:00:00 CET 2006 - jfunk@funktronics.ca + +- No longer need pth kludge + +------------------------------------------------------------------- +Thu Jun 22 00:00:00 CET 2006 - jfunk@funktronics.ca + +- Update + +------------------------------------------------------------------- +Thu Oct 13 00:00:00 CET 2005 - jfunk@funktronics.ca + +- Initial release + diff --git a/python-FormEncode.spec b/python-FormEncode.spec new file mode 100644 index 0000000..ca8f44e --- /dev/null +++ b/python-FormEncode.spec @@ -0,0 +1,61 @@ +# +# spec file for package python-FormEncode +# +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# 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 http://bugs.opensuse.org/ +# + +Name: python-FormEncode +Version: 1.2.4 +Release: 0 +Url: http://formencode.org +Summary: HTML form validation, generation, and conversion package +License: PSF +Group: Development/Languages/Python +Source: http://pypi.python.org/packages/source/F/FormEncode/FormEncode-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: python-devel +BuildRequires: python-distribute +%if 0%{?suse_version} +%py_requires +%if 0%{?suse_version} > 1110 +BuildArch: noarch +%endif +%endif +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} + +%description +FormEncode validates and converts nested structures. It allows for +a declarative form of defining the validation, and decoupled processes +for filling and generating forms. + +%prep +%setup -q -n FormEncode-%{version} +mv docs/_build docs/html # Use a better name for HTML docs +sed -i "s/\r//" docs/modules/national.txt # Fix EOL encoding + +%build +python setup.py build + +%install +python setup.py install --prefix=%{_prefix} --root=%{buildroot} + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%doc docs/* +%{python_sitelib}/* + +%changelog