diff -r 7ac7d5f20cb0 -r bff68b6e5999 mercurial/mail.py --- a/mercurial/mail.py Wed Dec 04 20:52:05 2024 -0500 +++ b/mercurial/mail.py Wed Dec 04 20:53:31 2024 -0500 @@ -28,9 +28,6 @@ ) from .i18n import _ -from .pycompat import ( - open, -) from . import ( encoding, error, @@ -221,7 +218,7 @@ def _mbox(mbox, sender, recipients, msg): '''write mails to mbox''' # TODO: use python mbox library for proper locking - with open(mbox, b'ab+') as fp: + with open(mbox, 'ab+') as fp: # Should be time.asctime(), but Windows prints 2-characters day # of month instead of one. Make them print the same thing. date = time.strftime('%a %b %d %H:%M:%S %Y', time.localtime()) @@ -237,7 +234,7 @@ """make a mail connection. return a function to send mail. call as sendmail(sender, list-of-recipients, msg).""" if mbox: - open(mbox, b'wb').close() + open(mbox, 'wb').close() return lambda s, r, m: _mbox(mbox, s, r, m) if ui.config(b'email', b'method') == b'smtp': return _smtp(ui)