Skip to content

Commit dc6035a

Browse files
committed
fix: replace tomllib with tomli for Python 3.10 compatibility in telemetry module
1 parent 57d8044 commit dc6035a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

MCPForUnity/UnityMcpServer~/src/telemetry.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from urllib.parse import urlparse
2525
import uuid
2626

27-
import tomllib
27+
import tomli
2828

2929
try:
3030
import httpx
@@ -39,9 +39,10 @@
3939
def get_package_version() -> str:
4040
"""
4141
Open pyproject.toml and parse version
42+
We use the tomli library instead of tomllib to support Python 3.10
4243
"""
4344
with open("pyproject.toml", "rb") as f:
44-
data = tomllib.load(f)
45+
data = tomli.load(f)
4546
return data["project"]["version"]
4647

4748

0 commit comments

Comments
 (0)