##// END OF EJS Templates
cached-commits: updated logic on cached commit updates....
cached-commits: updated logic on cached commit updates. - for repositories we ensure that damaged/empty repositories have initial data instead of now (bug) - for groups we only update based on first set of data inside a group without iterating to nested objects. This new logic goes in sync with new update task of groups with automation.

File last commit:

r3912:9bf26830 default
r4162:5cadc4f9 default
Show More
interfaces.py
73 lines | 1.3 KiB | text/x-python | PythonLexer
# -*- coding: utf-8 -*-
"""
Interfaces
^^^^^^^^^^
If you want to implement framework specific extras, use these abstract
classes as bases:
"""
import abc
class BaseSession(object):
"""
Abstract class for custom session implementations.
"""
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def save(self):
"""
Called only once per request.
Should implement a mechanism for setting the the session
**cookie** and saving the session **data** to storage.
"""
@abc.abstractmethod
def __setitem__(self, key, value):
"""
Same as :meth:`dict.__setitem__`.
"""
@abc.abstractmethod
def __getitem__(self, key):
"""
Same as :meth:`dict.__getitem__`.
"""
@abc.abstractmethod
def __delitem__(self, key):
"""
Same as :meth:`dict.__delitem__`.
"""
@abc.abstractmethod
def get(self, key):
"""
Same as :meth:`dict.get`.
"""
class BaseConfig(object):
"""
Abstract class for :doc:`config` implementations.
"""
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def get(self, key):
"""
Same as :attr:`dict.get`.
"""
@abc.abstractmethod
def values(self):
"""
Same as :meth:`dict.values`.
"""