Daniel P. Berrangé <berra...@redhat.com> writes: > This replaces use of the constants from the QapiSpecialFeatures > enum, with constants from the auto-generate QapiFeatures enum > in qapi-features.h > > The 'deprecated' and 'unstable' features still have a little bit of > special handling, being force defined to be the 1st + 2nd features > in the enum, regardless of whether they're used in the schema. This > retains compatibility with common code that references the features > via the QapiSpecialFeatures constants. > > Signed-off-by: Daniel P. Berrangé <berra...@redhat.com>
John pointed out that isort wants the appended fixup. Not thrilled about the additional churn in the first hunk, but let's not fight our tools. Thanks, John! diff --git a/scripts/qapi/features.py b/scripts/qapi/features.py index be3e5d03ff..16ed26672b 100644 --- a/scripts/qapi/features.py +++ b/scripts/qapi/features.py @@ -11,10 +11,7 @@ from .common import c_enum_const, c_name from .gen import QAPISchemaMonolithicCVisitor -from .schema import ( - QAPISchema, - QAPISchemaFeature, -) +from .schema import QAPISchema, QAPISchemaFeature class QAPISchemaGenFeatureVisitor(QAPISchemaMonolithicCVisitor): diff --git a/scripts/qapi/main.py b/scripts/qapi/main.py index 2b9a2c0c02..324081b9fc 100644 --- a/scripts/qapi/main.py +++ b/scripts/qapi/main.py @@ -15,10 +15,10 @@ from .common import must_match from .error import QAPIError from .events import gen_events +from .features import gen_features from .introspect import gen_introspect from .schema import QAPISchema from .types import gen_types -from .features import gen_features from .visit import gen_visit