Issue #13722: Avoid silencing ImportErrors when initializing the codecs registry.
diff --git a/Misc/NEWS b/Misc/NEWS
index bf5efba..2d70565 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -450,6 +450,9 @@
 Library
 -------
 
+- Issue #13722: Avoid silencing ImportErrors when initializing the codecs
+  registry.
+
 - Issue #13781: Fix GzipFile bug that caused an exception to be raised when
   opening for writing using a fileobj returned by os.fdopen().
 
diff --git a/Python/codecs.c b/Python/codecs.c
index 9b0c4b2..607feea 100644
--- a/Python/codecs.c
+++ b/Python/codecs.c
@@ -1041,15 +1041,6 @@
 
     mod = PyImport_ImportModuleNoBlock("encodings");
     if (mod == NULL) {
-        if (PyErr_ExceptionMatches(PyExc_ImportError)) {
-            /* Ignore ImportErrors... this is done so that
-               distributions can disable the encodings package. Note
-               that other errors are not masked, e.g. SystemErrors
-               raised to inform the user of an error in the Python
-               configuration are still reported back to the user. */
-            PyErr_Clear();
-            return 0;
-        }
         return -1;
     }
     Py_DECREF(mod);