From dcd70db15b5d178a87d458f392c1eaf38ba7261cad95fd7967502a301b26c875 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 25 Mar 2019 09:09:38 +0000 Subject: [PATCH] - Update to 1.0.4: * Dropped Python 3.3 support (end-of-life was September 29, 2017). * :doc:`/scripts/csvsql` adds a --chunk-size option to set the chunk size when batch inserting into a table. * csvkit is now tested against Python 3.7. * Dates and datetimes without punctuation can be parsed with --date-format and datetime-format. * Error messages about column indices use 1-based numbering unless --zero is set. - Remove merged patch remove-unittest2.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-csvkit?expand=0&rev=11 --- csvkit-1.0.3.tar.gz | 3 - csvkit-1.0.4.tar.gz | 3 + python-csvkit.changes | 11 ++++ python-csvkit.spec | 7 +- remove-unittest2.patch | 144 ----------------------------------------- 5 files changed, 16 insertions(+), 152 deletions(-) delete mode 100644 csvkit-1.0.3.tar.gz create mode 100644 csvkit-1.0.4.tar.gz delete mode 100644 remove-unittest2.patch diff --git a/csvkit-1.0.3.tar.gz b/csvkit-1.0.3.tar.gz deleted file mode 100644 index 89d3599..0000000 --- a/csvkit-1.0.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a6c859c1321d4697dc41252877249091681297f093e08d9c1e1828a6d52c260c -size 3780150 diff --git a/csvkit-1.0.4.tar.gz b/csvkit-1.0.4.tar.gz new file mode 100644 index 0000000..39e13ed --- /dev/null +++ b/csvkit-1.0.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1353a383531bee191820edfb88418c13dfe1cdfa9dd3dc46f431c05cd2a260a0 +size 3782239 diff --git a/python-csvkit.changes b/python-csvkit.changes index 063cd62..49f51b8 100644 --- a/python-csvkit.changes +++ b/python-csvkit.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Mon Mar 25 09:07:40 UTC 2019 - Tomáš Chvátal + +- Update to 1.0.4: + * Dropped Python 3.3 support (end-of-life was September 29, 2017). + * :doc:`/scripts/csvsql` adds a --chunk-size option to set the chunk size when batch inserting into a table. + * csvkit is now tested against Python 3.7. + * Dates and datetimes without punctuation can be parsed with --date-format and datetime-format. + * Error messages about column indices use 1-based numbering unless --zero is set. +- Remove merged patch remove-unittest2.patch + ------------------------------------------------------------------- Wed Feb 27 08:42:06 UTC 2019 - Tomáš Chvátal diff --git a/python-csvkit.spec b/python-csvkit.spec index 96ecc22..5f87c77 100644 --- a/python-csvkit.spec +++ b/python-csvkit.spec @@ -18,15 +18,13 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-csvkit -Version: 1.0.3 +Version: 1.0.4 Release: 0 Summary: A library of utilities for working with CSV License: MIT 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 mcepl@suse.cz -Patch0: remove-unittest2.patch BuildRequires: %{python_module SQLAlchemy >= 0.9.3} BuildRequires: %{python_module Sphinx >= 1.0.7} BuildRequires: %{python_module aenum} @@ -60,7 +58,6 @@ Aaron Bycoffe. %prep %setup -q -n csvkit-%{version} -%autopatch -p1 # find and remove unneeded shebangs find csvkit -name "*.py" | xargs sed -i '1 {/^#!/ d}' @@ -73,7 +70,7 @@ find csvkit -name "*.py" | xargs sed -i '1 {/^#!/ d}' %check export LANG=en_US.UTF-8 -%python_expand nosetests-%{$python_bin_suffix} +%python_expand nosetests-%{$python_bin_suffix} -v %files %python_files %license COPYING diff --git a/remove-unittest2.patch b/remove-unittest2.patch deleted file mode 100644 index 5e94dc7..0000000 --- a/remove-unittest2.patch +++ /dev/null @@ -1,144 +0,0 @@ -From 7d35c066d2dd95aad58c9f07bae28f572e53b19f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= -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 - --try: -- import unittest2 as unittest --except ImportError: -- import unittest -+import unittest - - from csvkit.cleanup import join_rows - ---- a/tests/test_cli.py -+++ b/tests/test_cli.py -@@ -1,9 +1,6 @@ - #!/usr/bin/env python - --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() - - def test_geojson_with_id(self): ---- a/tests/test_utilities/test_csvstat.py -+++ b/tests/test_utilities/test_csvstat.py -@@ -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 - --try: -- import unittest2 as unittest --except ImportError: -- import unittest -- - from csvkit.exceptions import ColumnIdentifierError, RequiredHeaderError - -