+creator: abentley
+severity: moderate
-creator=abentley
+status: open
+summary: Do we need a severity between serious and minor? EG "Moderate"?
-
-severity=serious
-
-
-
-
-
-
-status=open
-
-
-
-
-
-
-summary=Do we need a severity between serious and minor? EG "Moderate"?
-
-
-
-
-
-
-time=Wed, 25 Jan 2006 23:14:07 +0000
-
-
+time: Wed, 25 Jan 2006 23:14:07 +0000
rcs_name: bzr
+
severities:
-- name: wishlist
- description: A feature that could improve usefulness, but not a bug.
-- name: minor
- description: The standard bug level.
-- name: moderate
- description: Yet another bug severity.
-- name: serious
- description: A bug that requires workarounds.
-- name: critical
- description: A bug that prevents some features from working at all.
-- name: fatal
- description: A bug that makes the package unusable.
+- - wishlist
+ - A feature that could improve usefulness, but not a bug.
+- - minor
+ - The standard bug level.
+- - moderate
+ - Yet another bug severity.
+- - serious
+ - A bug that requires workarounds.
+- - critical
+ - A bug that prevents some features from working at all.
+- - fatal
+ - A bug that makes the package unusable.
+
global severity_values
global severity_description
global severity_index
- if type(severity_def[0]) == dict:
- # Convert {"name": "X", "description": "Y"} severities to ("X","Y").
- # The dict form is loaded from the per-tree settings file.
- severity_def = [(d["name"], d["description"]) for d in severity_def]
severity_values = tuple([val for val,description in severity_def])
severity_description = dict(severity_def)
severity_index = {}
@_versioned_property(name="severity",
doc="A measure of the bug's importance",
default="minor",
- allowed=severity_values,
+ check_fn=lambda s: s in severity_values,
require_save=True)
def severity(): return {}
"""Generate a YAML mapfile content string.
>>> generate({"q":"p"})
'q: p\\n\\n'
+ >>> generate({"q":u"Fran\u00e7ais"})
+ 'q: Fran\\xc3\\xa7ais\\n\\n'
+ >>> generate({"q":u"hello"})
+ 'q: hello\\n\\n'
>>> generate({"q=":"p"})
Traceback (most recent call last):
IllegalKey: Illegal key "q="
lines = []
for key in keys:
- lines.append(yaml.dump({key: map[key]}, default_flow_style=False))
+ lines.append(yaml.safe_dump({key: map[key]},
+ default_flow_style=False,
+ allow_unicode=True))
lines.append("")
return '\n'.join(lines)