Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions easybuild/tools/tomllib/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"""Compatibility module referring to the Python 3.11+ tomllib or an internal copy"""
import sys

if sys.version_info < (3, 11):
from .tomli import * # noqa
else:
from tomllib import * # noqa, pylint: disable=import-error
8 changes: 8 additions & 0 deletions easybuild/tools/tomllib/tomli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Tomllib

Vendored `tomli` from https://github.com/hukkin/tomli version 2.3.0.
PEP 680 added a version of it as `tomllib` to Python 3.11.

Patched to remove features not available in Python 3.6, mostly type hints.

Will be used on Python < 3.11 where `tomllib` isn't available yet.
8 changes: 8 additions & 0 deletions easybuild/tools/tomllib/tomli/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
# Licensed to PSF under a Contributor Agreement.

__all__ = ("loads", "load", "TOMLDecodeError")
__version__ = "2.3.0" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT

from ._parser import TOMLDecodeError, load, loads
Loading