forked from pool/python-PyNaCl
Accepting request 819131 from devel:languages:python
- Update to 1.4.0
* Update ``libsodium`` to 1.0.18.
* **BACKWARDS INCOMPATIBLE:** We no longer distribute 32-bit ``manylinux1``
wheels. Continuing to produce them was a maintenance burden.
* Added support for Python 3.8, and removed support for Python 3.4.
* Add low level bindings for extracting the seed and the public key
from crypto_sign_ed25519 secret key
* Add low level bindings for deterministic random generation.
* Add ``wheel`` and ``setuptools`` setup_requirements in ``setup.py`` (#485)
* Fix checks on very slow builders (#481, #495)
* Add low-level bindings to ed25519 arithmetic functions
* Update low-level blake2b state implementation
* Fix wrong short-input behavior of SealedBox.decrypt() (#517)
* Raise CryptPrefixError exception instead of InvalidkeyError when trying
to check a password against a verifier stored in a unknown format (#519)
* Add support for minimal builds of libsodium. Trying to call functions
not available in a minimal build will raise an UnavailableError
exception. To compile a minimal build of the bundled libsodium, set
the SODIUM_INSTALL_MINIMAL environment variable to any non-empty
string (e.g. ``SODIUM_INSTALL_MINIMAL=1``) for setup.
- removed obsolete back-port patch:
* fix_tests.patch
* hypothesis-no-unilmited.patch
* python-PyNaCl-hypothesis-remove-average_size.patch
OBS-URL: https://build.opensuse.org/request/show/819131
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-PyNaCl?expand=0&rev=8
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0c6100edd16fefd1557da078c7a31e7b7d7a52ce39fdca2bec29d4f7b6e7600c
|
||||
size 3351016
|
||||
3
PyNaCl-1.4.0.tar.gz
Normal file
3
PyNaCl-1.4.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:54e9a2c849c742006516ad56a88f5c74bf2ce92c9f67435187c3c5953b346505
|
||||
size 3416950
|
||||
@@ -1,71 +0,0 @@
|
||||
From 3479eaed36a32c6bd91331573a450a5bf099bdd5 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Gaynor <alex.gaynor@gmail.com>
|
||||
Date: Mon, 1 Jul 2019 00:11:38 -0400
|
||||
Subject: [PATCH] Fixed tests for change in pytest repr (#546)
|
||||
|
||||
* Fixed tests for change in pytest repr
|
||||
|
||||
* Fixed tests for change in pytest repr
|
||||
|
||||
* Fixed tests for change in pytest repr
|
||||
|
||||
* Fixed tests for change in pytest repr
|
||||
---
|
||||
tests/test_box.py | 2 +-
|
||||
tests/test_sealed_box.py | 2 +-
|
||||
tests/test_secret.py | 2 +-
|
||||
tests/test_signing.py | 2 +-
|
||||
4 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/tests/test_box.py b/tests/test_box.py
|
||||
index d547ac27..46f3b793 100644
|
||||
--- a/tests/test_box.py
|
||||
+++ b/tests/test_box.py
|
||||
@@ -268,7 +268,7 @@ def test_box_wrong_length():
|
||||
def check_type_error(expected, f, *args):
|
||||
with pytest.raises(TypeError) as e:
|
||||
f(*args)
|
||||
- assert expected in str(e)
|
||||
+ assert expected in str(e.value)
|
||||
|
||||
|
||||
def test_wrong_types():
|
||||
diff --git a/tests/test_sealed_box.py b/tests/test_sealed_box.py
|
||||
index f7ba15c3..49ea2324 100644
|
||||
--- a/tests/test_sealed_box.py
|
||||
+++ b/tests/test_sealed_box.py
|
||||
@@ -110,7 +110,7 @@ def test_sealed_box_decryption(privalice, pubalice, plaintext, encrypted):
|
||||
def check_type_error(expected, f, *args):
|
||||
with pytest.raises(TypeError) as e:
|
||||
f(*args)
|
||||
- assert expected in str(e)
|
||||
+ assert expected in str(e.value)
|
||||
|
||||
|
||||
def test_wrong_types():
|
||||
diff --git a/tests/test_secret.py b/tests/test_secret.py
|
||||
index 3b52459a..73987fcb 100644
|
||||
--- a/tests/test_secret.py
|
||||
+++ b/tests/test_secret.py
|
||||
@@ -142,7 +142,7 @@ def test_secret_box_wrong_lengths():
|
||||
def check_type_error(expected, f, *args):
|
||||
with pytest.raises(TypeError) as e:
|
||||
f(*args)
|
||||
- assert expected in str(e)
|
||||
+ assert expected in str(e.value)
|
||||
|
||||
|
||||
def test_wrong_types():
|
||||
diff --git a/tests/test_signing.py b/tests/test_signing.py
|
||||
index 4304afb9..3e2cf359 100644
|
||||
--- a/tests/test_signing.py
|
||||
+++ b/tests/test_signing.py
|
||||
@@ -219,7 +219,7 @@ def test_key_conversion(self):
|
||||
def check_type_error(expected, f, *args):
|
||||
with pytest.raises(TypeError) as e:
|
||||
f(*args)
|
||||
- assert expected in str(e)
|
||||
+ assert expected in str(e.value)
|
||||
|
||||
|
||||
def test_wrong_types():
|
||||
@@ -1,84 +0,0 @@
|
||||
From d28395dafd1b87f377299a8646551a454759e161 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Gaynor <alex.gaynor@gmail.com>
|
||||
Date: Sun, 12 Jan 2020 21:41:03 -0600
|
||||
Subject: [PATCH] Fix the tests (#572)
|
||||
|
||||
* Fix the tests
|
||||
|
||||
* for azure
|
||||
---
|
||||
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')
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
iff --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)
|
||||
|
||||
@@ -1,3 +1,31 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Jul 5 14:42:24 UTC 2020 - Michael Ströder <michael@stroeder.com>
|
||||
|
||||
- Update to 1.4.0
|
||||
* Update ``libsodium`` to 1.0.18.
|
||||
* **BACKWARDS INCOMPATIBLE:** We no longer distribute 32-bit ``manylinux1``
|
||||
wheels. Continuing to produce them was a maintenance burden.
|
||||
* Added support for Python 3.8, and removed support for Python 3.4.
|
||||
* Add low level bindings for extracting the seed and the public key
|
||||
from crypto_sign_ed25519 secret key
|
||||
* Add low level bindings for deterministic random generation.
|
||||
* Add ``wheel`` and ``setuptools`` setup_requirements in ``setup.py`` (#485)
|
||||
* Fix checks on very slow builders (#481, #495)
|
||||
* Add low-level bindings to ed25519 arithmetic functions
|
||||
* Update low-level blake2b state implementation
|
||||
* Fix wrong short-input behavior of SealedBox.decrypt() (#517)
|
||||
* Raise CryptPrefixError exception instead of InvalidkeyError when trying
|
||||
to check a password against a verifier stored in a unknown format (#519)
|
||||
* Add support for minimal builds of libsodium. Trying to call functions
|
||||
not available in a minimal build will raise an UnavailableError
|
||||
exception. To compile a minimal build of the bundled libsodium, set
|
||||
the SODIUM_INSTALL_MINIMAL environment variable to any non-empty
|
||||
string (e.g. ``SODIUM_INSTALL_MINIMAL=1``) for setup.
|
||||
- removed obsolete back-port patch:
|
||||
* fix_tests.patch
|
||||
* hypothesis-no-unilmited.patch
|
||||
* python-PyNaCl-hypothesis-remove-average_size.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 17 06:48:28 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-PyNaCl
|
||||
Version: 1.3.0
|
||||
Version: 1.4.0
|
||||
Release: 0
|
||||
Summary: Python binding to the Networking and Cryptography (NaCl) library
|
||||
License: Apache-2.0
|
||||
@@ -26,13 +26,11 @@ Group: Development/Languages/Python
|
||||
URL: https://github.com/pyca/pynacl/
|
||||
Source: https://pypi.org/packages/source/P/PyNaCl/PyNaCl-%{version}.tar.gz
|
||||
# https://github.com/pyca/pynacl/commit/a8c08b18f3a2e8f2140c531afaf42715fcab68e7
|
||||
Patch0: python-PyNaCl-hypothesis-remove-average_size.patch
|
||||
Patch1: fix_tests.patch
|
||||
Patch2: hypothesis-no-unilmited.patch
|
||||
BuildRequires: %{python_module cffi}
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module pycparser}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: python-rpm-macros
|
||||
@@ -52,7 +50,6 @@ speed.
|
||||
|
||||
%prep
|
||||
%setup -q -n PyNaCl-%{version}
|
||||
%autopatch -p1
|
||||
rm -Rf src/libsodium
|
||||
|
||||
%build
|
||||
|
||||
Reference in New Issue
Block a user