control: forcemerge 848692 -1
On Wed, Dec 28, 2016 at 5:53 PM, Russ Allbery <r...@debian.org> wrote: > > if re.match(r'[\w\s]+$', realname): > return '%s <%s>' % (realname, email) > > addr = email.utils.formataddr((realname, email)) > > I suspect this worked fine in Python 2, since this regex doesn't use > the UNICODE flag. However, in Python 3, I believe regexes are str > types by default and therefore Unicode by default, so this will match > non-ASCII characters, short-circuit this logic, and never call > formataddr. > > I'm not sure the original motivation for the short-circuit here, but > I suspect just removing the re.match conditional and unconditionally > calling email.utils.formataddr will produce the correct behavior. i just did exactly that as part of 848692 (hence the merge) -- Sandro "morph" Tosi My website: http://sandrotosi.me/ Me at Debian: http://wiki.debian.org/SandroTosi G+: https://plus.google.com/u/0/+SandroTosi