1. Python CFFI
  2. Untitled project
  3. cffi

Commits

Armin Rigo  committed 8fb5a8e

Python 3 compat

  • Participants
  • Parent commits ba9640d
  • Branches default

Comments (0)

Files changed (2)

File cffi/api.py

View file
  • Ignore whitespace
     from collections import Callable
     callable = lambda x: isinstance(x, Callable)
 
+try:
+    basestring
+except NameError:
+    # Python 3.x
+    basestring = str
+
 
 class FFIError(Exception):
     pass

File testing/test_zintegration.py

View file
  • Ignore whitespace
         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