[pypy-commit] pypy py3k: disable IntDictStrategy for now: we cannot use it, since now 'ints' are acutally 'longs'

antocuni noreply at buildbot.pypy.org
Fri Mar 23 18:38:34 CET 2012


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r53949:88bedcfe28c5
Date: 2012-03-23 17:45 +0100
http://bitbucket.org/pypy/pypy/changeset/88bedcfe28c5/

Log:	disable IntDictStrategy for now: we cannot use it, since now 'ints'
	are acutally 'longs'

diff --git a/pypy/objspace/std/dictmultiobject.py b/pypy/objspace/std/dictmultiobject.py
--- a/pypy/objspace/std/dictmultiobject.py
+++ b/pypy/objspace/std/dictmultiobject.py
@@ -176,9 +176,11 @@
             self.switch_to_string_strategy(w_dict)
             return
         w_type = self.space.type(w_key)
-        if self.space.is_w(w_type, self.space.w_int):
-            self.switch_to_int_strategy(w_dict)
-        elif withidentitydict and w_type.compares_by_identity():
+        # XXX: disable IntDictStrategy for now, because in py3k ints are
+        # actually long
+        ## if self.space.is_w(w_type, self.space.w_int):
+        ##     self.switch_to_int_strategy(w_dict)
+        if withidentitydict and w_type.compares_by_identity():
             self.switch_to_identity_strategy(w_dict)
         else:
             self.switch_to_object_strategy(w_dict)
diff --git a/pypy/objspace/std/test/test_dictmultiobject.py b/pypy/objspace/std/test/test_dictmultiobject.py
--- a/pypy/objspace/std/test/test_dictmultiobject.py
+++ b/pypy/objspace/std/test/test_dictmultiobject.py
@@ -754,6 +754,7 @@
         assert "StringDictStrategy" in self.get_strategy(d)
 
     def test_empty_to_int(self):
+        skip('IntDictStrategy is disabled for now, re-enable it!')
         import sys
         d = {}
         d[1] = "hi"


More information about the pypy-commit mailing list