diff options
author | Steve Dower <steve.dower@microsoft.com> | 2016-09-08 00:27:33 (GMT) |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2016-09-08 00:27:33 (GMT) |
commit | ef37dfcd841bc1565a3e40bbcd0f5354aa150965 (patch) | |
tree | 3084fb74962bd0adeee1ad2547e5b8ee0628125f | |
parent | 8195219acb242d8c1799102e21ce664d9ceac20d (diff) | |
download | cpython-ef37dfcd841bc1565a3e40bbcd0f5354aa150965.zip cpython-ef37dfcd841bc1565a3e40bbcd0f5354aa150965.tar.gz cpython-ef37dfcd841bc1565a3e40bbcd0f5354aa150965.tar.bz2 |
Issue #28005: Allow ImportErrors in encoding implementation to propagate.
-rw-r--r-- | Lib/encodings/__init__.py | 5 | ||||
-rw-r--r-- | Misc/NEWS | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/Lib/encodings/__init__.py b/Lib/encodings/__init__.py index ca07881..cf90568 100644 --- a/Lib/encodings/__init__.py +++ b/Lib/encodings/__init__.py @@ -98,8 +98,9 @@ def search_function(encoding): # module with side-effects that is not in the 'encodings' package. mod = __import__('encodings.' + modname, fromlist=_import_tail, level=0) - except ImportError: - pass + except ModuleNotFoundError as ex: + if ex.name != 'encodings.' + modname: + raise else: break else: @@ -99,6 +99,8 @@ Core and Builtins Library ------- +- Issue #28005: Allow ImportErrors in encoding implementation to propagate. + - Issue #27570: Avoid zero-length memcpy() etc calls with null source pointers in the "ctypes" and "array" modules. |