Skip to content

Commit

Permalink
Merge pull request #371 from lsst/tickets/DM-29509
Browse files Browse the repository at this point in the history
DM-29509: Fix usage of deprecated message
  • Loading branch information
timj committed Mar 30, 2021
2 parents 154d855 + 5cdc634 commit 873c13b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion python/lsst/obs/base/_fitsRawFormatterBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@ def _createSkyWcsFromMetadata(self):
return None

# TODO: remove in DM-27177
@deprecated(reason="Replaced with makeFilterLabel. Will be removed after v22.", category=FutureWarning)
@deprecated(reason="Replaced with makeFilterLabel. Will be removed after v22.",
version="v22", category=FutureWarning)
def makeFilter(self):
"""Construct a Filter from metadata.
Expand Down
2 changes: 1 addition & 1 deletion python/lsst/obs/base/cameraMapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ def getVisitInfo(datasetType, pythonType, location, dataId):

# TODO: remove in DM-27177
@deprecated(reason="Replaced with getFilterLabel. Will be removed after v22.",
category=FutureWarning)
category=FutureWarning, version="v22")
def getFilter(datasetType, pythonType, location, dataId):
fitsReader = afwImage.ExposureFitsReader(location.getLocationsWithRoot()[0])
return fitsReader.readFilter()
Expand Down
6 changes: 3 additions & 3 deletions python/lsst/obs/base/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def defineFilters(self):
"""
if self._defined is None:
with warnings.catch_warnings():
# surpress Filter warnings; we already know this is deprecated
# suppress Filter warnings; we already know this is deprecated
warnings.simplefilter('ignore', category=FutureWarning)
self.reset()
for filter in self._filters:
Expand All @@ -103,7 +103,7 @@ def reset(cls):
Use this in unittests that define different filters.
"""
with warnings.catch_warnings():
# surpress Filter warnings; we already know this is deprecated
# suppress Filter warnings; we already know this is deprecated
warnings.simplefilter('ignore', category=FutureWarning)
lsst.afw.image.utils.resetFilters()
cls._defined = None
Expand Down Expand Up @@ -271,7 +271,7 @@ def defineFilter(self):
aliases.difference_update(current_names)

with warnings.catch_warnings():
# surpress Filter warnings; we already know this is deprecated
# suppress Filter warnings; we already know this is deprecated
warnings.simplefilter('ignore', category=FutureWarning)
lsst.afw.image.utils.defineFilter(name,
lambdaEff=self.lambdaEff,
Expand Down

0 comments on commit 873c13b

Please sign in to comment.