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

Class Properties

source code

util.ComparableMixin --+
                       |
                      Properties


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
 
asList(self)
Return the properties as a sorted list of (name, value, source)
source code
 
asDict(self)
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
 
__provides__(...)
Special descriptor for class __provides__

Inherited from util.ComparableMixin: __cmp__, __hash__, __providedBy__

Class Variables
  compare_attrs = ('properties')
  __implemented__ = <implementedBy buildbot.process.properties.P...
Method Details

__init__(self, **kwargs)
(Constructor)

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

__provides__(...)

 
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__]
  ['IFooFactory']

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

Overrides: util.ComparableMixin.__provides__

Class Variable Details

__implemented__

Value:
<implementedBy buildbot.process.properties.Properties>