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

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Tue Feb 27 07:56:54 EST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG39c9f339b692: py3: use email.utils module instead of email.Utils (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2453?vs=6129&id=6162

REVISION DETAIL
  https://phab.mercurial-scm.org/D2453

AFFECTED FILES
  hgext/patchbomb.py

CHANGE DETAILS

diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
--- a/hgext/patchbomb.py
+++ b/hgext/patchbomb.py
@@ -75,6 +75,7 @@
 
 import email as emailmod
 import email.generator as emailgen
+import email.utils as eutil
 import errno
 import os
 import socket
@@ -745,7 +746,7 @@
         if not parent.endswith('>'):
             parent += '>'
 
-    sender_addr = emailmod.Utils.parseaddr(sender)[1]
+    sender_addr = eutil.parseaddr(sender)[1]
     sender = mail.addressencode(ui, sender, _charsets, opts.get('test'))
     sendmail = None
     firstpatch = None
@@ -764,7 +765,7 @@
             parent = m['Message-Id']
 
         m['User-Agent'] = 'Mercurial-patchbomb/%s' % util.version()
-        m['Date'] = emailmod.Utils.formatdate(start_time[0], localtime=True)
+        m['Date'] = eutil.formatdate(start_time[0], localtime=True)
 
         start_time = (start_time[0] + 1, start_time[1])
         m['From'] = sender



To: pulkit, #hg-reviewers, yuja
Cc: yuja, mercurial-devel


More information about the Mercurial-devel mailing list