STINNER Victor victor.stin...@haypocalc.com added the comment:
Bug related to this issue: #8124, PySys_WriteStdout() and PySys_WriteStderr()
ignore signal handlers errors.
...
Leave this issue open until #8124 is fixed.
I fixed both issues, so it's time to close this one.
--
STINNER Victor victor.stin...@haypocalc.com added the comment:
Commited to trunk: r78826 + r78827
Partial backport to 2.6 as r79204: leave import site error handler unchanged
(print the error and continue). I don't want to change Python behaviour between
minor releases.
--
STINNER Victor victor.stin...@haypocalc.com added the comment:
Backported to py3k as r78872
And backported to 3.1 as r79247.
But py3k will require extra work: there are some PyErr_Clear() somewhere,
eating the errors.
Leave this issue open until #8124 is fixed.
--
STINNER Victor victor.stin...@haypocalc.com added the comment:
Backported to py3k as r78872
And backported to 3.1 as r79247.
I reverted the change on initsite(): as for Python 2.6, I don't want to change
import site error handler between minor releases.
--
STINNER Victor victor.stin...@haypocalc.com added the comment:
Commited to trunk: r78826
Backported to py3k as r78872. But py3k will require extra work: there are some
PyErr_Clear() somewhere, eating the errors.
--
___
Python tracker
STINNER Victor victor.stin...@haypocalc.com added the comment:
Bug related to this issue: #8124, PySys_WriteStdout() and PySys_WriteStderr()
ignore signal handlers errors.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3137
STINNER Victor victor.stin...@haypocalc.com added the comment:
Commited to trunk: r78826 + r78827. I will later backport to py3k.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3137
___
STINNER Victor victor.stin...@haypocalc.com added the comment:
My change about site initialization error raised 2 old issues: #7774 and #7880.
flox commited a fix for #7880 and a workaround for #7774 (just enough to fix
test_subprocess).
--
___
STINNER Victor victor.stin...@haypocalc.com added the comment:
PyImport_Import() clears errors if a module has no globals, whereas
PyEval_GetGlobals() doesn't set any exception on failure. =
import_no_global.patch removes this unnecessary PyErr_Clear().
--
STINNER Victor victor.stin...@haypocalc.com added the comment:
Py_InitializeEx() calls PyErr_Clear() if PyCodec_Encoder() fails without
checking for the exception type.
Attached initiliaze_pycodec_error.patch checks for error type: if the error is
not an LookupError, display the error and
STINNER Victor victor.stin...@haypocalc.com added the comment:
tok_stdin_decode() clears error without check for the type.
tokenizer_error.patch stops the tokenizer with an E_ERROR if the exception is
not an UnicodeDecodeError. Fix also err_input() to support E_ERROR: leave the
global
Changes by STINNER Victor victor.stin...@haypocalc.com:
Removed file: http://bugs.python.org/file16489/main_pending_calls.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3137
___
STINNER Victor victor.stin...@haypocalc.com added the comment:
Remove main_pending_calls.patch hack: replaced by tokenizer_error.patch.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3137
Changes by STINNER Victor victor.stin...@haypocalc.com:
Added file: http://bugs.python.org/file16493/import_no_global.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3137
___
STINNER Victor victor.stin...@haypocalc.com added the comment:
Remove main_pending_calls.patch hack: replaced by tokenizer_error.patch.
With extra tests, I realized that this patchs is still useful to process a
SIGINT emitted between Py_Initialize() and PyRun_AnyFileExFlags(). Without the
STINNER Victor victor.stin...@haypocalc.com added the comment:
SIGINT.patch is the sum of all patches, it should be easier to review it.
--
Added file: http://bugs.python.org/file16499/SIGINT.patch
___
Python tracker rep...@bugs.python.org
STINNER Victor victor.stin...@haypocalc.com added the comment:
As requested by Guido, here is a new patch including the fix for the site
module: catch errors in execsitecustomize() and execusercustomize().
--
Added file: http://bugs.python.org/file16501/SIGINT-2.patch
Changes by STINNER Victor victor.stin...@haypocalc.com:
Removed file: http://bugs.python.org/file16488/initsite.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3137
___
Changes by STINNER Victor victor.stin...@haypocalc.com:
Removed file: http://bugs.python.org/file16491/initiliaze_pycodec_error.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3137
___
Changes by STINNER Victor victor.stin...@haypocalc.com:
Removed file: http://bugs.python.org/file16492/tokenizer_error.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3137
___
Changes by STINNER Victor victor.stin...@haypocalc.com:
Removed file: http://bugs.python.org/file16493/import_no_global.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3137
___
Changes by STINNER Victor victor.stin...@haypocalc.com:
Removed file: http://bugs.python.org/file16494/main_pending_calls.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3137
___
Changes by STINNER Victor victor.stin...@haypocalc.com:
Removed file: http://bugs.python.org/file16499/SIGINT.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3137
___
STINNER Victor victor.stin...@haypocalc.com added the comment:
I think initsite() should be atomic: if any kind of error occurs, Python should
print it and exit directly (exit code 1 to notice the error). If initsite()
fails, Python is not complelty initialized.
site is responsible to
STINNER Victor victor.stin...@haypocalc.com added the comment:
Using valgrind --log-file=/tmp/trace ./python to slow down Python, I found
another bug in the interactive interpreter: if you press CTRL+c just after the
initialization of the site module the exception will be ignored.
When a
New submission from Geoffrey Bache [EMAIL PROTECTED]:
If a python script receives SIGINT while the interpreter is starting up,
it's possible to get the message import site failed; use -v for
traceback printed on standard error and for execution to proceed. It
also seems to be possible to get
Benjamin Peterson [EMAIL PROTECTED] added the comment:
Yes, the C startup code in pythonrun.c has a lot of bare-except statements.
--
nosy: +benjamin.peterson
type: - behavior
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3137
27 matches
Mail list logo