Currently, launching Python without the _pyrepl module present causes it to abort. It would be better if it simply went into regular repl mode, rather than requiring the user to set an env var, as this would allow distributors to simply omit the module rather than having to patch and rebuild CPython.
|
PyObject *pyrepl = PyImport_ImportModule("_pyrepl.main"); |
|
if (pyrepl == NULL) { |
|
fprintf(stderr, "Could not import _pyrepl.main\n"); |
|
res = pymain_exit_err_print(); |
|
goto done; |
|
} |
I would prefer messages about ModuleNotFoundError here to only be shown in verbose mode, though other errors could still cause a full failure (if that's what the maintainers think is best... I disagree, but it's not important to me like ModuleNotFoundError would be).
Linked PRs
Currently, launching Python without the
_pyreplmodule present causes it to abort. It would be better if it simply went into regular repl mode, rather than requiring the user to set an env var, as this would allow distributors to simply omit the module rather than having to patch and rebuild CPython.cpython/Modules/main.c
Lines 281 to 286 in 175ab31
I would prefer messages about
ModuleNotFoundErrorhere to only be shown in verbose mode, though other errors could still cause a full failure (if that's what the maintainers think is best... I disagree, but it's not important to me likeModuleNotFoundErrorwould be).Linked PRs