From a5debd4970a97592efb792353045438bbe4c0c17 Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Mon, 20 Nov 2023 15:03:08 -0800 Subject: [PATCH] Fix deprecation warning from email_validator From my understanding of the docs, this is not a behavior change. --- minfraud/validation.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/minfraud/validation.py b/minfraud/validation.py index 483f6df..2091db7 100644 --- a/minfraud/validation.py +++ b/minfraud/validation.py @@ -57,7 +57,7 @@ def _ip_address(s: Optional[str]) -> str: def _email_or_md5(s: str) -> str: if re.match(r"^[0-9A-Fa-f]{32}$", s): return s - return validate_email(s, check_deliverability=False).email + return validate_email(s, check_deliverability=False).normalized # based off of: diff --git a/pyproject.toml b/pyproject.toml index dd25b12..f129b54 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ authors = [ dependencies = [ "setuptools>=60.0.0", "aiohttp>=3.6.2,<4.0.0", - "email_validator>=1.1.1,<3.0.0", + "email_validator>=2.0.0,<3.0.0", "geoip2>=4.7.0,<5.0.0", "requests>=2.24.0,<3.0.0", "voluptuous",