Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-email-validator for
openSUSE:Factory checked in at 2023-05-26 20:15:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-email-validator (Old)
and /work/SRC/openSUSE:Factory/.python-email-validator.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-email-validator"
Fri May 26 20:15:05 2023 rev:5 rq:1088992 version:2.0.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-email-validator/python-email-validator.changes
2023-01-29 14:14:46.852389786 +0100
+++
/work/SRC/openSUSE:Factory/.python-email-validator.new.1533/python-email-validator.changes
2023-05-26 20:15:09.320148885 +0200
@@ -1,0 +2,59 @@
+Thu May 25 08:23:47 UTC 2023 - Daniel Garcia <[email protected]>
+
+- Add dont-require-resolv-tests.patch to make tests run without an
+ existing /etc/resolv.conf file
+- Update to 2.0.0:
+ This is a major update to the library, but since email address specs
+ haven't changed there should be no significant changes to which
+ email addresses are considered valid or invalid with default
+ options. There are new options for accepting unusual email addresses
+ that were previously always rejected, some changes to how DNS errors
+ are handled, many changes in error message text, and major internal
+ improvements including the addition of type annotations. Python 3.7+
+ is now required. Details follow:
+
+ * Python 2.x and 3.x versions through 3.6, and dnspython 1.x, are no
+ longer supported. Python 3.7+ with dnspython 2.x are now required.
+ * The dnspython package is no longer required if DNS checks are not
+ used, although it will install automatically.
+ * NoNameservers and NXDOMAIN DNS errors are now handled differently:
+ NoNameservers no longer fails validation, and NXDOMAIN now skips
+ checking for an A/AAAA fallback and goes straight to failing
+ validation.
+ * Some syntax error messages have changed because they are now
+ checked explicitly rather than as a part of other checks.
+ * The quoted-string local part syntax (e.g. multiple @-signs,
+ spaces, etc. if surrounded by quotes) and domain-literal addresses
+ (e.g. @[192.XXX...] or @[IPv6:...]) are now parsed but not
+ considered valid by default. Better error messages are now given
+ for these addresses since it can be confusing for a technically
+ valid address to be rejected, and new allow_quoted_local and
+ allow_domain_literal options are added to allow these addresses if
+ you really need them.
+ * Some other error messages have changed to not repeat the email
+ address in the error message.
+ * The email field on the returned ValidatedEmail object has been
+ renamed to normalized to be clearer about its importance, but
+ access via .email is also still supported.
+ * Some mailbox names like postmaster are now normalized to lowercase
+ per RFC 2142.
+ * The library has been reorganized internally into smaller modules.
+ * The tests have been reorganized and expanded. Deliverability tests
+ now mostly use captured DNS responses so they can be run off-line.
+ * The main tool now reads options to validate_email from environment
+ variables.
+ * Type annotations have been added to the exported methods and the
+ ValidatedEmail class and some internal methods.
+ * The old dict-like pattern for the return value of validate_email
+ is deprecated.
+
+ Versions 2.0.0.post1 and 2.0.0.post2 corrected some packaging
+ issues. 2.0.0.post2 also added a check for an invalid combination of
+ arguments.
+
+-------------------------------------------------------------------
+Thu May 25 07:18:27 UTC 2023 - Daniel Garcia <[email protected]>
+
+- add sle15_python_module_pythons (jsc#PED-68)
+
+-------------------------------------------------------------------
Old:
----
email_validator-1.3.1.tar.gz
New:
----
dont-require-resolv-tests.patch
email_validator-2.0.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-email-validator.spec ++++++
--- /var/tmp/diff_new_pack.ihGlAa/_old 2023-05-26 20:15:10.552156228 +0200
+++ /var/tmp/diff_new_pack.ihGlAa/_new 2023-05-26 20:15:10.560156276 +0200
@@ -16,10 +16,10 @@
#
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%{?sle15_python_module_pythons}
%define skip_python2 1
Name: python-email-validator
-Version: 1.3.1
+Version: 2.0.0
Release: 0
Summary: A robust email syntax and deliverability validation library
for Python
License: CC0-1.0
@@ -28,6 +28,8 @@
# PATCH-FIX-OPENSUSE Ignore DeprecationWarning until requests-toolbelt is fixed
# (Pulled in by dnspython)
Patch0: ignore-urllib3-pyopenssl-warning.patch
+# PATCH-FIX-OPENSUSE do not require /etc/resolv.conf for testing
+Patch1: dont-require-resolv-tests.patch
BuildRequires: %{python_module dnspython >= 1.15.0}
BuildRequires: %{python_module idna >= 2.0.0}
BuildRequires: %{python_module pytest >= 5.0}
@@ -71,7 +73,11 @@
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
-%pytest tests -k 'not (test_deliverability_no_records or
test_deliverability_found or test_deliverability_fails or
test_deliverability_dns_timeout or test_main_single_good_input or
test_main_multi_input or test_main_input_shim or
test_validate_email__with_caching_resolver or
test_validate_email__with_configured_resolver or
test_email_example_reserved_domain)'
+echo "nameserver 1.1.1.1" > resolv.conf
+export RESOLV_FILE=$PWD/resolv.conf
+# test_caching_dns_resolver fails when running with kvm
+donttest="test_caching_dns_resolver"
+%pytest tests -k "not ($donttest)"
%post
%python_install_alternative email_validator
++++++ dont-require-resolv-tests.patch ++++++
Index: python-email-validator-2.0.0/email_validator/deliverability.py
===================================================================
--- python-email-validator-2.0.0.orig/email_validator/deliverability.py
+++ python-email-validator-2.0.0/email_validator/deliverability.py
@@ -6,11 +6,11 @@ import dns.resolver
import dns.exception
-def caching_resolver(*, timeout: Optional[int] = None, cache=None):
+def caching_resolver(*, timeout: Optional[int] = None, cache=None,
resolv=None):
if timeout is None:
from . import DEFAULT_TIMEOUT
timeout = DEFAULT_TIMEOUT
- resolver = dns.resolver.Resolver()
+ resolver = dns.resolver.Resolver(filename=resolv or '/etc/resolv.conf')
resolver.cache = cache or dns.resolver.LRUCache() # type: ignore
resolver.lifetime = timeout # type: ignore # timeout, in seconds
return resolver
Index: python-email-validator-2.0.0/tests/mocked_dns_response.py
===================================================================
--- python-email-validator-2.0.0.orig/tests/mocked_dns_response.py
+++ python-email-validator-2.0.0/tests/mocked_dns_response.py
@@ -1,5 +1,6 @@
import dns.resolver
import json
+import os
import os.path
import pytest
@@ -32,7 +33,8 @@ class MockedDnsResponseData:
# Return a new dns.resolver.Resolver configured for caching
# using the singleton instance.
- return caching_resolver(cache=MockedDnsResponseData.INSTANCE)
+ return caching_resolver(cache=MockedDnsResponseData.INSTANCE,
+ resolv=os.environ.get('RESOLV_FILE'))
def __init__(self):
self.data = {}
Index: python-email-validator-2.0.0/tests/test_deliverability.py
===================================================================
--- python-email-validator-2.0.0.orig/tests/test_deliverability.py
+++ python-email-validator-2.0.0/tests/test_deliverability.py
@@ -1,5 +1,6 @@
import pytest
import re
+import os
from email_validator import EmailUndeliverableError, \
validate_email, caching_resolver
@@ -73,7 +74,7 @@ def test_caching_dns_resolver():
self.cache[key] = value
cache = TestCache()
- resolver = caching_resolver(timeout=1, cache=cache)
+ resolver = caching_resolver(timeout=1, cache=cache,
resolv=os.environ.get('RESOLV_FILE'))
validate_email("[email protected]", dns_resolver=resolver)
assert len(cache.cache) == 1
++++++ email_validator-1.3.1.tar.gz -> email_validator-2.0.0.tar.gz ++++++
++++ 4122 lines of diff (skipped)
++++++ ignore-urllib3-pyopenssl-warning.patch ++++++
--- /var/tmp/diff_new_pack.ihGlAa/_old 2023-05-26 20:15:10.684157015 +0200
+++ /var/tmp/diff_new_pack.ihGlAa/_new 2023-05-26 20:15:10.688157039 +0200
@@ -1,10 +1,12 @@
-Index: python-email-validator-1.2.1/setup.cfg
+Index: python-email-validator-2.0.0/setup.cfg
===================================================================
---- python-email-validator-1.2.1.orig/setup.cfg
-+++ python-email-validator-1.2.1/setup.cfg
-@@ -43,3 +43,4 @@ max-line-length = 120
+--- python-email-validator-2.0.0.orig/setup.cfg
++++ python-email-validator-2.0.0/setup.cfg
+@@ -43,5 +43,6 @@ max-line-length = 120
testpaths = tests
filterwarnings =
error
+ ignore:.*urllib3.contrib.pyopenssl.*:DeprecationWarning
+ markers =
+ network: mark a test as requiring Internet access.