Skip to content

Commit 458f857

Browse files
authored
Fix KeyError: 'name' in python/extractor/imp.py on Python 3.14
Follow-up to #20630 The fix didn't fully work since when we raise the ImportError in `find_module` we don't pass a named argument into the format string which causes a `KeyError`. We need to use a format string without named arguments, like Python 3.13 and earlier did.
1 parent 1c2d8bb commit 458f857

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/extractor/imp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from importlib._bootstrap import _ERR_MSG
2626
except ImportError:
2727
from importlib._bootstrap import _ERR_MSG_PREFIX
28-
_ERR_MSG = _ERR_MSG_PREFIX + '{name!r}'
28+
_ERR_MSG = _ERR_MSG_PREFIX + '{!r}'
2929

3030
from importlib import machinery
3131
from importlib import util

0 commit comments

Comments
 (0)