version info for notebook c jupyter development team distributed under the terms of the modified bsd license import re from collections import namedtuple use hatch version xx yy zz to handle version changes version 7 1 0a0 pep440 version parser versionregex re compile r pmajord pminord pmicrod preleaselevelabrc dev pseriald c jupyter development team distributed under the terms of the modified bsd license use hatch version xx yy zz to handle version changes pep440 version parser p major d p minor d p micro d p releaselevel a b rc dev p serial d type ignore union attr
import re
from collections import namedtuple


__version__ = "7.1.0a0"


_version_regex = re.compile(
    r,
    re.VERBOSE,
)

_version_fields = _version_regex.match(__version__).groupdict()  

VersionInfo = namedtuple("VersionInfo", ["major", "minor", "micro", "releaselevel", "serial"])

version_info = VersionInfo(
    *[
        field
        for field in (
            int(_version_fields["major"]),
            int(_version_fields["minor"]),
            int(_version_fields["micro"]),
            _version_fields["releaselevel"] or "",
            _version_fields["serial"] or "",
        )
    ]
)