Debian Codegraph @

jupyter_client/_version.py

raw
1 """The version information for jupyter client."""
2
3 import re
4 from typing import Union
5
6 __version__ = "8.8.0"
7
8 # Build up version_info tuple for backwards compatibility
9 pattern = r"(?P<major>\d+).(?P<minor>\d+).(?P<patch>\d+)(?P<rest>.*)"
10 match = re.match(pattern, __version__)
11 if match:
12 parts: list[Union[int, str]] = [int(match[part]) for part in ["major", "minor", "patch"]]
13 if match["rest"]:
14 parts.append(match["rest"])
15 else:
16 parts = []
17 version_info = tuple(parts)
18
19
20 protocol_version_info = (5, 4)
21 protocol_version = "%i.%i" % protocol_version_info