[PATCH 5 of 5] mail: use print function
Gregory Szorc
gregory.szorc at gmail.com
Sat Jan 2 13:54:47 CST 2016
# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1451764027 28800
# Sat Jan 02 11:47:07 2016 -0800
# Node ID 89bfd2ba680276b426b10d087539a55707870bc0
# Parent eb38a483db6e6cef6f1e9e0c522f6b440f334a21
mail: use print function
We no longer use the print statement in mercurial.* \o/
diff --git a/mercurial/mail.py b/mercurial/mail.py
--- a/mercurial/mail.py
+++ b/mercurial/mail.py
@@ -1,16 +1,16 @@
# mail.py - mail sending bits for mercurial
#
# Copyright 2006 Matt Mackall <mpm at selenic.com>
#
# 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
import quopri
import smtplib
import socket
import sys
import time
@@ -76,17 +76,17 @@ class SMTPS(smtplib.SMTP):
self.keyfile = keyfile
self.certfile = certfile
smtplib.SMTP.__init__(self, **kwargs)
self.default_port = smtplib.SMTP_SSL_PORT
self._sslkwargs = sslkwargs
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,
**self._sslkwargs)
self.file = smtplib.SSLFakeFile(new_socket)
return new_socket
def _smtp(ui):
diff --git a/tests/test-check-py3-compat.t b/tests/test-check-py3-compat.t
--- a/tests/test-check-py3-compat.t
+++ b/tests/test-check-py3-compat.t
@@ -93,17 +93,16 @@
hgext/transplant.py not using absolute_import
hgext/win32mbcs.py not using absolute_import
hgext/win32text.py not using absolute_import
hgext/zeroconf/Zeroconf.py not using absolute_import
hgext/zeroconf/Zeroconf.py requires print_function
hgext/zeroconf/__init__.py not using absolute_import
i18n/check-translation.py not using absolute_import
i18n/polib.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
tests/get-with-headers.py requires print_function
tests/heredoctest.py requires print_function
tests/hypothesishelpers.py not using absolute_import
tests/hypothesishelpers.py requires print_function
tests/killdaemons.py not using absolute_import
More information about the Mercurial-devel
mailing list