[pypy-commit] pypy py3k: thread -> _thread, 2to3

pjenvey noreply at buildbot.pypy.org
Thu Dec 6 02:26:45 CET 2012


Author: Philip Jenvey <pjenvey at underboss.org>
Branch: py3k
Changeset: r59342:499e291b642a
Date: 2012-12-05 17:14 -0800
http://bitbucket.org/pypy/pypy/changeset/499e291b642a/

Log:	thread -> _thread, 2to3

diff --git a/pypy/module/_multiprocessing/test/test_connection.py b/pypy/module/_multiprocessing/test/test_connection.py
--- a/pypy/module/_multiprocessing/test/test_connection.py
+++ b/pypy/module/_multiprocessing/test/test_connection.py
@@ -113,7 +113,7 @@
         client.setblocking(False)
         try:
             client.connect(('127.0.0.1', serverSocket.getsockname()[1]))
-        except socket.error, e:
+        except socket.error as e:
             assert e.args[0] in (errno.EINPROGRESS, errno.EWOULDBLOCK)
         server, addr = serverSocket.accept()
 
diff --git a/pypy/module/select/test/test_select.py b/pypy/module/select/test/test_select.py
--- a/pypy/module/select/test/test_select.py
+++ b/pypy/module/select/test/test_select.py
@@ -291,11 +291,11 @@
     def w_getpair(self):
         """Helper method which returns a pair of connected sockets."""
         import socket
-        import thread
+        import _thread
 
         self.sock.listen(1)
         s2 = socket.socket()
-        thread.start_new_thread(s2.connect, (self.sockaddress,))
+        _thread.start_new_thread(s2.connect, (self.sockaddress,))
         s1, addr2 = self.sock.accept()
 
         return s1, s2


More information about the pypy-commit mailing list