Don't emit warnings in test_kdf, there's no point whoops here

Signed-off-by: ExtinctFire <shenyining_00@126.com>
This commit is contained in:
ExtinctFire 2021-02-27 10:31:59 +08:00
parent 88281bdee5
commit f0497608ef
2 changed files with 40 additions and 2 deletions

View File

@ -0,0 +1,30 @@
From ea76ee82eba1700e1143022050b368460fc9cd7f Mon Sep 17 00:00:00 2001
From: Alex Gaynor <alex.gaynor@gmail.com>
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

View File

@ -1,11 +1,13 @@
Name: python-bcrypt Name: python-bcrypt
Summary: Good password hashing for your software and your servers Summary: Good password hashing for your software and your servers
Version: 3.1.4 Version: 3.1.4
Release: 8 Release: 9
License: ASL 2.0 and Public Domain and BSD License: ASL 2.0 and Public Domain and BSD
URL: http://pypi.python.org/pypi/bcrypt URL: http://pypi.python.org/pypi/bcrypt
Source0: https://files.pythonhosted.org/packages/source/b/bcrypt/bcrypt-%{version}.tar.gz Source0: https://files.pythonhosted.org/packages/source/b/bcrypt/bcrypt-%{version}.tar.gz
Patch6000: backport-Don-t-emit-warnings-here-there-s-no-point-137.patch
BuildRequires: gcc BuildRequires: gcc
BuildRequires: python3-devel python3-setuptools python3-cffi python3-six python3-pytest BuildRequires: python3-devel python3-setuptools python3-cffi python3-six python3-pytest
@ -26,7 +28,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+. This library should be compatible with py-bcrypt and it will run on Python 3.4+ and PyPy 2.6+.
%prep %prep
%autosetup -n bcrypt-%{version} %autosetup -n bcrypt-%{version} -p1
%build %build
%py3_build %py3_build
@ -47,6 +49,12 @@ This library should be compatible with py-bcrypt and it will run on Python 3.4+
%changelog %changelog
* Sat Feb 27 2021 extinctfire <shenyining_00@126.com> - 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<jinzhimin2@huawei.com> - 3.1.4-8 * Wed Oct 21 2020 jinzhimin<jinzhimin2@huawei.com> - 3.1.4-8
- remove python2-bcrypt subpackage - remove python2-bcrypt subpackage