Skip to content

Commit e67354d

Browse files
author
Richard Jones
committed
Fixes for SourceForge tracker bugs.
- fixed filter() with no sort/group [SF#618614] - fixed register with no session [SF#618611] - fixed log / pid file path handling in roundup-server [SF#617981] - fixed old gadfly compatibiltiy problem, for sure this time [SF#612873]
1 parent a50a50b commit e67354d

File tree

12 files changed

+55
-26
lines changed

12 files changed

+55
-26
lines changed

CHANGES.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ are given with the most recent entry first.
66
- metakit cleanups
77
- nicer "navigation" style in index views
88
- handle missing Link values in anydbm backend set() operation
9+
- fixed filter() with no sort/group (sf bug 618614)
10+
- fixed register with no session (sf bug 618611)
11+
- fixed log / pid file path handling in roundup-server (sf bug 617981)
12+
- fixed old gadfly compatibiltiy problem, for sure this time (sf bug 612873)
913

1014

1115
2002-10-02 0.5.0

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ recursive-exclude roundup *.pyc *.pyo .cvsignore
99
recursive-exclude frontends *.pyc *.pyo .cvsignore
1010
include run_tests *.txt
1111
exclude BUILD.txt I18N_PROGRESS.txt TODO.txt
12+
exclude doc/security.txt doc/templating.txt
1213

doc/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ STXTOHTML = -c "from docutils.core import publish;publish(writer_name='html')"
33

44
SOURCE = announcement.txt customizing.txt developers.txt FAQ.txt features.txt \
55
glossary.txt implementation.txt index.txt design.txt \
6-
installation.txt security.txt upgrading.txt user_guide.txt \
7-
maintenance.txt
6+
installation.txt upgrading.txt user_guide.txt maintenance.txt
87

98
COMPILED := $(SOURCE:.txt=.html)
109

roundup/backends/__init__.py

Lines changed: 6 additions & 2 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: __init__.py,v 1.19 2002-10-03 06:56:29 richard Exp $
18+
# $Id: __init__.py,v 1.20 2002-10-07 00:52:51 richard Exp $
1919

2020
''' Container for the hyperdb storage backend implementations.
2121
@@ -46,7 +46,11 @@
4646
import gadfly
4747
import gadfly.client
4848
except ImportError, message:
49-
if str(message) != 'No module named gadfly': raise
49+
if str(message) == 'No module named client':
50+
# don't keep the old gadfly around
51+
del gadfly
52+
elif str(message) != 'No module named gadfly':
53+
raise
5054
else:
5155
import back_gadfly
5256
gadfly = back_gadfly

roundup/backends/back_anydbm.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: back_anydbm.py,v 1.87 2002-10-04 06:30:30 richard Exp $
18+
#$Id: back_anydbm.py,v 1.88 2002-10-07 00:52:51 richard 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
@@ -1531,8 +1531,8 @@ def list(self):
15311531
l.sort()
15321532
return l
15331533

1534-
def filter(self, search_matches, filterspec, sort, group,
1535-
num_re = re.compile('^\d+$')):
1534+
def filter(self, search_matches, filterspec, sort=(None,None),
1535+
group=(None,None), num_re = re.compile('^\d+$')):
15361536
''' Return a list of the ids of the active nodes in this class that
15371537
match the 'filter' spec, sorted by the group spec and then the
15381538
sort spec.

roundup/backends/back_gadfly.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: back_gadfly.py,v 1.28 2002-10-03 06:56:29 richard Exp $
1+
# $Id: back_gadfly.py,v 1.29 2002-10-07 00:52:51 richard Exp $
22
''' Gadlfy relational database hypderb backend.
33
44
About Gadfly
@@ -137,7 +137,8 @@ def load_journal(self, classname, cols, nodeid):
137137
return res
138138

139139
class GadflyClass:
140-
def filter(self, search_matches, filterspec, sort, group):
140+
def filter(self, search_matches, filterspec, sort=(None,None),
141+
group=(None,None)):
141142
''' Gadfly doesn't have a LIKE predicate :(
142143
'''
143144
cn = self.classname

roundup/backends/back_metakit.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -738,10 +738,10 @@ def addprop(self, **properties):
738738
view = self.__getview()
739739
self.db.commit()
740740
# ---- end of ping's spec
741-
def filter(self, search_matches, filterspec, sort, group):
741+
def filter(self, search_matches, filterspec, sort=(None,None),
742+
group=(None,None)):
742743
# search_matches is None or a set (dict of {nodeid: {propname:[nodeid,...]}})
743744
# filterspec is a dict {propname:value}
744-
# sort and group are lists of propnames
745745
# sort and group are (dir, prop) where dir is '+', '-' or None
746746
# and prop is a prop name or None
747747

roundup/backends/rdbms_common.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: rdbms_common.py,v 1.20 2002-10-03 06:56:29 richard Exp $
1+
# $Id: rdbms_common.py,v 1.21 2002-10-07 00:52:51 richard Exp $
22
''' Relational database (SQL) backend common code.
33
44
Basics:
@@ -1708,7 +1708,8 @@ def list(self):
17081708
'''
17091709
return self.db.getnodeids(self.classname, retired=0)
17101710

1711-
def filter(self, search_matches, filterspec, sort, group):
1711+
def filter(self, search_matches, filterspec, sort=(None,None),
1712+
group=(None,None)):
17121713
''' Return a list of the ids of the active nodes in this class that
17131714
match the 'filter' spec, sorted by the group spec and then the
17141715
sort spec

roundup/cgi/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: client.py,v 1.49 2002-10-03 06:56:29 richard Exp $
1+
# $Id: client.py,v 1.50 2002-10-07 00:52:51 richard Exp $
22

33
__doc__ = """
44
WWW request handler (also used in the stand-alone server).
@@ -603,8 +603,8 @@ def registerAction(self):
603603
# re-open the database for real, using the user
604604
self.opendb(self.user)
605605

606-
# update the user's session
607-
if self.session:
606+
# if we have a session, update it
607+
if hasattr(self, 'session'):
608608
self.db.sessions.set(self.session, user=self.user,
609609
last_use=time.time())
610610
else:

roundup/hyperdb.py

Lines changed: 13 additions & 4 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.83 2002-10-03 06:56:29 richard Exp $
18+
# $Id: hyperdb.py,v 1.84 2002-10-07 00:52:51 richard Exp $
1919

2020
"""
2121
Hyperdatabase implementation, especially field types.
@@ -512,11 +512,20 @@ def find(self, **propspec):
512512
"""
513513
raise NotImplementedError
514514

515-
def filter(self, search_matches, filterspec, sort, group,
516-
num_re = re.compile('^\d+$')):
515+
def filter(self, search_matches, filterspec, sort=(None,None),
516+
group=(None,None)):
517517
''' Return a list of the ids of the active nodes in this class that
518518
match the 'filter' spec, sorted by the group spec and then the
519-
sort spec
519+
sort spec.
520+
521+
"filterspec" is {propname: value(s)}
522+
"sort" and "group" are (dir, prop) where dir is '+', '-' or None
523+
and prop is a prop name or None
524+
"search_matches" is {nodeid: marker}
525+
526+
The filter must match all properties specificed - but if the
527+
property value to match is a list, any one of the values in the
528+
list may match for that property to match.
520529
'''
521530
raise NotImplementedError
522531

0 commit comments

Comments
 (0)