New submission from Antoine Pitrou <pit...@free.fr>: In _PyCodecRegistry_Init() (in Python/codecs.c), it is attempted to import the encodings module (so that the default search function gets registered) and failures get ignored following the same reasoning:
/* 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. */ However, it is unlikely for Python 3 to start up at all without an encodings package (we needs some codecs to initialize stdio). Also, I'm not sure what the point would be. Distributions can simply distribute a dummy encodings module if they really want to disable the default encodings. Not silencing the error would probably make it easier to diagnose early import issues. ---------- components: Interpreter Core messages: 150767 nosy: amaury.forgeotdarc, loewis, pitrou priority: low severity: normal status: open title: "distributions can disable the encodings package" versions: Python 3.3 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13722> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com