* [gentoo-commits] repo/gentoo:master commit in: dev-python/pynacl/files/, dev-python/pynacl/
@ 2019-12-04 0:51 Aaron Bauman
0 siblings, 0 replies; 2+ messages in thread
From: Aaron Bauman @ 2019-12-04 0:51 UTC (permalink / raw
To: gentoo-commits
commit: c902106e6752c0dad27fb1760c2d78ee03f7ead5
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 3 23:17:45 2019 +0000
Commit: Aaron Bauman <bman <AT> gentoo <DOT> org>
CommitDate: Wed Dec 4 00:51:29 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c902106e
dev-python/pynacl: Fix tests with >=dev-python/hypothesis-4.0.0
Closes: https://bugs.gentoo.org/701936
Package-Manager: Portage-2.3.80, Repoman-2.3.19
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
Signed-off-by: Aaron Bauman <bman <AT> gentoo.org>
.../pynacl/files/pynacl-1.3.0-hypothesis-4.patch | 29 ++++++++++++++++++++++
dev-python/pynacl/pynacl-1.3.0.ebuild | 2 ++
2 files changed, 31 insertions(+)
diff --git a/dev-python/pynacl/files/pynacl-1.3.0-hypothesis-4.patch b/dev-python/pynacl/files/pynacl-1.3.0-hypothesis-4.patch
new file mode 100644
index 00000000000..9b7a5a905d4
--- /dev/null
+++ b/dev-python/pynacl/files/pynacl-1.3.0-hypothesis-4.patch
@@ -0,0 +1,29 @@
+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)
diff --git a/dev-python/pynacl/pynacl-1.3.0.ebuild b/dev-python/pynacl/pynacl-1.3.0.ebuild
index ce1ea9dec3e..391ddc75589 100644
--- a/dev-python/pynacl/pynacl-1.3.0.ebuild
+++ b/dev-python/pynacl/pynacl-1.3.0.ebuild
@@ -27,6 +27,8 @@ DEPEND="${RDEPEND}
>=dev-python/pytest-3.2.1[${PYTHON_USEDEP}] )
"
+PATCHES=( "${FILESDIR}/${P}-hypothesis-4.patch" )
+
src_prepare() {
# For not using the bundled libsodium
export SODIUM_INSTALL=system
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/pynacl/files/, dev-python/pynacl/
@ 2025-06-07 13:47 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2025-06-07 13:47 UTC (permalink / raw
To: gentoo-commits
commit: a2ef337bbf95ff5950fd9c46b4dccfdbf7cfcb05
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 7 07:10:47 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jun 7 13:46:58 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a2ef337b
dev-python/pynacl: enable py3.14
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-python/pynacl/files/pynacl-1.5.0-py314.patch | 58 ++++++++++++++++++++++++
dev-python/pynacl/pynacl-1.5.0-r4.ebuild | 54 ++++++++++++++++++++++
2 files changed, 112 insertions(+)
diff --git a/dev-python/pynacl/files/pynacl-1.5.0-py314.patch b/dev-python/pynacl/files/pynacl-1.5.0-py314.patch
new file mode 100644
index 000000000000..210728b2ea76
--- /dev/null
+++ b/dev-python/pynacl/files/pynacl-1.5.0-py314.patch
@@ -0,0 +1,58 @@
+https://github.com/pyca/pynacl/commit/d33028e43b814615a33e231925eaddb0f679fa2b
+
+From d33028e43b814615a33e231925eaddb0f679fa2b Mon Sep 17 00:00:00 2001
+From: Karolina Surma <33810531+befeleme@users.noreply.github.com>
+Date: Fri, 15 Nov 2024 04:53:12 +0100
+Subject: [PATCH] Fix compatibility with Python 3.14.0a1 (#848)
+
+typing.ByteString has been removed from Python 3.14.
+Ported the suggested way from the documentation:
+https://docs.python.org/3.13/library/typing.html#typing.ByteString
+---
+ src/nacl/bindings/crypto_secretstream.py | 3 ++-
+ tests/test_secretstream.py | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/nacl/bindings/crypto_secretstream.py b/src/nacl/bindings/crypto_secretstream.py
+index d7c6725e..59b074c5 100644
+--- a/src/nacl/bindings/crypto_secretstream.py
++++ b/src/nacl/bindings/crypto_secretstream.py
+@@ -11,7 +11,7 @@
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+-from typing import ByteString, Optional, Tuple, cast
++from typing import Optional, Tuple, Union, cast
+
+ from nacl import exceptions as exc
+ from nacl._sodium import ffi, lib
+@@ -73,6 +73,7 @@ class crypto_secretstream_xchacha20poly1305_state:
+
+ def __init__(self) -> None:
+ """Initialize a clean state object."""
++ ByteString = Union[bytes, bytearray, memoryview]
+ self.statebuf: ByteString = ffi.new(
+ "unsigned char[]",
+ crypto_secretstream_xchacha20poly1305_STATEBYTES,
+diff --git a/tests/test_secretstream.py b/tests/test_secretstream.py
+index d1b72739..9a847bb4 100644
+--- a/tests/test_secretstream.py
++++ b/tests/test_secretstream.py
+@@ -16,7 +16,7 @@
+ import json
+ import os
+ import random
+-from typing import ByteString, List, Optional, Tuple
++from typing import List, Optional, Tuple, Union
+
+ from _pytest._code import ExceptionInfo
+ from _pytest.monkeypatch import MonkeyPatch
+@@ -219,6 +219,7 @@ def test_it_like_libsodium():
+
+ header = crypto_secretstream_xchacha20poly1305_init_push(state, k)
+
++ ByteString = Union[bytes, bytearray, memoryview]
+ state_save: ByteString = ffi.buffer(state.statebuf)[:]
+
+ c1 = crypto_secretstream_xchacha20poly1305_push(
+
diff --git a/dev-python/pynacl/pynacl-1.5.0-r4.ebuild b/dev-python/pynacl/pynacl-1.5.0-r4.ebuild
new file mode 100644
index 000000000000..f91d5678197e
--- /dev/null
+++ b/dev-python/pynacl/pynacl-1.5.0-r4.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( pypy3_11 python3_{11..14} )
+
+inherit distutils-r1
+
+DESCRIPTION="Python binding to the Networking and Cryptography (NaCl) library"
+HOMEPAGE="
+ https://github.com/pyca/pynacl/
+ https://pypi.org/project/PyNaCl/
+"
+SRC_URI="
+ https://github.com/pyca/pynacl/archive/${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="
+ dev-libs/libsodium:=
+"
+RDEPEND="
+ ${DEPEND}
+ $(python_gen_cond_dep '
+ >=dev-python/cffi-1.4.1[${PYTHON_USEDEP}]
+ ' 'python*')
+"
+BDEPEND="
+ $(python_gen_cond_dep '
+ >=dev-python/cffi-1.4.1[${PYTHON_USEDEP}]
+ ' 'python*')
+ test? (
+ >=dev-python/hypothesis-3.27.0[${PYTHON_USEDEP}]
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.0-py314.patch
+)
+
+distutils_enable_tests pytest
+
+src_compile() {
+ # For not using the bundled libsodium
+ local -x SODIUM_INSTALL=system
+ distutils-r1_src_compile
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-06-07 13:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-07 13:47 [gentoo-commits] repo/gentoo:master commit in: dev-python/pynacl/files/, dev-python/pynacl/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2019-12-04 0:51 Aaron Bauman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox