Page MenuHomePhabricator

py3: use email.utils module instead of email.Utils
ClosedPublic

Authored by pulkit on Feb 26 2018, 7:31 AM.

Details

Summary

On py2:

import email
import email.utils as eutil
email.Utils.parseaddr is eutil.parseaddr

True

email.Utils.formatdate is eutil.formatdate

True

email.Utils is not present on Python 3.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

pulkit created this revision.Feb 26 2018, 7:31 AM
yuja requested changes to this revision.Feb 26 2018, 8:16 AM
yuja added a subscriber: yuja.
yuja added inline comments.
hgext/patchbomb.py
749

Perhaps it should be encoding.strfromlocal() because sender
is provided from user config or argument.

This revision now requires changes to proceed.Feb 26 2018, 8:16 AM
yuja accepted this revision.Feb 27 2018, 7:07 AM
This revision is now accepted and ready to land.Feb 27 2018, 7:07 AM
This revision was automatically updated to reflect the committed changes.