From 3d5e7cd1c15eb99c5735a87df48a69fe243fcea0 Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 7 Jun 2019 14:25:22 -0700 Subject: [PATCH] pylink-mkpasswd: use hash() instead of encrypt() - This function was renamed in Passlib 1.7, deprecating the old name. - Depend accordingly on Passlib >= 1.7.0 --- README.md | 2 +- pylink-mkpasswd | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 188265e..5748e47 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ If you are a developer and want to help make PyLink more portable, patches are w * Setuptools (`pip3 install setuptools`) * PyYAML (`pip3 install pyyaml`) * ircmatch (`pip3 install ircmatch`) - * *For hashed password support*: Passlib (`pip3 install passlib`) + * *For hashed password support*: Passlib >= 1.7.0 (`pip3 install passlib`) * *For better PID file tracking (i.e. removing stale PID files after a crash)*: psutil (`pip3 install psutil`) * *For the servprotect plugin*: cachetools (`pip3 install cachetools`) diff --git a/pylink-mkpasswd b/pylink-mkpasswd index f6ec18f..44b142e 100755 --- a/pylink-mkpasswd +++ b/pylink-mkpasswd @@ -23,4 +23,4 @@ if __name__ == '__main__': password = password.strip() assert password, "Password cannot be empty!" - print(pwd_context.encrypt(password)) + print(pwd_context.hash(password)) diff --git a/setup.py b/setup.py index e921c1d..fc59f73 100644 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ setup( install_requires=['pyyaml', 'ircmatch'], extras_require={ - 'password-hashing': ['passlib'], + 'password-hashing': ['passlib>=1.7.0'], 'cron-support': ['psutil'], 'servprotect': ['expiringdict>=1.1.4'], },