Hello community,

here is the log from the commit of package python-csvkit for openSUSE:Factory 
checked in at 2018-08-13 09:55:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-csvkit (Old)
 and      /work/SRC/openSUSE:Factory/.python-csvkit.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-csvkit"

Mon Aug 13 09:55:34 2018 rev:4 rq:628845 version:1.0.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-csvkit/python-csvkit.changes      
2018-08-12 20:55:22.901468322 +0200
+++ /work/SRC/openSUSE:Factory/.python-csvkit.new/python-csvkit.changes 
2018-08-13 09:55:37.082987295 +0200
@@ -1,0 +2,7 @@
+Sun Aug 12 20:31:00 UTC 2018 - mc...@suse.com
+
+- We already use six, so it is better to use monkey-patching already
+  prepared there. remove-unittest2.patch updated.
+  Upstream pull request https://github.com/wireservice/csvkit/pull/979
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-csvkit.spec ++++++
--- /var/tmp/diff_new_pack.SxCm5D/_old  2018-08-13 09:55:38.610990391 +0200
+++ /var/tmp/diff_new_pack.SxCm5D/_new  2018-08-13 09:55:38.610990391 +0200
@@ -25,6 +25,7 @@
 Group:          Development/Languages/Python
 Url:            https://github.com/wireservice/csvkit
 Source:         
https://files.pythonhosted.org/packages/source/c/csvkit/csvkit-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM https://github.com/wireservice/csvkit/pull/979 
mc...@suse.cz
 Patch0:         remove-unittest2.patch
 BuildRequires:  %{python_module SQLAlchemy >= 0.9.3}
 BuildRequires:  %{python_module Sphinx >= 1.0.7}

++++++ remove-unittest2.patch ++++++
--- /var/tmp/diff_new_pack.SxCm5D/_old  2018-08-13 09:55:38.630990431 +0200
+++ /var/tmp/diff_new_pack.SxCm5D/_new  2018-08-13 09:55:38.630990431 +0200
@@ -1,41 +1,144 @@
---- a/tests/test_utilities/test_csvjson.py
-+++ b/tests/test_utilities/test_csvjson.py
-@@ -3,6 +3,7 @@
+From 7d35c066d2dd95aad58c9f07bae28f572e53b19f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= <mc...@cepl.eu>
+Date: Sun, 12 Aug 2018 22:33:39 +0200
+Subject: [PATCH] Remove unnecessary dependency on unittest2
+
+csvkit doesn't support Python 2.6, so there is no need to use unittest2
+which sole purpose is to bring unittest from Python 3.* (and 2.7) to
+2.6.
+
+Compatibility between 2.7 and 3.* API is provided by six (which is
+already requirement for csvkit).
+---
+ requirements-py2.txt                 | 1 -
+ tests/test_cleanup.py                | 5 +----
+ tests/test_cli.py                    | 5 +----
+ tests/test_convert/test_convert.py   | 5 +----
+ tests/test_grep.py                   | 6 +-----
+ tests/test_utilities/test_csvjson.py | 6 ++++--
+ tests/test_utilities/test_csvstat.py | 6 ++++--
+ tests/utils.py                       | 6 +-----
+ 8 files changed, 13 insertions(+), 27 deletions(-)
+
+--- a/tests/test_cleanup.py
++++ b/tests/test_cleanup.py
+@@ -1,9 +1,6 @@
+ #!/usr/bin/env python
  
- import json
- import sys
+-try:
+-    import unittest2 as unittest
+-except ImportError:
+-    import unittest
 +import unittest
  
- import six
+ from csvkit.cleanup import join_rows
  
-@@ -14,6 +15,11 @@ except ImportError:
- from csvkit.utilities.csvjson import CSVJSON, launch_new_instance
- from tests.utils import CSVKitTestCase, EmptyFileTests
+--- a/tests/test_cli.py
++++ b/tests/test_cli.py
+@@ -1,9 +1,6 @@
+ #!/usr/bin/env python
  
-+if not hasattr(unittest.TestCase, 'assertRegex'):
-+    setattr(unittest.TestCase, 'assertRegex', 
unittest.TestCase.assertRegexpMatches)
-+
-+if not hasattr(unittest.TestCase, 'assertRaisesRegex'):
-+    setattr(unittest.TestCase, 'assertRaisesRegex', 
unittest.TestCase.assertRaisesRegexp)
+-try:
+-    import unittest2 as unittest
+-except ImportError:
+-    import unittest
++import unittest
+ 
+ from csvkit.cli import match_column_identifier, parse_column_identifiers
+ 
+--- a/tests/test_convert/test_convert.py
++++ b/tests/test_convert/test_convert.py
+@@ -1,9 +1,6 @@
+ #!/usr/bin/env python
+ 
+-try:
+-    import unittest2 as unittest
+-except ImportError:
+-    import unittest
++import unittest
+ 
+ from csvkit import convert
+ 
+--- a/tests/test_grep.py
++++ b/tests/test_grep.py
+@@ -1,11 +1,7 @@
+ #!/usr/bin/env python
+ 
+ import re
+-
+-try:
+-    import unittest2 as unittest
+-except ImportError:
+-    import unittest
++import unittest
+ 
+ from csvkit.grep import FilteringCSVReader
+ from csvkit.exceptions import ColumnIdentifierError
+--- a/tests/test_utilities/test_csvjson.py
++++ b/tests/test_utilities/test_csvjson.py
+@@ -58,7 +58,7 @@ class TestCSVJSON(CSVKitTestCase, EmptyF
+         output = self.get_output(['-i', '4', 'examples/dummy.csv'])
+         js = json.loads(output)
+         self.assertDictEqual(js[0], {'a': True, 'c': 3.0, 'b': 2.0})
+-        self.assertRegex(output, '        "a": true,')
++        six.assertRegex(self, output, '        "a": true,')
+ 
+     def test_keying(self):
+         js = json.loads(self.get_output(['-k', 'a', 'examples/dummy.csv']))
+@@ -67,7 +67,9 @@ class TestCSVJSON(CSVKitTestCase, EmptyF
+     def test_duplicate_keys(self):
+         output_file = six.StringIO()
+         utility = CSVJSON(['-k', 'a', 'examples/dummy3.csv'], output_file)
+-        self.assertRaisesRegex(ValueError, 'Value True is not unique in the 
key column.', utility.run)
++        six.assertRaisesRegex(self, ValueError,
++                              'Value True is not unique in the key column.',
++                              utility.run)
+         output_file.close()
  
- class TestCSVJSON(CSVKitTestCase, EmptyFileTests):
-     Utility = CSVJSON
+     def test_geojson_with_id(self):
 --- a/tests/test_utilities/test_csvstat.py
 +++ b/tests/test_utilities/test_csvstat.py
-@@ -1,6 +1,7 @@
- #!/usr/bin/env python
+@@ -2,6 +2,8 @@
+ 
+ import sys
+ 
++import six
++
+ import agate
+ 
+ try:
+@@ -47,11 +49,11 @@ class TestCSVStat(CSVKitTestCase, Column
+ 
+     def test_unique(self):
+         output = self.get_output(['-c', 'county', 
'examples/realdata/ks_1033_data.csv'])
+-        self.assertRegex(output, r'Unique values:\s+73')
++        six.assertRegex(self, output, r'Unique values:\s+73')
+ 
+     def test_max_length(self):
+         output = self.get_output(['-c', 'county', 
'examples/realdata/ks_1033_data.csv'])
+-        self.assertRegex(output, r'Longest value:\s+12')
++        six.assertRegex(self, output, r'Longest value:\s+12')
+ 
+     def test_freq_list(self):
+         output = self.get_output(['examples/realdata/ks_1033_data.csv'])
+--- a/tests/utils.py
++++ b/tests/utils.py
+@@ -20,17 +20,13 @@ And paste:
+ """
  
  import sys
 +import unittest
+ import warnings
+ from contextlib import contextmanager
  
  import agate
+ import six
  
-@@ -12,6 +13,8 @@ except ImportError:
- from csvkit.utilities.csvstat import CSVStat, launch_new_instance
- from tests.utils import CSVKitTestCase, ColumnsTests, EmptyFileTests, 
NamesTests
+-try:
+-    import unittest2 as unittest
+-except ImportError:
+-    import unittest
+-
+ from csvkit.exceptions import ColumnIdentifierError, RequiredHeaderError
  
-+if not hasattr(unittest.TestCase, 'assertRegex'):
-+    setattr(unittest.TestCase, 'assertRegex', 
unittest.TestCase.assertRegexpMatches)
  
- class TestCSVStat(CSVKitTestCase, ColumnsTests, EmptyFileTests, NamesTests):
-     Utility = CSVStat


Reply via email to