Mercurial > p > roundup > code
view test/mocknull.py @ 5005:a86b0c02940d
Remove the tsearch2 backend
The documentation within the tsearch2 backend labels it as being
experimental and that it should not be used. The have_backend() function
in roundup.backend returns False indicating that it does not exist and
is labeled as "currently not working". The PostgreSQL website also seems
to indicate that it has been deprecated since v8.3 when text searching
was integrated into the core[1].
Considering all this, it seems like the best option is to just remove
the tsearch2 backend.
[1] http://www.postgresql.org/docs/9.4/static/tsearch2.html
| author | John Kristensen <john@jerrykan.com> |
|---|---|
| date | Sun, 11 Oct 2015 00:06:51 +1100 |
| parents | 79fd8537ae3b |
| children | 3757449e00c4 |
line wrap: on
line source
class MockNull: def __init__(self, **kwargs): for key, value in kwargs.items(): self.__dict__[key] = value def __call__(self, *args, **kwargs): return MockNull() def __getattr__(self, name): # This allows assignments which assume all intermediate steps are Null # objects if they don't exist yet. # # For example (with just 'client' defined): # # client.db.config.TRACKER_WEB = 'BASE/' self.__dict__[name] = MockNull() return getattr(self, name) def __getitem__(self, key): return self def __nonzero__(self): return 0 def __str__(self): return '' def __repr__(self): return '<MockNull 0x%x>'%id(self) def gettext(self, str): return str _ = gettext
