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-01-29 14:10:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-email-validator (Old)
and /work/SRC/openSUSE:Factory/.python-email-validator.new.32243 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-email-validator"
Sun Jan 29 14:10:33 2023 rev:4 rq:1061740 version:1.3.1
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-email-validator/python-email-validator.changes
2022-10-04 20:38:03.960945314 +0200
+++
/work/SRC/openSUSE:Factory/.python-email-validator.new.32243/python-email-validator.changes
2023-01-29 14:14:46.852389786 +0100
@@ -1,0 +2,8 @@
+Sat Jan 28 13:39:59 UTC 2023 - Dirk Müller <[email protected]>
+
+- update to 1.3.1:
+ * The new SPF 'v=spf1 -all' (reject-all) deliverability check is removed
+ in most cases. It now is performed only for domains that do not have MX
+ records but do have an A/AAAA fallback record.
+
+-------------------------------------------------------------------
Old:
----
email_validator-1.3.0.tar.gz
New:
----
email_validator-1.3.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-email-validator.spec ++++++
--- /var/tmp/diff_new_pack.2kwPqJ/_old 2023-01-29 14:14:47.228391831 +0100
+++ /var/tmp/diff_new_pack.2kwPqJ/_new 2023-01-29 14:14:47.236391875 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-email-validator
#
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-email-validator
-Version: 1.3.0
+Version: 1.3.1
Release: 0
Summary: A robust email syntax and deliverability validation library
for Python
License: CC0-1.0
++++++ email_validator-1.3.0.tar.gz -> email_validator-1.3.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-email-validator-1.3.0/CHANGELOG.md
new/python-email-validator-1.3.1/CHANGELOG.md
--- old/python-email-validator-1.3.0/CHANGELOG.md 2022-09-18
21:30:31.000000000 +0200
+++ new/python-email-validator-1.3.1/CHANGELOG.md 2023-01-21
11:44:29.000000000 +0100
@@ -1,10 +1,15 @@
+Version 1.3.1 (January 21, 2023)
+--------------------------------
+
+* The new SPF 'v=spf1 -all' (reject-all) deliverability check is removed in
most cases. It now is performed only for domains that do not have MX records
but do have an A/AAAA fallback record.
+
Version 1.3.0 (September 18, 2022)
----------------------------------
* Deliverability checks now check for 'v=spf1 -all' SPF records as a way to
reject more bad domains.
* Special use domain names now raise EmailSyntaxError instead of
EmailUndeliverableError since they are performed even if check_deliverability
is off.
* New module-level attributes are added to override the default values of the
keyword arguments and the special-use domains list.
-* The keyword arguments of the public methods are now marked as keyword-only.
+* The keyword arguments of the public methods are now marked as keyword-only,
ending support for Python 2.x.
* [pyIsEmail](https://github.com/michaelherold/pyIsEmail)'s test cases are
added to the tests.
* Recommend that check_deliverability be set to False for validation on login
pages.
* Added an undocumented globally_deliverable option.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-email-validator-1.3.0/README.md
new/python-email-validator-1.3.1/README.md
--- old/python-email-validator-1.3.0/README.md 2022-09-18 21:30:31.000000000
+0200
+++ new/python-email-validator-1.3.1/README.md 2023-01-21 11:44:29.000000000
+0100
@@ -109,8 +109,7 @@
The validator checks that the domain name in the email address has a
DNS MX record (except a NULL MX record) indicating that it can receive
-email and that it does not have a reject-all SPF record (`v=spf1 -all`)
-which would indicate that it cannot send email.
+email (or a fallback A-record, see below).
There is nothing to be gained by trying to actually contact an SMTP
server, so that's not done here. For privacy, security, and practicality
reasons servers are good at not giving away whether an address is
@@ -128,7 +127,7 @@
require the
[SMTPUTF8](https://tools.ietf.org/html/rfc6531) extension. You can also
set `email_validator.ALLOW_SMTPUTF8` to `False` to turn it off for all calls by
default.
-`check_deliverability=True`: If true, DNS queries check that a non-null MX (or
A/AAAA record as an MX fallback) is present for the domain-part of the email
address and that a reject-all SPF record is not present. Set to `False` to skip
these DNS checks. DNS is slow and sometimes unavailable, so consider whether
these checks are useful for your use case. It is recommended to pass `False`
when performing validation for login pages (but not account creation pages)
since re-validation of the domain by querying DNS at every login is probably
undesirable. You can also set `email_validator.CHECK_DELIVERABILITY` to `False`
to turn this off for all calls by default.
+`check_deliverability=True`: If true, a DNS query is made to check that a
non-null MX record is present for the domain-part of the email address (or if
not, an A/AAAA record as an MX fallback can be present but in that case a
reject-all SPF record must not be present). Set to `False` to skip this
DNS-based check. DNS is slow and sometimes unavailable, so consider whether
these checks are useful for your use case. It is recommended to pass `False`
when performing validation for login pages (but not account creation pages)
since re-validation of a previously validated domain in your database by
querying DNS at every login is probably undesirable. You can also set
`email_validator.CHECK_DELIVERABILITY` to `False` to turn this off for all
calls by default.
`allow_empty_local=False`: Set to `True` to allow an empty local part (i.e.
`@example.com`), e.g. for validating Postfix aliases.
@@ -252,13 +251,14 @@
(You probably should not do this at account creation time so you don't
change the user's login information without telling them.)
-### UCS-4 support required for Python 2.7
+### Support for Python 2.7
-This library hopefully still works with Python 2.7.
-Note that when using Python 2.7, it is required that it was built with
+The last version of this library supporting Python 2.x is version 1.2.1.
+
+When using Python 2.x, it is required that it was built with
UCS-4 support (see
-[here](https://stackoverflow.com/questions/29109944/python-returns-length-of-2-for-single-unicode-character-string));
-otherwise emails with unicode characters outside of the BMP (Basic
+[here](https://stackoverflow.com/questions/29109944/python-returns-length-of-2-for-single-unicode-character-string)).
+Without UCS-4 support, unicode characters outside of the BMP (Basic
Multilingual Plane) will not validate correctly.
Normalization
@@ -381,7 +381,7 @@
| `smtputf8` | A boolean indicating that the
[SMTPUTF8](https://tools.ietf.org/html/rfc6531) feature of your mail relay will
be required to transmit messages to this address because the local part of the
address has non-ASCII characters (the local part cannot be IDNA-encoded). If
`allow_smtputf8=False` is passed as an argument, this flag will always be false
because an exception is raised if it would have been true. |
| `mx` | A list of (priority, domain) tuples of MX records specified in the
DNS for the domain (see [RFC 5321 section
5](https://tools.ietf.org/html/rfc5321#section-5)). May be `None` if the
deliverability check could not be completed because of a temporary issue like a
timeout. |
| `mx_fallback_type` | `None` if an `MX` record is found. If no MX records are
actually specified in DNS and instead are inferred, through an obsolete
mechanism, from A or AAAA records, the value is the type of DNS record used
instead (`A` or `AAAA`). May be `None` if the deliverability check could not be
completed because of a temporary issue like a timeout. |
-| `spf` | Any SPF record found while checking deliverability. |
+| `spf` | Any SPF record found while checking deliverability. Only set if the
SPF record is queried. |
Assumptions
-----------
@@ -393,11 +393,10 @@
* The validator assumes the email address is intended to be
usable on the public Internet. The domain part
of the email address must be a resolvable domain name
- (without NULL MX or SPF -all DNS records) if deliverability
- checks are turned on.
+ (see the deliverability checks described above).
Most [Special Use Domain
Names](https://www.iana.org/assignments/special-use-domain-names/special-use-domain-names.xhtml)
- and their subdomains and
- domain names without a `.` are rejected as a syntax error
+ and their subdomains, as well as
+ domain names without a `.`, are rejected as a syntax error
(except see the `test_environment` parameter above).
* Obsolete email syntaxes are rejected:
The "quoted string" form of the local part of the email address (RFC
@@ -427,9 +426,10 @@
* Update CHANGELOG.md.
* Update the version number in setup.cfg.
-* Make a commit with the new version number.
-* Follow the steps below to publish source and a universal wheel to pypi and
tag the release.
+* Make & push a commit with the new version number.
+* Make & push a tag (`git tag v... && git push --tags`).
* Make a release at
https://github.com/JoshData/python-email-validator/releases/new.
+* Follow the steps below to publish source and a universal wheel to pypi.
```sh
./release_to_pypi.sh
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-email-validator-1.3.0/email_validator/__init__.py
new/python-email-validator-1.3.1/email_validator/__init__.py
--- old/python-email-validator-1.3.0/email_validator/__init__.py
2022-09-18 21:30:31.000000000 +0200
+++ new/python-email-validator-1.3.1/email_validator/__init__.py
2023-01-21 11:44:29.000000000 +0100
@@ -648,7 +648,7 @@
except (dns.resolver.NoNameservers, dns.resolver.NXDOMAIN,
dns.resolver.NoAnswer):
- # If there was no MX record, fall back to an A record.
+ # If there was no MX record, fall back to an A record, as SMTP
servers do.
try:
response = dns_resolver_resolve_shim(domain, "A")
deliverability_info["mx"] = [(0, str(r)) for r in response]
@@ -666,23 +666,25 @@
# this domain is not deliverable.
raise EmailUndeliverableError("The domain name %s does not
exist." % domain_i18n)
- try:
- # Check for a SPF reject all ("v=spf1 -all") record which indicates
- # no emails are sent from this domain, which like a NULL MX record
- # would indicate that the domain is not used for email.
- response = dns_resolver_resolve_shim(domain, "TXT")
- for rec in response:
- value = b"".join(rec.strings)
- if value.startswith(b"v=spf1 "):
- deliverability_info["spf"] = value.decode("ascii",
errors='replace')
- if value == b"v=spf1 -all":
- raise EmailUndeliverableError("The domain name %s does
not send email." % domain_i18n)
- except dns.resolver.NoAnswer:
- # No TXT records means there is no SPF policy, so we cannot take
any action.
- pass
- except (dns.resolver.NoNameservers, dns.resolver.NXDOMAIN):
- # Failure to resolve at this step will be ignored.
- pass
+ # Check for a SPF reject-all record ("v=spf1 -all") which indicates
+ # no emails are sent from this domain (similar to a NULL MX record
+ # but for sending rather than receiving). In combination with the
+ # absence of an MX record, this is probably a good sign that the
+ # domain is not used for email.
+ try:
+ response = dns_resolver_resolve_shim(domain, "TXT")
+ for rec in response:
+ value = b"".join(rec.strings)
+ if value.startswith(b"v=spf1 "):
+ deliverability_info["spf"] = value.decode("ascii",
errors='replace')
+ if value == b"v=spf1 -all":
+ raise EmailUndeliverableError("The domain name %s
does not send email." % domain_i18n)
+ except dns.resolver.NoAnswer:
+ # No TXT records means there is no SPF policy, so we cannot
take any action.
+ pass
+ except (dns.resolver.NoNameservers, dns.resolver.NXDOMAIN):
+ # Failure to resolve at this step will be ignored.
+ pass
except dns.exception.Timeout:
# A timeout could occur for various reasons, so don't treat it as a
failure.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-email-validator-1.3.0/setup.cfg
new/python-email-validator-1.3.1/setup.cfg
--- old/python-email-validator-1.3.0/setup.cfg 2022-09-18 21:30:31.000000000
+0200
+++ new/python-email-validator-1.3.1/setup.cfg 2023-01-21 11:44:29.000000000
+0100
@@ -1,6 +1,6 @@
[metadata]
name = email_validator
-version = 1.3.0
+version = 1.3.1
description = A robust email address syntax and deliverability validation
library.
long_description = file: README.md
long_description_content_type = text/markdown
@@ -13,8 +13,6 @@
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
- Programming Language :: Python :: 2
- Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
@@ -28,7 +26,7 @@
install_requires =
dnspython>=1.15.0
idna>=2.0.0
-python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
+python_requires = >=3.5
[options.entry_points]
console_scripts =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-email-validator-1.3.0/tests/test_main.py
new/python-email-validator-1.3.1/tests/test_main.py
--- old/python-email-validator-1.3.0/tests/test_main.py 2022-09-18
21:30:31.000000000 +0200
+++ new/python-email-validator-1.3.1/tests/test_main.py 2023-01-21
11:44:29.000000000 +0100
@@ -528,7 +528,7 @@
def test_deliverability_found():
response = validate_email_deliverability('gmail.com', 'gmail.com')
- assert response.keys() == {'mx', 'mx_fallback_type', 'spf'}
+ assert response.keys() == {'mx', 'mx_fallback_type'}
assert response['mx_fallback_type'] is None
assert len(response['mx']) > 1
assert len(response['mx'][0]) == 2