Table of Contents

Module: once ./src/peak/binding/once.py

Once objects and classes

Imported modules   
from __future__ import generators
from _once import *
from attributes import activateClass, classAttr, Activator, supertype, declareAttribute, initAttrs
from interfaces import IAttachable, IActiveDescriptor, IRecipe
from peak.api import NOT_FOUND, protocols, adapt, dispatch
from peak.config.interfaces import IConfigKey
from peak.util.imports import importObject, importString
from peak.util.signature import ISignature, getPositionalArgs
from protocols import IOpenProvider, IOpenImplementor, NO_ADAPTER_NEEDED
from protocols.advice import metamethod, getMRO
from types import ClassType
from warnings import warn
Functions   
_callableAsRecipe
_configKeyAsRecipe
_warnIfPermission
getInheritedRegistries
suggestParentComponent
suggest_attachable
suggest_nothing
suggest_sequence
  _callableAsRecipe 
_callableAsRecipe ( func )

  _configKeyAsRecipe 
_configKeyAsRecipe ( ob )

  _warnIfPermission 
_warnIfPermission ( kw,  level=4 )

XXX Set up a deprecation warning for permissionNeeded

  getInheritedRegistries 
getInheritedRegistries ( klass,  registryName )

Minimal set of registryName registries in reverse MRO order

  suggestParentComponent 
suggestParentComponent (
        parent,
        name,
        child,
        )

Suggest to child that it has parent and name

If child does not support IAttachable and is a container that derives from tuple or list, all of its elements that support IAttachable will be given a suggestion to use parent and name as well. Note that this means it would not be a good idea to use this on, say, a 10,000 element list (especially if the objects in it aren't components), because this function has to check all of them.

  suggest_attachable 
suggest_attachable (
        parent,
        name,
        child,
        )

  suggest_nothing 
suggest_nothing (
        parent,
        name,
        child,
        )

  suggest_sequence 
suggest_sequence (
        parent,
        name,
        child,
        )

Classes   

ActiveClass

Metaclass for classes that are themselves components

Attribute

Descriptor for Component Attribute Bindings

AttributeClass

Help attribute classes keep class docs separate from instance docs

ComponentSetupWarning

Large iterator passed to suggestParentComponent

Descriptor

Attribute descriptor with lazy initialization and caching

Make

Make(recipe)' - Construct a value and cache it

Singleton

Class whose instances are itself, with all attributes at class level

SingletonClass

_MultiRecipe

ADAPTER: Sequence(IRecipe) --> IRecipe

_StringAsRecipe

ADAPTER: string (import spec) --> IRecipe

_TypeAsRecipe

ADAPTER: type | class --> IRecipe


Table of Contents

This document was automatically generated on Mon Apr 15 01:11:03 2024 by HappyDoc version 2.1