Skip to content

Commit

Permalink
update warning message to mention alternatives
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram committed Feb 26, 2025
1 parent 33067b1 commit cc30426
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/stdatamodels/model_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1111,11 +1111,11 @@ def set_fits_wcs(self, wcs, hdu_name="SCI"):
# --------------------------------------------------------

def read(self, *args, **kwargs):
warnings.warn("read is deprecated and will be removed", DeprecationWarning, stacklevel=2)
warnings.warn("read is deprecated, use __init__ instead.", DeprecationWarning, stacklevel=2)
return self.__init__(*args, **kwargs)

def write(self, path, *args, **kwargs):
warnings.warn("write is deprecated and will be removed", DeprecationWarning, stacklevel=2)
warnings.warn("write is deprecated, use save instead.", DeprecationWarning, stacklevel=2)
self.save(path, *args, **kwargs)

def getarray_noinit(self, attribute):
Expand Down

0 comments on commit cc30426

Please sign in to comment.