Skip to content

Commit

Permalink
Deprecate RFC-834 transition helpers.
Browse files Browse the repository at this point in the history
  • Loading branch information
TallJimbo committed Jul 25, 2024
1 parent 6c802e8 commit edc973f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions python/lsst/daf/butler/dimensions/_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
from typing import TYPE_CHECKING, Any, TypeAlias

import pydantic
from deprecated.sphinx import deprecated
from lsst.utils.classes import cached_getter, immutable
from pydantic_core import core_schema

Expand Down Expand Up @@ -101,7 +102,13 @@ def as_tuple(self) -> tuple[str, ...]:
"""
return self._seq

# TODO: remove on DM-45185
@property
@deprecated(
"Deprecated in favor of direct iteration over the parent set. Will be removed after v28.",
version="v28",
category=FutureWarning,
)
def names(self) -> Set[str]:
"""An alias to ``self``.
Expand Down Expand Up @@ -265,6 +272,12 @@ def __str__(self) -> str:
def __repr__(self) -> str:
return f"DimensionGroup({self.names})"

# TODO: remove on DM-45185
@deprecated(
"Deprecated as no longer necessary (this method always returns 'self'). Will be removed after v28.",
version="v28",
category=FutureWarning,
)
def as_group(self) -> DimensionGroup:
"""Return ``self``.
Expand Down

0 comments on commit edc973f

Please sign in to comment.