Daniel Holth avatar Daniel Holth committed 8e221b8

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

Comments (0)

Files changed (4)

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


-if 'unicode' in __builtins__: # pragma NO COVERAGE
+    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"]
-      version='1.4',
+      version='1.4.1',
       description='A password hashing framework with bcrypt and pbkdf2.',
       long_description=README + '\n\n' +  CHANGES,
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.