Author: Armin Rigo <[email protected]>
Branch:
Changeset: r1124:8fb5a8ea6de2
Date: 2013-02-07 19:58 +0100
http://bitbucket.org/cffi/cffi/changeset/8fb5a8ea6de2/
Log: Python 3 compat
diff --git a/cffi/api.py b/cffi/api.py
--- a/cffi/api.py
+++ b/cffi/api.py
@@ -7,6 +7,12 @@
from collections import Callable
callable = lambda x: isinstance(x, Callable)
+try:
+ basestring
+except NameError:
+ # Python 3.x
+ basestring = str
+
class FFIError(Exception):
pass
diff --git a/testing/test_zintegration.py b/testing/test_zintegration.py
--- a/testing/test_zintegration.py
+++ b/testing/test_zintegration.py
@@ -9,7 +9,7 @@
subprocess.check_call(['virtualenv', '--distribute',
'-p', sys.executable,
str(tmpdir)])
- except OSError, e:
+ except OSError as e:
py.test.skip("Cannot execute virtualenv: %s" % (e,))
site_packages = None
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit