py-passlib: Access actual bcrypt version Recent bcrypt package no longer has __about__ field, the version is directly under __version__. Noticed via: python3 -c 'import passlib.apache' PKGREVISION++diff -r1.10 -r1.11 pkgsrc/security/py-passlib/Makefile
(leot)
@@ -1,17 +1,17 @@ | @@ -1,17 +1,17 @@ | |||
1 | # $NetBSD: Makefile,v 1.10 2022/01/04 20:54:43 wiz Exp $ | 1 | # $NetBSD: Makefile,v 1.11 2024/01/01 16:19:57 leot Exp $ | |
2 | 2 | |||
3 | DISTNAME= passlib-1.7.4 | 3 | DISTNAME= passlib-1.7.4 | |
4 | PKGNAME= ${PYPKGPREFIX}-${DISTNAME} | 4 | PKGNAME= ${PYPKGPREFIX}-${DISTNAME} | |
5 | PKGREVISION= 1 | 5 | PKGREVISION= 2 | |
6 | CATEGORIES= security python | 6 | CATEGORIES= security python | |
7 | MASTER_SITES= ${MASTER_SITE_PYPI:=p/passlib/} | 7 | MASTER_SITES= ${MASTER_SITE_PYPI:=p/passlib/} | |
8 | 8 | |||
9 | MAINTAINER= kleink@NetBSD.org | 9 | MAINTAINER= kleink@NetBSD.org | |
10 | HOMEPAGE= https://passlib.readthedocs.io/ | 10 | HOMEPAGE= https://passlib.readthedocs.io/ | |
11 | COMMENT= Comprehensive password hashing framework supporting over 30 schemes | 11 | COMMENT= Comprehensive password hashing framework supporting over 30 schemes | |
12 | LICENSE= modified-bsd | 12 | LICENSE= modified-bsd | |
13 | 13 | |||
14 | USE_LANGUAGES= # none | 14 | USE_LANGUAGES= # none | |
15 | 15 | |||
16 | .include "../../lang/python/egg.mk" | 16 | .include "../../lang/python/egg.mk" | |
17 | .include "../../mk/bsd.pkg.mk" | 17 | .include "../../mk/bsd.pkg.mk" |
@@ -1,5 +1,6 @@ | @@ -1,5 +1,6 @@ | |||
1 | $NetBSD: distinfo,v 1.9 2021/10/26 11:17:48 nia Exp $ | 1 | $NetBSD: distinfo,v 1.10 2024/01/01 16:19:57 leot Exp $ | |
2 | 2 | |||
3 | BLAKE2s (passlib-1.7.4.tar.gz) = 7007ebe597e6b68cd7a180195629a5531b5a4f80374c00c1166561c030c45084 | 3 | BLAKE2s (passlib-1.7.4.tar.gz) = 7007ebe597e6b68cd7a180195629a5531b5a4f80374c00c1166561c030c45084 | |
4 | SHA512 (passlib-1.7.4.tar.gz) = 350bd6da5ac57e6c266ffe8bf9684c8c2cce3fc6b513eb6c7bc1b302d2d8a1b701e9c01c953782520a2ac37b7ec1f6d7bd5855f99f6ee0e2dbbf33f2d49a9530 | 4 | SHA512 (passlib-1.7.4.tar.gz) = 350bd6da5ac57e6c266ffe8bf9684c8c2cce3fc6b513eb6c7bc1b302d2d8a1b701e9c01c953782520a2ac37b7ec1f6d7bd5855f99f6ee0e2dbbf33f2d49a9530 | |
5 | Size (passlib-1.7.4.tar.gz) = 689844 bytes | 5 | Size (passlib-1.7.4.tar.gz) = 689844 bytes | |
6 | SHA1 (patch-passlib_handlers_bcrypt.py) = f67386201a22d37dd502926a26d07741ded1daf1 |
$NetBSD: patch-passlib_handlers_bcrypt.py,v 1.1 2024/01/01 16:19:57 leot Exp $
Version is available under __version__, __about__ field no longer
exists.
--- passlib/handlers/bcrypt.py.orig 2024-01-01 16:12:38.252193463 +0000
+++ 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>'