From 3505d4152074d89b1c0ce5b149e6f75239712ad5427703c5b730d2df76f3c60e Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 6 Jun 2024 07:39:25 +0000 Subject: [PATCH] - update to 2.1.1: * Fixed typo 'marking' instead of 'marketing' in case- insensitive mailbox name list. * When DNS-based deliverability checks fail, in some cases exceptions are now thrown with `raise ... from` for better nested exception tracking. * Fixed tests to work when no local resolver can be configured. * This project is now licensed under the Unlicense (instead of CC0). * Minor improvements to tests. * Minor improvements to code style. - drop dont-require-resolv-tests.patch: obsolete * Ignore warning as error from requests-toolbelt via dnspython. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-email-validator?expand=0&rev=16 --- dont-require-resolv-tests.patch | 59 --------------------------------- email_validator-2.1.0.tar.gz | 3 -- email_validator-2.1.1.tar.gz | 3 ++ python-email-validator.changes | 18 +++++++++- python-email-validator.spec | 8 ++--- 5 files changed, 23 insertions(+), 68 deletions(-) delete mode 100644 dont-require-resolv-tests.patch delete mode 100644 email_validator-2.1.0.tar.gz create mode 100644 email_validator-2.1.1.tar.gz diff --git a/dont-require-resolv-tests.patch b/dont-require-resolv-tests.patch deleted file mode 100644 index 45efa13..0000000 --- a/dont-require-resolv-tests.patch +++ /dev/null @@ -1,59 +0,0 @@ -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("test@gmail.com", dns_resolver=resolver) - assert len(cache.cache) == 1 - diff --git a/email_validator-2.1.0.tar.gz b/email_validator-2.1.0.tar.gz deleted file mode 100644 index e2c866c..0000000 --- a/email_validator-2.1.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:dd26943d2030b0d1fd73455a4365773d54c0daa47ba37b3cbab7aca18d465218 -size 39752 diff --git a/email_validator-2.1.1.tar.gz b/email_validator-2.1.1.tar.gz new file mode 100644 index 0000000..53807f3 --- /dev/null +++ b/email_validator-2.1.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:051fdaf98263be9afa52dcd50b6bc591708654b6b598b47e4a4080205a717fc1 +size 38305 diff --git a/python-email-validator.changes b/python-email-validator.changes index d82e373..4b110a0 100644 --- a/python-email-validator.changes +++ b/python-email-validator.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Thu Jun 6 07:38:28 UTC 2024 - Dirk Müller + +- update to 2.1.1: + * Fixed typo 'marking' instead of 'marketing' in case- + insensitive mailbox name list. + * When DNS-based deliverability checks fail, in some cases + exceptions are now thrown with `raise ... from` for better + nested exception tracking. + * Fixed tests to work when no local resolver can be configured. + * This project is now licensed under the Unlicense (instead of + CC0). + * Minor improvements to tests. + * Minor improvements to code style. +- drop dont-require-resolv-tests.patch: obsolete + ------------------------------------------------------------------- Thu Nov 16 10:02:55 UTC 2023 - Dirk Müller @@ -111,7 +127,7 @@ Thu Sep 8 07:24:18 UTC 2022 - Steve Kowalik TEST_ENVIRONMENT, and DEFAULT_TIMEOUT can be used to change the default values of the keyword arguments. - Add patch ignore-urllib3-pyopenssl-warning.patch: - * Ignore warning as error from requests-toolbelt via dnspython. + * Ignore warning as error from requests-toolbelt via dnspython. ------------------------------------------------------------------- Tue Apr 19 17:42:44 UTC 2022 - Matej Cepl diff --git a/python-email-validator.spec b/python-email-validator.spec index f401a50..3c36ca4 100644 --- a/python-email-validator.spec +++ b/python-email-validator.spec @@ -1,7 +1,7 @@ # # spec file for package python-email-validator # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %{?sle15_python_module_pythons} Name: python-email-validator -Version: 2.1.0 +Version: 2.1.1 Release: 0 Summary: A robust email syntax and deliverability validation library for Python License: CC0-1.0 @@ -27,8 +27,6 @@ Source: https://github.com/JoshData/python-email-validator/archive/refs/ # 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 base >= 3.8} BuildRequires: %{python_module dnspython >= 1.15.0} BuildRequires: %{python_module idna >= 2.0.0} @@ -40,7 +38,7 @@ Requires: python-dnspython >= 1.15.0 Requires: python-idna >= 2.0.0 Requires: python-setuptools Requires(post): update-alternatives -Requires(postun):update-alternatives +Requires(postun): update-alternatives Provides: python-email_validator = %{version}-%{release} Obsoletes: python-email_validator < %{version}-%{release} BuildArch: noarch