[pypy-commit] cffi default: Bah. "print >> sys.stderr, ..." is syntactically valid on Python 3,

arigo noreply at buildbot.pypy.org
Mon Nov 18 14:26:12 CET 2013


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r1422:c1c4583b0bd1
Date: 2013-11-18 14:26 +0100
http://bitbucket.org/cffi/cffi/changeset/c1c4583b0bd1/

Log:	Bah. "print >> sys.stderr, ..." is syntactically valid on Python 3,
	but does nonsense.

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -48,8 +48,8 @@
     try:
         compiler.compile(['c/check__thread.c'])
     except distutils.errors.CompileError:
-        print >> sys.stderr, "the above error message can be safely ignored;"
-        print >> sys.stderr, "will not use '__thread' in the C code"
+        sys.stderr.write("the above error message can be safely ignored;\n")
+        sys.stderr.write("will not use '__thread' in the C code\n")
     else:
         define_macros.append(('USE__THREAD', None))
     try:


More information about the pypy-commit mailing list