From 3f59fefcaa6d2e8a60fe3d619793e05255d42df2 Mon Sep 17 00:00:00 2001 From: John Eckersberg Date: Thu, 14 Dec 2023 11:04:29 -0500 Subject: [PATCH] Remove old unused patches --- 0001-Do-not-override-executable-path.patch | 29 --------- ...d-github-Issue-no.-2.-Thanks-keesbos.patch | 65 ------------------- ...eturn-instead-of-raise-StopIteration.patch | 26 -------- ...ts-in-issue-149-python-3-regression-.patch | 53 --------------- python-netaddr-fix-assertion-in-test.patch | 35 ---------- 5 files changed, 208 deletions(-) delete mode 100644 0001-Do-not-override-executable-path.patch delete mode 100644 0001-Fixed-github-Issue-no.-2.-Thanks-keesbos.patch delete mode 100644 0001-PEP-479-return-instead-of-raise-StopIteration.patch delete mode 100644 0001-fixed-broken-tests-in-issue-149-python-3-regression-.patch delete mode 100644 python-netaddr-fix-assertion-in-test.patch diff --git a/0001-Do-not-override-executable-path.patch b/0001-Do-not-override-executable-path.patch deleted file mode 100644 index 89c0a9c..0000000 --- a/0001-Do-not-override-executable-path.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 8b08c463a49bdcca455cdfbefa971c89bd309ddf Mon Sep 17 00:00:00 2001 -From: John Eckersberg -Date: Mon, 19 Feb 2018 15:20:54 -0500 -Subject: [PATCH] Do not override executable path - -Resolves: RHBZ#1546800 ---- - setup.py | 5 ----- - 1 file changed, 5 deletions(-) - -diff --git a/setup.py b/setup.py -index 2bd2a08..4cd2780 100644 ---- a/setup.py -+++ b/setup.py -@@ -177,11 +177,6 @@ def main(): - scripts=['netaddr/tools/netaddr'], - url='https://github.com/drkjam/netaddr/', - version=netaddr.__version__, -- options={ -- 'build_scripts': { -- 'executable': '/usr/bin/env python', -- }, -- }, - ) - - setup(**setup_options) --- -2.14.3 - diff --git a/0001-Fixed-github-Issue-no.-2.-Thanks-keesbos.patch b/0001-Fixed-github-Issue-no.-2.-Thanks-keesbos.patch deleted file mode 100644 index 28d4d61..0000000 --- a/0001-Fixed-github-Issue-no.-2.-Thanks-keesbos.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 80071f4450261b70b70f537bc2b54d2c97d9f562 Mon Sep 17 00:00:00 2001 -From: "David P. D. Moss" -Date: Thu, 25 Nov 2010 08:53:49 +0000 -Subject: [PATCH] Fixed github Issue no. 2. Thanks keesbos. - ---- - netaddr/ip/__init__.py | 2 ++ - netaddr/tests/2.x/ip/constructor.txt | 11 +++++++++++ - netaddr/tests/3.x/ip/constructor.txt | 11 +++++++++++ - 3 files changed, 24 insertions(+), 0 deletions(-) - -diff --git a/netaddr/ip/__init__.py b/netaddr/ip/__init__.py -index 0179c38..e4a6b7b 100644 ---- a/netaddr/ip/__init__.py -+++ b/netaddr/ip/__init__.py -@@ -779,6 +779,8 @@ def parse_ip_network(module, addr, implicit_prefix=False, flags=0): - # Try a partial IPv4 network address... - expanded_addr = _ipv4.expand_partial_address(val1) - ip = IPAddress(expanded_addr, module.version, flags=INET_PTON) -+ else: -+ raise AddrFormatError('invalid IPNetwork address %s!' % addr) - value = ip._value - - try: -diff --git a/netaddr/tests/2.x/ip/constructor.txt b/netaddr/tests/2.x/ip/constructor.txt -index f67f5e4..5a9e978 100644 ---- a/netaddr/tests/2.x/ip/constructor.txt -+++ b/netaddr/tests/2.x/ip/constructor.txt -@@ -209,3 +209,14 @@ IPNetwork('172.24.0.0/16') - - - }}} -+ -+Negative testing -+ -+{{{ -+ -+>>> IPNetwork('foo') -+Traceback (most recent call last): -+... -+AddrFormatError: invalid IPNetwork foo -+ -+}}} -diff --git a/netaddr/tests/3.x/ip/constructor.txt b/netaddr/tests/3.x/ip/constructor.txt -index 2ec47c0..35a5cd6 100644 ---- a/netaddr/tests/3.x/ip/constructor.txt -+++ b/netaddr/tests/3.x/ip/constructor.txt -@@ -209,3 +209,14 @@ IPNetwork('172.24.0.0/16') - - - }}} -+ -+Negative testing -+ -+{{{ -+ -+>>> IPNetwork('foo') -+Traceback (most recent call last): -+... -+netaddr.core.AddrFormatError: invalid IPNetwork foo -+ -+}}} --- -1.7.5.2 - diff --git a/0001-PEP-479-return-instead-of-raise-StopIteration.patch b/0001-PEP-479-return-instead-of-raise-StopIteration.patch deleted file mode 100644 index 2aa13c9..0000000 --- a/0001-PEP-479-return-instead-of-raise-StopIteration.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 2599f0e57c0a20bd3f8870dbc2c5479cad502597 Mon Sep 17 00:00:00 2001 -From: Sergey Kozlov -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 - diff --git a/0001-fixed-broken-tests-in-issue-149-python-3-regression-.patch b/0001-fixed-broken-tests-in-issue-149-python-3-regression-.patch deleted file mode 100644 index 0c03e02..0000000 --- a/0001-fixed-broken-tests-in-issue-149-python-3-regression-.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 2ab73f10be7069c9412e853d2d0caf29bd624012 Mon Sep 17 00:00:00 2001 -From: David Moss -Date: Mon, 16 Jan 2017 22:17:16 +0000 -Subject: [PATCH] - fixed broken tests in issue #149 (python 3 regression in - 0.7.19) - only affects test suite - ---- - netaddr/tests/eui/test_ieee_parsers.py | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/netaddr/tests/eui/test_ieee_parsers.py b/netaddr/tests/eui/test_ieee_parsers.py -index 7877f09..81f1faa 100644 ---- a/netaddr/tests/eui/test_ieee_parsers.py -+++ b/netaddr/tests/eui/test_ieee_parsers.py -@@ -12,7 +12,7 @@ SAMPLE_DIR = os.path.dirname(__file__) - def test_oui_parser_py2(): - from cStringIO import StringIO - outfile = StringIO() -- with open(os.path.join(SAMPLE_DIR, 'sample_oui.txt')) as infile: -+ with open(os.path.join(SAMPLE_DIR, 'sample_oui.txt'), 'rb') as infile: - iab_parser = OUIIndexParser(infile) - iab_parser.attach(FileIndexer(outfile)) - iab_parser.parse() -@@ -23,7 +23,7 @@ def test_oui_parser_py2(): - def test_iab_parser_py2(): - from cStringIO import StringIO - outfile = StringIO() -- with open(os.path.join(SAMPLE_DIR, 'sample_iab.txt')) as infile: -+ with open(os.path.join(SAMPLE_DIR, 'sample_iab.txt'), 'rb') as infile: - iab_parser = IABIndexParser(infile) - iab_parser.attach(FileIndexer(outfile)) - iab_parser.parse() -@@ -34,7 +34,7 @@ def test_iab_parser_py2(): - def test_oui_parser_py3(): - from io import StringIO - outfile = StringIO() -- with open(os.path.join(SAMPLE_DIR, 'sample_oui.txt')) as infile: -+ with open(os.path.join(SAMPLE_DIR, 'sample_oui.txt'), 'rb') as infile: - iab_parser = OUIIndexParser(infile) - iab_parser.attach(FileIndexer(outfile)) - iab_parser.parse() -@@ -45,7 +45,7 @@ def test_oui_parser_py3(): - def test_iab_parser_py3(): - from io import StringIO - outfile = StringIO() -- with open(os.path.join(SAMPLE_DIR, 'sample_iab.txt')) as infile: -+ with open(os.path.join(SAMPLE_DIR, 'sample_iab.txt'), 'rb') as infile: - iab_parser = IABIndexParser(infile) - iab_parser.attach(FileIndexer(outfile)) - iab_parser.parse() --- -2.9.3 - diff --git a/python-netaddr-fix-assertion-in-test.patch b/python-netaddr-fix-assertion-in-test.patch deleted file mode 100644 index f0912c6..0000000 --- a/python-netaddr-fix-assertion-in-test.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 4b1f09a7e122f6b7af699242b58b5284c5eeab00 Mon Sep 17 00:00:00 2001 -From: John Eckersberg -Date: Tue, 30 Jun 2015 11:03:57 -0400 -Subject: [PATCH] Fix bad pop() assumption in test - -Do not assume that IPSet.pop will always return the same item. The -pop method is implemented via the popitem method on the underlying -_cidrs object, which is a dict. - -dict.popitem is documented as: - -Remove and return an arbitrary (key, value) pair from the dictionary. - -So one cannot assert that the value popped from an IPSet will be a -specific item in the set. - -Instead, assert that the item popped out of the set is present in the -other set. ---- - test/ip/test_ip_sets.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/ip/test_ip_sets.py b/test/ip/test_ip_sets.py -index 3732a11..32589e1 100644 ---- a/test/ip/test_ip_sets.py -+++ b/test/ip/test_ip_sets.py -@@ -34,7 +34,7 @@ def test_ipset_basic_api(): - ]) - - assert set1 == set2 -- assert set2.pop() == IPNetwork('192.0.2.4/30') -+ assert set2.pop() in set1 - assert set1 != set2 - -