Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #580.
email()only accepted\.and an escaped tab inside a quoted local part, so valid addresses such as"a\"b"@example.comand"a\\b"@example.comwere rejected. The quoted-pair class was narrowed in af69a68, where\\[\001-\011\013\014\016-\177]became\\[\011.]. In a character class.is a literal dot.This changes the quoted-pair to a backslash followed by a tab or any printable ASCII character (
\x20–\x7E), following RFC 5322 section 3.2.1:"a\"b","a\\b","a\ b","\z"are now accepted"\<LF>"test is unchanged(?-i:...)so thatre.IGNORECASEdoesn't also let in characters like the Kelvin sign (U+212A), which case-folds tokThe same
\\[\011.]pattern was also added to the username regex inurl.pyby af69a68. I left that alone here because URL userinfo has different rules; happy to look at it separately if wanted.Tests: the four new valid cases fail before the change and pass after it.
tox -e lint,format,type,py312,py314passes on Windows (1,582 tests).I used Claude to help investigate and draft this change.