Skip to content

Commit ddd6d2f

Browse files
committed
Use tomli for Python < 3.11
1 parent 8d98703 commit ddd6d2f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

repo2docker/buildpacks/pyproject/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@
66

77
import os
88
import re
9-
import tomllib
109
from functools import lru_cache
1110

11+
try:
12+
import tomllib
13+
except ImportError:
14+
import tomli as tomllib
15+
1216
from ..conda import CondaBuildPack
1317

1418
VERSION_PAT = re.compile(r"\d+(\.\d+)*")

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def get_identifier(json):
6262
"toml",
6363
"traitlets",
6464
],
65-
python_requires=">=3.11",
65+
python_requires=">=3.9",
6666
author="Project Jupyter Contributors",
6767
author_email="[email protected]",
6868
url="https://repo2docker.readthedocs.io/en/latest/",

0 commit comments

Comments
 (0)