Skip to content

Commit

Permalink
Deprecate Butler.collection_chains
Browse files Browse the repository at this point in the history
Now called collections
  • Loading branch information
timj committed Aug 16, 2024
1 parent c140084 commit 250c5dc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python/lsst/daf/butler/direct_butler/_direct_butler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 6 additions & 0 deletions python/lsst/daf/butler/remote_butler/_remote_butler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 250c5dc

Please sign in to comment.