Mercurial > hg
changeset 27619:10bed65ef209
mail: use print function
We no longer use the print statement in mercurial.* \o/
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 02 Jan 2016 11:47:07 -0800 |
parents | 5a988b3c9645 |
children | 0c60843b55b5 |
files | mercurial/mail.py tests/test-check-py3-compat.t |
diffstat | 2 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/mail.py Sat Jan 02 11:45:29 2016 -0800 +++ b/mercurial/mail.py Sat Jan 02 11:47:07 2016 -0800 @@ -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 @@ 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,
--- a/tests/test-check-py3-compat.t Sat Jan 02 11:45:29 2016 -0800 +++ b/tests/test-check-py3-compat.t Sat Jan 02 11:47:07 2016 -0800 @@ -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