Skip to content

Commit

Permalink
Add more ticket TODOs for deprecations.
Browse files Browse the repository at this point in the history
  • Loading branch information
TallJimbo authored and mfisherlevine committed Jul 24, 2023
1 parent 40a415b commit bdaf0dd
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 1 deletion.
4 changes: 4 additions & 0 deletions python/lsst/daf/butler/_butler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1109,6 +1109,7 @@ def _findDatasetRef(

return ref

# TODO: remove on DM-40067.
@transactional
@deprecated(
reason="Butler.put() now behaves like Butler.putDirect() when given a DatasetRef."
Expand Down Expand Up @@ -1204,6 +1205,7 @@ def put(

return ref

# TODO: remove on DM-40067.
@deprecated(
reason="Butler.get() now behaves like Butler.getDirect() when given a DatasetRef."
" Please use Butler.get(). Will be removed after v26.0.",
Expand Down Expand Up @@ -1240,6 +1242,7 @@ def getDirect(
"""
return self._datastore.get(ref, parameters=parameters, storageClass=storageClass)

# TODO: remove on DM-40067.
@deprecated(
reason="Butler.getDeferred() now behaves like getDirectDeferred() when given a DatasetRef. "
"Please use Butler.getDeferred(). Will be removed after v26.0.",
Expand Down Expand Up @@ -1739,6 +1742,7 @@ def _exists_many(

return existence

# TODO: remove on DM-40079.
@deprecated(
reason="Butler.datasetExists() has been replaced by Butler.exists(). Will be removed after v26.0.",
version="v26.0",
Expand Down
5 changes: 5 additions & 0 deletions python/lsst/daf/butler/_limited_butler.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def isWriteable(self) -> bool:
"""Return `True` if this `Butler` supports write operations."""
raise NotImplementedError()

# TODO: remove on DM-40067.
@deprecated(
reason="Butler.put() now behaves like Butler.putDirect() when given a DatasetRef."
" Please use Butler.put(). Will be removed after v26.0.",
Expand Down Expand Up @@ -164,6 +165,7 @@ def get(
log.debug("Butler get: %s, parameters=%s, storageClass: %s", ref, parameters, storageClass)
return self._datastore.get(ref, parameters=parameters, storageClass=storageClass)

# TODO: remove on DM-40067.
@deprecated(
reason="Butler.get() now behaves like Butler.getDirect() when given a DatasetRef."
" Please use Butler.get(). Will be removed after v26.0.",
Expand Down Expand Up @@ -200,6 +202,7 @@ def getDirect(
"""
return self._datastore.get(ref, parameters=parameters, storageClass=storageClass)

# TODO: remove on DM-40067.
@deprecated(
reason="Butler.getDeferred() now behaves like getDirectDeferred() when given a DatasetRef. "
"Please use Butler.getDeferred(). Will be removed after v26.0.",
Expand Down Expand Up @@ -443,6 +446,7 @@ def stored_many(
"""
return self._datastore.mexists(refs)

# TODO: remove on DM-40079.
@deprecated(
reason="Butler.datasetExistsDirect() has been replaced by Butler.stored(). "
"Will be removed after v26.0.",
Expand Down Expand Up @@ -542,6 +546,7 @@ def dimensions(self) -> DimensionUniverse:
"""
raise NotImplementedError()

# TODO: remove on DM-40080.
@property
@deprecated(
reason="The Butler.datastore property is now deprecated. Butler APIs should now exist with the "
Expand Down
2 changes: 2 additions & 0 deletions python/lsst/daf/butler/_quantum_backed.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ def isWriteable(self) -> bool:
# Docstring inherited.
return True

# TODO: remove on DM-40067.
@deprecated(
reason="Butler.get() now behaves like Butler.getDirect() when given a DatasetRef."
" Please use Butler.get(). Will be removed after v26.0.",
Expand Down Expand Up @@ -418,6 +419,7 @@ def get(
self._available_inputs.add(ref.id)
return obj

# TODO: remove on DM-40067.
@deprecated(
reason="Butler.getDeferred() now behaves like getDirectDeferred() when given a DatasetRef. "
"Please use Butler.getDeferred(). Will be removed after v26.0.",
Expand Down
4 changes: 3 additions & 1 deletion python/lsst/daf/butler/core/quantum.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,10 +392,12 @@ def from_simple(
required dimension has already been loaded. Otherwise the record
will be unpersisted from the SerializedQuatnum and added to the
reconstitutedDimensions dict (if not None). Defaults to None.
Deprecated, any argument will be ignored.
Deprecated, any argument will be ignored. Will be removed after
v26.
"""
initInputs: MutableMapping[DatasetType, DatasetRef] = {}
if reconstitutedDimensions is not None:
# TODO: remove this argument on DM-40150.
warnings.warn(
"The reconstitutedDimensions argument is now ignored and may be removed after v26",
category=FutureWarning,
Expand Down
1 change: 1 addition & 0 deletions python/lsst/daf/butler/instrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from lsst.daf.butler import DataCoordinate, DimensionGraph, DimensionPacker


# TODO: remove on DM-38687.
@deprecated(
"Deprecated in favor of configurable dimension packers. Will be removed after v26.",
version="v26",
Expand Down

0 comments on commit bdaf0dd

Please sign in to comment.