From cc8585239b8b7210858d10d04f519c76316f09de Mon Sep 17 00:00:00 2001 From: Jim Bosch Date: Tue, 18 Jul 2023 11:04:27 -0400 Subject: [PATCH] Add more ticket TODOs for deprecations. --- python/lsst/daf/butler/_butler.py | 4 ++++ python/lsst/daf/butler/_limited_butler.py | 5 +++++ python/lsst/daf/butler/_quantum_backed.py | 2 ++ python/lsst/daf/butler/instrument.py | 1 + 4 files changed, 12 insertions(+) diff --git a/python/lsst/daf/butler/_butler.py b/python/lsst/daf/butler/_butler.py index b85ae5a9b1..8dd814b978 100644 --- a/python/lsst/daf/butler/_butler.py +++ b/python/lsst/daf/butler/_butler.py @@ -1101,6 +1101,7 @@ def _findDatasetRef( return ref + # TODO: remove on DM-40067. @transactional @deprecated( reason="Butler.put() now behaves like Butler.putDirect() when given a DatasetRef." @@ -1196,6 +1197,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.", @@ -1232,6 +1234,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.", @@ -1731,6 +1734,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", diff --git a/python/lsst/daf/butler/_limited_butler.py b/python/lsst/daf/butler/_limited_butler.py index 12697d777f..f04d92221f 100644 --- a/python/lsst/daf/butler/_limited_butler.py +++ b/python/lsst/daf/butler/_limited_butler.py @@ -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.", @@ -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.", @@ -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.", @@ -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.", @@ -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 " diff --git a/python/lsst/daf/butler/_quantum_backed.py b/python/lsst/daf/butler/_quantum_backed.py index 9f54f5cc56..dbdb331ebe 100644 --- a/python/lsst/daf/butler/_quantum_backed.py +++ b/python/lsst/daf/butler/_quantum_backed.py @@ -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.", @@ -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.", diff --git a/python/lsst/daf/butler/instrument.py b/python/lsst/daf/butler/instrument.py index 4a6b27d726..9c84b2b7fb 100644 --- a/python/lsst/daf/butler/instrument.py +++ b/python/lsst/daf/butler/instrument.py @@ -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",