diff options
Diffstat (limited to 'Lib/pkgutil.py')
-rw-r--r-- | Lib/pkgutil.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/pkgutil.py b/Lib/pkgutil.py index 81d418d..9d1879a 100644 --- a/Lib/pkgutil.py +++ b/Lib/pkgutil.py @@ -37,7 +37,10 @@ def read_code(stream): import marshal magic = stream.read(4) - if magic != importlib.util.MAGIC_NUMBER: + if (magic != importlib.util.MAGIC_NUMBER + # Issue #29537: handle issue27286 bytecode incompatibility + # See Lib/importlib/_bootstrap_external.py + and magic != importlib.util._BACKCOMPAT_MAGIC_NUMBER): return None stream.read(8) # Skip timestamp and size |