Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-texttable for 
openSUSE:Factory checked in at 2024-01-03 12:24:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-texttable (Old)
 and      /work/SRC/openSUSE:Factory/.python-texttable.new.28375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-texttable"

Wed Jan  3 12:24:13 2024 rev:10 rq:1135624 version:1.7.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-texttable/python-texttable.changes        
2023-06-27 23:18:18.319970218 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-texttable.new.28375/python-texttable.changes 
    2024-01-03 12:24:16.957930912 +0100
@@ -1,0 +2,6 @@
+Fri Dec 29 09:57:42 UTC 2023 - Dirk Müller <dmuel...@suse.com>
+
+- update to 1.7.0:
+  * Add boolean formatting option
+
+-------------------------------------------------------------------

Old:
----
  texttable-1.6.7.tar.gz

New:
----
  texttable-1.7.0.tar.gz

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

Other differences:
------------------
++++++ python-texttable.spec ++++++
--- /var/tmp/diff_new_pack.6FlHEK/_old  2024-01-03 12:24:18.081971981 +0100
+++ /var/tmp/diff_new_pack.6FlHEK/_new  2024-01-03 12:24:18.081971981 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-texttable
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,15 +18,16 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-texttable
-Version:        1.6.7
+Version:        1.7.0
 Release:        0
 Summary:        Module for creating simple ASCII tables
 License:        MIT
 Group:          Development/Languages/Python
 URL:            https://github.com/foutaise/texttable/
 Source:         
https://files.pythonhosted.org/packages/source/t/texttable/texttable-%{version}.tar.gz
+BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module pytest}
-BuildRequires:  %{python_module setuptools}
+BuildRequires:  %{python_module wheel}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 Requires:       python-base
@@ -42,10 +43,10 @@
 %setup -q -n texttable-%{version}
 
 %build
-%python_build
+%pyproject_wheel
 
 %install
-%python_install
+%pyproject_install
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 %check
@@ -54,5 +55,7 @@
 %files %{python_files}
 %license LICENSE
 %doc README.md CHANGELOG.md
-%{python_sitelib}/*
+%{python_sitelib}/texttable.py
+%pycache_only %{python_sitelib}/__pycache__/texttable*
+%{python_sitelib}/texttable-%{version}.dist-info
 

++++++ texttable-1.6.7.tar.gz -> texttable-1.7.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/texttable-1.6.7/.gitignore 
new/texttable-1.7.0/.gitignore
--- old/texttable-1.6.7/.gitignore      2018-06-12 19:37:11.000000000 +0200
+++ new/texttable-1.7.0/.gitignore      1970-01-01 01:00:00.000000000 +0100
@@ -1,7 +0,0 @@
-/.cache/
-/.coverage
-/.tox/
-/MANIFEST
-/__pycache__/
-*.egg-info/
-*.pyc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/texttable-1.6.7/CHANGELOG.md 
new/texttable-1.7.0/CHANGELOG.md
--- old/texttable-1.6.7/CHANGELOG.md    2022-11-23 08:11:53.000000000 +0100
+++ new/texttable-1.7.0/CHANGELOG.md    2023-10-03 11:40:32.000000000 +0200
@@ -1,5 +1,8 @@
 # Version History
 
+v1.7.0 (2023-10-03)
+* Add boolean formatting option (https://github.com/foutaise/texttable/pull/89)
+
 v1.6.7 (2022-11-23)
 * Get rid of stub file in wheel package 
(https://github.com/foutaise/texttable/issues/84)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/texttable-1.6.7/PKG-INFO new/texttable-1.7.0/PKG-INFO
--- old/texttable-1.6.7/PKG-INFO        2022-11-23 08:17:52.513803200 +0100
+++ new/texttable-1.7.0/PKG-INFO        2023-10-03 11:40:45.542220600 +0200
@@ -1,9 +1,9 @@
 Metadata-Version: 2.1
 Name: texttable
-Version: 1.6.7
+Version: 1.7.0
 Summary: module to create simple ASCII tables
 Home-page: https://github.com/foutaise/texttable/
-Download-URL: https://github.com/foutaise/texttable/archive/v1.6.7.tar.gz
+Download-URL: https://github.com/foutaise/texttable/archive/v1.7.0.tar.gz
 Author: Gerome Fournier
 Author-email: j...@foutaise.org
 License: MIT
@@ -177,6 +177,7 @@
      |          * "f": treat as float in decimal format
      |          * "e": treat as float in exponential format
      |          * "i": treat as int
+     |          * "b": treat as boolean
      |          * a callable: should return formatted string for any value 
given
      |
      |      - by default, automatic datatyping is used for each column
@@ -252,10 +253,10 @@
     __author__ = 'Gerome Fournier <jef(at)foutaise.org>'
     __credits__ = 'Jeff Kowalczyk:\n    - textwrap improved import\n ...at...
     __license__ = 'MIT'
-    __version__ = '1.6.7'
+    __version__ = '1.7.0'
 
 VERSION
-    1.6.7
+    1.7.0
 
 AUTHOR
     Gerome Fournier <jef(at)foutaise.org>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/texttable-1.6.7/README.md 
new/texttable-1.7.0/README.md
--- old/texttable-1.6.7/README.md       2022-11-23 08:12:19.000000000 +0100
+++ new/texttable-1.7.0/README.md       2023-10-03 11:40:32.000000000 +0200
@@ -144,6 +144,7 @@
      |          * "f": treat as float in decimal format
      |          * "e": treat as float in exponential format
      |          * "i": treat as int
+     |          * "b": treat as boolean
      |          * a callable: should return formatted string for any value 
given
      |
      |      - by default, automatic datatyping is used for each column
@@ -219,10 +220,10 @@
     __author__ = 'Gerome Fournier <jef(at)foutaise.org>'
     __credits__ = 'Jeff Kowalczyk:\n    - textwrap improved import\n ...at...
     __license__ = 'MIT'
-    __version__ = '1.6.7'
+    __version__ = '1.7.0'
 
 VERSION
-    1.6.7
+    1.7.0
 
 AUTHOR
     Gerome Fournier <jef(at)foutaise.org>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/texttable-1.6.7/setup.py new/texttable-1.7.0/setup.py
--- old/texttable-1.6.7/setup.py        2022-11-23 08:10:39.000000000 +0100
+++ new/texttable-1.7.0/setup.py        2023-10-03 11:40:32.000000000 +0200
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 #
 # texttable - module to create simple ASCII tables
-# Copyright (C) 2003-2022 Gerome Fournier <jef(at)foutaise.org>
+# Copyright (C) 2003-2023 Gerome Fournier <jef(at)foutaise.org>
 
 from setuptools import setup
 
@@ -12,11 +12,11 @@
 
 setup(
     name="texttable",
-    version="1.6.7",
+    version="1.7.0",
     author="Gerome Fournier",
     author_email="j...@foutaise.org",
     url="https://github.com/foutaise/texttable/";,
-    download_url="https://github.com/foutaise/texttable/archive/v1.6.7.tar.gz";,
+    download_url="https://github.com/foutaise/texttable/archive/v1.7.0.tar.gz";,
     license="MIT",
     py_modules=["texttable"],
     description=DESCRIPTION,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/texttable-1.6.7/tests.py new/texttable-1.7.0/tests.py
--- old/texttable-1.6.7/tests.py        2019-06-24 14:19:02.000000000 +0200
+++ new/texttable-1.7.0/tests.py        2023-10-03 11:40:32.000000000 +0200
@@ -303,3 +303,25 @@
         | NaN   |
         +-------+
     ''')
+
+def test_bool():
+    table = Texttable()
+    table.set_cols_align(["l", "l"])
+    table.set_cols_dtype(["a", "b"])
+    table.set_deco(0)
+    table.add_rows([
+        [True,   True],
+        [False,  False],
+        ["test", 0],
+        [12,     "true"],
+        [12,     ""],
+        [34.2,   1.0],
+    ], header=False)
+    assert clean(table.draw()) == u_dedent('''\
+        True     True
+        False    False
+        test     False
+        12       True
+        12       False
+        34.200   True
+    ''')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/texttable-1.6.7/texttable.egg-info/PKG-INFO 
new/texttable-1.7.0/texttable.egg-info/PKG-INFO
--- old/texttable-1.6.7/texttable.egg-info/PKG-INFO     2022-11-23 
08:17:52.000000000 +0100
+++ new/texttable-1.7.0/texttable.egg-info/PKG-INFO     2023-10-03 
11:40:45.000000000 +0200
@@ -1,9 +1,9 @@
 Metadata-Version: 2.1
 Name: texttable
-Version: 1.6.7
+Version: 1.7.0
 Summary: module to create simple ASCII tables
 Home-page: https://github.com/foutaise/texttable/
-Download-URL: https://github.com/foutaise/texttable/archive/v1.6.7.tar.gz
+Download-URL: https://github.com/foutaise/texttable/archive/v1.7.0.tar.gz
 Author: Gerome Fournier
 Author-email: j...@foutaise.org
 License: MIT
@@ -177,6 +177,7 @@
      |          * "f": treat as float in decimal format
      |          * "e": treat as float in exponential format
      |          * "i": treat as int
+     |          * "b": treat as boolean
      |          * a callable: should return formatted string for any value 
given
      |
      |      - by default, automatic datatyping is used for each column
@@ -252,10 +253,10 @@
     __author__ = 'Gerome Fournier <jef(at)foutaise.org>'
     __credits__ = 'Jeff Kowalczyk:\n    - textwrap improved import\n ...at...
     __license__ = 'MIT'
-    __version__ = '1.6.7'
+    __version__ = '1.7.0'
 
 VERSION
-    1.6.7
+    1.7.0
 
 AUTHOR
     Gerome Fournier <jef(at)foutaise.org>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/texttable-1.6.7/texttable.egg-info/SOURCES.txt 
new/texttable-1.7.0/texttable.egg-info/SOURCES.txt
--- old/texttable-1.6.7/texttable.egg-info/SOURCES.txt  2022-11-23 
08:17:52.000000000 +0100
+++ new/texttable-1.7.0/texttable.egg-info/SOURCES.txt  2023-10-03 
11:40:45.000000000 +0200
@@ -1,9 +1,7 @@
 .coveragerc
-.gitignore
 CHANGELOG.md
 LICENSE
 MANIFEST.in
-PKG-INFO
 README.md
 setup.py
 tests.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/texttable-1.6.7/texttable.py 
new/texttable-1.7.0/texttable.py
--- old/texttable-1.6.7/texttable.py    2022-11-23 08:12:09.000000000 +0100
+++ new/texttable-1.7.0/texttable.py    2023-10-03 11:40:32.000000000 +0200
@@ -1,5 +1,5 @@
 # texttable - module to create simple ASCII tables
-# Copyright (C) 2003-2022 Gerome Fournier <jef(at)foutaise.org>
+# Copyright (C) 2003-2023 Gerome Fournier <jef(at)foutaise.org>
 
 """module to create simple ASCII tables
 
@@ -63,7 +63,7 @@
 
 __author__ = 'Gerome Fournier <jef(at)foutaise.org>'
 __license__ = 'MIT'
-__version__ = '1.6.7'
+__version__ = '1.7.0'
 __credits__ = """\
 Jeff Kowalczyk:
     - textwrap improved import
@@ -311,13 +311,14 @@
         """Set the desired columns datatype for the cols.
 
         - the elements of the array should be either a callable or any of
-          "a", "t", "f", "e" or "i":
+          "a", "t", "f", "e", "i" or "b":
 
             * "a": automatic (try to use the most appropriate datatype)
             * "t": treat as text
             * "f": treat as float in decimal format
             * "e": treat as float in exponential format
             * "i": treat as int
+            * "b": treat as boolean
             * a callable: should return formatted string for any value given
 
         - by default, automatic datatyping is used for each column
@@ -481,6 +482,11 @@
         return obj2unicode(x)
 
     @classmethod
+    def _fmt_bool(cls, x, **kw):
+        """Boolean formatting class-method"""
+        return str(bool(x))
+
+    @classmethod
     def _fmt_auto(cls, x, **kw):
         """auto formatting class-method."""
         f = cls._to_float(x)
@@ -489,7 +495,7 @@
         elif f != f:  # NaN
             fn = cls._fmt_text
         elif f - round(f) == 0:
-            fn = cls._fmt_int
+            fn = cls._fmt_bool if isinstance(x, bool) else cls._fmt_int
         else:
             fn = cls._fmt_float
         return fn(x, **kw)
@@ -503,6 +509,7 @@
         FMT = {
             'a':self._fmt_auto,
             'i':self._fmt_int,
+            'b':self._fmt_bool,
             'f':self._fmt_float,
             'e':self._fmt_exp,
             't':self._fmt_text,

Reply via email to