Coverage for python/lsst/utils/backtrace/__init__.py: 67%
12 statements
« prev ^ index » next coverage.py v6.4.4, created at 2022-09-11 01:01 -0700
« prev ^ index » next coverage.py v6.4.4, created at 2022-09-11 01:01 -0700
1# This file is part of utils.
2#
3# Developed for the LSST Data Management System.
4# This product includes software developed by the LSST Project
5# (https://www.lsst.org).
6# See the COPYRIGHT file at the top-level directory of this distribution
7# for details of code ownership.
8#
9# Use of this source code is governed by a 3-clause BSD-style
10# license that can be found in the LICENSE file.
11"""Temporary forwarding of backtrace to cpputils package."""
13__all__ = ["isEnabled"]
15from deprecated.sphinx import deprecated
17try:
18 # For now, ensure that backtrace has been imported if somebody
19 # is relying on it from a lsst.utils import. Treat it as an optional
20 # import.
21 import lsst.cpputils.backtrace
22except ImportError:
23 pass
25from .._forwarded import _REASON, _VERSION_REMOVED
28@deprecated(reason=_REASON, version=_VERSION_REMOVED, category=FutureWarning)
29def isEnabled() -> bool:
30 """Check that backtrace is enabled."""
31 from lsst.cpputils import backtrace
33 return backtrace.isEnabled()