Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-cli-helpers for 
openSUSE:Factory checked in at 2023-01-05 15:00:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-cli-helpers (Old)
 and      /work/SRC/openSUSE:Factory/.python-cli-helpers.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-cli-helpers"

Thu Jan  5 15:00:43 2023 rev:7 rq:1056001 version:2.3.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-cli-helpers/python-cli-helpers.changes    
2022-03-11 11:31:54.181960165 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-cli-helpers.new.1563/python-cli-helpers.changes
  2023-01-05 15:01:04.177088828 +0100
@@ -1,0 +2,7 @@
+Wed Jan  4 20:18:48 UTC 2023 - Dirk Müller <dmuel...@suse.com>
+
+- update to 2.3.0:
+  * don't escape newlines, etc. in ascii tables, and add ascii_escaped table
+    format
+
+-------------------------------------------------------------------

Old:
----
  cli_helpers-2.2.1.tar.gz

New:
----
  cli_helpers-2.3.0.tar.gz

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

Other differences:
------------------
++++++ python-cli-helpers.spec ++++++
--- /var/tmp/diff_new_pack.PD4bgG/_old  2023-01-05 15:01:04.637091253 +0100
+++ /var/tmp/diff_new_pack.PD4bgG/_new  2023-01-05 15:01:04.637091253 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-cli-helpers
 #
-# 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
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %bcond_without python2
 Name:           python-cli-helpers
-Version:        2.2.1
+Version:        2.3.0
 Release:        0
 Summary:        Helpers for building command-line apps
 License:        BSD-3-Clause

++++++ cli_helpers-2.2.1.tar.gz -> cli_helpers-2.3.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cli_helpers-2.2.1/AUTHORS 
new/cli_helpers-2.3.0/AUTHORS
--- old/cli_helpers-2.2.1/AUTHORS       2022-01-18 04:12:26.000000000 +0100
+++ new/cli_helpers-2.3.0/AUTHORS       2022-10-13 03:44:08.000000000 +0200
@@ -24,6 +24,7 @@
 - Waldir Pimenta
 - Mel Dafert
 - Andrii Kohut
+- Roland Walker
 
 Thanks
 ------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cli_helpers-2.2.1/CHANGELOG 
new/cli_helpers-2.3.0/CHANGELOG
--- old/cli_helpers-2.2.1/CHANGELOG     2022-01-18 04:12:26.000000000 +0100
+++ new/cli_helpers-2.3.0/CHANGELOG     2022-10-13 03:44:56.000000000 +0200
@@ -1,6 +1,13 @@
 Changelog
 =========
 
+Version 2.3.0
+-------------
+
+(released on 2022-10-12)
+
+* don't escape newlines, etc. in ascii tables, and add ascii_escaped table 
format
+
 Version 2.2.1
 -------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cli_helpers-2.2.1/PKG-INFO 
new/cli_helpers-2.3.0/PKG-INFO
--- old/cli_helpers-2.2.1/PKG-INFO      2022-01-18 04:13:58.914194300 +0100
+++ new/cli_helpers-2.3.0/PKG-INFO      2022-10-13 03:45:33.789316200 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: cli_helpers
-Version: 2.2.1
+Version: 2.3.0
 Summary: Helpers for building command-line apps
 Home-page: https://github.com/dbcli/cli_helpers
 Author: dbcli
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cli_helpers-2.2.1/cli_helpers/__init__.py 
new/cli_helpers-2.3.0/cli_helpers/__init__.py
--- old/cli_helpers-2.2.1/cli_helpers/__init__.py       2022-01-18 
04:12:39.000000000 +0100
+++ new/cli_helpers-2.3.0/cli_helpers/__init__.py       2022-10-13 
03:45:24.000000000 +0200
@@ -1 +1 @@
-__version__ = "2.2.1"
+__version__ = "2.3.0"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cli_helpers-2.2.1/cli_helpers/tabular_output/tabulate_adapter.py 
new/cli_helpers-2.3.0/cli_helpers/tabular_output/tabulate_adapter.py
--- old/cli_helpers-2.2.1/cli_helpers/tabular_output/tabulate_adapter.py        
2022-01-18 04:12:26.000000000 +0100
+++ new/cli_helpers-2.3.0/cli_helpers/tabular_output/tabulate_adapter.py        
2022-10-13 03:44:08.000000000 +0200
@@ -52,9 +52,25 @@
     with_header_hide=None,
 )
 
+tabulate._table_formats["ascii_escaped"] = tabulate.TableFormat(
+    lineabove=tabulate.Line("+", "-", "+", "+"),
+    linebelowheader=tabulate.Line("+", "-", "+", "+"),
+    linebetweenrows=None,
+    linebelow=tabulate.Line("+", "-", "+", "+"),
+    headerrow=tabulate.DataRow("|", "|", "|"),
+    datarow=tabulate.DataRow("|", "|", "|"),
+    padding=1,
+    with_header_hide=None,
+)
+
 # "minimal" is the same as "plain", but without headers
 tabulate._table_formats["minimal"] = tabulate._table_formats["plain"]
 
+tabulate.multiline_formats["psql_unicode"] = "psql_unicode"
+tabulate.multiline_formats["double"] = "double"
+tabulate.multiline_formats["ascii"] = "ascii"
+tabulate.multiline_formats["minimal"] = "minimal"
+
 supported_markup_formats = (
     "mediawiki",
     "html",
@@ -66,6 +82,7 @@
 )
 supported_table_formats = (
     "ascii",
+    "ascii_escaped",
     "plain",
     "simple",
     "minimal",
@@ -82,7 +99,10 @@
 
 supported_formats = supported_markup_formats + supported_table_formats
 
-default_kwargs = {"ascii": {"numalign": "left"}}
+default_kwargs = {
+    "ascii": {"numalign": "left"},
+    "ascii_escaped": {"numalign": "left"},
+}
 headless_formats = ("minimal",)
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cli_helpers-2.2.1/cli_helpers.egg-info/PKG-INFO 
new/cli_helpers-2.3.0/cli_helpers.egg-info/PKG-INFO
--- old/cli_helpers-2.2.1/cli_helpers.egg-info/PKG-INFO 2022-01-18 
04:13:58.000000000 +0100
+++ new/cli_helpers-2.3.0/cli_helpers.egg-info/PKG-INFO 2022-10-13 
03:45:33.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: cli-helpers
-Version: 2.2.1
+Version: 2.3.0
 Summary: Helpers for building command-line apps
 Home-page: https://github.com/dbcli/cli_helpers
 Author: dbcli
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cli_helpers-2.2.1/docs/source/quickstart.rst 
new/cli_helpers-2.3.0/docs/source/quickstart.rst
--- old/cli_helpers-2.2.1/docs/source/quickstart.rst    2021-09-20 
17:34:48.000000000 +0200
+++ new/cli_helpers-2.3.0/docs/source/quickstart.rst    2022-10-13 
03:44:08.000000000 +0200
@@ -15,7 +15,7 @@
     >>> data = [[1, 'Asgard', True], [2, 'Camelot', False], [3, 'El Dorado', 
True]]
     >>> headers = ['id', 'city', 'visited']
 
-    >>> print(tabular_output.format_output(data, headers, 
format_name='simple'))
+    >>> print("\n".join(tabular_output.format_output(iter(data), headers, 
format_name='simple')))
 
       id  city       visited
     ----  ---------  ---------
@@ -57,7 +57,7 @@
 
     >>> data = [[1, 'Asgard', True], [2, 'Camelot', False], [3, 'El Dorado', 
True]]
     >>> headers = ['id', 'city', 'visited']
-    >>> print(formatter.format_output(data, headers, format_name='fancy_grid'))
+    >>> print("\n".join(formatter.format_output(iter(data), headers, 
format_name='fancy_grid')))
     
╒══════╤═══════════╤═══════════╕
     │   id │ city      │ visited   │
     
╞══════╪═══════════╪═══════════╡
@@ -70,7 +70,7 @@
 
 That was easy! How about CLI Helper's vertical table layout?
 
-    >>> print(formatter.format_output(data, headers, format_name='vertical'))
+    >>> print("\n".join(formatter.format_output(iter(data), headers, 
format_name='vertical')))
     ***************************[ 1. row ]***************************
     id      | 1
     city    | Asgard
@@ -93,7 +93,7 @@
 format name each time you want to format your data::
 
     >>> formatter = TabularOutputFormatter(format_name='plain')
-    >>> print(formatter.format_output(data, headers))
+    >>> print("\n".join(formatter.format_output(iter(data), headers)))
       id  city       visited
        1  Asgard     True
        2  Camelot    False
@@ -115,13 +115,13 @@
 
     >>> data = [[1, 1.5], [2, 19.605], [3, 100.0]]
     >>> headers = ['id', 'rating']
-    >>> print(format_output(data, headers, format_name='simple', 
disable_numparse=True))
+    >>> print("\n".join(format_output(iter(data), headers, 
format_name='simple', disable_numparse=True)))
     id    rating
     ----  --------
     1     1.5
     2     19.605
     3     100.0
-    >>> print(format_output(data, headers, format_name='simple', 
disable_numparse=False))
+    >>> print("\n".join(format_output(iter(data), headers, 
format_name='simple', disable_numparse=False)))
       id    rating
     ----  --------
        1     1.5
@@ -140,7 +140,7 @@
     >>> step = 3
     >>> data = [range(n, n + step) for n in range(0, 9, step)]
     >>> headers = 'abc'
-    >>> print(format_output(data, headers, format_name='simple'))
+    >>> print("\n".join(format_output(iter(data), headers, 
format_name='simple')))
       a    b    c
     ---  ---  ---
       0    1    2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cli_helpers-2.2.1/requirements-dev.txt 
new/cli_helpers-2.3.0/requirements-dev.txt
--- old/cli_helpers-2.2.1/requirements-dev.txt  2021-09-20 17:34:48.000000000 
+0200
+++ new/cli_helpers-2.3.0/requirements-dev.txt  2022-10-13 03:44:08.000000000 
+0200
@@ -1,5 +1,5 @@
 autopep8==1.3.3
-codecov==2.0.9
+codecov==2.0.16
 coverage==4.3.4
 black>=20.8b1
 Pygments>=2.4.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cli_helpers-2.2.1/tests/tabular_output/test_output_formatter.py 
new/cli_helpers-2.3.0/tests/tabular_output/test_output_formatter.py
--- old/cli_helpers-2.2.1/tests/tabular_output/test_output_formatter.py 
2022-01-18 04:12:26.000000000 +0100
+++ new/cli_helpers-2.3.0/tests/tabular_output/test_output_formatter.py 
2022-10-13 03:44:08.000000000 +0200
@@ -23,6 +23,41 @@
     ]
     expected = dedent(
         """\
+        +-------+---------+
+        | text  | numeric |
+        +-------+---------+
+        | abc   | 1       |
+        | defg  | 11.1    |
+        | hi    | 1.1     |
+        | Pablo | 0       |
+        | ß     |         |
+        +-------+---------+"""
+    )
+
+    print(expected)
+    print(
+        "\n".join(
+            TabularOutputFormatter().format_output(
+                iter(data), headers, format_name="ascii"
+            )
+        )
+    )
+    assert expected == "\n".join(
+        TabularOutputFormatter().format_output(iter(data), headers, 
format_name="ascii")
+    )
+
+
+def test_tabular_output_escaped():
+    """Test the ascii_escaped output format."""
+    headers = ["text", "numeric"]
+    data = [
+        ["abc", Decimal(1)],
+        ["defg", Decimal("11.1")],
+        ["hi", Decimal("1.1")],
+        ["Pablo\rß\n", 0],
+    ]
+    expected = dedent(
+        """\
         +------------+---------+
         | text       | numeric |
         +------------+---------+
@@ -37,12 +72,14 @@
     print(
         "\n".join(
             TabularOutputFormatter().format_output(
-                iter(data), headers, format_name="ascii"
+                iter(data), headers, format_name="ascii_escaped"
             )
         )
     )
     assert expected == "\n".join(
-        TabularOutputFormatter().format_output(iter(data), headers, 
format_name="ascii")
+        TabularOutputFormatter().format_output(
+            iter(data), headers, format_name="ascii_escaped"
+        )
     )
 
 

Reply via email to