From 1a26df865c8b183b9a837d823fe36204322cab9a Mon Sep 17 00:00:00 2001 From: Unrud Date: Sat, 8 Sep 2018 14:42:19 +0200 Subject: [PATCH] passlib: use hash() instead of deprecated encrypt() --- radicale/auth/htpasswd.py | 2 +- radicale/tests/test_auth.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/radicale/auth/htpasswd.py b/radicale/auth/htpasswd.py index 3f1c7858..0d2ce164 100644 --- a/radicale/auth/htpasswd.py +++ b/radicale/auth/htpasswd.py @@ -57,7 +57,7 @@ class Auth(auth.BaseAuth): # A call to `encrypt` raises passlib.exc.MissingBackendError with a # good error message if bcrypt backend is not available. Trigger # this here. - bcrypt.encrypt("test-bcrypt-backend") + bcrypt.hash("test-bcrypt-backend") self.verify = functools.partial(self._bcrypt, bcrypt) elif self.encryption == "crypt": try: diff --git a/radicale/tests/test_auth.py b/radicale/tests/test_auth.py index 4aae5b78..a655b25a 100644 --- a/radicale/tests/test_auth.py +++ b/radicale/tests/test_auth.py @@ -106,7 +106,7 @@ class TestBaseAuthRequests(BaseTest): except ImportError: pytest.skip("passlib is not installed") try: - bcrypt.encrypt("test-bcrypt-backend") + bcrypt.hash("test-bcrypt-backend") except MissingBackendError: pytest.skip("bcrypt backend for passlib is not installed") self._test_htpasswd(