bpo-31677: email: Add re.ASCII when re.IGNORECASE is used by methane · Pull Request #3868 · python/cpython
Conversation
While there is not real bug in this case, using re.ASCII is
safe when re.IGNORECASE is used.
This commit removes dead copy in email.util too.
While there is not real bug in this case, using re.ASCII is safe when re.IGNORECASE is used. This commit removes dead copy in email.util too.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for removing the dead code too.
| \? # literal ? | ||
| (?P<atom>.*?) # non-greedy up to the next ?= is the atom | ||
| \?= # literal ?= | ||
| ''', re.VERBOSE | re.IGNORECASE) |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was probably left in place for backward compatibility reasons (just in case someone was using it). Or it may have been overlooked. No way to tell :) But, probably better to not delete it if you backport this change.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this change doesn't actual bugfix (B and Q don't have another lower cases),
I won't backport it to Python 3.6.
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