From 2e4924a0dac9b63444c11ff902060193e4d7948a Mon Sep 17 00:00:00 2001 From: Unrud Date: Mon, 13 Jan 2020 15:51:10 +0100 Subject: [PATCH] Improve documentation --- radicale/app/__init__.py | 4 +++- radicale/auth/__init__.py | 7 +++++++ radicale/config.py | 4 ++++ radicale/rights/__init__.py | 7 +++++++ radicale/web/__init__.py | 7 +++++++ setup.py | 1 + 6 files changed, 29 insertions(+), 1 deletion(-) diff --git a/radicale/app/__init__.py b/radicale/app/__init__.py index f48d9d2..10982c4 100644 --- a/radicale/app/__init__.py +++ b/radicale/app/__init__.py @@ -67,9 +67,11 @@ class Application( """WSGI application.""" def __init__(self, configuration): - """Initialize application. + """Initialize Application. ``configuration`` see ``radicale.config`` module. + The ``configuration`` must not change during the lifetime of + this object, it is kept as an internal reference. """ super().__init__() diff --git a/radicale/auth/__init__.py b/radicale/auth/__init__.py index 6f83083..6b2bbcc 100644 --- a/radicale/auth/__init__.py +++ b/radicale/auth/__init__.py @@ -53,6 +53,13 @@ def load(configuration): class BaseAuth: def __init__(self, configuration): + """Initialize BaseAuth. + + ``configuration`` see ``radicale.config`` module. + The ``configuration`` must not change during the lifetime of + this object, it is kept as an internal reference. + + """ self.configuration = configuration def get_external_login(self, environ): diff --git a/radicale/config.py b/radicale/config.py index ca27084..1ebed20 100644 --- a/radicale/config.py +++ b/radicale/config.py @@ -294,6 +294,8 @@ class Configuration: ``schema`` a dict that describes the configuration format. See ``DEFAULT_CONFIG_SCHEMA``. + The content of ``schema`` must not change afterwards, it is kept + as an internal reference. Use ``load()`` to create an instance for use with ``radicale.app.Application``. @@ -316,6 +318,8 @@ class Configuration: ``config`` a dict of the format {SECTION: {OPTION: VALUE, ...}, ...}. The configuration is checked for errors according to the config schema. + The content of ``config`` must not change afterwards, it is kept + as an internal reference. ``source`` a description of the configuration source (used in error messages). diff --git a/radicale/rights/__init__.py b/radicale/rights/__init__.py index 7da4aec..05d078b 100644 --- a/radicale/rights/__init__.py +++ b/radicale/rights/__init__.py @@ -59,6 +59,13 @@ def intersect_permissions(a, b="RrWw"): class BaseRights: def __init__(self, configuration): + """Initialize BaseRights. + + ``configuration`` see ``radicale.config`` module. + The ``configuration`` must not change during the lifetime of + this object, it is kept as an internal reference. + + """ self.configuration = configuration def authorized(self, user, path, permissions): diff --git a/radicale/web/__init__.py b/radicale/web/__init__.py index 5362695..f1cd214 100644 --- a/radicale/web/__init__.py +++ b/radicale/web/__init__.py @@ -46,6 +46,13 @@ def load(configuration): class BaseWeb: def __init__(self, configuration): + """Initialize BaseWeb. + + ``configuration`` see ``radicale.config`` module. + The ``configuration`` must not change during the lifetime of + this object, it is kept as an internal reference. + + """ self.configuration = configuration def get(self, environ, base_prefix, path, user): diff --git a/setup.py b/setup.py index 753f1ef..8578b69 100644 --- a/setup.py +++ b/setup.py @@ -94,4 +94,5 @@ setup( "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", "Topic :: Office/Business :: Groupware"])