Skip to content

Commit

Permalink
Mark DB.new_oid as deprecated.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamadden committed Jan 28, 2017
1 parent 89db8a2 commit 8009351
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/ZODB/DB.py
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,13 @@ def transaction(self, note=None):
return ContextManager(self, note)

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):
"""Create and return a connection.
Expand Down

0 comments on commit 8009351

Please sign in to comment.