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

Error for Convert subclasses with multiple tags if select_tag isn't implemented #1853

Merged
merged 2 commits into from
Oct 31, 2024

Conversation

braingram
Copy link
Contributor

@braingram braingram commented Oct 28, 2024

Description

Closes #1632

For a converter that supports multiple tags but does not implement select tag, raise a RuntimeError (instead of a warning). Previously a warning was produced only for Converter subclasses (virtual subclasses produced RuntimeErrors). Now both real and virtual subclasses produce errors.

Checklist:

  • pre-commit checks ran successfully

  • tests ran successfully

  • for a public change, added a towncrier news fragment

    changes/<PR#>.<changetype>.rst

    • changes/<PR#>.feature.rst: new feature
    • changes/<PR#>.bugfix.rst: bug fix
    • changes/<PR#>.doc.rst: documentation change
    • changes/<PR#>.removal.rst: deprecation or removal of public API
    • changes/<PR#>.general.rst: infrastructure or miscellaneous change
  • for a public change, updated documentation

  • for any new features, unit tests were added

@braingram braingram marked this pull request as ready for review October 28, 2024 21:05
@braingram braingram requested a review from a team as a code owner October 28, 2024 21:05
@braingram braingram added this to the 4.0.0 milestone Oct 28, 2024
@braingram braingram changed the title only error if Converter.select_tag isn't implemented for a multi-tag converter Error for Convert subclasses with multiple tags if select_tag isn't implemented Oct 28, 2024
Copy link
Contributor

@eslavich eslavich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Nice

@braingram
Copy link
Contributor Author

braingram commented Oct 31, 2024

image

Nice

Thanks for the review! Soon this repo will be empty *wrings hands maniacally*

@braingram braingram merged commit 8d9b721 into asdf-format:main Oct 31, 2024
49 checks passed
@braingram braingram deleted the err_select_tag branch October 31, 2024 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No longer warn but raise an exception for converters with more than 1 tag that don't implement select tag
2 participants