diff --git a/astropy/io/fits/hdu/compressed.py b/astropy/io/fits/hdu/compressed.py index 50b2e9709b47..6c59d3ca8518 100644 --- a/astropy/io/fits/hdu/compressed.py +++ b/astropy/io/fits/hdu/compressed.py @@ -11,7 +11,6 @@ import numpy as np -from astropy.utils.exceptions import AstropyDeprecationWarning from astropy.io.fits import conf from astropy.io.fits._tiled_compression import compress_hdu, decompress_hdu from astropy.io.fits.card import Card @@ -26,7 +25,7 @@ _pseudo_zero, ) from astropy.utils import lazyproperty -from astropy.utils.exceptions import AstropyUserWarning +from astropy.utils.exceptions import AstropyDeprecationWarning, AstropyUserWarning from .base import BITPIX2DTYPE, DELAYED, DTYPE2BITPIX, ExtensionHDU from .image import ImageHDU @@ -1129,12 +1128,15 @@ def _update_header_data( ) if tile_size != original_tile_size: - warnings.warn(f"The tile size should be such that no tiles have " - f"fewer than 4 pixels. The tile size has " - f"automatically been changed from {original_tile_size} " - f"to {tile_size}, but in future this will raise an " - f"error and the correct tile size should be specified " - f"directly.", AstropyDeprecationWarning) + warnings.warn( + f"The tile size should be such that no tiles have " + f"fewer than 4 pixels. The tile size has " + f"automatically been changed from {original_tile_size} " + f"to {tile_size}, but in future this will raise an " + f"error and the correct tile size should be specified " + f"directly.", + AstropyDeprecationWarning, + ) # Set up locations for writing the next cards in the header. last_znaxis = "ZNAXIS"