Skip to content

Commit 650ab2b

Browse files
committed
Ensure python 3.13 compatibility
1 parent 1802d6e commit 650ab2b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

plugin.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@
1111
else:
1212
import sys
1313

14-
prefix = __package__ + '.' # don't clear the base package
14+
try:
15+
prefix = __spec__.parent + '.'
16+
except Exception:
17+
prefix = __package__ + '.'
18+
1519
for module_name in [
1620
module_name for module_name in sys.modules
1721
if module_name.startswith(prefix) and module_name != __name__]:

0 commit comments

Comments
 (0)