diff --git a/CHANGES.rst b/CHANGES.rst index 684cdf08..78be0595 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,8 @@ - add grating keyword to dark and superbias schemas [#317] +- remove uses of now unused ``ignore_version_mismatch`` [#313] + 2.0.0 (2024-06-24) =================== diff --git a/src/stdatamodels/fits_support.py b/src/stdatamodels/fits_support.py index 4b970175..18c17755 100644 --- a/src/stdatamodels/fits_support.py +++ b/src/stdatamodels/fits_support.py @@ -729,7 +729,6 @@ def from_fits(hdulist, schema, context, skip_fits_update=None, **kwargs): def from_fits_asdf(hdulist, - ignore_version_mismatch=True, ignore_unrecognized_tag=False, **kwargs): """ @@ -742,7 +741,6 @@ def from_fits_asdf(hdulist, except (KeyError, IndexError, AttributeError): # This means there is no ASDF extension return asdf.AsdfFile( - ignore_version_mismatch=ignore_version_mismatch, ignore_unrecognized_tag=ignore_unrecognized_tag, ) @@ -754,7 +752,6 @@ def from_fits_asdf(hdulist, } af = asdf.open( generic_file, - ignore_version_mismatch=ignore_version_mismatch, ignore_unrecognized_tag=ignore_unrecognized_tag, ignore_missing_extensions=ignore_missing_extensions, **akwargs diff --git a/src/stdatamodels/model_base.py b/src/stdatamodels/model_base.py index 787a726e..a231a7d9 100644 --- a/src/stdatamodels/model_base.py +++ b/src/stdatamodels/model_base.py @@ -556,7 +556,6 @@ def save(self, path, dir_path=None, *args, **kwargs): @staticmethod def open_asdf(init=None, - ignore_version_mismatch=True, ignore_unrecognized_tag=False, **kwargs): """ @@ -564,13 +563,11 @@ def open_asdf(init=None, """ if isinstance(init, str): asdffile = asdf.open(init, - ignore_version_mismatch=ignore_version_mismatch, ignore_unrecognized_tag=ignore_unrecognized_tag, **kwargs) else: asdffile = AsdfFile(init, - ignore_version_mismatch=ignore_version_mismatch, ignore_unrecognized_tag=ignore_unrecognized_tag ) return asdffile diff --git a/tests/test_models.py b/tests/test_models.py index c99e60eb..b766ea17 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -159,8 +159,7 @@ def test_initialize_arrays_with_arglist(): def test_open_asdf_model(tmp_path): # Open an empty asdf file, pass extra arguments - with DataModel(ignore_version_mismatch=False, ignore_unrecognized_tag=True) as model: - assert not model._asdf._ignore_version_mismatch + with DataModel(ignore_unrecognized_tag=True) as model: assert model._asdf._ignore_unrecognized_tag file_path = tmp_path/"test.asdf" @@ -168,8 +167,7 @@ def test_open_asdf_model(tmp_path): with asdf.AsdfFile() as af: af.write_to(file_path) - with DataModel(file_path, ignore_version_mismatch=False, ignore_unrecognized_tag=True) as model: - assert not model._asdf._ignore_version_mismatch + with DataModel(file_path, ignore_unrecognized_tag=True) as model: assert model._asdf._ignore_unrecognized_tag