Package buildbot :: Package process :: Module properties :: Class Properties
[frames] | no frames]

Class Properties

source code

util.ComparableMixin --+

I represent a set of properties that can be interpolated into various
strings in buildsteps.

@ivar properties: dictionary mapping property values to tuples 
    (value, source), where source is a string identifing the source
    of the property.

Objects of this class can be read like a dictionary -- in this case,
only the property value is returned.

As a special case, a property value of None is returned as an empty 
string when used as a mapping.

Instance Methods
__init__(self, **kwargs) source code
__getstate__(self) source code
__setstate__(self, d) source code
__contains__(self, name) source code
__getitem__(self, name)
Just get the value for this property.
source code
__nonzero__(self) source code
getPropertySource(self, name) source code
Return the properties as a sorted list of (name, value, source)
source code
Return the properties as a simple key:value dictionary
source code
__repr__(self) source code
update(self, dict, source, runtime=False)
Update this object from a dictionary, with an explicit source specified.
source code
updateFromProperties(self, other)
Update this object based on another object; the other object's
source code
updateFromPropertiesNoRuntime(self, other)
Update this object based on another object, but don't include properties that were marked as runtime.
source code
getProperty(self, name, default=None) source code
hasProperty(self, name) source code
has_key(self, name) source code
setProperty(self, name, value, source, runtime=False) source code
getProperties(self) source code
getBuild(self) source code
render(self, value) source code
Special descriptor for class __provides__

Inherited from util.ComparableMixin: __cmp__, __hash__, __providedBy__

Class Variables
  compare_attrs = ('properties')
  __implemented__ = <implementedBy
Method Details

__init__(self, **kwargs)

source code 
  • kwargs - initial property values (for testing)


Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that
we can get declarations for objects without instance-specific
interfaces a bit quicker.

For example:

  >>> from zope.interface import Interface
  >>> class IFooFactory(Interface):
  ...     pass
  >>> class IFoo(Interface):
  ...     pass
  >>> class C(object):
  ...     implements(IFoo)
  ...     classProvides(IFooFactory)
  >>> [i.getName() for i in C.__provides__]

  >>> [i.getName() for i in C().__provides__]

Overrides: util.ComparableMixin.__provides__

Class Variable Details