[pypy-commit] pypy py3.5: Pass _multiprocessing/test/test_connection.py -k test_exception
arigo
pypy.commits at gmail.com
Thu Nov 17 14:08:37 EST 2016
Author: Armin Rigo <arigo at tunes.org>
Branch: py3.5
Changeset: r88454:8a4da5e45a8c
Date: 2016-11-17 17:59 +0100
http://bitbucket.org/pypy/pypy/changeset/8a4da5e45a8c/
Log: Pass _multiprocessing/test/test_connection.py -k test_exception
diff --git a/pypy/module/_multiprocessing/interp_connection.py b/pypy/module/_multiprocessing/interp_connection.py
--- a/pypy/module/_multiprocessing/interp_connection.py
+++ b/pypy/module/_multiprocessing/interp_connection.py
@@ -2,6 +2,7 @@
from errno import EINTR
from rpython.rlib import rpoll, rsocket
+from rpython.rlib.objectmodel import we_are_translated
from rpython.rlib.rarithmetic import intmask
from rpython.rtyper.lltypesystem import lltype, rffi
@@ -29,7 +30,10 @@
w_builtins, '__import__', space.wrap("pickle"))
def BufferTooShort(space, w_data):
- w_BufferTooShort = space.fromcache(State).w_BufferTooShort
+ state = space.fromcache(State)
+ if not we_are_translated() and not hasattr(state, 'w_BufferTooShort'):
+ state.init(space) # xxx for test/test_connection.py
+ w_BufferTooShort = state.w_BufferTooShort
return OperationError(w_BufferTooShort, w_data)
def w_handle(space, handle):
More information about the pypy-commit
mailing list