[pypy-commit] pypy py2-mappingproxy: Rename DictProxyStrategy to ClassDictStrategy and dictproxyobject.py to classdict.py

rlamy pypy.commits at gmail.com
Tue Aug 9 10:52:36 EDT 2016


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: py2-mappingproxy
Changeset: r86109:82c4a72260a7
Date: 2016-08-02 20:01 +0100
http://bitbucket.org/pypy/pypy/changeset/82c4a72260a7/

Log:	Rename DictProxyStrategy to ClassDictStrategy and dictproxyobject.py
	to classdict.py

diff --git a/pypy/objspace/std/dictproxyobject.py b/pypy/objspace/std/classdict.py
rename from pypy/objspace/std/dictproxyobject.py
rename to pypy/objspace/std/classdict.py
--- a/pypy/objspace/std/dictproxyobject.py
+++ b/pypy/objspace/std/classdict.py
@@ -7,7 +7,7 @@
 from pypy.objspace.std.typeobject import unwrap_cell
 
 
-class DictProxyStrategy(DictStrategy):
+class ClassDictStrategy(DictStrategy):
     erase, unerase = rerased.new_erasing_pair("dictproxy")
     erase = staticmethod(erase)
     unerase = staticmethod(unerase)
@@ -112,4 +112,4 @@
     def wrapvalue(space, value):
         return unwrap_cell(space, value)
 
-create_iterator_classes(DictProxyStrategy)
+create_iterator_classes(ClassDictStrategy)
diff --git a/pypy/objspace/std/typeobject.py b/pypy/objspace/std/typeobject.py
--- a/pypy/objspace/std/typeobject.py
+++ b/pypy/objspace/std/typeobject.py
@@ -486,11 +486,11 @@
             del self.lazyloaders
 
     def getdict(self, space): # returning a dict-proxy!
-        from pypy.objspace.std.dictproxyobject import DictProxyStrategy
+        from pypy.objspace.std.classdict import ClassDictStrategy
         from pypy.objspace.std.dictmultiobject import W_DictObject
         if self.lazyloaders:
             self._cleanup_()    # force un-lazification
-        strategy = space.fromcache(DictProxyStrategy)
+        strategy = space.fromcache(ClassDictStrategy)
         storage = strategy.erase(self)
         return W_DictObject(space, strategy, storage)
 


More information about the pypy-commit mailing list