From 144f5e49b96ad8bc6bab6e35e44e72af5c31475e Mon Sep 17 00:00:00 2001 From: Steven Hardy Date: Thu, 15 Jan 2015 09:41:57 +0000 Subject: [PATCH] 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 --- doc/source/ext/resources.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/source/ext/resources.py b/doc/source/ext/resources.py index d64fba165c..19e7c81c9e 100644 --- a/doc/source/ext/resources.py +++ b/doc/source/ext/resources.py @@ -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)