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
13try:
14 from .version import __version__ # type: ignore[import]
15 if "dev" in __version__:
16 raise ValueError
17except Exception:
18 # version.py is auto-generated with the git tag when building
19 __version__ = "???"
20 __version_info__ = _VersionInfo(-1, -1, -1)
21else:
22 __version_info__ = _VersionInfo(*map(int, __version__.split('.')))
23
24
25__all__ = ["Source"]