diff options
Diffstat (limited to 'doc/development')
-rw-r--r-- | doc/development/caching.txt | 3 | ||||
-rw-r--r-- | doc/development/compat.txt | 12 | ||||
-rw-r--r-- | doc/development/plugins.txt | 10 |
3 files changed, 20 insertions, 5 deletions
diff --git a/doc/development/caching.txt b/doc/development/caching.txt index 83ec0290f..c8b7aba14 100644 --- a/doc/development/caching.txt +++ b/doc/development/caching.txt @@ -67,6 +67,9 @@ Currently known caches are: | pkg_sets | <Collection.cachekey>`, | | for clients | | | hash of the initial package selection | | | +-------------+---------------------------------------+-------------------------------------------------+------------------------------------------------------+ +| Ldap, | Hostname, ``<query name>`` | :func:`processed result of the query | Cached results from the Ldap queries | +| results, | | <Bcfg2.Server.Plugins.LdapQuery.process_result>`| | ++-------------+---------------------------------------+-------------------------------------------------+------------------------------------------------------+ These are enumerated so that they can be expired as needed by other plugins or other code points. diff --git a/doc/development/compat.txt b/doc/development/compat.txt index 8700c46d3..a6a85cbab 100644 --- a/doc/development/compat.txt +++ b/doc/development/compat.txt @@ -113,7 +113,7 @@ with Python 2.4 (and occasionally 2.5). Be sure to read the notes below, since some of these implementations may be feature-incomplete. +----------------+--------------------------------+--------------------------------------------+ -| Name | Python 2.4 | Python 2.4+ | +| Name | Python 2.4 | Python 2.5+ | +================+================================+============================================+ | formatdate | :func:`email.Utils.formatdate` | :func:`email.utils.formatdate` | +----------------+--------------------------------+--------------------------------------------+ @@ -129,6 +129,8 @@ below, since some of these implementations may be feature-incomplete. +----------------+--------------------------------+--------------------------------------------+ | MutableMapping | :class:`UserDict.DictMixin` | :class:`collections.MutableMapping` (2.6+) | +----------------+--------------------------------+--------------------------------------------+ +| literal_eval | :func:`eval` | :func:`ast.literal_eval` (2.6+) | ++----------------+--------------------------------+--------------------------------------------+ walk_packages ~~~~~~~~~~~~~ @@ -171,6 +173,14 @@ mind. :class:`collections.MutableMapping` is available in Python 2.6+, and will be used if available. +literal_eval +~~~~~~~~~~~~ + +:func:`ast.literal_eval` is a safe version of :func:`eval` that will only +allow delaration of literal strings, ints, list, dicts, etc. This was +introduced in Python 2.6, and as such Python 2.4 uses the plain-old +:func:`eval`. + Other Symbols ------------- diff --git a/doc/development/plugins.txt b/doc/development/plugins.txt index d292c9dd7..0d524973e 100644 --- a/doc/development/plugins.txt +++ b/doc/development/plugins.txt @@ -118,7 +118,9 @@ Invalidating Caches In Bcfg2 1.3.0, some limited :ref:`server-caching` was introduced. If you are writing a :class:`Bcfg2.Server.Plugin.interfaces.Connector` plugin that implements -:func:`Bcfg2.Server.Plugin.interfaces.Connector.get_additional_groups`, +:func:`Bcfg2.Server.Plugin.interfaces.Connector.get_additional_groups` +or +:func:`Bcfg2.Server.Plugin.interfaces.Connector.get_additional_data`, then you need to be able to invalidate the server metadata cache in order to be compatible with the ``cautious`` or ``aggressive`` caching modes. @@ -140,9 +142,9 @@ called with one string argument, it expires cached data for the named client. It's important, therefore, that your Connector plugin can either track -when changes are made to the group membership it reports, and expire -cached data appropriately when in ``cautious`` or ``aggressive`` mode; -or prudently flag an incompatibility with those two modes. +when changes are made to the data or group membership it reports, and +expire cached data appropriately when in ``cautious`` or ``aggressive`` +mode; or prudently flag an incompatibility with those two modes. For examples, see: |