Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite01c27e

Browse files
authored
Merge pull request#1176 from wookayin/py312-find-module
Fix PathFinder.find_module AttributeError for Python 3.12
2 parents57384b9 +afc201a commite01c27e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎pymode/__init__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66
importvim# noqa
77

88
ifnothasattr(vim,'find_module'):
9-
vim.find_module=_PathFinder.find_module
9+
try:
10+
vim.find_module=_PathFinder.find_module# deprecated
11+
exceptAttributeError:
12+
def_find_module(package_name):
13+
spec=_PathFinder.find_spec(package_name)
14+
returnspec.loaderifspecelseNone
15+
vim.find_module=_find_module
1016

1117

1218
defauto():

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp