-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove legacy extension api #1637
Remove legacy extension api #1637
Conversation
dkist also contains at least 1 ref by tag: Opened PR updating the schema to use a uri in the ref instead of a tag: |
e428962
to
214f8be
Compare
e428962
to
bc03ed4
Compare
this prevents the BuiltinExtension from being loaded which means that the default tag_mapping that maps 'tag:stsci.edu:asdf' tags to uris is no longer included. This would be a breaking change so ``asdf.schema._tag_to_uri`` is added to map just these tags and issue an AsdfDeprecationWarning so we can remove this entirely in a later version
splitting up this commit would make the changes easier to understand. However the above change had numerous knock-on and dependent changes that required updating many tests and removing other deprecated functions/features. However, as everything removed was already deprecated this commit will exist in it's current overly large size.
63cd7a1
to
fbcc1f9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weeee!
Builds on changes from:
Some notes so far:
BuiltinExtension
legacy class name (so warnings should not be seen when a file is opened that was produced with the legacy extension api)$ref
using a tag (not a tag uri) (see: Add warning when schema $ref is a tag #752)there are several uses in stdatamodels/jwst which should be updatedEDIT: stdatamodels uses fixed in: switch schema refs that use tag to uris spacetelescope/stdatamodels#201Closes: #752
Closes #1622
Deserialization types vs converters
The old type system caught TypeError raised on deserialization and turned it into a warning:
asdf/asdf/yamlutil.py
Lines 343 to 349 in 53b87b4
The new converters do not catch TypeError:
asdf/asdf/yamlutil.py
Lines 311 to 315 in 53b87b4
There were a few tests that relied on this behavior. However it appears that the
raw
value is only passed on when aTypeError
is raised (all other exceptions bubble up and result in a failure to load the file). I see no documentation of this (looking at the 2.14.4 docs which have all descriptions of the old type system) and it seems like an inconsistent way to allow partial conversion failures during open. As we already have an open issue for discussing options for partial/graceful loading on failed conversions (#1555) I vote for not replicating this undocumented behavior of the type system and address the issue in a separate PR.