From e6fdac8bfb36a58853b4cccb35fd57fd6d1c3ae9c1615825df1847f285c9da76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 17 Jun 2019 11:19:45 +0000 Subject: [PATCH] - Update to 1.2.1: * Work with new pygments - Remove merged patch: * pygments.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cli-helpers?expand=0&rev=6 --- cli_helpers-1.2.0.tar.gz | 3 - cli_helpers-1.2.1.tar.gz | 3 + pygments.patch | 224 ------------------------------------- python-cli-helpers.changes | 8 ++ python-cli-helpers.spec | 4 +- 5 files changed, 12 insertions(+), 230 deletions(-) delete mode 100644 cli_helpers-1.2.0.tar.gz create mode 100644 cli_helpers-1.2.1.tar.gz delete mode 100644 pygments.patch diff --git a/cli_helpers-1.2.0.tar.gz b/cli_helpers-1.2.0.tar.gz deleted file mode 100644 index 04f283f..0000000 --- a/cli_helpers-1.2.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d211192b4d5a61de0020c516213ba67bbf1662ccd8c0624e6696dedb1a9d3e5d -size 30843 diff --git a/cli_helpers-1.2.1.tar.gz b/cli_helpers-1.2.1.tar.gz new file mode 100644 index 0000000..42d5fd0 --- /dev/null +++ b/cli_helpers-1.2.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:98db22eaa86827d99ee6af9f5f3923142d04df256425204530842b032849a165 +size 31718 diff --git a/pygments.patch b/pygments.patch deleted file mode 100644 index 9a40d5f..0000000 --- a/pygments.patch +++ /dev/null @@ -1,224 +0,0 @@ -From 19a0e9def85b6a8f066594ae25204338c28eeb04 Mon Sep 17 00:00:00 2001 -From: Thomas Roten -Date: Sat, 25 May 2019 15:23:32 -0500 -Subject: [PATCH] Fix use of bold in Pygments tests. - ---- - tests/tabular_output/test_preprocessors.py | 6 +-- - tests/tabular_output/test_tabulate_adapter.py | 42 +++++++++---------- - .../test_terminaltables_adapter.py | 42 +++++++++---------- - 3 files changed, 45 insertions(+), 45 deletions(-) - -diff --git a/tests/tabular_output/test_preprocessors.py b/tests/tabular_output/test_preprocessors.py -index d79b744..44fc652 100644 ---- a/tests/tabular_output/test_preprocessors.py -+++ b/tests/tabular_output/test_preprocessors.py -@@ -161,7 +161,7 @@ class CliStyle(Style): - headers = ['h1', 'h2'] - data = [['观音', '2'], ['Ποσειδῶν', 'b']] - -- expected_headers = ['\x1b[31;01mh1\x1b[39;00m', '\x1b[31;01mh2\x1b[39;00m'] -+ expected_headers = ['\x1b[91;01mh1\x1b[39;00m', '\x1b[91;01mh2\x1b[39;00m'] - expected_data = [['\x1b[38;5;233;48;5;7m观音\x1b[39;49m', - '\x1b[38;5;233;48;5;7m2\x1b[39;49m'], - ['\x1b[38;5;10mΠοσειδῶν\x1b[39m', '\x1b[38;5;10mb\x1b[39m']] -@@ -183,7 +183,7 @@ class CliStyle(Style): - headers = ['h1', 'h2'] - data = [['观音\nLine2', 'Ποσειδῶν']] - -- expected_headers = ['\x1b[31;01mh1\x1b[39;00m', '\x1b[31;01mh2\x1b[39;00m'] -+ expected_headers = ['\x1b[91;01mh1\x1b[39;00m', '\x1b[91;01mh2\x1b[39;00m'] - expected_data = [ - ['\x1b[38;5;233;48;5;7m观音\x1b[39;49m\n\x1b[38;5;233;48;5;7m' - 'Line2\x1b[39;49m', -@@ -207,7 +207,7 @@ class CliStyle(Style): - headers = ['h1', 'h2'] - data = [['1', '2'], ['a', 'b']] - -- expected_headers = ['\x1b[31;01mh1\x1b[39;00m', '\x1b[31;01mh2\x1b[39;00m'] -+ expected_headers = ['\x1b[91;01mh1\x1b[39;00m', '\x1b[91;01mh2\x1b[39;00m'] - expected_data = [['\x1b[38;5;233;48;5;7m1\x1b[39;49m', - '\x1b[38;5;233;48;5;7m2\x1b[39;49m'], - ['\x1b[38;5;10ma\x1b[39m', '\x1b[38;5;10mb\x1b[39m']] -diff --git a/tests/tabular_output/test_tabulate_adapter.py b/tests/tabular_output/test_tabulate_adapter.py -index d2ade12..e0dd5a8 100644 ---- a/tests/tabular_output/test_tabulate_adapter.py -+++ b/tests/tabular_output/test_tabulate_adapter.py -@@ -73,24 +73,24 @@ class CliStyle(Style): - output = tabulate_adapter.adapter(iter(data), headers, table_format='psql') - - assert "\n".join(output) == dedent('''\ -- \x1b[31;01m+\x1b[39;00m''' + ( -- ('\x1b[31;01m-\x1b[39;00m' * 10) + -- '\x1b[31;01m+\x1b[39;00m' + -- ('\x1b[31;01m-\x1b[39;00m' * 6)) + -- '''\x1b[31;01m+\x1b[39;00m -- \x1b[31;01m|\x1b[39;00m h1 \x1b[31;01m|\x1b[39;00m''' + -- ''' h2 \x1b[31;01m|\x1b[39;00m -- ''' + '\x1b[31;01m|\x1b[39;00m' + ( -- ('\x1b[31;01m-\x1b[39;00m' * 10) + -- '\x1b[31;01m+\x1b[39;00m' + -- ('\x1b[31;01m-\x1b[39;00m' * 6)) + -- '''\x1b[31;01m|\x1b[39;00m -- \x1b[31;01m|\x1b[39;00m 观音 \x1b[31;01m|\x1b[39;00m''' + -- ''' 2 \x1b[31;01m|\x1b[39;00m -- \x1b[31;01m|\x1b[39;00m Ποσειδῶν \x1b[31;01m|\x1b[39;00m''' + -- ''' b \x1b[31;01m|\x1b[39;00m -- ''' + '\x1b[31;01m+\x1b[39;00m' + ( -- ('\x1b[31;01m-\x1b[39;00m' * 10) + -- '\x1b[31;01m+\x1b[39;00m' + -- ('\x1b[31;01m-\x1b[39;00m' * 6)) + -- '\x1b[31;01m+\x1b[39;00m') -+ \x1b[91m+\x1b[39m''' + ( -+ ('\x1b[91m-\x1b[39m' * 10) + -+ '\x1b[91m+\x1b[39m' + -+ ('\x1b[91m-\x1b[39m' * 6)) + -+ '''\x1b[91m+\x1b[39m -+ \x1b[91m|\x1b[39m h1 \x1b[91m|\x1b[39m''' + -+ ''' h2 \x1b[91m|\x1b[39m -+ ''' + '\x1b[91m|\x1b[39m' + ( -+ ('\x1b[91m-\x1b[39m' * 10) + -+ '\x1b[91m+\x1b[39m' + -+ ('\x1b[91m-\x1b[39m' * 6)) + -+ '''\x1b[91m|\x1b[39m -+ \x1b[91m|\x1b[39m 观音 \x1b[91m|\x1b[39m''' + -+ ''' 2 \x1b[91m|\x1b[39m -+ \x1b[91m|\x1b[39m Ποσειδῶν \x1b[91m|\x1b[39m''' + -+ ''' b \x1b[91m|\x1b[39m -+ ''' + '\x1b[91m+\x1b[39m' + ( -+ ('\x1b[91m-\x1b[39m' * 10) + -+ '\x1b[91m+\x1b[39m' + -+ ('\x1b[91m-\x1b[39m' * 6)) + -+ '\x1b[91m+\x1b[39m') -diff --git a/tests/tabular_output/test_terminaltables_adapter.py b/tests/tabular_output/test_terminaltables_adapter.py -index 8794129..f756327 100644 ---- a/tests/tabular_output/test_terminaltables_adapter.py -+++ b/tests/tabular_output/test_terminaltables_adapter.py -@@ -46,24 +46,24 @@ class CliStyle(Style): - output = terminaltables_adapter.adapter(iter(data), headers, table_format='ascii') - - assert "\n".join(output) == dedent('''\ -- \x1b[31;01m+\x1b[39;00m''' + ( -- ('\x1b[31;01m-\x1b[39;00m' * 10) + -- '\x1b[31;01m+\x1b[39;00m' + -- ('\x1b[31;01m-\x1b[39;00m' * 4)) + -- '''\x1b[31;01m+\x1b[39;00m -- \x1b[31;01m|\x1b[39;00m h1 \x1b[31;01m|\x1b[39;00m''' + -- ''' h2 \x1b[31;01m|\x1b[39;00m -- ''' + '\x1b[31;01m+\x1b[39;00m' + ( -- ('\x1b[31;01m-\x1b[39;00m' * 10) + -- '\x1b[31;01m+\x1b[39;00m' + -- ('\x1b[31;01m-\x1b[39;00m' * 4)) + -- '''\x1b[31;01m+\x1b[39;00m -- \x1b[31;01m|\x1b[39;00m 观音 \x1b[31;01m|\x1b[39;00m''' + -- ''' 2 \x1b[31;01m|\x1b[39;00m -- \x1b[31;01m|\x1b[39;00m Ποσειδῶν \x1b[31;01m|\x1b[39;00m''' + -- ''' b \x1b[31;01m|\x1b[39;00m -- ''' + '\x1b[31;01m+\x1b[39;00m' + ( -- ('\x1b[31;01m-\x1b[39;00m' * 10) + -- '\x1b[31;01m+\x1b[39;00m' + -- ('\x1b[31;01m-\x1b[39;00m' * 4)) + -- '\x1b[31;01m+\x1b[39;00m') -+ \x1b[91m+\x1b[39m''' + ( -+ ('\x1b[91m-\x1b[39m' * 10) + -+ '\x1b[91m+\x1b[39m' + -+ ('\x1b[91m-\x1b[39m' * 4)) + -+ '''\x1b[91m+\x1b[39m -+ \x1b[91m|\x1b[39m h1 \x1b[91m|\x1b[39m''' + -+ ''' h2 \x1b[91m|\x1b[39m -+ ''' + '\x1b[91m+\x1b[39m' + ( -+ ('\x1b[91m-\x1b[39m' * 10) + -+ '\x1b[91m+\x1b[39m' + -+ ('\x1b[91m-\x1b[39m' * 4)) + -+ '''\x1b[91m+\x1b[39m -+ \x1b[91m|\x1b[39m 观音 \x1b[91m|\x1b[39m''' + -+ ''' 2 \x1b[91m|\x1b[39m -+ \x1b[91m|\x1b[39m Ποσειδῶν \x1b[91m|\x1b[39m''' + -+ ''' b \x1b[91m|\x1b[39m -+ ''' + '\x1b[91m+\x1b[39m' + ( -+ ('\x1b[91m-\x1b[39m' * 10) + -+ '\x1b[91m+\x1b[39m' + -+ ('\x1b[91m-\x1b[39m' * 4)) + -+ '\x1b[91m+\x1b[39m') -From ccc7aaffca8fa6e2b2f167a9d0f13e4dafe75aee Mon Sep 17 00:00:00 2001 -From: Thomas Roten -Date: Fri, 24 May 2019 12:36:41 -0500 -Subject: [PATCH] Pin to Pygments >= 2.4.0 for tests. - ---- - cli_helpers/tabular_output/preprocessors.py | 2 +- - tests/tabular_output/test_preprocessors.py | 6 +++--- - tests/tabular_output/test_tabulate_adapter.py | 2 +- - tests/tabular_output/test_terminaltables_adapter.py | 2 +- - 5 files changed, 7 insertions(+), 6 deletions(-) - -diff --git a/cli_helpers/tabular_output/preprocessors.py b/cli_helpers/tabular_output/preprocessors.py -index 9bbbd39..8a1c91f 100644 ---- a/cli_helpers/tabular_output/preprocessors.py -+++ b/cli_helpers/tabular_output/preprocessors.py -@@ -193,7 +193,7 @@ def style_output(data, headers, style=None, - class YourStyle(Style): - default_style = "" - styles = { -- Token.Output.Header: 'bold #ansired', -+ Token.Output.Header: 'bold ansibrightred', - Token.Output.OddRow: 'bg:#eee #111', - Token.Output.EvenRow: '#0f0' - } -diff --git a/tests/tabular_output/test_preprocessors.py b/tests/tabular_output/test_preprocessors.py -index 4eb9165..d79b744 100644 ---- a/tests/tabular_output/test_preprocessors.py -+++ b/tests/tabular_output/test_preprocessors.py -@@ -154,7 +154,7 @@ def test_style_output(): - class CliStyle(Style): - default_style = "" - styles = { -- Token.Output.Header: 'bold #ansired', -+ Token.Output.Header: 'bold ansibrightred', - Token.Output.OddRow: 'bg:#eee #111', - Token.Output.EvenRow: '#0f0' - } -@@ -176,7 +176,7 @@ def test_style_output_with_newlines(): - class CliStyle(Style): - default_style = "" - styles = { -- Token.Output.Header: 'bold #ansired', -+ Token.Output.Header: 'bold ansibrightred', - Token.Output.OddRow: 'bg:#eee #111', - Token.Output.EvenRow: '#0f0' - } -@@ -200,7 +200,7 @@ def test_style_output_custom_tokens(): - class CliStyle(Style): - default_style = "" - styles = { -- Token.Results.Headers: 'bold #ansired', -+ Token.Results.Headers: 'bold ansibrightred', - Token.Results.OddRows: 'bg:#eee #111', - Token.Results.EvenRows: '#0f0' - } -diff --git a/tests/tabular_output/test_tabulate_adapter.py b/tests/tabular_output/test_tabulate_adapter.py -index c289cba..d2ade12 100644 ---- a/tests/tabular_output/test_tabulate_adapter.py -+++ b/tests/tabular_output/test_tabulate_adapter.py -@@ -63,7 +63,7 @@ def test_style_output_table(): - class CliStyle(Style): - default_style = "" - styles = { -- Token.Output.TableSeparator: '#ansired', -+ Token.Output.TableSeparator: 'ansibrightred', - } - headers = ['h1', 'h2'] - data = [['观音', '2'], ['Ποσειδῶν', 'b']] -diff --git a/tests/tabular_output/test_terminaltables_adapter.py b/tests/tabular_output/test_terminaltables_adapter.py -index fc49b99..8794129 100644 ---- a/tests/tabular_output/test_terminaltables_adapter.py -+++ b/tests/tabular_output/test_terminaltables_adapter.py -@@ -36,7 +36,7 @@ def test_style_output_table(): - class CliStyle(Style): - default_style = "" - styles = { -- Token.Output.TableSeparator: '#ansired', -+ Token.Output.TableSeparator: 'ansibrightred', - } - headers = ['h1', 'h2'] - data = [['观音', '2'], ['Ποσειδῶν', 'b']] diff --git a/python-cli-helpers.changes b/python-cli-helpers.changes index 83ac21a..b27d392 100644 --- a/python-cli-helpers.changes +++ b/python-cli-helpers.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Jun 17 11:18:18 UTC 2019 - Tomáš Chvátal + +- Update to 1.2.1: + * Work with new pygments +- Remove merged patch: + * pygments.patch + ------------------------------------------------------------------- Tue May 28 10:47:19 UTC 2019 - Tomáš Chvátal diff --git a/python-cli-helpers.spec b/python-cli-helpers.spec index eccc154..920812d 100644 --- a/python-cli-helpers.spec +++ b/python-cli-helpers.spec @@ -18,14 +18,13 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-cli-helpers -Version: 1.2.0 +Version: 1.2.1 Release: 0 Summary: Helpers for building command-line apps License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/dbcli/cli_helpers Source: https://files.pythonhosted.org/packages/source/c/cli_helpers/cli_helpers-%{version}.tar.gz -Patch0: pygments.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -68,7 +67,6 @@ other libraries. %prep %setup -q -n cli_helpers-%{version} -%patch0 -p1 %build %python_build