Skip to content
This repository was archived by the owner on Jun 9, 2025. It is now read-only.

Commit 4ec4cd2

Browse files
committed
Fix Python 3.10
1 parent 656585d commit 4ec4cd2

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed

poetry.lock

Lines changed: 19 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ betterproto2 = { version = "^0.3.1", extras = ["grpc-async"] }
3232
ruff = "~0.9.3"
3333
jinja2 = ">=3.0.3"
3434
typing-extensions = "^4.7.1"
35+
strenum = [
36+
{version = "^0.4.15", python = "=3.10"},
37+
]
3538

3639
[tool.poetry.group.dev.dependencies]
3740
pre-commit = "^2.17.0"

src/betterproto2_compiler/settings.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
import sys
12
from dataclasses import dataclass
2-
from enum import StrEnum
3+
4+
if sys.version_info >= (3, 11):
5+
from enum import StrEnum
6+
else:
7+
from strenum import StrEnum
38

49

510
class ClientGeneration(StrEnum):

0 commit comments

Comments
 (0)