Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-tablib for openSUSE:Factory 
checked in at 2022-12-15 19:24:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-tablib (Old)
 and      /work/SRC/openSUSE:Factory/.python-tablib.new.1835 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-tablib"

Thu Dec 15 19:24:47 2022 rev:11 rq:1042864 version:3.3.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-tablib/python-tablib.changes      
2022-10-11 18:05:49.194111004 +0200
+++ /work/SRC/openSUSE:Factory/.python-tablib.new.1835/python-tablib.changes    
2022-12-15 19:24:54.959957580 +0100
@@ -1,0 +2,7 @@
+Tue Dec 13 17:21:30 UTC 2022 - Yogalakshmi Arunachalam <yarunacha...@suse.com>
+
+- Update to version 3.3.0 
+  * Add support for Python 3.11 (#525).
+  * ODS export: integers/floats/decimals are exported as numbers (#527).
+
+-------------------------------------------------------------------

Old:
----
  tablib-3.2.1.tar.gz

New:
----
  tablib-3.3.0.tar.gz

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

Other differences:
------------------
++++++ python-tablib.spec ++++++
--- /var/tmp/diff_new_pack.ITB0c4/_old  2022-12-15 19:24:55.431960266 +0100
+++ /var/tmp/diff_new_pack.ITB0c4/_new  2022-12-15 19:24:55.439960311 +0100
@@ -24,7 +24,7 @@
 %define         skip_python2 1
 %define         skip_python36 1
 Name:           python-tablib
-Version:        3.2.1
+Version:        3.3.0
 Release:        0
 Summary:        Format agnostic tabular data library (XLS, JSON, YAML, CSV)
 License:        MIT

++++++ tablib-3.2.1.tar.gz -> tablib-3.3.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tablib-3.2.1/.github/workflows/docs-lint.yml 
new/tablib-3.3.0/.github/workflows/docs-lint.yml
--- old/tablib-3.2.1/.github/workflows/docs-lint.yml    2022-04-09 
16:17:58.000000000 +0200
+++ new/tablib-3.3.0/.github/workflows/docs-lint.yml    2022-12-10 
15:04:35.000000000 +0100
@@ -18,7 +18,7 @@
       - uses: actions/checkout@v3
 
       - name: Set up Python
-        uses: actions/setup-python@v3
+        uses: actions/setup-python@v4
         with:
           python-version: "3.10"
           cache: pip
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tablib-3.2.1/.github/workflows/release.yml 
new/tablib-3.3.0/.github/workflows/release.yml
--- old/tablib-3.2.1/.github/workflows/release.yml      2022-04-09 
16:17:58.000000000 +0200
+++ new/tablib-3.3.0/.github/workflows/release.yml      2022-12-10 
15:04:35.000000000 +0100
@@ -20,7 +20,7 @@
           fetch-depth: 0
 
       - name: Set up Python
-        uses: actions/setup-python@v3
+        uses: actions/setup-python@v4
         with:
           python-version: "3.10"
           cache: pip
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tablib-3.2.1/.github/workflows/test.yml 
new/tablib-3.3.0/.github/workflows/test.yml
--- old/tablib-3.2.1/.github/workflows/test.yml 2022-04-09 16:17:58.000000000 
+0200
+++ new/tablib-3.3.0/.github/workflows/test.yml 2022-12-10 15:04:35.000000000 
+0100
@@ -11,14 +11,14 @@
     strategy:
       fail-fast: false
       matrix:
-        python-version: ["3.7", "3.8", "3.9", "3.10"]
+        python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
         os: [ubuntu-latest, macOS-latest, windows-latest]
 
     steps:
     - uses: actions/checkout@v3
 
     - name: Set up Python ${{ matrix.python-version }}
-      uses: actions/setup-python@v3
+      uses: actions/setup-python@v4
       with:
         python-version: ${{ matrix.python-version }}
         cache: pip
@@ -36,6 +36,6 @@
         tox -e py
 
     - name: Upload coverage
-      uses: codecov/codecov-action@v2
+      uses: codecov/codecov-action@v3
       with:
         name: ${{ matrix.os }} Python ${{ matrix.python-version }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tablib-3.2.1/.pre-commit-config.yaml 
new/tablib-3.3.0/.pre-commit-config.yaml
--- old/tablib-3.2.1/.pre-commit-config.yaml    2022-04-09 16:17:58.000000000 
+0200
+++ new/tablib-3.3.0/.pre-commit-config.yaml    2022-12-10 15:04:35.000000000 
+0100
@@ -1,6 +1,6 @@
 repos:
   - repo: https://github.com/asottile/pyupgrade
-    rev: v2.31.1
+    rev: v2.38.2
     hooks:
       - id: pyupgrade
         args: [--py37-plus]
@@ -9,7 +9,11 @@
     rev: 5.10.1
     hooks:
       - id: isort
-        additional_dependencies: [toml]
+
+  - repo: https://github.com/isidentical/teyit
+    rev: 0.4.3
+    hooks:
+      -   id: teyit
 
   - repo: https://github.com/pre-commit/pygrep-hooks
     rev: v1.9.0
@@ -18,7 +22,7 @@
       - id: rst-backticks
 
   - repo: https://github.com/pre-commit/pre-commit-hooks
-    rev: v4.1.0
+    rev: v4.3.0
     hooks:
       - id: check-merge-conflict
       - id: check-toml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tablib-3.2.1/HISTORY.md new/tablib-3.3.0/HISTORY.md
--- old/tablib-3.2.1/HISTORY.md 2022-04-09 16:17:58.000000000 +0200
+++ new/tablib-3.3.0/HISTORY.md 2022-12-10 15:04:35.000000000 +0100
@@ -1,5 +1,12 @@
 # History
 
+## 3.3.0 (2022-12-10)
+
+### Improvements
+
+- Add support for Python 3.11 (#525).
+- ODS export: integers/floats/decimals are exported as numbers (#527).
+
 ## 3.2.1 (2022-04-09)
 
 ### Bugfixes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tablib-3.2.1/PKG-INFO new/tablib-3.3.0/PKG-INFO
--- old/tablib-3.2.1/PKG-INFO   2022-04-09 16:18:14.908756500 +0200
+++ new/tablib-3.3.0/PKG-INFO   2022-12-10 15:04:54.534745700 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: tablib
-Version: 3.2.1
+Version: 3.3.0
 Summary: Format agnostic tabular data library (XLS, JSON, YAML, CSV)
 Home-page: https://tablib.readthedocs.io
 Author: Kenneth Reitz
@@ -10,7 +10,6 @@
 License: MIT
 Project-URL: Documentation, https://tablib.readthedocs.io
 Project-URL: Source, https://github.com/jazzband/tablib
-Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Intended Audience :: Developers
 Classifier: Natural Language :: English
@@ -22,6 +21,7 @@
 Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3.10
+Classifier: Programming Language :: Python :: 3.11
 Requires-Python: >=3.7
 Description-Content-Type: text/markdown
 Provides-Extra: all
@@ -83,6 +83,13 @@
 
 # History
 
+## 3.3.0 (2022-12-10)
+
+### Improvements
+
+- Add support for Python 3.11 (#525).
+- ODS export: integers/floats/decimals are exported as numbers (#527).
+
 ## 3.2.1 (2022-04-09)
 
 ### Bugfixes
@@ -455,5 +462,3 @@
 * Export Support for XLS, JSON, YAML, and CSV.
 * DataBook Export for XLS, JSON, and YAML.
 * Python Dict Property Support.
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tablib-3.2.1/setup.py new/tablib-3.3.0/setup.py
--- old/tablib-3.2.1/setup.py   2022-04-09 16:17:58.000000000 +0200
+++ new/tablib-3.3.0/setup.py   2022-12-10 15:04:35.000000000 +0100
@@ -37,6 +37,7 @@
         'Programming Language :: Python :: 3.8',
         'Programming Language :: Python :: 3.9',
         'Programming Language :: Python :: 3.10',
+        'Programming Language :: Python :: 3.11',
     ],
     python_requires='>=3.7',
     extras_require={
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tablib-3.2.1/src/tablib/_version.py 
new/tablib-3.3.0/src/tablib/_version.py
--- old/tablib-3.2.1/src/tablib/_version.py     2022-04-09 16:18:13.000000000 
+0200
+++ new/tablib-3.3.0/src/tablib/_version.py     2022-12-10 15:04:54.000000000 
+0100
@@ -1,5 +1,5 @@
 # coding: utf-8
 # file generated by setuptools_scm
 # don't change, don't track in version control
-version = '3.2.1'
-version_tuple = (3, 2, 1)
+__version__ = version = '3.3.0'
+__version_tuple__ = version_tuple = (3, 3, 0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tablib-3.2.1/src/tablib/formats/_ods.py 
new/tablib-3.3.0/src/tablib/formats/_ods.py
--- old/tablib-3.2.1/src/tablib/formats/_ods.py 2022-04-09 16:17:58.000000000 
+0200
+++ new/tablib-3.3.0/src/tablib/formats/_ods.py 2022-12-10 15:04:35.000000000 
+0100
@@ -1,6 +1,7 @@
 """ Tablib - ODF Support.
 """
 
+import numbers
 from io import BytesIO
 
 from odf import opendocument, style, table, text
@@ -53,45 +54,18 @@
             _offset = i
             _package.insert((sep[0] + _offset), (sep[1],))
 
-        for i, row in enumerate(_package):
-            row_number = i + 1
-            odf_row = table.TableRow(stylename=bold, 
defaultcellstylename='bold')
+        for row_number, row in enumerate(_package, start=1):
+            is_header = row_number == 1 and dataset.headers
+            style = bold if is_header else None
+            odf_row = table.TableRow(stylename=style)
+            ws.addElement(odf_row)
             for j, col in enumerate(row):
-                try:
-                    col = str(col, errors='ignore')
-                except TypeError:
-                    # col is already str
-                    pass
-                ws.addElement(table.TableColumn())
-
-                # bold headers
-                if (row_number == 1) and dataset.headers:
-                    odf_row.setAttribute('stylename', bold)
-                    ws.addElement(odf_row)
-                    cell = table.TableCell()
-                    p = text.P()
-                    p.addElement(text.Span(text=col, stylename=bold))
-                    cell.addElement(p)
-                    odf_row.addElement(cell)
-
-                # wrap the rest
+                if isinstance(col, numbers.Number):
+                    cell = table.TableCell(valuetype="float", value=col)
                 else:
-                    try:
-                        if '\n' in col:
-                            ws.addElement(odf_row)
-                            cell = table.TableCell()
-                            cell.addElement(text.P(text=col))
-                            odf_row.addElement(cell)
-                        else:
-                            ws.addElement(odf_row)
-                            cell = table.TableCell()
-                            cell.addElement(text.P(text=col))
-                            odf_row.addElement(cell)
-                    except TypeError:
-                        ws.addElement(odf_row)
-                        cell = table.TableCell()
-                        cell.addElement(text.P(text=col))
-                        odf_row.addElement(cell)
+                    cell = table.TableCell(valuetype="string")
+                    cell.addElement(text.P(text=str(col), stylename=style))
+                odf_row.addElement(cell)
 
     @classmethod
     def detect(cls, stream):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tablib-3.2.1/src/tablib.egg-info/PKG-INFO 
new/tablib-3.3.0/src/tablib.egg-info/PKG-INFO
--- old/tablib-3.2.1/src/tablib.egg-info/PKG-INFO       2022-04-09 
16:18:14.000000000 +0200
+++ new/tablib-3.3.0/src/tablib.egg-info/PKG-INFO       2022-12-10 
15:04:54.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: tablib
-Version: 3.2.1
+Version: 3.3.0
 Summary: Format agnostic tabular data library (XLS, JSON, YAML, CSV)
 Home-page: https://tablib.readthedocs.io
 Author: Kenneth Reitz
@@ -10,7 +10,6 @@
 License: MIT
 Project-URL: Documentation, https://tablib.readthedocs.io
 Project-URL: Source, https://github.com/jazzband/tablib
-Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Intended Audience :: Developers
 Classifier: Natural Language :: English
@@ -22,6 +21,7 @@
 Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3.10
+Classifier: Programming Language :: Python :: 3.11
 Requires-Python: >=3.7
 Description-Content-Type: text/markdown
 Provides-Extra: all
@@ -83,6 +83,13 @@
 
 # History
 
+## 3.3.0 (2022-12-10)
+
+### Improvements
+
+- Add support for Python 3.11 (#525).
+- ODS export: integers/floats/decimals are exported as numbers (#527).
+
 ## 3.2.1 (2022-04-09)
 
 ### Bugfixes
@@ -455,5 +462,3 @@
 * Export Support for XLS, JSON, YAML, and CSV.
 * DataBook Export for XLS, JSON, and YAML.
 * Python Dict Property Support.
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tablib-3.2.1/tests/test_tablib.py 
new/tablib-3.3.0/tests/test_tablib.py
--- old/tablib-3.2.1/tests/test_tablib.py       2022-04-09 16:17:58.000000000 
+0200
+++ new/tablib-3.3.0/tests/test_tablib.py       2022-12-10 15:04:35.000000000 
+0100
@@ -7,6 +7,7 @@
 import pickle
 import unittest
 from collections import OrderedDict
+from decimal import Decimal
 from io import BytesIO, StringIO
 from pathlib import Path
 from uuid import uuid4
@@ -68,8 +69,8 @@
         data.append(new_row)
 
         # Verify width/data
-        self.assertTrue(data.width == len(new_row))
-        self.assertTrue(data[0] == new_row)
+        self.assertEqual(data.width, len(new_row))
+        self.assertEqual(data[0], new_row)
 
     def test_empty_append_with_headers(self):
         """Verify append() correctly detects mismatch of number of
@@ -448,14 +449,14 @@
         data.append(new_row)
 
         # Verify width/data
-        self.assertTrue(data.width == len(new_row))
-        self.assertTrue(data[0] == new_row)
+        self.assertEqual(data.width, len(new_row))
+        self.assertEqual(data[0], new_row)
 
         data.wipe()
         new_row = (1, 2, 3, 4)
         data.append(new_row)
-        self.assertTrue(data.width == len(new_row))
-        self.assertTrue(data[0] == new_row)
+        self.assertEqual(data.width, len(new_row))
+        self.assertEqual(data[0], new_row)
 
     def test_subset(self):
         """Create a subset of a dataset"""
@@ -890,7 +891,7 @@
         data.csv = self.founders.csv
 
         headers = data.headers
-        self.assertTrue(isinstance(headers[0], str))
+        self.assertIsInstance(headers[0], str)
 
         orig_first_name = self.founders[self.headers[0]]
         csv_first_name = data[headers[0]]
@@ -903,11 +904,11 @@
         data.csv = self.founders.csv
 
         target_header = data.headers[0]
-        self.assertTrue(isinstance(target_header, str))
+        self.assertIsInstance(target_header, str)
 
         del data[target_header]
 
-        self.assertTrue(target_header not in data.headers)
+        self.assertNotIn(target_header, data.headers)
 
     def test_csv_column_sort(self):
         """Build up a CSV and test sorting a column by name"""
@@ -990,6 +991,16 @@
         self.assertEqual(tsv, self.founders.tsv)
 
 
+class ODSTests(BaseTestCase):
+    def test_ods_export_datatypes(self):
+        date_time = datetime.datetime(2019, 10, 4, 12, 30, 8)
+        data.append(('string', '004', 42, 21.55, Decimal('34.5'), date_time))
+        data.headers = ('string', 'start0', 'integer', 'float', 'decimal', 
'date/time')
+        # ODS is currently write-only, just test that output doesn't crash.
+        assert data.ods is not None
+        assert len(data.ods)
+
+
 class XLSTests(BaseTestCase):
     def test_xls_format_detect(self):
         """Test the XLS format detection."""
@@ -1244,36 +1255,36 @@
         self.assertEqual(output, expected)
 
     def test_latex_export_empty_dataset(self):
-        self.assertTrue(tablib.Dataset().latex is not None)
+        self.assertIsNotNone(tablib.Dataset().latex)
 
     def test_latex_export_no_headers(self):
         d = tablib.Dataset()
         d.append(('one', 'two', 'three'))
-        self.assertTrue('one' in d.latex)
+        self.assertIn('one', d.latex)
 
     def test_latex_export_caption(self):
         d = tablib.Dataset()
         d.append(('one', 'two', 'three'))
-        self.assertFalse('caption' in d.latex)
+        self.assertNotIn('caption', d.latex)
 
         d.title = 'Title'
-        self.assertTrue('\\caption{Title}' in d.latex)
+        self.assertIn('\\caption{Title}', d.latex)
 
     def test_latex_export_none_values(self):
         headers = ['foo', None, 'bar']
         d = tablib.Dataset(['foo', None, 'bar'], headers=headers)
         output = d.latex
-        self.assertTrue('foo' in output)
-        self.assertFalse('None' in output)
+        self.assertIn('foo', output)
+        self.assertNotIn('None', output)
 
     def test_latex_escaping(self):
         d = tablib.Dataset(['~', '^'])
         output = d.latex
 
-        self.assertFalse('~' in output)
-        self.assertTrue('textasciitilde' in output)
-        self.assertFalse('^' in output)
-        self.assertTrue('textasciicircum' in output)
+        self.assertNotIn('~', output)
+        self.assertIn('textasciitilde', output)
+        self.assertNotIn('^', output)
+        self.assertIn('textasciicircum', output)
 
 
 class DBFTests(BaseTestCase):
@@ -1395,7 +1406,7 @@
         self.assertEqual('| | |c|', tablib.Dataset(['', None, 'c']).jira)
 
     def test_jira_export_empty_dataset(self):
-        self.assertTrue(tablib.Dataset().jira is not None)
+        self.assertIsNotNone(tablib.Dataset().jira)
 
 
 class DocTests(unittest.TestCase):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tablib-3.2.1/tox.ini new/tablib-3.3.0/tox.ini
--- old/tablib-3.2.1/tox.ini    2022-04-09 16:17:58.000000000 +0200
+++ new/tablib-3.3.0/tox.ini    2022-12-10 15:04:35.000000000 +0100
@@ -4,7 +4,7 @@
 envlist =
     docs
     lint
-    py{37,38,39,310}
+    py{37,38,39,310,311}
 
 [testenv]
 deps =

Reply via email to