[pypy-commit] pypy py3.5-async-translate: some more translation issues resolved
plan_rich
pypy.commits at gmail.com
Tue Aug 9 09:59:07 EDT 2016
Author: Richard Plangger <planrichi at gmail.com>
Branch: py3.5-async-translate
Changeset: r86105:2ac7d3003c50
Date: 2016-08-09 15:58 +0200
http://bitbucket.org/pypy/pypy/changeset/2ac7d3003c50/
Log: some more translation issues resolved
diff --git a/pypy/interpreter/pyopcode.py b/pypy/interpreter/pyopcode.py
--- a/pypy/interpreter/pyopcode.py
+++ b/pypy/interpreter/pyopcode.py
@@ -59,7 +59,6 @@
w_sum = space.newlist([], sizehint=itemcount)
for i in range(itemcount, 0, -1):
w_item = frame.peekvalue(i-1)
- #items = frame.space.fixedview(w_item)
w_sum.extend(w_item)
while itemcount != 0:
frame.popvalue()
@@ -1390,8 +1389,9 @@
self.pushvalue(w_sum)
def BUILD_TUPLE_UNPACK(self, itemcount, next_instr):
- w_sum_list = list_unpack_helper(self, itemcount)
- self.pushvalue(self.space.newtuple(w_sum_list))
+ w_list = list_unpack_helper(self, itemcount)
+ items = [w_obj for w_obj in w_list.getitems_unroll()]
+ self.pushvalue(self.space.newtuple(items))
def BUILD_LIST_UNPACK(self, itemcount, next_instr):
w_sum = list_unpack_helper(self, itemcount)
@@ -1407,7 +1407,7 @@
if not space.ismapping_w(w_item):
raise oefmt(space.w_TypeError,
"'%T' object is not a mapping", w_item)
- iterator = w_item.iterkeys()
+ iterator = w_item.iterkeys(w_item)
while True:
w_key = iterator.next_key()
if w_key is None:
diff --git a/pypy/module/_asyncio/test/test_asyncio.py b/pypy/module/_asyncio/test/test_asyncio.py
--- a/pypy/module/_asyncio/test/test_asyncio.py
+++ b/pypy/module/_asyncio/test/test_asyncio.py
@@ -1,9 +1,13 @@
class AppTestAsyncIO(object):
- spaceconfig = dict(usemodules=["select","_socket","thread","signal","struct","_multiprocessing","array","_posixsubprocess","fcntl","unicodedata"])
+ spaceconfig = dict(usemodules=["select","_socket","thread","signal",
+ "struct","_multiprocessing","array",
+ "_posixsubprocess","fcntl",
+ "unicodedata"])
def test_gil_issue(self):
- # the problem occured at await asyncio.open_connection after calling run_until_complete
+ # the problem occured at await asyncio.open_connection
+ # after calling run_until_complete
"""
import encodings.idna
import asyncio
@@ -11,4 +15,6 @@
reader, writer = await asyncio.open_connection('example.com', 80)
loop = asyncio.get_event_loop()
- loop.run_until_complete(f())"""
+ loop.run_until_complete(f())
+ print("done with async loop")
+ """
diff --git a/pypy/module/zipimport/interp_zipimport.py b/pypy/module/zipimport/interp_zipimport.py
--- a/pypy/module/zipimport/interp_zipimport.py
+++ b/pypy/module/zipimport/interp_zipimport.py
@@ -82,7 +82,7 @@
for key in self.cache.keys()]
return space.newlist(items_w)
- def iterkeys(self, space):
+ def iteratekeys(self, space):
return space.iter(self.keys(space))
def itervalues(self, space):
@@ -106,11 +106,11 @@
'zip_dict',
__getitem__ = interp2app(W_ZipCache.getitem),
__contains__ = interp2app(W_ZipCache.contains),
- __iter__ = interp2app(W_ZipCache.iterkeys),
+ __iter__ = interp2app(W_ZipCache.iteratekeys),
items = interp2app(W_ZipCache.items),
iteritems = interp2app(W_ZipCache.iteritems),
keys = interp2app(W_ZipCache.keys),
- iterkeys = interp2app(W_ZipCache.iterkeys),
+ iterkeys = interp2app(W_ZipCache.iteratekeys),
values = interp2app(W_ZipCache.values),
itervalues = interp2app(W_ZipCache.itervalues),
clear = interp2app(W_ZipCache.clear),
More information about the pypy-commit
mailing list