summaryrefslogtreecommitdiff
path: root/admin
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2016-11-28 13:05:30 -0500
committerEli Collins <elic@assurancetechnologies.com>2016-11-28 13:05:30 -0500
commit2b4b86a81a5b9845a92fab89e804d428a3d6da99 (patch)
treef79b2dedd8e943e4f1f14d418e110a0f8892ffed /admin
parent59a6a2bdc1ff24abacdca74967ebd75a23aa9fc2 (diff)
downloadpasslib-2b4b86a81a5b9845a92fab89e804d428a3d6da99.tar.gz
general: went ahead and removed a bunch of deprecated features that were scheduled
for removal in v1.8. this removes CryptPolicy, unix_fallback, some old HtpasswdFile methods, and more. tests were updated as well. see history/1.8 for a complete list.
Diffstat (limited to 'admin')
-rw-r--r--admin/benchmarks.py23
1 files changed, 5 insertions, 18 deletions
diff --git a/admin/benchmarks.py b/admin/benchmarks.py
index fb02b39..f664cea 100644
--- a/admin/benchmarks.py
+++ b/admin/benchmarks.py
@@ -90,10 +90,6 @@ class benchmark:
sample_config_1p = os.path.join(root, "passlib", "tests", "sample_config_1s.cfg")
from passlib.context import CryptContext
-if hasattr(CryptContext, "from_path"):
- CryptPolicy = None
-else:
- from passlib.context import CryptPolicy
class BlankHandler(uh.HasRounds, uh.HasSalt, uh.GenericHandler):
name = "blank"
@@ -133,12 +129,8 @@ OTHER = u("setecastronomy")
def test_context_from_path():
"""test speed of CryptContext.from_path()"""
path = sample_config_1p
- if CryptPolicy:
- def helper():
- CryptPolicy.from_path(path)
- else:
- def helper():
- CryptContext.from_path(path)
+ def helper():
+ CryptContext.from_path(path)
return helper
@benchmark.constructor()
@@ -150,14 +142,9 @@ def test_context_update():
deprecated = [ "des_crypt" ],
sha512_crypt__min_rounds=4000,
)
- if CryptPolicy:
- policy=CryptPolicy.from_path(sample_config_1p)
- def helper():
- policy.replace(**kwds)
- else:
- ctx = CryptContext.from_path(sample_config_1p)
- def helper():
- ctx.copy(**kwds)
+ ctx = CryptContext.from_path(sample_config_1p)
+ def helper():
+ ctx.copy(**kwds)
return helper
@benchmark.constructor()