commit: c1e015b65b74283a51893672739c5e4784b95273 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Thu Apr 25 12:30:53 2024 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Thu Apr 25 12:51:56 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1e015b6
dev-python/passlib: Fix warning with dev-python/bcrypt-4.1.1 Fix a warning due to `dev-python/bcrypt` removing `bcrypt.__about__`. Apparently this breaks random packages. Closes: https://bugs.gentoo.org/925289 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> dev-python/passlib/files/passlib-1.7.4-bcrypt-4.1.patch | 13 +++++++++++++ .../{passlib-1.7.4-r2.ebuild => passlib-1.7.4-r3.ebuild} | 10 +++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/dev-python/passlib/files/passlib-1.7.4-bcrypt-4.1.patch b/dev-python/passlib/files/passlib-1.7.4-bcrypt-4.1.patch new file mode 100644 index 000000000000..706ff73f3b5f --- /dev/null +++ b/dev-python/passlib/files/passlib-1.7.4-bcrypt-4.1.patch @@ -0,0 +1,13 @@ +diff --git a/passlib/handlers/bcrypt.py b/passlib/handlers/bcrypt.py +index b83b110..42dd019 100644 +--- a/passlib/handlers/bcrypt.py ++++ b/passlib/handlers/bcrypt.py +@@ -617,7 +617,7 @@ class _BcryptBackend(_BcryptCommon): + except ImportError: # pragma: no cover + return False + try: +- version = _bcrypt.__about__.__version__ ++ version = _bcrypt.__version__ + except: + log.warning("(trapped) error reading bcrypt version", exc_info=True) + version = '<unknown>' diff --git a/dev-python/passlib/passlib-1.7.4-r2.ebuild b/dev-python/passlib/passlib-1.7.4-r3.ebuild similarity index 82% rename from dev-python/passlib/passlib-1.7.4-r2.ebuild rename to dev-python/passlib/passlib-1.7.4-r3.ebuild index 708ef7f23b53..51d6fda8f495 100644 --- a/dev-python/passlib/passlib-1.7.4-r2.ebuild +++ b/dev-python/passlib/passlib-1.7.4-r3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -30,6 +30,14 @@ BDEPEND=" distutils_enable_tests pytest +src_prepare() { + # fix compatibility with >=dev-python/bcrypt-4.1 + # https://foss.heptapod.net/python-libs/passlib/-/issues/190 + sed -i -e '/bcrypt/s:__about__\.::' passlib/handlers/bcrypt.py || die + + distutils-r1_src_prepare +} + python_test() { local EPYTEST_DESELECT=( # broken all the time by new django releases
