-
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
Deprecate AsdfFile.extensions and the 'extensions' argument to AsdfFile and asdf.open #1476
Deprecate AsdfFile.extensions and the 'extensions' argument to AsdfFile and asdf.open #1476
Conversation
for more information, see https://pre-commit.ci
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.
Overall looks good. I made some minor warning message suggestions (adding what should be a link to the docs).
I also scanned the downstream run logs for more AsdfDeprecationWarning
messages and don't see any new ones (there are some in WeldX from other deprecations which they said they'll fix once 2.15 is released and some in JWST because of the unreleased changes in stpipe). Are there any uses for these arguments/methods that you're aware of?
@@ -69,6 +69,7 @@ def __init__( | |||
if possible and if created from `asdf.AsdfFile.open`. | |||
|
|||
extensions : object, optional | |||
DEPRECATED |
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.
Is there a concise link we can add here that will render in the docs, something like (I'm not sure if this will render right so the docs should be checked if this suggestion is used).
DEPRECATED | |
DEPRECATED See :ref:`extending_extensions_installing_asdf_config` |
"The 'extensions' argument to AsdfFile is deprecated. Use asdf.get_config().add_extension to " | ||
"add an extension at runtime.", | ||
AsdfDeprecationWarning, |
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.
Similar to the other suggestion:
"The 'extensions' argument to AsdfFile is deprecated. Use asdf.get_config().add_extension to " | |
"add an extension at runtime.", | |
AsdfDeprecationWarning, | |
"The 'extensions' argument to AsdfFile is deprecated. Please see :ref:`extending_extensions_installing_asdf_config`.", | |
AsdfDeprecationWarning, |
"AsdfFile.extensions is deprecated. Use asdf.get_config().extensions to " | ||
"get a list of enabled extensions.", | ||
AsdfDeprecationWarning, |
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.
Similar to other suggestions.
"AsdfFile.extensions is deprecated. Use asdf.get_config().extensions to " | |
"get a list of enabled extensions.", | |
AsdfDeprecationWarning, | |
"AsdfFile.extensions is deprecated. Please see :ref:`extending_extensions_installing_asdf_config`.", | |
AsdfDeprecationWarning, |
"AsdfFile.extensions is deprecated. Use asdf.get_config().add_extension to " | ||
"add an extension at runtime.", | ||
AsdfDeprecationWarning, |
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.
ditto
"AsdfFile.extensions is deprecated. Use asdf.get_config().add_extension to " | |
"add an extension at runtime.", | |
AsdfDeprecationWarning, | |
"AsdfFile.extensions is deprecated. Please see :ref:`extending_extensions_installing_asdf_config`.", | |
AsdfDeprecationWarning, |
"The 'extensions' argument to asdf.open is deprecated. Use asdf.get_config().add_extension to " | ||
"add an extension at runtime.", | ||
AsdfDeprecationWarning, |
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.
ditto
"The 'extensions' argument to asdf.open is deprecated. Use asdf.get_config().add_extension to " | |
"add an extension at runtime.", | |
AsdfDeprecationWarning, | |
"The 'extensions' argument to asdf.open is deprecated. Please see :ref:`extending_extensions_installing_asdf_config`.", | |
AsdfDeprecationWarning, |
This branch is also decaying and I don't see a clear justification for rushing to include it in the 3.0 release. I'll close the PR and we can open a new one later if we decide this is a worthy effort. |
The AsdfConfig object provides a way to add extensions at runtime, so we don't need to continue to allow custom extensions on the AsdfFile.