From fb1d3048be4f1eda2b633d328af87733bf780bbb Mon Sep 17 00:00:00 2001 From: ExtinctFire Date: Sat, 27 Feb 2021 10:31:59 +0800 Subject: [PATCH] Don't emit warnings in test_kdf, there's no point whoops here Signed-off-by: ExtinctFire (cherry picked from commit f0497608efc9375810d4c97278cd821bab1d5668) --- ...t-warnings-here-there-s-no-point-137.patch | 30 +++++++++++++++++++ python-bcrypt.spec | 17 +++++++++-- 2 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 backport-Don-t-emit-warnings-here-there-s-no-point-137.patch diff --git a/backport-Don-t-emit-warnings-here-there-s-no-point-137.patch b/backport-Don-t-emit-warnings-here-there-s-no-point-137.patch new file mode 100644 index 0000000..f829dac --- /dev/null +++ b/backport-Don-t-emit-warnings-here-there-s-no-point-137.patch @@ -0,0 +1,30 @@ +From ea76ee82eba1700e1143022050b368460fc9cd7f Mon Sep 17 00:00:00 2001 +From: Alex Gaynor +Date: Sun, 3 Dec 2017 20:43:38 -0600 +Subject: [PATCH 01/73] Don't emit warnings here, there's no point (#137) + +* Don't emit warnings here, there's no point + +* whoops here +--- + tests/test_bcrypt.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/tests/test_bcrypt.py b/tests/test_bcrypt.py +index 7ad40f7..3f00875 100644 +--- a/tests/test_bcrypt.py ++++ b/tests/test_bcrypt.py +@@ -400,7 +400,9 @@ def test_checkpw_extra_data(): + b"\x43\x66\x6c\x9b\x09\xef\x33\xed\x8c\x27\xe8\xe8\xf3\xe2\xd8\xe6" + ]]) + def test_kdf(rounds, password, salt, expected): +- derived = bcrypt.kdf(password, salt, len(expected), rounds) ++ derived = bcrypt.kdf( ++ password, salt, len(expected), rounds, ignore_few_rounds=True ++ ) + assert derived == expected + + +-- +2.23.0 + diff --git a/python-bcrypt.spec b/python-bcrypt.spec index a6a3579..dd669fa 100644 --- a/python-bcrypt.spec +++ b/python-bcrypt.spec @@ -1,12 +1,14 @@ Name: python-bcrypt Summary: Good password hashing for your software and your servers Version: 3.1.4 -Release: 7 +Release: 9 License: ASL 2.0 and Public Domain and BSD URL: http://pypi.python.org/pypi/bcrypt Source0: https://files.pythonhosted.org/packages/source/b/bcrypt/bcrypt-%{version}.tar.gz -BuildRequires: gcc python2-devel python2-setuptools python2-six python2-pytest python2-cffi +Patch6000: backport-Don-t-emit-warnings-here-there-s-no-point-137.patch + +BuildRequires: gcc BuildRequires: python3-devel python3-setuptools python3-cffi python3-six python3-pytest %description @@ -37,7 +39,7 @@ Good password hashing for your software and your servers. This library should be compatible with py-bcrypt and it will run on Python 3.4+ and PyPy 2.6+. %prep -%autosetup -n bcrypt-%{version} +%autosetup -n bcrypt-%{version} -p1 %build %{__python2} setup.py build @@ -69,5 +71,14 @@ This library should be compatible with py-bcrypt and it will run on Python 3.4+ %changelog +* Sat Feb 27 2021 extinctfire - 3.1.4-9 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:Don't emit warning in test_kdf, there's no point whoops here + +* Wed Oct 21 2020 jinzhimin - 3.1.4-8 +- remove python2-bcrypt subpackage + * Wed Nov 13 2019 Lijin Yang - 3.1.4-7 - init package -- Gitee