[pypy-commit] pypy default: prefer print as a statement and one more debug print

pjenvey noreply at buildbot.pypy.org
Wed Aug 14 02:22:35 CEST 2013


Author: Philip Jenvey <pjenvey at underboss.org>
Branch: 
Changeset: r66135:ee703e7a6a8a
Date: 2013-08-13 17:18 -0700
http://bitbucket.org/pypy/pypy/changeset/ee703e7a6a8a/

Log:	prefer print as a statement and one more debug print

diff --git a/pypy/module/__pypy__/test/test_signal.py b/pypy/module/__pypy__/test/test_signal.py
--- a/pypy/module/__pypy__/test/test_signal.py
+++ b/pypy/module/__pypy__/test/test_signal.py
@@ -28,16 +28,17 @@
         import __pypy__, thread, signal, time, sys
 
         def subthread():
+            print('subthread started')
             try:
                 with __pypy__.thread.signals_enabled:
                     thread.interrupt_main()
                     for i in range(10):
-                        print 'x'
+                        print('x')
                         time.sleep(0.1)
             except BaseException, e:
                 interrupted.append(e)
             finally:
-                print 'subthread stops, interrupted=%r' % (interrupted,)
+                print('subthread stops, interrupted=%r' % (interrupted,))
                 done.append(None)
 
         # This is normally called by app_main.py
@@ -53,13 +54,13 @@
             try:
                 done = []
                 interrupted = []
-                print '--- start ---'
+                print('--- start ---')
                 thread.start_new_thread(subthread, ())
                 for j in range(10):
                     if len(done): break
-                    print '.'
+                    print('.')
                     time.sleep(0.1)
-                print 'main thread loop done'
+                print('main thread loop done')
                 assert len(done) == 1
                 assert len(interrupted) == 1
                 assert 'KeyboardInterrupt' in interrupted[0].__class__.__name__
@@ -80,7 +81,7 @@
         def threadfunction():
             pid = fork()
             if pid == 0:
-                print 'in child'
+                print('in child')
                 # signal() only works from the 'main' thread
                 signal.signal(signal.SIGUSR1, signal.SIG_IGN)
                 os._exit(42)


More information about the pypy-commit mailing list