Skip to content

Commit e3e08eb

Browse files
committed
Add tomli import to support python<3.11
1 parent 1fbd5d0 commit e3e08eb

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

babel_runner.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,15 @@
66
import subprocess
77
from pathlib import Path
88

9-
import tomllib
9+
try:
10+
import tomllib
11+
except ImportError:
12+
try:
13+
import tomli as tomllib
14+
except ImportError as ie:
15+
raise ImportError(
16+
"tomli or tomllib is required to parse pyproject.toml"
17+
) from ie
1018

1119
PROJECT_DIR = Path(__file__).resolve().parent
1220

requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# for babel_runner.py
2+
setuptools
3+
Babel
4+
Jinja2
5+
tomli; python_version < "3.10"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy