_version.py 535 B

12345678910111213141516171819
  1. # Copyright (c) Jupyter Development Team.
  2. # Distributed under the terms of the Modified BSD License.
  3. """
  4. store the current version info of the server.
  5. """
  6. import re
  7. __version__ = "2.28.0"
  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. assert match is not None
  12. parts: list = [int(match[part]) for part in ["major", "minor", "patch"]]
  13. if match["rest"]:
  14. parts.append(match["rest"])
  15. version_info = tuple(parts)