Skip to content

Commit

Permalink
fixup! Deprecate non-configurable access to dimension packers.
Browse files Browse the repository at this point in the history
  • Loading branch information
TallJimbo committed Apr 24, 2023
1 parent 5fb0611 commit 31bc19e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions python/lsst/daf/butler/core/dimensions/_coordinate.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,7 @@ def pack(self, name: str, *, returnMaxBits: Literal[True]) -> Tuple[int, int]:
def pack(self, name: str, *, returnMaxBits: Literal[False]) -> int:
...

# TODO: Remove this method and its overloads above on DM-38687.
@deprecated(
"Deprecated in favor of configurable dimension packers. Will be removed after v27.",
version="v26",
Expand Down
2 changes: 2 additions & 0 deletions python/lsst/daf/butler/core/dimensions/_packer.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ def unpack(self, packedId: int) -> DataCoordinate:
"""


# TODO: Remove this class on DM-38687.
@deprecated(
"Deprecated in favor of configurable dimension packers. Will be removed after v27.",
version="v26",
Expand Down Expand Up @@ -240,6 +241,7 @@ def __call__(self, universe: DimensionUniverse, fixed: DataCoordinate) -> Dimens
return self._cls(fixed, self._dimensions)


# TODO: Remove this class on DM-38687.
@deprecated(
"Deprecated in favor of configurable dimension packers. Will be removed after v27.",
version="v26",
Expand Down
1 change: 1 addition & 0 deletions python/lsst/daf/butler/core/dimensions/_universe.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ def sorted(self, elements: Iterable[Union[E, str]], *, reverse: bool = False) ->
# passed it was Dimensions; we know better.
return result # type: ignore

# TODO: Remove this method on DM-38687.
@deprecated(
"Deprecated in favor of configurable dimension packers. Will be removed after v27.",
version="v26",
Expand Down
2 changes: 2 additions & 0 deletions python/lsst/daf/butler/instrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

__all__ = ["ObservationDimensionPacker"]

# TODO: Remove this entire module on DM-38687.

from deprecated.sphinx import deprecated

Check warning on line 26 in python/lsst/daf/butler/instrument.py

View check run for this annotation

Codecov / codecov/patch

python/lsst/daf/butler/instrument.py#L26

Added line #L26 was not covered by tests
from lsst.daf.butler import DataCoordinate, DimensionGraph, DimensionPacker

Expand Down

0 comments on commit 31bc19e

Please sign in to comment.