Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/importlib/_bootstrap_external.py
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@ def get_filename(self, fullname):

def get_data(self, path):
"""Return the data from path as raw bytes."""
if isinstance(self, (SourceLoader, ExtensionFileLoader)):
if isinstance(self, (SourceLoader, SourcelessFileLoader, ExtensionFileLoader)):
with _io.open_code(str(path)) as file:
return file.read()
else:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fixes :cve:`2026-2297` by ensuring that ``SourcelessFileLoader`` uses
:func:`io.open_code` when opening ``.pyc`` files.
Loading
Loading