gnu: python-robotframework-sshlibrary: Patch for RobotFramework 5 compatibility.

* gnu/packages/patches/python-robotframework-sshlibrary-rf5-compat.patch: New
file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/python-xyz.scm (python-robotframework-sshlibrary): Apply it.
This commit is contained in:
Maxim Cournoyer 2022-03-08 20:51:35 -05:00
parent 67cb8e90c4
commit 1a7424957d
No known key found for this signature in database
GPG key ID: 1260E46482E63562
3 changed files with 23 additions and 1 deletions

View file

@ -1706,6 +1706,7 @@ dist_patch_DATA = \
%D%/packages/patches/python-pytorch-system-libraries.patch \
%D%/packages/patches/python-pytorch-1.9.0-system-libraries.patch \
%D%/packages/patches/python-robotframework-source-date-epoch.patch \
%D%/packages/patches/python-robotframework-sshlibrary-rf5-compat.patch \
%D%/packages/patches/python-seaborn-kde-test.patch \
%D%/packages/patches/python-seaborn-2690.patch \
%D%/packages/patches/python2-subprocess32-disable-input-test.patch \

View file

@ -0,0 +1,19 @@
This patches add compatibility for the forthcoming RobotFramework 5.
Taken from: https://github.com/robotframework/SSHLibrary/pull/403.
diff --git a/src/SSHLibrary/pythonforward.py b/src/SSHLibrary/pythonforward.py
index 8b85997b7..607985cf4 100644
--- a/src/SSHLibrary/pythonforward.py
+++ b/src/SSHLibrary/pythonforward.py
@@ -1,9 +1,9 @@
import select
import socket
import threading
-from robot.utils import platform
+from robot.utils import PY2, WINDOWS
from .logger import logger
-if platform.PY2 and platform.WINDOWS:
+if PY2 and WINDOWS:
import win_inet_pton
try:
import SocketServer

View file

@ -4850,7 +4850,9 @@ (define-public python-robotframework-sshlibrary
(file-name (git-file-name name version))
(sha256
(base32
"1fn72hw7xacjjpl4dd6wynh2x63i9rk8iqhj3v640db21qpcnbkw"))))
"1fn72hw7xacjjpl4dd6wynh2x63i9rk8iqhj3v640db21qpcnbkw"))
(patches (search-patches
"python-robotframework-sshlibrary-rf5-compat.patch"))))
(build-system python-build-system)
(arguments
`(#:phases