Patchwork [1,of,6,v3] setup: use printf instead of print

login
register
mail settings
Submitter Pierre-Yves David
Date March 9, 2020, 5:34 p.m.
Message ID <27e1e79c1a5ad9dfa699.1583775292@nodosa.octobus.net>
Download mbox | patch
Permalink /patch/45636/
State Accepted
Headers show

Comments

Pierre-Yves David - March 9, 2020, 5:34 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1583770604 -3600
#      Mon Mar 09 17:16:44 2020 +0100
# Node ID 27e1e79c1a5ad9dfa699954aa68a4c0361d39f1b
# Parent  b4fe3395b975d72c56f392fa671f86c3ccd1a892
# EXP-Topic rust-test-option
# Available At https://dev.heptapod.net/octobus/mercurial-devel/
#              hg pull https://dev.heptapod.net/octobus/mercurial-devel/ -r 27e1e79c1a5a
setup: use printf instead of print

Yuya Nishihara pointed `printf` to me, so I will respect the cargo cult.
Yuya Nishihara - March 10, 2020, 12:03 p.m.
On Mon, 09 Mar 2020 18:34:52 +0100, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@octobus.net>
> # Date 1583770604 -3600
> #      Mon Mar 09 17:16:44 2020 +0100
> # Node ID 27e1e79c1a5ad9dfa699954aa68a4c0361d39f1b
> # Parent  b4fe3395b975d72c56f392fa671f86c3ccd1a892
> # EXP-Topic rust-test-option
> # Available At https://dev.heptapod.net/octobus/mercurial-devel/
> #              hg pull https://dev.heptapod.net/octobus/mercurial-devel/ -r 27e1e79c1a5a
> setup: use printf instead of print

Queued, thanks.

Patch

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -3,8 +3,6 @@ 
 #
 # 'python setup.py install', or
 # 'python setup.py --help' for more options
-from __future__ import print_function
-
 import os
 
 # Mercurial will never work on Python 3 before 3.5 due to a lack
@@ -143,7 +141,7 @@  hgrustext = os.environ.get('HGWITHRUSTEX
 # (see mercurial/__modulepolicy__.py)
 if hgrustext != 'cpython' and hgrustext is not None:
     if hgrustext:
-        print('unkown HGWITHRUSTEXT value: %s' % hgrustext, file=sys.stderr)
+        printf('unkown HGWITHRUSTEXT value: %s' % hgrustext, file=sys.stderr)
     hgrustext = None
 
 import ctypes