[repo] Stop setting hashmode on schema stable
authorJulien Cristau <julien.cristau@logilab.fr>
Mon, 01 Aug 2011 17:59:48 +0200
branchstable
changeset 7723 badfd5524ab6
parent 7722 fb231d62adda
child 7724 313c874df009
[repo] Stop setting hashmode on schema At best it was a no-op, at worst it created race conditions.
server/repository.py
server/test/unittest_repository.py
--- a/server/repository.py	Mon Aug 01 17:58:28 2011 +0200
+++ b/server/repository.py	Mon Aug 01 17:59:48 2011 +0200
@@ -505,12 +505,7 @@
 
         This is a public method, not requiring a session id.
         """
-        try:
-            # necessary to support pickling used by pyro
-            self.schema.__hashmode__ = 'pickle'
-            return self.schema
-        finally:
-            self.schema.__hashmode__ = None
+        return self.schema
 
     def get_cubes(self):
         """Return the list of cubes used by this instance.
--- a/server/test/unittest_repository.py	Mon Aug 01 17:58:28 2011 +0200
+++ b/server/test/unittest_repository.py	Mon Aug 01 17:59:48 2011 +0200
@@ -366,7 +366,6 @@
             schema = cnx.get_schema()
             self.failUnless(cnx.vreg)
             self.failUnless('etypes'in cnx.vreg)
-            self.assertEqual(schema.__hashmode__, None)
             cu = cnx.cursor()
             rset = cu.execute('Any U,G WHERE U in_group G')
             user = iter(rset.entities()).next()