Hello community,

here is the log from the commit of package python-FormEncode for 
openSUSE:Factory checked in at 2019-03-05 12:24:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-FormEncode (Old)
 and      /work/SRC/openSUSE:Factory/.python-FormEncode.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-FormEncode"

Tue Mar  5 12:24:50 2019 rev:13 rq:681513 version:1.3.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-FormEncode/python-FormEncode.changes      
2018-12-13 19:44:50.868981075 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-FormEncode.new.28833/python-FormEncode.changes
   2019-03-05 12:24:54.428849017 +0100
@@ -1,0 +2,16 @@
+Mon Mar  4 16:23:43 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Remove online tests:
+  * remove-online-tests.patch
+- Work with new pycountry:
+  * new-pycountry.patch
+- Run tests
+
+-------------------------------------------------------------------
+Mon Dec 10 14:55:26 UTC 2018 - Tomáš Chvátal <[email protected]>
+
+- Fix fdupes call
+- Update to 1.3.1:
+  * no obvious changelog
+
+-------------------------------------------------------------------

Old:
----
  FormEncode-1.3.0.zip
  FormEncode-doc-infrastructure.tar.gz

New:
----
  FormEncode-1.3.1.tar.gz
  new-pycountry.patch
  remove-online-tests.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-FormEncode.spec ++++++
--- /var/tmp/diff_new_pack.3t11GE/_old  2019-03-05 12:24:55.792848601 +0100
+++ /var/tmp/diff_new_pack.3t11GE/_new  2019-03-05 12:24:55.796848600 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-FormEncode
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,21 +19,22 @@
 %define oldpython python
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-FormEncode
-Version:        1.3.0
+Version:        1.3.1
 Release:        0
 Summary:        HTML form validation, generation, and conversion package
 License:        Python-2.0
 Group:          Development/Languages/Python
-Url:            http://formencode.org
-Source:         
https://files.pythonhosted.org/packages/source/F/FormEncode/FormEncode-%{version}.zip
-Source1:        FormEncode-doc-infrastructure.tar.gz
-# Documentation requirements:
+URL:            http://formencode.org
+Source:         
https://files.pythonhosted.org/packages/source/F/FormEncode/FormEncode-%{version}.tar.gz
+Patch0:         remove-online-tests.patch
+Patch1:         new-pycountry.patch
+BuildRequires:  %{python_module nose}
+BuildRequires:  %{python_module pycountry}
 BuildRequires:  %{python_module setuptools}
+BuildRequires:  dos2unix
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
-BuildRequires:  python3-Sphinx
-BuildRequires:  unzip
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+BuildRequires:  python2-dnspython
 BuildArch:      noarch
 %ifpython2
 Provides:       %{oldpython}-formencode = %{version}
@@ -46,40 +47,30 @@
 a declarative form of defining the validation, and decoupled processes
 for filling and generating forms.
 
-%package -n %{name}-doc
-Summary:        HTML form validation, generation, and conversion package
-Group:          Development/Libraries/Python
-Provides:       %{python_module FormEncode-doc = %{version}}
-
-%description -n %{name}-doc
-This package contains documentation files for %{name}.
-
 %prep
-%setup -q -n FormEncode-%{version} -a1
-find . -name \*.txt -exec sed -i 's/\r$//g' {} \;
-sed -i 's/\r$//g' PKG-INFO README.rst
-sed -i '/^:date:/d' docs/*.txt # fix build-compare
+%setup -q -n FormEncode-%{version}
+%patch0 -p1
+%patch1 -p1
+dos2unix README.rst
 
 %build
 %python_build
-%{_python_use_flavor python3}
-python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo && mv 
build/sphinx/html html
 
 %install
 %python_install
 
-# install documentation
-rm -r %{buildroot}%{python_sitelib}/docs # remove misplaced documentation
+# remove misplaced documentation
+%python_expand rm -r %{buildroot}%{$python_sitelib}/docs
 
-%fdupes %{buildroot}%{_prefix}
+%python_expand %fdupes %{buildroot}%{$python_sitelib}
+
+%check
+export LANG=en_US.UTF-8
+# excluded tests poll dns
+%python_expand PYTHONPATH=%{buildroot}%{python_sitelib} 
nosetests-%{python_bin_suffix} -v -e 
'(test_cyrillic_email|test_unicode_ascii_subgroup)' formencode/tests
 
 %files %{python_files}
-%defattr(-,root,root,-)
 %doc README.rst
 %{python_sitelib}/*
 
-%files -n %{name}-doc
-%defattr(-,root,root,-)
-%doc html
-
 %changelog

++++++ FormEncode-doc-infrastructure.tar.gz -> FormEncode-1.3.1.tar.gz ++++++
++++ 28478 lines of diff (skipped)

++++++ new-pycountry.patch ++++++
From: Chris Lamb <[email protected]>
Date: Mon, 6 Aug 2018 22:29:58 +0800
Subject: Use "alpha_2" over "alpha2" for compatibility with newer versions of
 pycountry.

---
 formencode/national.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/formencode/national.py b/formencode/national.py
index a8514ab..5a55fab 100644
--- a/formencode/national.py
+++ b/formencode/national.py
@@ -85,19 +85,19 @@ elif pycountry:
     _l = lambda t: gettext.dgettext('iso639', t)
 
     def get_countries():
-        c1 = set([(e.alpha2, _c(e.name)) for e in pycountry.countries])
+        c1 = set([(e.alpha_2, _c(e.name)) for e in pycountry.countries])
         ret = c1.union(country_additions + fuzzy_countrynames)
         return ret
 
     def get_country(code):
-        return _c(pycountry.countries.get(alpha2=code).name)
+        return _c(pycountry.countries.get(alpha_2=code).name)
 
     def get_languages():
-        return [(e.alpha2, _l(e.name)) for e in pycountry.languages
-            if e.name and getattr(e, 'alpha2', None)]
+        return [(e.alpha_2, _l(e.name)) for e in pycountry.languages
+            if e.name and getattr(e, 'alpha_2', None)]
 
     def get_language(code):
-        return _l(pycountry.languages.get(alpha2=code).name)
+        return _l(pycountry.languages.get(alpha_2=code).name)
 
 
 ############################################################
++++++ remove-online-tests.patch ++++++
From: Stefano Rivera <[email protected]>
Date: Sun, 11 Oct 2015 22:20:17 +0200
Subject: remove-dns-tests.diff

Tests that require network (DNS) access
Patch-Name: remove-dns-tests.diff
---
 formencode/validators.py | 30 ------------------------------
 1 file changed, 30 deletions(-)

diff --git a/formencode/validators.py b/formencode/validators.py
index c332ec9..cfba7c8 100644
--- a/formencode/validators.py
+++ b/formencode/validators.py
@@ -1288,20 +1288,6 @@ class Email(FancyValidator):
         '[email protected]'
         >>> e.to_python('o*[email protected]')
         'o*[email protected]'
-        >>> e = Email(resolve_domain=True)
-        >>> e.resolve_domain
-        True
-        >>> e.to_python('[email protected]')
-        '[email protected]'
-        >>> e.to_python('[email protected]')
-        '[email protected]'
-        >>> # NOTE: If you do not have dnspython installed this example won't 
work:
-        >>> e.to_python('[email protected]')
-        Traceback (most recent call last):
-            ...
-        Invalid: The domain of the email address does not exist (the portion 
after the @: thisdomaindoesnotexistithinkforsure.com)
-        >>> e.to_python(u'[email protected]')
-        u'[email protected]'
         >>> e = Email(not_empty=False)
         >>> e.to_python('')
 
@@ -1429,22 +1415,6 @@ class URL(FancyValidator):
         Traceback (most recent call last):
             ...
         Invalid: That is not a valid URL
-        >>> u = URL(add_http=False, check_exists=True)
-        >>> u.to_python('http://google.com')
-        'http://google.com'
-        >>> u.to_python('google.com')
-        Traceback (most recent call last):
-            ...
-        Invalid: You must start your URL with http://, https://, etc
-        >>> u.to_python('http://www.formencode.org/does/not/exist/page.html')
-        Traceback (most recent call last):
-            ...
-        Invalid: The server responded that the page could not be found
-        >>> 
u.to_python('http://this.domain.does.not.exist.example.org/test.html')
-        ... # doctest: +ELLIPSIS
-        Traceback (most recent call last):
-            ...
-        Invalid: An error occured when trying to connect to the server: ...
 
     If you want to allow addresses without a TLD (e.g., ``localhost``) you can 
do::
 
From: "[email protected]" <[email protected]>
Date: Tue, 14 Jun 2016 14:40:12 +0200
Subject: Remove tests from test_email that require dns.

Some of the new tests in test_email also require dns. This patch
removes them so the build does not require network access.
---
 formencode/tests/test_email.py | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/formencode/tests/test_email.py b/formencode/tests/test_email.py
index 3ebf120..2305454 100644
--- a/formencode/tests/test_email.py
+++ b/formencode/tests/test_email.py
@@ -65,17 +65,3 @@ class TestEmail(unittest.TestCase):
 
         for email, expected in valid_email_addresses:
             self.assertEqual(self.validate(email), expected)
-
-
-class TestUnicodeEmailWithResolveDomain(unittest.TestCase):
-
-    def setUp(self):
-        self.validator = Email(resolve_domain=True)
-
-    def test_unicode_ascii_subgroup(self):
-        self.assertEqual(self.validator.to_python(
-            u'[email protected]'), '[email protected]')
-
-    def test_cyrillic_email(self):
-        self.assertEqual(self.validator.to_python(
-            u'me@письмо.рф'), u'me@письмо.рф')

Reply via email to