Skip to content

Commit b2f46ea

Browse files
committed
Include tomli 2.3.0
Can be imported as `easybuild.tools.tomllib` and will use the official `tomllib` package on Python 3.11.
1 parent 889a06b commit b2f46ea

File tree

7 files changed

+945
-0
lines changed

7 files changed

+945
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
"""Compatibility module referring to the Python 3.11+ tomllib or an internal copy"""
2+
import sys
3+
4+
if sys.version_info < (3, 11):
5+
from .tomli import * # noqa
6+
else:
7+
from tomllib import * # noqa, pylint: disable=import-error
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# SPDX-License-Identifier: MIT
2+
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
3+
# Licensed to PSF under a Contributor Agreement.
4+
5+
__all__ = ("loads", "load", "TOMLDecodeError")
6+
__version__ = "2.3.0" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT
7+
8+
from ._parser import TOMLDecodeError, load, loads

0 commit comments

Comments
 (0)