Commit 177cfabe authored by Jason Madden's avatar Jason Madden

Mark DB.new_oid as deprecated.

parent 89db8a28
...@@ -8,5 +8,6 @@ omit = ...@@ -8,5 +8,6 @@ omit =
[report] [report]
exclude_lines = exclude_lines =
pragma: nocover pragma: nocover
pragma: no cover
if __name__ == ['"]__main__['"]: if __name__ == ['"]__main__['"]:
assert False assert False
...@@ -987,7 +987,13 @@ class DB(object): ...@@ -987,7 +987,13 @@ class DB(object):
return ContextManager(self, note) return ContextManager(self, note)
def new_oid(self): def new_oid(self):
return self.storage.new_oid() """
Return a new oid from the storage.
Kept for backwards compatibility only. New oids should be
allocated in a transaction using an open Connection.
"""
return self.storage.new_oid() # pragma: no cover
def open_then_close_db_when_connection_closes(self): def open_then_close_db_when_connection_closes(self):
"""Create and return a connection. """Create and return a connection.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment