compat.py 301 B

12345678910111213141516171819
  1. # SPDX-License-Identifier: AGPL-3.0-or-later
  2. """Compatibility with older versions"""
  3. # pylint: disable=unused-import
  4. __all__ = [
  5. "tomllib",
  6. ]
  7. import sys
  8. # TOML (lib) compatibility
  9. # ------------------------
  10. if sys.version_info >= (3, 11):
  11. import tomllib
  12. else:
  13. import tomli as tomllib