[pypy-commit] pypy default: disable this safety check for Wing IDE, to make debugging less tedious
ctismer
noreply at buildbot.pypy.org
Tue Mar 13 06:51:02 CET 2012
Author: Christian Tismer <tismer at stackless.com>
Branch:
Changeset: r53416:27200ab07cc6
Date: 2012-03-12 22:50 -0700
http://bitbucket.org/pypy/pypy/changeset/27200ab07cc6/
Log: disable this safety check for Wing IDE, to make debugging less
tedious
diff --git a/pypy/annotation/model.py b/pypy/annotation/model.py
--- a/pypy/annotation/model.py
+++ b/pypy/annotation/model.py
@@ -786,12 +786,15 @@
#
# safety check that no-one is trying to make annotation and translation
# faster by providing the -O option to Python.
-try:
- assert False
-except AssertionError:
- pass # fine
-else:
- raise RuntimeError("The annotator relies on 'assert' statements from the\n"
+import os
+if "WINGDB_PYTHON" not in os.environ:
+ # ...but avoiding this boring check in the IDE
+ try:
+ assert False
+ except AssertionError:
+ pass # fine
+ else:
+ raise RuntimeError("The annotator relies on 'assert' statements from the\n"
"\tannotated program: you cannot run it with 'python -O'.")
# this has the side-effect of registering the unary and binary operations
More information about the pypy-commit
mailing list