From ade216b11aee1122019a6b73483eb3c5a6c163f4 Mon Sep 17 00:00:00 2001 From: Gregory Szorc Date: Sat, 2 Jan 2016 11:47:07 -0800 Subject: [PATCH] mail: use print function We no longer use the print statement in mercurial.* \o/ --- mercurial/mail.py | 4 ++-- tests/test-check-py3-compat.t | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/mercurial/mail.py b/mercurial/mail.py index 863dde8970..e8ebd3ed7d 100644 --- a/mercurial/mail.py +++ b/mercurial/mail.py @@ -5,7 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. -from __future__ import absolute_import +from __future__ import absolute_import, print_function import email import os @@ -81,7 +81,7 @@ class SMTPS(smtplib.SMTP): def _get_socket(self, host, port, timeout): if self.debuglevel > 0: - print >> sys.stderr, 'connect:', (host, port) + print('connect:', (host, port), file=sys.stderr) new_socket = socket.create_connection((host, port), timeout) new_socket = sslutil.wrapsocket(new_socket, self.keyfile, self.certfile, diff --git a/tests/test-check-py3-compat.t b/tests/test-check-py3-compat.t index 48a565907b..c1329b09c4 100644 --- a/tests/test-check-py3-compat.t +++ b/tests/test-check-py3-compat.t @@ -100,7 +100,6 @@ i18n/polib.py not using absolute_import mercurial/cmdutil.py not using absolute_import mercurial/commands.py not using absolute_import - mercurial/mail.py requires print_function setup.py not using absolute_import tests/filterpyflakes.py requires print_function tests/generate-working-copy-states.py requires print_function