diff --git a/python/lsst/daf/butler/direct_butler/_direct_butler.py b/python/lsst/daf/butler/direct_butler/_direct_butler.py index 2465a026ba..8a2f67212b 100644 --- a/python/lsst/daf/butler/direct_butler/_direct_butler.py +++ b/python/lsst/daf/butler/direct_butler/_direct_butler.py @@ -46,6 +46,7 @@ from collections.abc import Iterable, Iterator, MutableMapping, Sequence from typing import TYPE_CHECKING, Any, ClassVar, TextIO, cast +from deprecated.sphinx import deprecated from lsst.resources import ResourcePath, ResourcePathExpression from lsst.utils.introspection import get_class_of from lsst.utils.logging import VERBOSE, getLogger @@ -2149,6 +2150,11 @@ def validateConfiguration( raise ValidationError(";\n".join(messages)) @property + @deprecated( + "Please use 'collections' instead. collection_chains will be removed after v28.", + version="v28", + category=FutureWarning, + ) def collection_chains(self) -> DirectButlerCollections: """Object with methods for modifying collection chains.""" return DirectButlerCollections(self._registry) diff --git a/python/lsst/daf/butler/remote_butler/_remote_butler.py b/python/lsst/daf/butler/remote_butler/_remote_butler.py index fbabfd0f02..bc9d78b8dc 100644 --- a/python/lsst/daf/butler/remote_butler/_remote_butler.py +++ b/python/lsst/daf/butler/remote_butler/_remote_butler.py @@ -35,6 +35,7 @@ from dataclasses import dataclass from typing import TYPE_CHECKING, Any, TextIO, cast +from deprecated.sphinx import deprecated from lsst.daf.butler.datastores.file_datastore.retrieve_artifacts import ( determine_destination_for_retrieved_artifact, ) @@ -144,6 +145,11 @@ def isWriteable(self) -> bool: return False @property + @deprecated( + "Please use 'collections' instead. collection_chains will be removed after v28.", + version="v28", + category=FutureWarning, + ) def collection_chains(self) -> ButlerCollections: """Object with methods for modifying collection chains.""" from ._registry import RemoteButlerRegistry