Upgrade to 0.8.0 to support OpenStack-W

This changes:
1. upgrade to 0.8.0
2. drop the patch which has been upstreamed
This commit is contained in:
huangtianhua 2021-07-15 09:28:49 +00:00
parent 9dd3d5d773
commit 927d0e4712
4 changed files with 9 additions and 31 deletions

View File

@ -1,26 +0,0 @@
From 2599f0e57c0a20bd3f8870dbc2c5479cad502597 Mon Sep 17 00:00:00 2001
From: Sergey Kozlov <sergey.kozlov@intel.com>
Date: Mon, 11 Dec 2017 17:04:20 +0100
Subject: [PATCH] PEP 479: 'return' instead of 'raise StopIteration'.
Fro details please visit https://www.python.org/dev/peps/pep-0479/
---
netaddr/ip/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/netaddr/ip/__init__.py b/netaddr/ip/__init__.py
index 489badf..ecf72d0 100644
--- a/netaddr/ip/__init__.py
+++ b/netaddr/ip/__init__.py
@@ -1258,7 +1258,7 @@ class IPNetwork(BaseIP, IPListMixin):
if not self.prefixlen <= prefixlen:
# Don't return anything.
- raise StopIteration
+ return
# Calculate number of subnets to be returned.
width = self._module.width
--
2.17.1

Binary file not shown.

BIN
netaddr-0.8.0.tar.gz Normal file

Binary file not shown.

View File

@ -1,6 +1,6 @@
Name: python-netaddr
Version: 0.7.19
Release: 15
Version: 0.8.0
Release: 1
Summary: A pure Python network address representation and manipulation library
License: BSD
@ -10,8 +10,6 @@ Source0: https://pypi.python.org/packages/source/n/netaddr/netaddr-%{vers
BuildArch: noarch
BuildRequires: python3-devel python3-setuptools python3-sphinx python3-pytest
Patch0001: 0001-PEP-479-return-instead-of-raise-StopIteration.patch
%description
A network address manipulation library for Python
Provides support for:
@ -45,13 +43,19 @@ PYTHONPATH='../' sphinx-build-%{python3_version} -b html -d build/doctrees sourc
%install
%py3_install
%check
%{__python3} setup.py test
%files -n python3-netaddr
%license COPYRIGHT
%doc AUTHORS CHANGELOG README.md docs/python3/html
%doc AUTHORS CHANGELOG README.rst docs/python3/html
%{python3_sitelib}/*
%{_bindir}/netaddr
%changelog
* Thu Jul 15 2021 huangtianhua <huangtianhua@huawei.com> - 0.8.0-1
- Upgrade to 0.8.0 to support OpenStack-W
* Mon Aug 10 2020 lingsheng<lingsheng@huawei.com> - 0.7.19-15
- Remove python2-netaddr subpackage