gh-151253: Dump the Python path configuration on _PyCodec_InitRegistry() failure#151250
Conversation
|
Example before the change: Example with the change: |
|
Before, init_fs_encoding() was the first function importing a module: if config_get_codec_name() fails, call _Py_DumpPathConfig(). commit f8290df changed Python startup to call _PyCodecRegistry_Init() at startup, before config_get_codec_name(). |
If "import encodings" fails at Python startup, dump the Python path configuration to help users debugging their configuration. The encodings module is the first module imported during Python startup.
ef03265 to
58eb3f2
Compare
|
|
|
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15. |
|
Sorry, @vstinner, I could not cleanly backport this to |
|
Sorry, @vstinner, I could not cleanly backport this to |
|
Sorry, @vstinner, I could not cleanly backport this to |
|
GH-151269 is a backport of this pull request to the 3.15 branch. |
…Registry() failure (#151250) (#151269) gh-151253: Dump the Python path configuration on _PyCodec_InitRegistry() failure (#151250) If "import encodings" fails at Python startup, dump the Python path configuration to help users debugging their configuration. The encodings module is the first module imported during Python startup. (cherry picked from commit 7b6e989)
…c_InitRegistry() failure (python#151250) (python#151269) pythongh-151253: Dump the Python path configuration on _PyCodec_InitRegistry() failure (python#151250) If "import encodings" fails at Python startup, dump the Python path configuration to help users debugging their configuration. The encodings module is the first module imported during Python startup. (cherry picked from commit 7b6e989) (cherry picked from commit 10f616c)
…c_InitRegistry() failure (#151250) (#151269) (#151283) [3.15] gh-151253: Dump the Python path configuration on _PyCodec_InitRegistry() failure (#151250) (#151269) gh-151253: Dump the Python path configuration on _PyCodec_InitRegistry() failure (#151250) If "import encodings" fails at Python startup, dump the Python path configuration to help users debugging their configuration. The encodings module is the first module imported during Python startup. (cherry picked from commit 7b6e989) (cherry picked from commit 10f616c)
…Registry() failure (#151250) (#151269) (#151283) (#151287) [3.14][3.15] gh-151253: Dump the Python path configuration on _PyCodec_InitRegistry() failure (#151250) (#151269) (#151283) [3.15] gh-151253: Dump the Python path configuration on _PyCodec_InitRegistry() failure (#151250) (#151269) gh-151253: Dump the Python path configuration on _PyCodec_InitRegistry() failure (#151250) If "import encodings" fails at Python startup, dump the Python path configuration to help users debugging their configuration. The encodings module is the first module imported during Python startup. (cherry picked from commit 7b6e989) (cherry picked from commit 10f616c) (cherry picked from commit b3a7758)
If "import encodings" fails, dump the Python path configuration to help users debugging their configuration. The encodings module (package) is the first module imported during Python startup.
import encodingsfails #151253