[Zodb-checkins] SVN: ZODB/trunk/src/ZODB/Connection.py Cleanup
unused var, more shuffling around.
Florent Guillaume
fg at nuxeo.com
Mon Jul 3 10:57:00 EDT 2006
Log message for revision 68961:
Cleanup unused var, more shuffling around.
Changed:
U ZODB/trunk/src/ZODB/Connection.py
-=-
Modified: ZODB/trunk/src/ZODB/Connection.py
===================================================================
--- ZODB/trunk/src/ZODB/Connection.py 2006-07-03 14:38:58 UTC (rev 68960)
+++ ZODB/trunk/src/ZODB/Connection.py 2006-07-03 14:57:00 UTC (rev 68961)
@@ -74,27 +74,30 @@
def __init__(self, db, version='', cache_size=400):
"""Create a new Connection."""
+ self._log = logging.getLogger('ZODB.Connection')
+ self._debug_info = ()
+
self._db = db
+ # Multi-database support
+ self.connections = {self._db.database_name: self}
+
+ self._synch = None
+ self._mvcc = None
+
self._version = version
self._normal_storage = self._storage = db._storage
self.new_oid = db._storage.new_oid
self._savepoint_storage = None
+ # Do we need to join a txn manager?
+ self._needs_to_join = True
self.transaction_manager = None
- self._synch = None
- self._mvcc = None
-
- self._log = logging.getLogger("ZODB.Connection")
- self._debug_info = ()
self._opened = None # time.time() when DB.open() opened us
self._reset_counter = global_reset_counter
self._load_count = 0 # Number of objects unghosted
self._store_count = 0 # Number of objects stored
- # Do we need to join a txn manager?
- self._needs_to_join = True
-
# Cache which can ghostify (forget the state of) objects not
# recently used. Its API is roughly that of a dict, with
# additional gc-related and invalidation-related methods.
@@ -154,7 +157,7 @@
# critical sections (if any -- this needs careful thought).
self._inv_lock = threading.Lock()
- self._invalidated = d = {}
+ self._invalidated = {}
# We intend to prevent committing a transaction in which
# ReadConflictError occurs. _conflicts is the set of oids that
@@ -179,13 +182,9 @@
# to pass to _importDuringCommit().
self._import = None
-
self._reader = ObjectReader(self, self._cache, self._db.classFactory)
- # Multi-database support
- self.connections = {self._db.database_name: self}
-
def add(self, obj):
"""Add a new object 'obj' to the database and assign it an oid."""
if self._opened is None:
More information about the Zodb-checkins
mailing list