Release 1.0.7, fixes #95

This commit is contained in:
László Károlyi 2022-06-30 00:40:10 +02:00
parent 5f406473eb
commit 69be4f4b9c
Signed by: karolyi
GPG Key ID: 2DCAF25E55735BFE
4 changed files with 9 additions and 4 deletions

View File

@ -1,3 +1,6 @@
1.0.7:
- Handle STARTTLS timeouts: https://gitea.ksol.io/karolyi/py3-validate-email/issues/95
1.0.6:
- Add the option to exclusively use certain address schemas (IPv4/IPV6)

View File

@ -30,7 +30,8 @@ Basic usage:
smtp_from_address='my@from.addr.ess',
smtp_skip_tls=False,
smtp_tls_context=None,
smtp_debug=False)
smtp_debug=False,
address_types=frozenset([IPv4Address, IPv6Address]))
### Parameters
@ -58,7 +59,7 @@ Basic usage:
`smtp_debug`: activate smtplib's debug output which always goes to stderr; defaults to `False`
`address_types`: The IP address types to use. pass a `frozenset` if you want to change the default `frozenset([IPv6Address, IPv4Address])`. Useful when you only deliver emails through one interface, but you have dual stack. For an explanation, see [this issue](https://gitea.ksol.io/karolyi/py3-validate-email/issues/94)
`address_types`: The IP address types to use. pass a `frozenset` if you want to change the default `frozenset([IPv6Address, IPv4Address])`. Useful when you only deliver emails through one interface, but you have dual stack. For a detailed explanation, see [this issue](https://gitea.ksol.io/karolyi/py3-validate-email/issues/94).
### Result

View File

@ -57,7 +57,7 @@ class BuildPyCommand(build_py):
setup(
name='py3-validate-email',
version='1.0.6',
version='1.0.7',
packages=find_packages(exclude=['tests']),
install_requires=['dnspython~=2.2', 'idna~=3.3', 'filelock~=3.7'],
author='László Károlyi',

View File

@ -1,6 +1,7 @@
from logging import getLogger
from smtplib import (
SMTP, SMTPNotSupportedError, SMTPResponseException, SMTPServerDisconnected)
from socket import timeout
from ssl import SSLContext, SSLError
from typing import List, Optional, Tuple
@ -91,7 +92,7 @@ class _SMTPChecker(SMTP):
except RuntimeError:
# SSL/TLS support is not available to your Python interpreter
pass
except SSLError as exc:
except (SSLError, timeout) as exc:
raise TLSNegotiationError(exc)
def mail(self, sender: str, options: tuple = ()):