From 77eba3ff7b244ac58edf12325dd881dabb5fe273 Mon Sep 17 00:00:00 2001 From: Kirill Radzikhovskyy Date: Mon, 1 Dec 2025 06:23:32 +1100 Subject: [PATCH] python3Packages.flask-bcrypt: backport upstream test fix for long passwords --- pkgs/development/python-modules/flask-bcrypt/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/python-modules/flask-bcrypt/default.nix b/pkgs/development/python-modules/flask-bcrypt/default.nix index a1f4cacc0cf6..83771359fcb6 100644 --- a/pkgs/development/python-modules/flask-bcrypt/default.nix +++ b/pkgs/development/python-modules/flask-bcrypt/default.nix @@ -19,6 +19,13 @@ buildPythonPackage rec { hash = "sha256-WlIholi/nzq6Ikc0LS6FhG0Q5Kz0kvvAlA2YJ7EksZ4="; }; + postPatch = '' + # Backport fix for test_long_password from upstream PR: https://github.com/maxcountryman/flask-bcrypt/pull/96 + substituteInPlace test_bcrypt.py \ + --replace-fail "self.assertTrue(self.bcrypt.check_password_hash(pw_hash, 'A' * 80))" \ + "self.assertTrue(self.bcrypt.check_password_hash(pw_hash, 'A' * 72))" + ''; + propagatedBuildInputs = [ flask bcrypt