From fbcc1f977fae849bb88759d21249b7d50489ff91 Mon Sep 17 00:00:00 2001 From: Brett Date: Wed, 20 Sep 2023 10:47:09 -0400 Subject: [PATCH] use legacy_class_names instead of ignoring missing BuiltinExtension --- asdf/asdf.py | 6 ------ asdf/core/_extensions.py | 7 ++++++- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/asdf/asdf.py b/asdf/asdf.py index 7ccbd8094..924274d8f 100644 --- a/asdf/asdf.py +++ b/asdf/asdf.py @@ -294,12 +294,6 @@ def _check_extensions(self, tree, strict=False): return for extension in tree["history"]["extensions"]: - # asdf 3.0 removed the BuiltinExtension and handles all - # core objects with a ManifestExtension so don't warn if - # a file is opened that was created with an older asdf - # which used the BuiltinExtension (which is no longer installed) - if extension.get("extension_class", None) == "asdf.extension.BuiltinExtension": - continue installed = None for ext in self._user_extensions + self._plugin_extensions: if ( diff --git a/asdf/core/_extensions.py b/asdf/core/_extensions.py index 059ea4e5a..205fd23f0 100644 --- a/asdf/core/_extensions.py +++ b/asdf/core/_extensions.py @@ -48,4 +48,9 @@ ] -EXTENSIONS = [ManifestExtension.from_uri(u, converters=CONVERTERS, validators=VALIDATORS) for u in MANIFEST_URIS] +EXTENSIONS = [ + ManifestExtension.from_uri( + u, converters=CONVERTERS, validators=VALIDATORS, legacy_class_names=["asdf.extension.BuiltinExtension"] + ) + for u in MANIFEST_URIS +]