[pypy-commit] pypy default: Fix for 6dac6407412f. Very obscure.
arigo
noreply at buildbot.pypy.org
Wed Apr 16 10:33:16 CEST 2014
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r70648:a82950d1732e
Date: 2014-04-16 10:32 +0200
http://bitbucket.org/pypy/pypy/changeset/a82950d1732e/
Log: Fix for 6dac6407412f. Very obscure.
diff --git a/pypy/module/__pypy__/app_signal.py b/pypy/module/__pypy__/app_signal.py
--- a/pypy/module/__pypy__/app_signal.py
+++ b/pypy/module/__pypy__/app_signal.py
@@ -1,4 +1,9 @@
-import __pypy__.thread
+import thread
+# ^^ relative import of __pypy__.thread. Note that some tests depend on
+# this (test_enable_signals in test_signal.py) to work properly,
+# otherwise they get caught in some deadlock waiting for the import
+# lock...
+
class SignalsEnabled(object):
'''A context manager to use in non-main threads:
@@ -8,7 +13,7 @@
that is within a "with signals_enabled:". This other thread should be
ready to handle unexpected exceptions that the signal handler might
raise --- notably KeyboardInterrupt.'''
- __enter__ = __pypy__.thread._signals_enter
- __exit__ = __pypy__.thread._signals_exit
+ __enter__ = thread._signals_enter
+ __exit__ = thread._signals_exit
signals_enabled = SignalsEnabled()
More information about the pypy-commit
mailing list