D12271: setup: remove printf trampoline
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Wed Mar 2 15:45:18 UTC 2022
durin42 created this revision.
durin42 added a reviewer: indygreg.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D12271
AFFECTED FILES
setup.py
CHANGE DETAILS
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -22,7 +22,6 @@
import sys, platform
import sysconfig
-printf = eval('print')
libdir_escape = 'unicode_escape'
@@ -51,7 +50,7 @@
version enabling these features (likely this requires the OpenSSL version to
be at least 1.0.1).
"""
- printf(error, file=sys.stderr)
+ print(error, file=sys.stderr)
sys.exit(1)
if sys.version_info[0] >= 3:
@@ -236,8 +235,8 @@
returncode, out, err = runcmd(cmd, self.env)
err = filterhgerr(err)
if err or returncode != 0:
- printf("stderr from '%s':" % (' '.join(cmd)), file=sys.stderr)
- printf(err, file=sys.stderr)
+ print("stderr from '%s':" % (' '.join(cmd)), file=sys.stderr)
+ print(err, file=sys.stderr)
return b''
return out
@@ -470,7 +469,7 @@
if hgrustext != 'cpython' and hgrustext is not None:
if hgrustext:
msg = 'unknown HGWITHRUSTEXT value: %s' % hgrustext
- printf(msg, file=sys.stderr)
+ print(msg, file=sys.stderr)
hgrustext = None
self.rust = hgrustext is not None
self.no_rust = not self.rust
To: durin42, indygreg, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list