Commits

Daniel Holth  committed 8e221b8

Fix pypy support by replacing "if 'unicode' in __builtins__"

  • Participants
  • Parent commits 9c27880

Comments (0)

Files changed (4)

+1.4.1
+=====
+- Fix pypy support by replacing "if 'unicode' in __builtins__"
+
 1.4
 ===
 - Tests all run under Python 3 (skipping doctest)

File cryptacular/core/__init__.py

 ]
 
 
-if 'unicode' in __builtins__: # pragma NO COVERAGE
+try:
+    unicode
     def check_unicode(text):
         if isinstance(text, unicode):
             text = text.encode('utf-8')
         if not isinstance(text, str):
             raise TypeError()
         return text
-else: # pragma NO COVERAGE
+except NameError:
     def check_unicode(text):
         # In Python3, PyArg_ParseTuple("ss") in the builtin crypt module
         # and our _bcrypt.c encodes unicode as utf-8, which falls short
 tests_require = ["nose", "coverage"]
 
 setup(name='cryptacular',
-      version='1.4',
+      version='1.4.1',
       description='A password hashing framework with bcrypt and pbkdf2.',
       long_description=README + '\n\n' +  CHANGES,
       classifiers=[
 [tox]
-envlist=py27,py32
+envlist=py27,py32,pypy
 [testenv]
 deps=nose
 	coverage