File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 22
33## [ Unreleased]
44
5+ - Remove unused pystac.validation import ([ #1583 ] ( https://github.com/stac-utils/pystac/pull/1583 ) )
6+
57## [ v1.14.1] - 2025-09-18
68
79### Fixed
Original file line number Diff line number Diff line change 8686from pystac .item_collection import ItemCollection
8787from pystac .provider import ProviderRole , Provider
8888from pystac .utils import HREF
89- import pystac .validation
9089
9190import pystac .extensions .hooks
9291import pystac .extensions .classification
@@ -239,3 +238,18 @@ def read_dict(
239238 if stac_io is None :
240239 stac_io = StacIO .default ()
241240 return stac_io .stac_object_from_dict (d , href , root )
241+
242+
243+ def __getattr__ (name : str ) -> Any :
244+ if name == "validation" :
245+ import warnings
246+ import pystac .validation
247+
248+ warnings .warn (
249+ "pystac.validation will not be automatically imported to the package in "
250+ "pystac v2.0. Instead, import it directly: `import pystac.validation`" ,
251+ DeprecationWarning ,
252+ stacklevel = 2 ,
253+ )
254+ return pystac .validation
255+ raise AttributeError (f"module '{ __name__ } ' has no attribute '{ name } '" )
You can’t perform that action at this time.
0 commit comments