Update to 1.4.0 (#1840424)

This commit is contained in:
Damien Ciabrini 2020-08-26 11:32:33 +02:00
parent b9c714693a
commit 01acaa9839
6 changed files with 67 additions and 118 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@
/pynacl-1.2.0.tar.gz
/pynacl-1.2.1.tar.gz
/pynacl-1.3.0.tar.gz
/pynacl-1.4.0.tar.gz

View File

@ -1,29 +0,0 @@
From af2d8c241872318baba42d7f5fbfb1869de91baa Mon Sep 17 00:00:00 2001
From: Valentin Heidelberger <github@valentinsblog.com>
Date: Thu, 27 Sep 2018 22:36:34 +0200
Subject: [PATCH] Remove average_size hypothesis setting from test_bindings.py
---
tests/test_bindings.py | 2 --
1 file changed, 2 deletions(-)
diff --git a/tests/test_bindings.py b/tests/test_bindings.py
index 22930cc7..d7951a21 100644
--- a/tests/test_bindings.py
+++ b/tests/test_bindings.py
@@ -306,7 +306,6 @@ def test_unpad_not_padded():
@given(binary(min_size=0,
- average_size=128,
max_size=2049),
integers(min_value=16,
max_value=256)
@@ -320,7 +319,6 @@ def test_pad_sizes(msg, bl_sz):
@given(binary(min_size=0,
- average_size=128,
max_size=2049),
integers(min_value=16,
max_value=256)

View File

@ -1,81 +0,0 @@
From f26fc9dae2004ec812697e13d2a9aafa0e931e85 Mon Sep 17 00:00:00 2001
From: Alex Gaynor <alex.gaynor@gmail.com>
Date: Sun, 12 Jan 2020 22:15:54 -0500
Subject: [PATCH 1/2] Fix the tests
---
tests/test_aead.py | 4 ++--
tests/test_pwhash.py | 10 +++++-----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/tests/test_aead.py b/tests/test_aead.py
index 1fa32a2b..d5c58d56 100644
--- a/tests/test_aead.py
+++ b/tests/test_aead.py
@@ -18,7 +18,7 @@
import sys
from collections import namedtuple
-from hypothesis import given, settings, unlimited
+from hypothesis import given, settings
from hypothesis.strategies import binary, sampled_from
import pytest
@@ -97,7 +97,7 @@ def test_chacha20poly1305_variants_kat(kv):
max_size=b.crypto_aead_xchacha20poly1305_ietf_NPUBBYTES),
binary(min_size=b.crypto_aead_chacha20poly1305_KEYBYTES,
max_size=b.crypto_aead_chacha20poly1305_KEYBYTES))
-@settings(deadline=None, max_examples=20, timeout=unlimited)
+@settings(deadline=None, max_examples=20)
def test_chacha20poly1305_variants_roundtrip(construction,
message,
aad,
diff --git a/tests/test_pwhash.py b/tests/test_pwhash.py
index ac603665..9e53966b 100644
--- a/tests/test_pwhash.py
+++ b/tests/test_pwhash.py
@@ -20,7 +20,7 @@
import sys
import unicodedata as ud
-from hypothesis import given, settings, unlimited
+from hypothesis import given, settings
from hypothesis.strategies import integers, text
import pytest
@@ -410,7 +410,7 @@ def test_str_verify_argon2_ref_fail(password_hash, password):
integers(min_value=1024 * 1024,
max_value=16 * 1024 * 1024)
)
-@settings(deadline=None, max_examples=20, timeout=unlimited)
+@settings(deadline=None, max_examples=20)
def test_argon2i_str_and_verify(password, ops, mem):
_psw = password.encode('utf-8')
pw_hash = nacl.pwhash.argon2i.str(_psw, opslimit=ops, memlimit=mem)
@@ -424,7 +424,7 @@ def test_argon2i_str_and_verify(password, ops, mem):
integers(min_value=1024 * 1024,
max_value=16 * 1024 * 1024)
)
-@settings(deadline=None, max_examples=20, timeout=unlimited)
+@settings(deadline=None, max_examples=20)
def test_argon2id_str_and_verify(password, ops, mem):
_psw = password.encode('utf-8')
pw_hash = nacl.pwhash.argon2id.str(_psw, opslimit=ops, memlimit=mem)
@@ -438,7 +438,7 @@ def test_argon2id_str_and_verify(password, ops, mem):
integers(min_value=1024 * 1024,
max_value=16 * 1024 * 1024)
)
-@settings(deadline=None, max_examples=20, timeout=unlimited)
+@settings(deadline=None, max_examples=20)
def test_argon2i_str_and_verify_fail(password, ops, mem):
_psw = password.encode('utf-8')
pw_hash = nacl.pwhash.argon2i.str(_psw, opslimit=ops, memlimit=mem)
@@ -447,7 +447,7 @@ def test_argon2i_str_and_verify_fail(password, ops, mem):
@given(text(alphabet=PASSWD_CHARS, min_size=5, max_size=20))
-@settings(deadline=None, max_examples=5, timeout=unlimited)
+@settings(deadline=None, max_examples=5)
def test_pwhash_str_and_verify(password):
_psw = password.encode('utf-8')

58
596.patch Normal file
View File

@ -0,0 +1,58 @@
From 1a14a865a27467914be183f5465c29b36fd27f88 Mon Sep 17 00:00:00 2001
From: Scott Kitterman <scott@kitterman.com>
Date: Tue, 26 May 2020 17:03:17 -0400
Subject: [PATCH 1/2] Remove spurious requirement for wheel
---
pyproject.toml | 1 -
setup.py | 3 +--
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index ed437acd..94baf50c 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -2,7 +2,6 @@
# Must be kept in sync with `setup_requirements` in `setup.py`
requires = [
"setuptools>=40.8.0",
- "wheel",
"cffi>=1.4.1; python_implementation != 'PyPy'",
]
build-backend = "setuptools.build_meta"
diff --git a/setup.py b/setup.py
index 9319c1cb..d82a7fe3 100644
--- a/setup.py
+++ b/setup.py
@@ -35,8 +35,7 @@
requirements = ["six"]
-setup_requirements = ["setuptools",
- "wheel"]
+setup_requirements = ["setuptools"]
test_requirements = ["pytest>=3.2.1,!=3.3.0",
"hypothesis>=3.27.0"]
docs_requirements = ["sphinx>=1.6.5",
From 5eb5f1e70580a386d9a95b74eda1a54af13f5e3a Mon Sep 17 00:00:00 2001
From: Scott Kitterman <scott@kitterman.com>
Date: Tue, 26 May 2020 18:44:33 -0400
Subject: [PATCH 2/2] Put wheel back in pyproject.toml
---
pyproject.toml | 1 +
1 file changed, 1 insertion(+)
diff --git a/pyproject.toml b/pyproject.toml
index 94baf50c..ed437acd 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -2,6 +2,7 @@
# Must be kept in sync with `setup_requirements` in `setup.py`
requires = [
"setuptools>=40.8.0",
+ "wheel",
"cffi>=1.4.1; python_implementation != 'PyPy'",
]
build-backend = "setuptools.build_meta"

View File

@ -4,19 +4,16 @@
%global modname pynacl
Name: python-%{modname}
Version: 1.3.0
Release: 9%{?dist}
Version: 1.4.0
Release: 1%{?dist}
Summary: Python binding to the Networking and Cryptography (NaCl) library
License: ASL 2.0
URL: https://github.com/pyca/pynacl
Source0: %{url}/archive/%{version}/%{modname}-%{version}.tar.gz
# hypothesis 4 support
Patch1: %{url}/pull/480.patch
# hypothesis 5 support
Patch2: %{url}/pull/572.patch
# remove spurious wheel dependency
Patch1: %{url}/pull/596.patch
BuildRequires: gcc
BuildRequires: libsodium-devel
@ -75,6 +72,9 @@ PYTHONPATH=%{buildroot}%{python3_sitearch} py.test-3 -v
%{python3_sitearch}/nacl/
%changelog
* Wed Aug 26 2020 Damien Ciabrini <dciabrin@redhat.com> - 1.4.0-1
- Update to 1.4.0 (#1840424)
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (pynacl-1.3.0.tar.gz) = 815c31a2069cbee1091d7e0ebf0b5572875c4a537311af561b5bce0b9d8051028e367a516b46481453d9780e60e9e7e2a4640d320164059c3974b0319d1cf96d
SHA512 (pynacl-1.4.0.tar.gz) = 2a11a623452cea60199cdff83db6f5922698237267c11f055f2fd7768e0875a819dcc08c477113ad89461797ab36d66e0b9c7700eee335eb6b16af6b378b9e88