diff options
Diffstat (limited to 'passlib/registry.py')
-rw-r--r-- | passlib/registry.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/passlib/registry.py b/passlib/registry.py index 9964b25..3d2976b 100644 --- a/passlib/registry.py +++ b/passlib/registry.py @@ -14,7 +14,6 @@ from passlib.utils import ( is_crypt_handler, has_crypt as os_crypt_present, unix_crypt_schemes as os_crypt_schemes, ) -from passlib.utils.compat import unicode_or_str from passlib.utils.decor import memoize_single_value # local __all__ = [ @@ -162,7 +161,6 @@ _locations = dict( sha512_crypt = "passlib.handlers.sha2_crypt", sun_md5_crypt = "passlib.handlers.sun_md5_crypt", unix_disabled = "passlib.handlers.misc", - unix_fallback = "passlib.handlers.misc", ) # master regexp for detecting valid handler names @@ -324,7 +322,7 @@ def get_crypt_handler(name, default=_UNSET): pass # normalize name (and if changed, check dict again) - assert isinstance(name, unicode_or_str), "name must be string instance" + assert isinstance(name, str), "name must be string instance" alt = name.replace("-","_").lower() if alt != name: warn("handler names should be lower-case, and use underscores instead " @@ -435,10 +433,10 @@ def _resolve(hasher, param="value"): """ if is_crypt_handler(hasher): return hasher - elif isinstance(hasher, unicode_or_str): + elif isinstance(hasher, str): return get_crypt_handler(hasher) else: - raise exc.ExpectedTypeError(hasher, unicode_or_str, param) + raise exc.ExpectedTypeError(hasher, str, param) #: backend aliases |