forked from pool/python-email-validator
- 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 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-email-validator?expand=0&rev=11
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
%{?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 @@ 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 dnspython >= 1.15.0}
|
||||
BuildRequires: %{python_module idna >= 2.0.0}
|
||||
BuildRequires: %{python_module pytest >= 5.0}
|
||||
@@ -71,7 +73,9 @@ Key features:
|
||||
%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
|
||||
%pytest tests
|
||||
|
||||
%post
|
||||
%python_install_alternative email_validator
|
||||
|
Reference in New Issue
Block a user