[pypy-commit] pypy py3k: fix some of the results of the merge. StringListStrategy is called

antocuni noreply at buildbot.pypy.org
Mon Apr 16 14:01:23 CEST 2012


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r54410:6c3be7bcfb8b
Date: 2012-04-16 13:57 +0200
http://bitbucket.org/pypy/pypy/changeset/6c3be7bcfb8b/

Log:	fix some of the results of the merge. StringListStrategy is called
	UnicodeListStrategy on py3k, and withrangelist has been removed (but
	we still keep the tests, just because)

diff --git a/pypy/objspace/std/listobject.py b/pypy/objspace/std/listobject.py
--- a/pypy/objspace/std/listobject.py
+++ b/pypy/objspace/std/listobject.py
@@ -1086,7 +1086,7 @@
 
         strlist = space.listview_str(w_iterable)
         if strlist is not None:
-            w_list.strategy = strategy = space.fromcache(StringListStrategy)
+            w_list.strategy = strategy = space.fromcache(UnicodeListStrategy)
              # need to copy because intlist can share with w_iterable
             w_list.lstorage = strategy.erase(strlist[:])
             return
diff --git a/pypy/objspace/std/test/test_listobject.py b/pypy/objspace/std/test/test_listobject.py
--- a/pypy/objspace/std/test/test_listobject.py
+++ b/pypy/objspace/std/test/test_listobject.py
@@ -1145,7 +1145,7 @@
                 (set, []),  (set,  [5]), (set,  ['x']), (set, [X]),
                 (dict, []), (dict, [(5,6)]), (dict, [('x',7)]), (dict, [(X,8)]),
                 ]:
-            print base, arg
+            print(base, arg)
             class SubClass(base):
                 def __iter__(self):
                     return iter("foobar")
@@ -1159,9 +1159,9 @@
 
 class AppTestForRangeLists(AppTestW_ListObject):
 
-    def setup_class(cls):
-        cls.space = gettestobjspace(**{"objspace.std.withrangelist" :
-                                       True})
+    ## def setup_class(cls):
+    ##     cls.space = gettestobjspace(**{"objspace.std.withrangelist" :
+    ##                                    True})
 
     def test_range_simple_backwards(self):
         x = range(5,1)


More information about the pypy-commit mailing list