mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Merge pull request #20630 from github/tausbn/python-fix-importerror-in-imp
Python: Fix `ImportError` in `imp.py` under Python 3.14
This commit is contained in:
@@ -17,9 +17,16 @@ except ImportError:
|
||||
# Platform doesn't support dynamic loading.
|
||||
create_dynamic = None
|
||||
|
||||
from importlib._bootstrap import _ERR_MSG, _exec, _load, _builtin_from_name
|
||||
from importlib._bootstrap import _exec, _load, _builtin_from_name
|
||||
from importlib._bootstrap_external import SourcelessFileLoader
|
||||
|
||||
# In Python 3.14, `_ERR_MSG` was removed in favor of `_ERR_MSG_PREFIX`.
|
||||
try:
|
||||
from importlib._bootstrap import _ERR_MSG
|
||||
except ImportError:
|
||||
from importlib._bootstrap import _ERR_MSG_PREFIX
|
||||
_ERR_MSG = _ERR_MSG_PREFIX + '{name!r}'
|
||||
|
||||
from importlib import machinery
|
||||
from importlib import util
|
||||
import importlib
|
||||
|
||||
@@ -10,7 +10,7 @@ from io import BytesIO
|
||||
|
||||
#Semantic version of extractor.
|
||||
#Update this if any changes are made
|
||||
VERSION = "7.1.4"
|
||||
VERSION = "7.1.5"
|
||||
|
||||
PY_EXTENSIONS = ".py", ".pyw"
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
category: fix
|
||||
---
|
||||
* The Python extractor no longer crashes with an `ImportError` when run using Python 3.14.
|
||||
Reference in New Issue
Block a user