Skip to content
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

Add deprecations for 'legacy' extension system #1333

Closed
14 of 15 tasks
braingram opened this issue Jan 26, 2023 · 3 comments · Fixed by #1361
Closed
14 of 15 tasks

Add deprecations for 'legacy' extension system #1333

braingram opened this issue Jan 26, 2023 · 3 comments · Fixed by #1361
Milestone

Comments

@braingram braingram added this to the 2.15 milestone Jan 26, 2023
@braingram
Copy link
Contributor Author

braingram commented Jan 26, 2023

  • Resolver
    The documentation mentions a deprecated resolver mechanism:
    reasons explained later. The resolver system has been deprecated in favor
    of resource mappings; new code should use the latter instead.

    Some of this has deprecation warnings.
    @property
    def tag_to_schema_resolver(self):
    """Deprecated. Use `tag_mapping` instead"""
    warnings.warn(
    "The 'tag_to_schema_resolver' property is deprecated. Use 'tag_mapping' instead.",
    AsdfDeprecationWarning,
    )
    return self._tag_mapping

    Some does not:
    def get_default_resolver():
    """
    Get the resolver that includes mappings from all installed extensions.
    """
    return default_extensions.resolver

I'm not familiar with the resolver. @WilliamJamieson do you think we'll still need this in 3.0? If it's uncertain should we add a deprecation with the hope we can remove it?

@eslavich
Copy link
Contributor

eslavich commented Feb 6, 2023

The resolver is what the old-style extensions use to locate schema content for a URI. If we're removing CustomType and friends then we won't need it.

@eslavich
Copy link
Contributor

eslavich commented Feb 6, 2023

A prerequisite to removing the above is translating everything under asdf.core.tags to Converter and providing some new entity class for each tagged object. Probably the user should see some kind of deprecation warning when they import from those modules? But we'll need to prevent the warning when asdf itself imports them. Maybe we move their contents to an underscored module that asdf can import from, and create aliases in the original module names with a warning?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants