diff options
author | Eli Collins <elic@assurancetechnologies.com> | 2020-10-06 14:30:03 -0400 |
---|---|---|
committer | Eli Collins <elic@assurancetechnologies.com> | 2020-10-06 14:30:03 -0400 |
commit | 72732cc46d29091118701392cd51c78675726ebf (patch) | |
tree | 5b36cae444dd6ba76e4602b3d808a6c2c283209e | |
parent | f108e0fc03eead818b0c80bde820ecc9393b29cb (diff) | |
download | passlib-72732cc46d29091118701392cd51c78675726ebf.tar.gz |
cleanup old python compat -- removed itervalues() wrapper
-rw-r--r-- | passlib/pwd.py | 4 | ||||
-rw-r--r-- | passlib/utils/compat/__init__.py | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/passlib/pwd.py b/passlib/pwd.py index 7fecdd6..3c45d8e 100644 --- a/passlib/pwd.py +++ b/passlib/pwd.py @@ -17,7 +17,7 @@ import os # site # pkg from passlib import exc -from passlib.utils.compat import itervalues, int_types +from passlib.utils.compat import int_types from passlib.utils import rng, getrandstr, to_unicode from passlib.utils.decor import memoized_property # local @@ -86,7 +86,7 @@ def _self_info_rate(source): values = counts.values() size = sum(values) else: - values = itervalues(counts) + values = counts.values() if not size: return 0 # NOTE: the following performs ``- sum(value / size * logf(value / size, 2) for value in values)``, diff --git a/passlib/utils/compat/__init__.py b/passlib/utils/compat/__init__.py index 679c680..9e23b48 100644 --- a/passlib/utils/compat/__init__.py +++ b/passlib/utils/compat/__init__.py @@ -61,7 +61,6 @@ __all__ = [ 'iter_byte_values', # iteration helpers - 'itervalues', 'next', # collections @@ -175,9 +174,6 @@ num_types = (int, float) #============================================================================= if True: # legacy PY3 indent - def itervalues(d): - return d.values() - def nextgetter(obj): return obj.__next__ |