Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/mail.py @ 19810:c80feeb715d1
python2.4: fix imports of sub-packages of the email package
These all have an obvious comment so if/when we finally ditch Python
2.4 we can eradicate them easily.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Tue, 24 Sep 2013 15:10:32 -0400 |
parents | 53f16f4aff33 |
children | a4af6fd99fb0 |
comparison
equal
deleted
inserted
replaced
19809:50d721553198 | 19810:c80feeb715d1 |
---|---|
7 | 7 |
8 from i18n import _ | 8 from i18n import _ |
9 import util, encoding, sslutil | 9 import util, encoding, sslutil |
10 import os, smtplib, socket, quopri, time, sys | 10 import os, smtplib, socket, quopri, time, sys |
11 import email | 11 import email |
12 # On python2.4 you have to import these by name or they fail to | |
13 # load. This was not a problem on Python 2.7. | |
14 import email.Header | |
15 import email.MIMEText | |
12 | 16 |
13 _oldheaderinit = email.Header.Header.__init__ | 17 _oldheaderinit = email.Header.Header.__init__ |
14 def _unifiedheaderinit(self, *args, **kw): | 18 def _unifiedheaderinit(self, *args, **kw): |
15 """ | 19 """ |
16 Python 2.7 introduces a backwards incompatible change | 20 Python 2.7 introduces a backwards incompatible change |