We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 29d7b4d commit bd6ceabCopy full SHA for bd6ceab
sdk/etrecord/_etrecord.py
@@ -7,7 +7,6 @@
7
import json
8
import pickle
9
from dataclasses import dataclass
10
-from enum import Enum
11
from typing import Dict, List, Optional, Union
12
from zipfile import BadZipFile, ZipFile
13
@@ -29,8 +28,18 @@
29
28
30
ProgramOutput = List[Value]
31
+try:
32
+ # breaking change introduced in python 3.11
33
+ # pyre-ignore
34
+ from enum import StrEnum
35
+except ImportError:
36
+ from enum import Enum
37
-class ETRecordReservedFileNames(str, Enum):
38
+ class StrEnum(str, Enum):
39
+ pass
40
+
41
42
+class ETRecordReservedFileNames(StrEnum):
43
ETRECORD_IDENTIFIER = "ETRECORD_V0"
44
EDGE_DIALECT_EXPORTED_PROGRAM = "edge_dialect_exported_program"
45
ET_DIALECT_GRAPH_MODULE = "et_dialect_graph_module"
0 commit comments