stop using passlib

passlib is unmaintained and has not had a release since 2020
a recent bcrypt release just broke passlib
see https://github.com/pyca/bcrypt/issues/684

trove's use of passlib is pretty tirval so this change
just removes it as a depency and delegate the random password
generation in trove.common.utils to the generate_random_key
function in the trove.common.crypto_utils module

Change-Id: I6b6c64147c627025d5f89db6032d1c54445df94f
This commit is contained in:
Sean Mooney 2024-03-26 14:44:17 +00:00
parent 83a525067d
commit 3367c25e77
4 changed files with 2 additions and 5 deletions

View File

@ -11,7 +11,6 @@ python-keystoneclient>=2.0.0,!=2.1.0 # Apache-2.0
kombu>=2.5.0 kombu>=2.5.0
babel>=1.3 babel>=1.3
python-heatclient>=0.3.0 python-heatclient>=0.3.0
passlib
jinja2>=2.6 jinja2>=2.6
PyMySQL>=0.6.2 # MIT License PyMySQL>=0.6.2 # MIT License
python-neutronclient>=2.3.11,<3 python-neutronclient>=2.3.11,<3

View File

@ -11,7 +11,6 @@ python-keystoneclient>=2.0.0,!=2.1.0 # Apache-2.0
kombu>=2.5.0 kombu>=2.5.0
babel babel
python-heatclient>=0.2.9 python-heatclient>=0.2.9
passlib
jinja2 jinja2
PyMySQL>=0.6.2 # MIT License PyMySQL>=0.6.2 # MIT License
python-neutronclient>=2.3.6,<3 python-neutronclient>=2.3.6,<3

View File

@ -13,7 +13,6 @@ sqlalchemy-migrate>=0.11.0 # Apache-2.0
netaddr>=0.7.18 # BSD netaddr>=0.7.18 # BSD
httplib2>=0.9.1 # MIT httplib2>=0.9.1 # MIT
lxml!=3.7.0,>=3.4.1 # BSD lxml!=3.7.0,>=3.4.1 # BSD
passlib>=1.7.0 # BSD
python-heatclient>=1.10.0 # Apache-2.0 python-heatclient>=1.10.0 # Apache-2.0
python-novaclient>=9.1.0 # Apache-2.0 python-novaclient>=9.1.0 # Apache-2.0
python-cinderclient>=3.3.0 # Apache-2.0 python-cinderclient>=3.3.0 # Apache-2.0

View File

@ -30,9 +30,9 @@ from oslo_service import loopingcall
from oslo_utils.encodeutils import safe_encode from oslo_utils.encodeutils import safe_encode
from oslo_utils import importutils from oslo_utils import importutils
from oslo_utils import strutils from oslo_utils import strutils
from passlib import pwd
from trove.common import cfg from trove.common import cfg
from trove.common import crypto_utils
from trove.common import exception from trove.common import exception
from trove.common.i18n import _ from trove.common.i18n import _
@ -298,7 +298,7 @@ def generate_random_password(password_length=None):
password_length or password_length or
cfg.get_configuration_property('default_password_length') cfg.get_configuration_property('default_password_length')
) )
return pwd.genword(length=password_length) return crypto_utils.generate_random_key(length=password_length)
def try_recover(func): def try_recover(func):