Skip to content

Commit 6758148

Browse files
authored
Merge pull request #176 from lsst/tickets/DM-40032
DM-40032: Add stacklevel parameter to the warnings
2 parents 411fad2 + 6fb36c3 commit 6758148

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

python/lsst/ap/association/diaForcedSource.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ def run(self,
135135
warnings.warn(
136136
"'expIdBits' argument is deprecated in favor of 'idGenerator'; will be removed after v26.",
137137
category=FutureWarning,
138+
stacklevel=3, # Caller + timeMethod
138139
)
139140

140141
if idGenerator is None:

python/lsst/ap/association/packageAlerts.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ def run(self,
119119
warnings.warn(
120120
"The 'ccdExposureIdBits' argument is deprecated and unused; it will be removed after v26.",
121121
category=FutureWarning,
122+
stacklevel=3, # Caller + timeMethod
122123
)
123124
alerts = []
124125
self._patchDiaSources(diaSourceCat)

0 commit comments

Comments
 (0)