Hello community,

here is the log from the commit of package python-email_validator for 
openSUSE:Factory checked in at 2020-05-28 09:09:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-email_validator (Old)
 and      /work/SRC/openSUSE:Factory/.python-email_validator.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-email_validator"

Thu May 28 09:09:31 2020 rev:6 rq:809396 version:1.1.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-email_validator/python-email_validator.changes
    2020-05-12 22:28:05.043337467 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-email_validator.new.3606/python-email_validator.changes
  2020-05-28 09:09:33.612059341 +0200
@@ -1,0 +2,13 @@
+Tue May 26 06:34:06 UTC 2020 - Petr Gajdos <[email protected]>
+
+- %python3_only -> %python_alternative
+
+-------------------------------------------------------------------
+Mon May 11 07:38:24 UTC 2020 - Antonio Larrosa <[email protected]>
+
+- Do not build python2 version
+- Add patch to fix error messages being compared in tests to match
+  error messages in Leap/SLE:
+  * fix-tests-strings.patch
+
+-------------------------------------------------------------------

New:
----
  fix-tests-strings.patch

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

Other differences:
------------------
++++++ python-email_validator.spec ++++++
--- /var/tmp/diff_new_pack.xUAZUK/_old  2020-05-28 09:09:34.424061303 +0200
+++ /var/tmp/diff_new_pack.xUAZUK/_new  2020-05-28 09:09:34.428061313 +0200
@@ -17,6 +17,7 @@
 
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%define skip_python2 1
 Name:           python-email_validator
 Version:        1.1.0
 Release:        0
@@ -26,15 +27,18 @@
 URL:            https://github.com/JoshData/python-email-validator
 Source:         
https://github.com/JoshData/python-email-validator/archive/v%{version}.tar.gz
 Patch0:         skip-tests-using-network.patch
+Patch1:         fix-tests-strings.patch
 BuildRequires:  %{python_module dnspython >= 1.15.0}
 BuildRequires:  %{python_module idna >= 2.0.0}
-BuildRequires:  %{python_module pytest >= 4.0}
+BuildRequires:  %{python_module pytest >= 5.0}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 Requires:       python-dnspython >= 1.15.0
 Requires:       python-idna >= 2.0.0
 Requires:       python-setuptools
+Requires(post): update-alternatives
+Requires(postun): update-alternatives
 BuildArch:      noarch
 %python_subpackages
 
@@ -56,21 +60,31 @@
 %prep
 %setup -q -n python-email-validator-%{version}
 %patch0 -p1
+%if %{?suse_version} <= 1500
+%patch1 -p1
+%endif
 
 %build
 %python_build
 
 %install
 %python_install
+%python_clone -a %{buildroot}%{_bindir}/email_validator
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 %check
 %pytest
 
+%post
+%python_install_alternative email_validator
+
+%postun
+%python_uninstall_alternative email_validator
+
 %files %{python_files}
 %license LICENSE
 %doc README.md
-%python3_only %{_bindir}/email_validator
+%python_alternative %{_bindir}/email_validator
 %{python_sitelib}/*
 
 %changelog

++++++ fix-tests-strings.patch ++++++
Index: python-email-validator-1.1.0/tests/test_main.py
===================================================================
--- python-email-validator-1.1.0.orig/tests/test_main.py
+++ python-email-validator-1.1.0/tests/test_main.py
@@ -212,17 +212,17 @@ def test_email_valid(email_input, output
         ('[email protected]', 'An email address cannot have a period 
immediately after the @-sign.'),
         ('[email protected]', 'An email address cannot have two periods in a 
row.'),
         ('[email protected]',
-         'The domain name baddash.-.com contains invalid characters (Label 
must not start or end with a hyphen).'),
+         'The domain name baddash.-.com contains invalid characters (The label 
b\'-\' is not a valid A-label).'),
         ('[email protected]',
-         'The domain name baddash.-a.com contains invalid characters (Label 
must not start or end with a hyphen).'),
+         'The domain name baddash.-a.com contains invalid characters (The 
label b\'-a\' is not a valid A-label).'),
         ('[email protected]',
-         'The domain name baddash.b-.com contains invalid characters (Label 
must not start or end with a hyphen).'),
+         'The domain name baddash.b-.com contains invalid characters (The 
label b\'b-\' is not a valid A-label).'),
         ('[email protected]\n',
-         'The domain name example.com\n contains invalid characters (Codepoint 
U+000A at position 4 of '
-         '\'com\\n\' not allowed).'),
+         'The domain name example.com\n contains invalid characters (Codepoint 
U+000A not allowed at '
+         'position 12 in \'example.com\\n\').'),
         ('my@example\n.com',
-         'The domain name example\n.com contains invalid characters (Codepoint 
U+000A at position 8 of '
-         '\'example\\n\' not allowed).'),
+         'The domain name example\n.com contains invalid characters (Codepoint 
U+000A not allowed at '
+         'position 8 in \'example\\n.com\').'),
         ('[email protected]', 'The email address contains invalid 
characters before the @-sign: ..'),
         ('[email protected]', 'The email address contains invalid 
characters before the @-sign: ..'),
         ('[email protected]', 'The email address contains invalid 
characters before the @-sign: ..'),

Reply via email to