15
0

- Add get-telnetlib-from-netmiko.patch, telnetlib was removed from

the standardlibrary in Python 3.13
  * https://github.com/Juniper/py-junos-eznc/issues/1324

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-junos-eznc?expand=0&rev=34
This commit is contained in:
2024-11-27 10:15:06 +00:00
committed by Git OBS Bridge
commit 45d7c63a2c
11 changed files with 2130 additions and 0 deletions

33
python-311.patch Normal file
View File

@@ -0,0 +1,33 @@
Index: py-junos-eznc-2.7.0/lib/jnpr/junos/device.py
===================================================================
--- py-junos-eznc-2.7.0.orig/lib/jnpr/junos/device.py
+++ py-junos-eznc-2.7.0/lib/jnpr/junos/device.py
@@ -43,6 +43,12 @@ from jnpr.junos.exception import JSONLoa
from ncclient.operations.third_party.juniper.rpc import ExecuteRpc
import inspect
+# Python 3.11 compatibility
+# gh#Juniper/py-junos-eznc#1236
+if not hasattr(inspect, "getargspec"):
+ inspect.getargspec = inspect.getfullargspec
+
+
if sys.version_info[0] >= 3:
NCCLIENT_FILTER_XML = len(inspect.signature(ExecuteRpc.request).parameters) == 3
else:
Index: py-junos-eznc-2.7.0/lib/jnpr/junos/utils/scp.py
===================================================================
--- py-junos-eznc-2.7.0.orig/lib/jnpr/junos/utils/scp.py
+++ py-junos-eznc-2.7.0/lib/jnpr/junos/utils/scp.py
@@ -1,6 +1,11 @@
from __future__ import absolute_import
import inspect
+# Python 3.11 compatibility
+# gh#Juniper/py-junos-eznc#1236
+if not hasattr(inspect, "getargspec"):
+ inspect.getargspec = inspect.getfullargspec
+
from scp import SCPClient
from jnpr.junos.utils.ssh_client import open_ssh_client