Skip to content

Commit 371c120

Browse files
committed
Mark the email address argument to validate_email as positional-only
1 parent 2a9653b commit 371c120

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ In Development
44
* Python 3.8+ is now required (support for Python 3.7 was dropped).
55
* 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.
66
* A `__version__` module attribute is added.
7+
* 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.
78

89
2.0.0 (April 15, 2023)
910
----------------------

email_validator/validate_email.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
def validate_email(
99
email: Union[str, bytes],
10-
# /, # not supported in Python 3.6, 3.7
11-
*,
10+
/, # prior arguments are positional-only
11+
*, # subsequent arguments are keyword-only
1212
allow_smtputf8: Optional[bool] = None,
1313
allow_empty_local: bool = False,
1414
allow_quoted_local: Optional[bool] = None,

0 commit comments

Comments
 (0)