Accepting request 888644 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/888644 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-junos-eznc?expand=0&rev=10
This commit is contained in:
commit
38436e7bc6
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:fff9d52563b6f1de194cd74b5357ff740ea2a13433eb348c8f4b5b64564fae94
|
||||
size 580962
|
3
python-junos-eznc-2.6.0.tar.gz
Normal file
3
python-junos-eznc-2.6.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b23f34fbf2011c4cd71e20b90c0314fb4cf73ba05ccb5f66b557b8cf295f9842
|
||||
size 581200
|
48
python-junos-eznc-py39xml.patch
Normal file
48
python-junos-eznc-py39xml.patch
Normal file
@ -0,0 +1,48 @@
|
||||
Index: py-junos-eznc-2.6.0/lib/jnpr/junos/factory/cfgtable.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.6.0.orig/lib/jnpr/junos/factory/cfgtable.py
|
||||
+++ py-junos-eznc-2.6.0/lib/jnpr/junos/factory/cfgtable.py
|
||||
@@ -158,7 +158,7 @@ class CfgTable(Table):
|
||||
add_field = self._grindfield(lxpath[-1], field_value)
|
||||
for _add in add_field:
|
||||
if len(_add.attrib) > 0:
|
||||
- for i in dot.getiterator():
|
||||
+ for i in dot.iter():
|
||||
if i.tag == _add.tag:
|
||||
i.attrib.update(_add.attrib)
|
||||
break
|
||||
Index: py-junos-eznc-2.6.0/lib/jnpr/junos/jxml.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.6.0.orig/lib/jnpr/junos/jxml.py
|
||||
+++ py-junos-eznc-2.6.0/lib/jnpr/junos/jxml.py
|
||||
@@ -161,7 +161,7 @@ strip_rpc_error_transform = etree.XSLT(s
|
||||
|
||||
|
||||
def remove_namespaces(xml):
|
||||
- for elem in xml.getiterator():
|
||||
+ for elem in xml.iter():
|
||||
if elem.tag is etree.Comment:
|
||||
continue
|
||||
i = elem.tag.find("}")
|
||||
@@ -171,7 +171,7 @@ def remove_namespaces(xml):
|
||||
|
||||
|
||||
def remove_namespaces_and_spaces(xml):
|
||||
- for elem in xml.getiterator():
|
||||
+ for elem in xml.iter():
|
||||
if elem.tag is etree.Comment:
|
||||
continue
|
||||
# Remove namespace from attributes
|
||||
Index: py-junos-eznc-2.6.0/tests/unit/test_jxml.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.6.0.orig/tests/unit/test_jxml.py
|
||||
+++ py-junos-eznc-2.6.0/tests/unit/test_jxml.py
|
||||
@@ -40,7 +40,7 @@ class Test_JXML(unittest.TestCase):
|
||||
parser = ET.XMLParser()
|
||||
root = ET.parse(StringIO(xmldata), parser)
|
||||
test = remove_namespaces(root)
|
||||
- for elem in test.getiterator():
|
||||
+ for elem in test.iter():
|
||||
i = elem.tag.find("}")
|
||||
if i > 0:
|
||||
i = i + 1
|
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 26 16:58:17 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Update to 2.6.0
|
||||
* Python 2 support removed from this release.
|
||||
* Session-id variable added to support telnet based persistent
|
||||
connection in Juniper supported ansible collections.
|
||||
- Add python-junos-eznc-py39xml.patch gh#Juniper/py-junos-eznc#1110
|
||||
- Skip failing test gh#Juniper/py-junos-eznc/issues/1109
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 29 19:40:57 UTC 2020 - Martin Hauke <mardnh@gmx.de>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-junos-eznc
|
||||
#
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
# Copyright (c) 2017-2020, Martin Hauke <mardnh@gmx.de>
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
@ -20,7 +20,7 @@
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define skip_python2 1
|
||||
Name: python-junos-eznc
|
||||
Version: 2.5.4
|
||||
Version: 2.6.0
|
||||
Release: 0
|
||||
Summary: Junos 'EZ' automation for non-programmers
|
||||
License: Apache-2.0
|
||||
@ -32,11 +32,13 @@ Patch0: python-junos-eznc-remove-nose.patch
|
||||
# replace deprecated yamlordereddictloader by yamlloader
|
||||
# https://github.com/Juniper/py-junos-eznc/pull/1078
|
||||
Patch1: python-junos-eznc-remove-yamlordereddictloader.patch
|
||||
# https://github.com/Juniper/py-junos-eznc/pull/1110
|
||||
Patch2: python-junos-eznc-py39xml.patch
|
||||
BuildRequires: %{python_module Jinja2 >= 2.7.1}
|
||||
BuildRequires: %{python_module PyYAML >= 5.1}
|
||||
BuildRequires: %{python_module lxml >= 3.2.4}
|
||||
BuildRequires: %{python_module mock}
|
||||
BuildRequires: %{python_module ncclient >= 0.6.3}
|
||||
BuildRequires: %{python_module ncclient >= 0.6.9}
|
||||
BuildRequires: %{python_module netaddr}
|
||||
BuildRequires: %{python_module ntc-templates}
|
||||
BuildRequires: %{python_module paramiko >= 1.15.2}
|
||||
@ -55,7 +57,7 @@ BuildRequires: python-rpm-macros
|
||||
Requires: python-Jinja2 >= 2.7.1
|
||||
Requires: python-PyYAML >= 5.1
|
||||
Requires: python-lxml >= 3.2.4
|
||||
Requires: python-ncclient >= 0.6.3
|
||||
Requires: python-ncclient >= 0.6.9
|
||||
Requires: python-netaddr
|
||||
Requires: python-ntc-templates
|
||||
Requires: python-paramiko >= 1.15.2
|
||||
@ -81,9 +83,7 @@ These capabilities include, but are not limited to:
|
||||
software updates
|
||||
|
||||
%prep
|
||||
%setup -q -n py-junos-eznc-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%autosetup -p1 -n py-junos-eznc-%{version}
|
||||
|
||||
%build
|
||||
%python_build
|
||||
@ -93,11 +93,17 @@ These capabilities include, but are not limited to:
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
%pytest -m "not functional" --forked
|
||||
donttest="nonemptydonttestprefix"
|
||||
# https://github.com/Juniper/py-junos-eznc/issues/1109
|
||||
python39_donttest=" or test_sw_put_ftp"
|
||||
%pytest -m "not functional" --forked -k "not ($donttest ${$python_donttest})"
|
||||
|
||||
%files %{python_files}
|
||||
%license COPYRIGHT LICENSE
|
||||
%doc README.txt README.md
|
||||
%{python_sitelib}/*
|
||||
%dir %{python_sitelib}/jnpr
|
||||
%{python_sitelib}/jnpr/junos
|
||||
%{python_sitelib}/junos_eznc-%{version}*-info
|
||||
%{python_sitelib}/junos_eznc-%{version}*-nspkg.pth
|
||||
|
||||
%changelog
|
||||
|
Loading…
x
Reference in New Issue
Block a user