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

Cleanup asdf.util #1688

Merged
merged 11 commits into from
Dec 5, 2023
Merged

Cleanup asdf.util #1688

merged 11 commits into from
Dec 5, 2023

Conversation

braingram
Copy link
Contributor

@braingram braingram commented Nov 16, 2023

Description

This PR starts the cleanup of the asdf api starting with the asdf.util submodule. This PR includes the following deprecations:

  • deprecate human_list (unused in downstream)
  • deprecate resolve_name and minversion (these are out-dated copies from astropy.utils, the one use in the asdf pytest plugin was replaced, these methods are unused in downstream)
  • deprecate iter_subclasses (unused in downstream, replaced with _iter_subclasses for internal uses)

The following were not listed in __all__ and are only used internally. Each was modified to be prefixed with an _ to make their private nature more explicit:

  • BinaryStruct
  • InheritDocstrings
  • patched_urllib_parse

One addition was made to the public api:

  • add get_file_type and FileType to __all__ (these are used by weldx and look generally useful for working with ASDF files as a way to check if a file is an ASDF file without some sort of try/except with asdf.open)

Once merged, tracking issues can be opened for the deprecations to plan for their removal in asdf 4.0.

Checklist:

  • pre-commit checks ran successfully
  • tests ran successfully
  • for a public change, a changelog entry was added
  • for a public change, documentation was updated
  • for any new features, unit tests were added

@braingram braingram changed the title Cleanup util Cleanup asdf.util Nov 16, 2023
@braingram braingram marked this pull request as ready for review November 16, 2023 19:43
@braingram braingram requested a review from a team as a code owner November 16, 2023 19:43
@braingram braingram force-pushed the cleanup_util branch 2 times, most recently from 2c4c883 to 024626b Compare November 16, 2023 22:13
@braingram braingram merged commit 0231fe2 into asdf-format:main Dec 5, 2023
44 checks passed
@braingram braingram mentioned this pull request Dec 5, 2023
4 tasks
@braingram braingram deleted the cleanup_util branch December 5, 2023 21:31
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.

2 participants