cpython: 2b2e7b39bb68 (original) (raw)
Mercurial > cpython
changeset 103269:2b2e7b39bb68
Issue #28005: Allow ImportErrors in encoding implementation to propagate. [#28005]
Steve Dower steve.dower@microsoft.com | |
---|---|
date | Wed, 07 Sep 2016 17:27:33 -0700 |
parents | 15d79fcaf98c |
children | fffa689ba0c4 e4faff120be2 |
files | Lib/encodings/__init__.py Misc/NEWS |
diffstat | 2 files changed, 5 insertions(+), 2 deletions(-)[+] [-] Lib/encodings/__init__.py 5 Misc/NEWS 2 |
line wrap: on
line diff
--- 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:[](#l1.7)
pass[](#l1.8)
except ModuleNotFoundError as ex:[](#l1.9)
if ex.name != 'encodings.' + modname:[](#l1.10)
else:raise[](#l1.11) else:[](#l1.12) break[](#l1.13)
--- a/Misc/NEWS +++ b/Misc/NEWS @@ -99,6 +99,8 @@ Core and Builtins Library ------- +- Issue #28005: Allow ImportErrors in encoding implementation to propagate. +