summaryrefslogtreecommitdiff
path: root/passlib/ext
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2012-01-18 17:51:32 -0500
committerEli Collins <elic@assurancetechnologies.com>2012-01-18 17:51:32 -0500
commit666aa14bf15ed898472463d2ec890de0b8c60923 (patch)
treef4ad79fb817cdca19e64dbb1abfe86c1a2c8ffc1 /passlib/ext
parentb6d904be92c77bce061c78034145958401bba381 (diff)
downloadpasslib-666aa14bf15ed898472463d2ec890de0b8c60923.tar.gz
import cleanups
* moved bytes compat functions from utils to utils.compat (bord, bjoin, bjoin_ints, bjoin_elems, ujoin) * renamed bord -> belem_ord for clarify * a bunch of to_native_str() always use ascii, and have fixed input types (always bytes or always unicode). these don't need overhead of to_native_str(), so replaced those calls with two new funcs: compat.bascii_to_str() / compat.uascii_to_str() * cleaned up a lot of imports from utils/utils.compat to pull from correct module * simplified the to_string() logic of a bunch of handlers to reduce unicode<->byte transitions
Diffstat (limited to 'passlib/ext')
-rw-r--r--passlib/ext/django/models.py4
-rw-r--r--passlib/ext/django/utils.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/passlib/ext/django/models.py b/passlib/ext/django/models.py
index b86a796..9ae17b7 100644
--- a/passlib/ext/django/models.py
+++ b/passlib/ext/django/models.py
@@ -15,8 +15,8 @@ see the Passlib documentation for details on how to use this app
from django.conf import settings
#pkg
from passlib.context import CryptContext, CryptPolicy
-from passlib.utils import is_crypt_context, bytes
-from passlib.utils.compat import sb_types, unicode
+from passlib.utils import is_crypt_context
+from passlib.utils.compat import bytes, sb_types, unicode
from passlib.ext.django.utils import DEFAULT_CTX, get_category, \
set_django_password_context
diff --git a/passlib/ext/django/utils.py b/passlib/ext/django/utils.py
index dbd3581..fc7c713 100644
--- a/passlib/ext/django/utils.py
+++ b/passlib/ext/django/utils.py
@@ -12,8 +12,8 @@
#site
from warnings import warn
#pkg
-from passlib.utils import is_crypt_context, bytes
-from passlib.utils.compat import get_method_function as um
+from passlib.utils import is_crypt_context
+from passlib.utils.compat import bytes, get_method_function as um
#local
__all__ = [
"get_category",