1"""
2Get information about what a frame is currently doing. Typical usage:
3
4 import executing
5
6 node = executing.Source.executing(frame).node
7 # node will be an AST node or None
8"""
9
10from collections import namedtuple
11_VersionInfo = namedtuple('_VersionInfo', ('major', 'minor', 'micro'))
12from .executing import Source, Executing, only, NotOneValueFound, cache, future_flags
13
14from ._pytest_utils import is_pytest_compatible
15
16try:
17 from .version import __version__ # type: ignore[import]
18 if "dev" in __version__:
19 raise ValueError
20except Exception:
21 # version.py is auto-generated with the git tag when building
22 __version__ = "???"
23 __version_info__ = _VersionInfo(-1, -1, -1)
24else:
25 __version_info__ = _VersionInfo(*map(int, __version__.split('.')))
26
27
28__all__ = ["Source","is_pytest_compatible"]