diff --git a/python-tld.changes b/python-tld.changes index f2374ee..a42aadb 100644 --- a/python-tld.changes +++ b/python-tld.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Mon Sep 16 13:21:10 UTC 2019 - Tomáš Chvátal + +- Update to 0.9.6: + * Fix for update-tld-names returns a non-zero exit code on success + * Minor tests improvements. + +------------------------------------------------------------------- +Sat Sep 14 20:05:33 UTC 2019 - Sebastian Wagner + +- update to version 0.9.5: + - Tests improvements. +- update to version 0.9.4: + - Optimisations in setup.py, tests and console scripts. + - Skip testing the update-tld-names functionality if no internet is available. +- add skip_internet_tests.patch +- remove remove-download-test.patch + ------------------------------------------------------------------- Sun Apr 7 11:31:45 UTC 2019 - Sebastian Wagner diff --git a/python-tld.spec b/python-tld.spec index c9d2e10..47278d5 100644 --- a/python-tld.spec +++ b/python-tld.spec @@ -18,15 +18,15 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-tld -Version: 0.9.3 +Version: 0.9.6 Release: 0 Summary: URL top level domain (TLD) extraction module License: MPL-1.1 OR GPL-2.0-only OR LGPL-2.1-only Group: Development/Languages/Python Url: https://github.com/barseghyanartur/tld Source: https://files.pythonhosted.org/packages/source/t/tld/tld-%{version}.tar.gz -# PATCH-FIX-OPENSUSE remove-download-test.patch -Patch0: remove-download-test.patch +# PATCH-FIX-OPENSUSE skip_internet_tests.patch +Patch0: skip_internet_tests.patch BuildRequires: %{python_module setuptools} BuildRequires: python-rpm-macros # SECTION test requirements @@ -49,7 +49,7 @@ A list of TLD names is taken from Mozillas public suffix list: %prep %setup -q -n tld-%{version} -sed -i '1s/^#!.*/#!\/usr\/bin\/python3/' src/tld/bin/update-tld-names +#sed -i '1s/^#!.*/#!\/usr\/bin\/python3/' src/tld/bin/update-tld-names %patch0 -p1 %build diff --git a/remove-download-test.patch b/remove-download-test.patch deleted file mode 100644 index edb8bda..0000000 --- a/remove-download-test.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- tld-0.9.2/src/tld/tests/test_core.py 2019-01-10 22:54:41.000000000 +0100 -+++ tld-0.9.2/src/tld/tests/test_core.py 2019-01-15 21:40:19.489828184 +0100 -@@ -296,13 +296,6 @@ - return res - - @log_info -- def test_1_update_tld_names(self): -- """Test updating the tld names (re-fetch mozilla source).""" -- res = update_tld_names(fail_silently=True) -- self.assertTrue(res) -- return res -- -- @log_info - def test_2_fld_good_patterns_pass(self): - """Test good URL patterns.""" - res = [] ---- tld-0.9.2/src/tld/tests/test_commands.py 2019-01-10 22:54:41.000000000 +0100 -+++ tld-0.9.2/src/tld/tests/test_commands1.py 2019-01-15 21:51:14.998679024 +0100 -@@ -23,22 +23,6 @@ - def setUp(self): - """Set up.""" - -- @log_info -- def test_1_update_tld_names_command(self): -- """Test updating the tld names (re-fetch mozilla source).""" -- res = subprocess.check_output(shlex.split('update-tld-names')).strip() -- self.assertEqual(res, b'True') -- return res -- -- @log_info -- def test_2_update_tld_names_module(self): -- """Test updating the tld names (re-fetch mozilla source).""" -- res = subprocess.check_output( -- shlex.split('python src/tld/commands/update_tld_names.py') -- ).strip() -- self.assertEqual(res, b'True') -- return res -- - - if __name__ == '__main__': - unittest.main() diff --git a/skip_internet_tests.patch b/skip_internet_tests.patch new file mode 100644 index 0000000..e910e89 --- /dev/null +++ b/skip_internet_tests.patch @@ -0,0 +1,17 @@ +--- tld-0.9.5/src/tld/tests/base.py 2019-09-11 01:17:41.000000000 +0200 ++++ tld-0.9.5/src/tld/tests/base.py 2019-09-14 22:20:02.920343051 +0200 +@@ -55,13 +55,7 @@ + OpenPort: 53/tcp + Service: domain (DNS/TCP) + """ +- try: +- socket.setdefaulttimeout(timeout) +- socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect((host, port)) +- return True +- except socket.error as ex: +- print(ex) +- return False ++ return False + + + def internet_available_only(func): diff --git a/tld-0.9.3.tar.gz b/tld-0.9.3.tar.gz deleted file mode 100644 index 8ff8716..0000000 --- a/tld-0.9.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f766638e4e972445ce18e4dc0fadc0189c0a2a4f7d15e50c3c25d49af9cb1744 -size 247523 diff --git a/tld-0.9.6.tar.gz b/tld-0.9.6.tar.gz new file mode 100644 index 0000000..999b693 --- /dev/null +++ b/tld-0.9.6.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89a7a403a4a5de1ca7b64550df8a8a2abdfbbd1556e1b8cdfe251c0f90ab2f3a +size 251010