Skip to content

Commit 3367c25

Browse files
committed
stop using passlib
passlib is unmaintained and has not had a release since 2020 a recent bcrypt release just broke passlib see pyca/bcrypt#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
1 parent 83a5250 commit 3367c25

File tree

4 files changed

+2
-5
lines changed

4 files changed

+2
-5
lines changed

integration/scripts/files/requirements/fedora-requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ python-keystoneclient>=2.0.0,!=2.1.0 # Apache-2.0
1111
kombu>=2.5.0
1212
babel>=1.3
1313
python-heatclient>=0.3.0
14-
passlib
1514
jinja2>=2.6
1615
PyMySQL>=0.6.2 # MIT License
1716
python-neutronclient>=2.3.11,<3

integration/scripts/files/requirements/ubuntu-requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ python-keystoneclient>=2.0.0,!=2.1.0 # Apache-2.0
1111
kombu>=2.5.0
1212
babel
1313
python-heatclient>=0.2.9
14-
passlib
1514
jinja2
1615
PyMySQL>=0.6.2 # MIT License
1716
python-neutronclient>=2.3.6,<3

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ sqlalchemy-migrate>=0.11.0 # Apache-2.0
1313
netaddr>=0.7.18 # BSD
1414
httplib2>=0.9.1 # MIT
1515
lxml!=3.7.0,>=3.4.1 # BSD
16-
passlib>=1.7.0 # BSD
1716
python-heatclient>=1.10.0 # Apache-2.0
1817
python-novaclient>=9.1.0 # Apache-2.0
1918
python-cinderclient>=3.3.0 # Apache-2.0

trove/common/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
from oslo_utils.encodeutils import safe_encode
3131
from oslo_utils import importutils
3232
from oslo_utils import strutils
33-
from passlib import pwd
3433

3534
from trove.common import cfg
35+
from trove.common import crypto_utils
3636
from trove.common import exception
3737
from trove.common.i18n import _
3838

@@ -298,7 +298,7 @@ def generate_random_password(password_length=None):
298298
password_length or
299299
cfg.get_configuration_property('default_password_length')
300300
)
301-
return pwd.genword(length=password_length)
301+
return crypto_utils.generate_random_key(length=password_length)
302302

303303

304304
def try_recover(func):

0 commit comments

Comments
 (0)