Skip to content

Commit 535faa6

Browse files
author
Johannes Gijsbers
committed
Remove implementations of Class.getnode from back_anydbm and rdbms_common...
...it's already in hyperdb.Class. Implementations of hyperdb.Database do need to implement the getnode method themselves.
1 parent fff3c89 commit 535faa6

File tree

3 files changed

+5
-26
lines changed

3 files changed

+5
-26
lines changed

roundup/backends/back_anydbm.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
#$Id: back_anydbm.py,v 1.131 2003-11-14 00:11:18 richard Exp $
18+
#$Id: back_anydbm.py,v 1.132 2003-11-16 18:41:40 jlgijsbers Exp $
1919
'''
2020
This module defines a backend that saves the hyperdatabase in a database
2121
chosen by anydbm. It is guaranteed to always be available in python
@@ -1094,17 +1094,6 @@ def get(self, nodeid, propname, default=_marker, cache=1):
10941094

10951095
return d[propname]
10961096

1097-
# not in spec
1098-
def getnode(self, nodeid, cache=1):
1099-
''' Return a convenience wrapper for the node.
1100-
1101-
'nodeid' must be the id of an existing node of this class or an
1102-
IndexError is raised.
1103-
1104-
'cache' exists for backwards compatibility, and is not used.
1105-
'''
1106-
return Node(self, nodeid)
1107-
11081097
def set(self, nodeid, **propvalues):
11091098
'''Modify a property on an existing node of this class.
11101099

roundup/backends/rdbms_common.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: rdbms_common.py,v 1.70 2003-11-14 00:11:19 richard Exp $
1+
# $Id: rdbms_common.py,v 1.71 2003-11-16 18:41:40 jlgijsbers Exp $
22
''' Relational database (SQL) backend common code.
33
44
Basics:
@@ -1373,16 +1373,6 @@ def get(self, nodeid, propname, default=_marker, cache=1):
13731373

13741374
return d[propname]
13751375

1376-
def getnode(self, nodeid, cache=1):
1377-
''' Return a convenience wrapper for the node.
1378-
1379-
'nodeid' must be the id of an existing node of this class or an
1380-
IndexError is raised.
1381-
1382-
'cache' exists for backwards compatibility, and is not used.
1383-
'''
1384-
return Node(self, nodeid)
1385-
13861376
def set(self, nodeid, **propvalues):
13871377
'''Modify a property on an existing node of this class.
13881378

roundup/hyperdb.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: hyperdb.py,v 1.91 2003-11-11 00:35:13 richard Exp $
18+
# $Id: hyperdb.py,v 1.92 2003-11-16 18:41:40 jlgijsbers Exp $
1919

2020
"""
2121
Hyperdatabase implementation, especially field types.
@@ -163,8 +163,7 @@ class Database:
163163
Implementation
164164
--------------
165165
166-
All methods except __repr__ and getnode must be implemented by a
167-
concrete backend Class.
166+
All methods except __repr__ must be implemented by a concrete backend Database.
168167
169168
'''
170169

@@ -374,6 +373,7 @@ def get(self, nodeid, propname, default=_marker, cache=1):
374373
"""
375374
raise NotImplementedError
376375

376+
# not in spec
377377
def getnode(self, nodeid, cache=1):
378378
''' Return a convenience wrapper for the node.
379379

0 commit comments

Comments
 (0)