Skip to content

Commit a55305e

Browse files
committed
new location of importlib Traversable
1 parent e39fe0a commit a55305e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tools/board_stubs/circuitpython_setboard/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@
1212
import shutil
1313
from collections import defaultdict
1414
from importlib import resources
15-
from importlib.abc import Traversable
15+
16+
try:
17+
from importlib.resources.abc import Traversable
18+
except ModuleNotFoundError:
19+
# 3.10 and earlier.
20+
from importlib.abc import Traversable
1621

1722

1823
def get_definitions_or_exit(board: str) -> Traversable:

0 commit comments

Comments
 (0)