public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-asyncssh] rawhide: Update to version 2.24.1 (fixes fedora#2545606)
@ 2026-11-14 12:06 Georg Sauthoff
  0 siblings, 0 replies; only message in thread
From: Georg Sauthoff @ 2026-11-14 12:06 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/python-asyncssh
Branch : rawhide
Commit : 1d757673e70fccd858ccbe22dc5ca165aea7d7c8
Author : Georg Sauthoff <mail@gms.tf>
Date   : 2026-11-14T13:03:57+01:00
Stats  : +90/-3 in 3 file(s)
URL    : https://src.fedoraproject.org/rpms/python-asyncssh/c/1d757673e70fccd858ccbe22dc5ca165aea7d7c8?branch=rawhide

Log:
Update to version 2.24.1 (fixes fedora#2545606)

---
diff --git a/nettle4.diff b/nettle4.diff
new file mode 100644
index 0000000..81ea895
--- /dev/null
+++ b/nettle4.diff
@@ -0,0 +1,84 @@
+commit 8aeb0e44e893c28f7373a9d766a9d68a765aaeab
+Author: Georg Sauthoff <mail@gms.tf>
+Date:   2026-11-14 11:53:48 +0100
+
+    Support Nettle 4 besides version 3
+    
+    i.e. drop the digest size argument when the nettle library version 4 is
+    loaded due to version 4 API changes
+    
+    fixes #842
+
+diff --git a/asyncssh/crypto/umac.py b/asyncssh/crypto/umac.py
+index 981be41..d8f03f7 100644
+--- a/asyncssh/crypto/umac.py
++++ b/asyncssh/crypto/umac.py
+@@ -26,12 +26,39 @@ import ctypes.util
+ from typing import TYPE_CHECKING, Callable, Optional
+ 
+ 
++if TYPE_CHECKING:
++    _GetMajor = Callable[[], ctypes.c_int]
++else:
++    # only required for Python < 3.14, because of eager evaluation there
++    _GetMajor = None
++
++
++for lib in ('nettle', 'libnettle', 'libnettle-6'):
++    _nettle_lib = ctypes.util.find_library(lib)
++
++    if _nettle_lib: # pragma: no branch
++        break
++else: # pragma: no cover
++    _nettle_lib = None
++    _major = 3
++
++if _nettle_lib: # pragma: no branch
++    _nettle = ctypes.cdll.LoadLibrary(_nettle_lib)
++    _get_major: _GetMajor = getattr(_nettle, 'nettle_version_major')
++    _major = _get_major()
++    if _major not in (3, 4):
++        _nettle_lib = None
++
++
+ if TYPE_CHECKING:
+     _ByteArray = ctypes.Array[ctypes.c_char]
+     _SetKey = Callable[[_ByteArray, bytes], None]
+     _SetNonce = Callable[[_ByteArray, ctypes.c_size_t, bytes], None]
+     _Update = Callable[[_ByteArray, ctypes.c_size_t, bytes], None]
+-    _Digest = Callable[[_ByteArray, ctypes.c_size_t, _ByteArray], None]
++    if _major == 3:
++        _Digest = Callable[[_ByteArray, ctypes.c_size_t, _ByteArray], None]
++    else:
++        _Digest = Callable[[_ByteArray, _ByteArray], None]
+     _New = Callable[[bytes, Optional[bytes], Optional[bytes]], object]
+ 
+ 
+@@ -113,7 +140,10 @@ def _build_umac(size: int) -> '_New':
+             """
+ 
+             result = ctypes.create_string_buffer(self.digest_size)
+-            _digest(self._ctx, ctypes.c_size_t(self.digest_size), result)
++            if _major == 3:
++                _digest(self._ctx, ctypes.c_size_t(self.digest_size), result)
++            else:
++                _digest(self._ctx, result)
+             return result.raw
+ 
+         def hexdigest(self) -> str:
+@@ -125,15 +155,5 @@ def _build_umac(size: int) -> '_New':
+     return _UMAC.new
+ 
+ 
+-for lib in ('nettle', 'libnettle', 'libnettle-6'):
+-    _nettle_lib = ctypes.util.find_library(lib)
+-
+-    if _nettle_lib: # pragma: no branch
+-        break
+-else: # pragma: no cover
+-    _nettle_lib = None
+-
+ if _nettle_lib: # pragma: no branch
+-    _nettle = ctypes.cdll.LoadLibrary(_nettle_lib)
+-
+     umac32, umac64, umac96, umac128 = map(_build_umac, (32, 64, 96, 128))

diff --git a/python-asyncssh.spec b/python-asyncssh.spec
index c958e8c..fe4858d 100644
--- a/python-asyncssh.spec
+++ b/python-asyncssh.spec
@@ -5,7 +5,7 @@ implements many SSH protocol features such as the various channels,\
 SFTP, SCP, forwarding, session multiplexing over a connection and more.
 
 Name:           python-%{srcname}
-Version:        2.24.0
+Version:        2.24.1
 Release:        %autorelease
 Summary:        Asynchronous SSH for Python
 
@@ -13,6 +13,9 @@ Summary:        Asynchronous SSH for Python
 License:        EPL-2.0 OR GPL-2.0-or-later
 URL:            https://github.com/ronf/asyncssh
 Source0:        %pypi_source
+# cf. https://github.com/ronf/asyncssh/pull/844
+# XXX remove when fixed
+Patch0:         nettle4.diff
 
 
 
@@ -52,7 +55,7 @@ Summary:        %{summary}
 %autosetup -p1 -n %{srcname}-%{version}
 
 # remove superfluous build dependencies
-sed '/pytest-cov/d' tox.ini -i  # coverage not desired
+sed -E '/(pytest-cov|coverage_conditional_plugin|\<coverage\>)/d' tox.ini -i  # coverage not desired
 sed -E '/(uvloop|python-pkcs11)/d' tox.ini -i  # not available, tests skipped when missing
 # sometimes upstream is too eager to bump this dependency,
 # e.g. due to 'Vulnerable OpenSSL included in cryptography wheels'

diff --git a/sources b/sources
index 667c803..64e6f8b 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (asyncssh-2.24.0.tar.gz) = f8504dc52945424da34812e2a08b9d6d00f69a2d30f55ec25df4e41b31419a368852f3124a885e62012520b255838599101b32ae7a8ed4abd5d926ce1c6ca72b
+SHA512 (asyncssh-2.24.1.tar.gz) = 54b8e6a9519781f5e5d5c394b2b5780d7d88880c3c17ccdd30edf856d21c9201d6a390dcfb348f736ecc4158e8e3b053ceb48ba5e6f285598b8fed12b056d0e1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-14 12:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-14 12:06 [rpms/python-asyncssh] rawhide: Update to version 2.24.1 (fixes fedora#2545606) Georg Sauthoff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox