asdf-format / asdf

ASDF (Advanced Scientific Data Format) is a next generation interchange format for scientific data
http://asdf.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
511 stars 56 forks source link

deprecate `AsdfSpec` and `format_tag` #1773

Closed braingram closed 2 months ago

braingram commented 3 months ago

AsdfSpec (based off of SimpleSpec from semantic_version) is effectively unused.

It is referenced once in format_tag: https://github.com/asdf-format/asdf/blob/aedf1563eeeb64eec61c860073e20e88ddb49d5c/asdf/testing/helpers.py#L20-L21 format_tag has only a single use in asdf: https://github.com/asdf-format/asdf/blob/aedf1563eeeb64eec61c860073e20e88ddb49d5c/asdf/_tests/test_schema.py#L841 where a spec is not provided.

The format_tag use can be replaced by an f-string.

One motivation for deprecating AsdfSpec is that it provides unexpected version comparisons: see #1772