Author: Armin Rigo <[email protected]>
Branch: py3.5
Changeset: r90568:8d60fe293e79
Date: 2017-03-05 16:16 +0100
http://bitbucket.org/pypy/pypy/changeset/8d60fe293e79/
Log: fix for the most recent merge of default
diff --git a/pypy/module/_io/interp_bufferedio.py
b/pypy/module/_io/interp_bufferedio.py
--- a/pypy/module/_io/interp_bufferedio.py
+++ b/pypy/module/_io/interp_bufferedio.py
@@ -15,7 +15,6 @@
W_IOBase, DEFAULT_BUFFER_SIZE, convert_size, trap_eintr,
check_readable_w, check_writable_w, check_seekable_w)
from rpython.rlib import rthread
-from rpython.rtyper.lltypesystem import rffi
STATE_ZERO, STATE_OK, STATE_DETACHED = range(3)
@@ -174,8 +173,7 @@
self.buf[index] = char
def get_raw_address(self):
- ptr = nonmoving_raw_ptr_for_resizable_list(self.buf)
- return rffi.ptradd(ptr, self.start)
+ return nonmoving_raw_ptr_for_resizable_list(self.buf)
class BufferedMixin:
_mixin_ = True
diff --git a/pypy/module/_io/test/test_bufferedio.py
b/pypy/module/_io/test/test_bufferedio.py
--- a/pypy/module/_io/test/test_bufferedio.py
+++ b/pypy/module/_io/test/test_bufferedio.py
@@ -293,7 +293,7 @@
spaceconfig = dict(usemodules=['_io', 'thread', 'time'])
def test_readinto_small_parts(self):
- import _io, os, thread, time
+ import _io, os, _thread, time
read_fd, write_fd = os.pipe()
raw = _io.FileIO(read_fd)
f = _io.BufferedReader(raw)
@@ -302,9 +302,9 @@
def write_more():
time.sleep(0.5)
os.write(write_fd, b"fghij")
- thread.start_new_thread(write_more, ())
+ _thread.start_new_thread(write_more, ())
assert f.readinto(a) == 10
- assert a == 'abcdefghij'
+ assert a == b'abcdefghij'
class AppTestBufferedWriter:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit