Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite3e08eb

Browse files
committed
Add tomli import to support python<3.11
1 parent1fbd5d0 commite3e08eb

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
importsubprocess
77
frompathlibimportPath
88

9-
importtomllib
9+
try:
10+
importtomllib
11+
exceptImportError:
12+
try:
13+
importtomliastomllib
14+
exceptImportErrorasie:
15+
raiseImportError(
16+
"tomli or tomllib is required to parse pyproject.toml"
17+
)fromie
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)

[8]ページ先頭

©2009-2025 Movatter.jp