From 371c12079fa10cd3f93ba68aaf149070a7119d2b Mon Sep 17 00:00:00 2001 From: Joshua Tauberer Date: Sun, 2 Jul 2023 09:47:53 -0400 Subject: [PATCH] Mark the email address argument to validate_email as positional-only --- CHANGELOG.md | 1 + email_validator/validate_email.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4961fc5..744644f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ In Development * Python 3.8+ is now required (support for Python 3.7 was dropped). * The old `email` field on the returned `ValidatedEmail` object, which in the previous version was superseded by `normalized`, will now raise a deprecation warning if used. See https://stackoverflow.com/q/879173 for strategies to suppress the DeprecationWarning. * A `__version__` module attribute is added. +* The email address argument to validate_email is now marked as positional-only to better reflect the documented usage using the new Python 3.8 feature. 2.0.0 (April 15, 2023) ---------------------- diff --git a/email_validator/validate_email.py b/email_validator/validate_email.py index 0d8f581..b33394a 100644 --- a/email_validator/validate_email.py +++ b/email_validator/validate_email.py @@ -7,8 +7,8 @@ def validate_email( email: Union[str, bytes], - # /, # not supported in Python 3.6, 3.7 - *, + /, # prior arguments are positional-only + *, # subsequent arguments are keyword-only allow_smtputf8: Optional[bool] = None, allow_empty_local: bool = False, allow_quoted_local: Optional[bool] = None,