Re: [Python-Dev] cpython: Issue #12550: regrtest displays the Python traceback on SIGALRM or SIGUSR1
Would it make sense to not propagate the signal in one case (e.g. SIGUSR1), i.e. just display the traceback in this case? Georg Am 13.07.2011 23:49, schrieb victor.stinner: > http://hg.python.org/cpython/rev/30f91fbfc8b3 > changeset: 71315:30f91fbfc8b3 > user:Victor Stinner > date:Wed Jul 13 23:47:21 2011 +0200 > summary: > Issue #12550: regrtest displays the Python traceback on SIGALRM or SIGUSR1 > > files: > Lib/test/regrtest.py | 12 +++- > 1 files changed, 11 insertions(+), 1 deletions(-) > > > diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py > --- a/Lib/test/regrtest.py > +++ b/Lib/test/regrtest.py > @@ -172,6 +172,7 @@ > import platform > import random > import re > +import signal > import sys > import sysconfig > import tempfile > @@ -266,9 +267,18 @@ > on the command line. > """ > > -# Display the Python traceback fatal errors (e.g. segfault) > +# Display the Python traceback on fatal errors (e.g. segfault) > faulthandler.enable(all_threads=True) > > +# Display the Python traceback on SIGALRM or SIGUSR1 signal > +signals = [] > +if hasattr(signal, 'SIGALRM'): > +signals.append(signal.SIGALRM) > +if hasattr(signal, 'SIGUSR1'): > +signals.append(signal.SIGUSR1) > +for signum in signals: > +faulthandler.register(signum, chain=True) > + > replace_stdout() > > support.record_original_stdout(sys.stdout) > > > > > ___ > Python-checkins mailing list > [email protected] > http://mail.python.org/mailman/listinfo/python-checkins ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] [Python-checkins] cpython (merge 3.2 -> default): Merge with 3.2.
Hi,
On 14/07/2011 15.57, ezio.melotti wrote:
http://hg.python.org/cpython/rev/ac1c3291a689
changeset: 71325:ac1c3291a689
parent: 71321:f45823977d4b
parent: 71324:530ba6c7e578
user:Ezio Melotti
date:Thu Jul 14 15:57:12 2011 +0300
summary:
Merge with 3.2.
files:
Lib/test/test_cgi.py | 8 +++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/Lib/test/test_cgi.py b/Lib/test/test_cgi.py
--- a/Lib/test/test_cgi.py
+++ b/Lib/test/test_cgi.py
@@ -155,7 +155,13 @@
cgi.logfp = None
cgi.logfile = "/dev/null"
cgi.initlog("%s", "Testing log 3")
-self.addCleanup(cgi.logfp.close)
+def log_cleanup():
+"""Restore the global state of the log vars."""
+cgi.logfile = ''
+cgi.logfp.close()
+cgi.logfp = None
+cgi.log = cgi.initlog
It was suggested (on #python-dev) to move this function to the cgi
module itself, but since I'm not familiar with it I just added it
here in order to fix a failure in the test.
The cgi module has two global vars (logfile and logfp) and a global
function (log) that is initialized to initlog and then reassigned to
either dolog or nolog (a dummy function that does nothing) in
initlog itself[0].
If someone thinks the log_cleanup function should be moved to the
cgi.py module and/or the code be refactored a bit, he can do it or
open an issue.
[0]: http://hg.python.org/cpython/file/ac1c3291a689/Lib/cgi.py#l50
Best Regards,
Ezio Melotti
+self.addCleanup(log_cleanup)
cgi.log("Testing log 4")
def test_fieldstorage_readline(self):
___
Python-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-checkins
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] PEP 3151 implementation
Hello, Just a quick note that I have a working PEP 3151 implementation at http://hg.python.org/features/pep-3151/, in named branch "pep-3151". The implementation is (should be) complete on the feature side, so you can play with it right now. It still lacks a deprecation mechanism for old names. It is tracked in http://bugs.python.org/issue12555. Regards Antoine. ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] [Python-checkins] cpython (3.1): Issue #12502: asyncore: fix polling loop with AF_UNIX sockets.
2011/7/14 charles-francois.natali : > http://hg.python.org/cpython/rev/42ec507815d2 > changeset: 71334:42ec507815d2 > branch: 3.1 > parent: 71126:0d4ca1e77205 > user: Charles-François Natali > date: Thu Jul 14 19:53:38 2011 +0200 > summary: > Issue #12502: asyncore: fix polling loop with AF_UNIX sockets. Please do not apply bugfixes to 3.1. -- Regards, Benjamin ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] error upon Mercurial commit
Hello, I just committed a patch, and got the following error: """ $ hg push pushing to ssh://[email protected]/cpython searching for changes remote: adding changesets remote: adding manifests remote: adding file changes remote: added 1 changesets with 2 changes to 2 files remote: change(s) NOT sent, something went wrong: remote: [Failure instance: Traceback from remote host -- Traceback unavailable remote: ] remote: sent email to roundup at [email protected] remote: notified [email protected] of incoming changeset ca077f2672e3 """ But the change seems to have been committed successfully. I get this on every branch. Am I the only one in this case? Any idea of what's going on here? ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] error upon Mercurial commit
Am 14.07.2011 20:05, schrieb Charles-François Natali: > Hello, > > I just committed a patch, and got the following error: > > """ > $ hg push > pushing to ssh://[email protected]/cpython > searching for changes > remote: adding changesets > remote: adding manifests > remote: adding file changes > remote: added 1 changesets with 2 changes to 2 files > remote: change(s) NOT sent, something went wrong: > remote: [Failure instance: Traceback from remote host -- Traceback unavailable > remote: ] > remote: sent email to roundup at [email protected] > remote: notified [email protected] of incoming changeset ca077f2672e3 > """ > > But the change seems to have been committed successfully. > I get this on every branch. > Am I the only one in this case? Any idea of what's going on here? That is just output from the buildbot hook. The changes have been pushed (not committed, that is done locally on your computer), just that hook failed to execute (I don't know why.) Georg ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] cpython: Issue #12550: regrtest displays the Python traceback on SIGALRM or SIGUSR1
Le 14/07/2011 13:33, Georg Brandl a écrit : Would it make sense to not propagate the signal in one case (e.g. SIGUSR1), i.e. just display the traceback in this case? I opened this issue for buildbots. If the test suite doesn't fail anymore because of a SIGALRM or SIGUSR1, we may miss a bug in a test, or a real bug in a module. I don't think that anyone will read the output of all builds. I patched faulthandler for this issue: I added a chain argument to faulthandler.register() to call also the previous signal handler. I prefer to call the original signal handler to not change the current behaviour of the test suite. Victor ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] [Python-checkins] cpython (merge 3.2 -> default): Merge with 3.2.
Done:
changeset: 71337:66e519792e4c
tag: tip
user:Victor Stinner
date:Thu Jul 14 22:28:36 2011 +0200
files: Lib/cgi.py Lib/test/test_cgi.py Misc/NEWS
description:
Add cgi.closelog() function to close the log file
Le 14/07/2011 14:57, Ezio Melotti a écrit :
diff --git a/Lib/test/test_cgi.py b/Lib/test/test_cgi.py
--- a/Lib/test/test_cgi.py
+++ b/Lib/test/test_cgi.py
@@ -155,7 +155,13 @@
cgi.logfp = None
cgi.logfile = "/dev/null"
cgi.initlog("%s", "Testing log 3")
-self.addCleanup(cgi.logfp.close)
+def log_cleanup():
+"""Restore the global state of the log vars."""
+cgi.logfile = ''
+cgi.logfp.close()
+cgi.logfp = None
+cgi.log = cgi.initlog
It was suggested (on #python-dev) to move this function to the cgi
module itself, but since I'm not familiar with it I just added it here
in order to fix a failure in the test.
The cgi module has two global vars (logfile and logfp) and a global
function (log) that is initialized to initlog and then reassigned to
either dolog or nolog (a dummy function that does nothing) in initlog
itself[0].
If someone thinks the log_cleanup function should be moved to the
cgi.py module and/or the code be refactored a bit, he can do it or
open an issue.
[0]: http://hg.python.org/cpython/file/ac1c3291a689/Lib/cgi.py#l50
Best Regards,
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
