Author: Matti Picus <[email protected]>
Branch: unicode-utf8-py3
Changeset: r94826:0727cbb8aadd
Date: 2018-07-07 21:16 -0700
http://bitbucket.org/pypy/pypy/changeset/0727cbb8aadd/
Log: provide a nicer error message if tests are run with python3
diff --git a/rpython/tool/leakfinder.py b/rpython/tool/leakfinder.py
--- a/rpython/tool/leakfinder.py
+++ b/rpython/tool/leakfinder.py
@@ -1,5 +1,10 @@
import sys, gc
-import cStringIO
+try:
+ import cStringIO
+except ImportError as e:
+ if sys.version_info.major > 2:
+ raise RuntimeError('use python 2 to run tests')
+ raise
import traceback
# Track allocations to detect memory leaks.
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit