Add support status to docs for properties

I thought we already had this, but inspection of the generated docs
reveals that we only do class-level docs for the support status,
not exposing those defined in the schema.

Adding the properties support status should help reduce user confusion
when new properties are added between releases.

Change-Id: I5f3228161e57daad73cbafc124c4fad05c68d3d6
Closes-Bug: 1376868
This commit is contained in:
Steven Hardy 2015-01-15 09:41:57 +00:00
parent 7327715380
commit 144f5e49b9

View File

@ -237,6 +237,14 @@ Resources:
note = nodes.note('', para)
definition.append(note)
if (prop.support_status.status == support.SUPPORTED and
prop.support_status.version is not None):
tag = prop.support_status.version.title()
message = (_('Available since %s.') % self._version_str(tag))
para = nodes.paragraph('', message)
note = nodes.note('', para)
definition.append(note)
if not prop.implemented:
para = nodes.paragraph('', _('Not implemented.'))
note = nodes.note('', para)