cli-helpers 2.12.0__tar.gz → 2.14.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/CHANGELOG +16 -3
  2. {cli_helpers-2.12.0/cli_helpers.egg-info → cli_helpers-2.14.0}/PKG-INFO +1 -1
  3. cli_helpers-2.14.0/cli_helpers/__init__.py +1 -0
  4. {cli_helpers-2.12.0 → cli_helpers-2.14.0/cli_helpers.egg-info}/PKG-INFO +1 -1
  5. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/requirements-dev.txt +1 -1
  6. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/tests/tabular_output/test_preprocessors.py +36 -6
  7. cli_helpers-2.12.0/cli_helpers/__init__.py +0 -1
  8. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  9. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/.github/workflows/codeql.yml +0 -0
  10. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/.gitignore +0 -0
  11. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/.travis/install.sh +0 -0
  12. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/.travis.yml +0 -0
  13. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/AUTHORS +0 -0
  14. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/CONTRIBUTING.rst +0 -0
  15. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/LICENSE +0 -0
  16. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/MANIFEST.in +0 -0
  17. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/README.rst +0 -0
  18. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/appveyor.yml +0 -0
  19. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/cli_helpers/compat.py +0 -0
  20. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/cli_helpers/config.py +0 -0
  21. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/cli_helpers/tabular_output/__init__.py +0 -0
  22. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/cli_helpers/tabular_output/delimited_output_adapter.py +0 -0
  23. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/cli_helpers/tabular_output/json_output_adapter.py +0 -0
  24. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/cli_helpers/tabular_output/output_formatter.py +0 -0
  25. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/cli_helpers/tabular_output/preprocessors.py +0 -0
  26. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/cli_helpers/tabular_output/tabulate_adapter.py +0 -0
  27. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/cli_helpers/tabular_output/tsv_output_adapter.py +0 -0
  28. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/cli_helpers/tabular_output/vertical_table_adapter.py +0 -0
  29. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/cli_helpers/utils.py +0 -0
  30. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/cli_helpers.egg-info/SOURCES.txt +0 -0
  31. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/cli_helpers.egg-info/dependency_links.txt +0 -0
  32. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/cli_helpers.egg-info/requires.txt +0 -0
  33. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/cli_helpers.egg-info/top_level.txt +0 -0
  34. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/docs/Makefile +0 -0
  35. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/docs/source/api.rst +0 -0
  36. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/docs/source/authors.rst +0 -0
  37. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/docs/source/changelog.rst +0 -0
  38. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/docs/source/conf.py +0 -0
  39. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/docs/source/contributing.rst +0 -0
  40. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/docs/source/index.rst +0 -0
  41. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/docs/source/license.rst +0 -0
  42. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/docs/source/quickstart.rst +0 -0
  43. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/release.py +0 -0
  44. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/setup.cfg +0 -0
  45. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/setup.py +0 -0
  46. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/tasks.py +0 -0
  47. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/tests/__init__.py +0 -0
  48. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/tests/compat.py +0 -0
  49. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/tests/config_data/configrc +0 -0
  50. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/tests/config_data/configspecrc +0 -0
  51. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/tests/config_data/invalid_configrc +0 -0
  52. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/tests/config_data/invalid_configspecrc +0 -0
  53. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/tests/tabular_output/__init__.py +0 -0
  54. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/tests/tabular_output/test_delimited_output_adapter.py +0 -0
  55. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/tests/tabular_output/test_json_output_adapter.py +0 -0
  56. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/tests/tabular_output/test_output_formatter.py +0 -0
  57. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/tests/tabular_output/test_tabulate_adapter.py +0 -0
  58. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/tests/tabular_output/test_tsv_output_adapter.py +0 -0
  59. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/tests/tabular_output/test_vertical_table_adapter.py +0 -0
  60. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/tests/test_cli_helpers.py +0 -0
  61. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/tests/test_config.py +0 -0
  62. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/tests/test_utils.py +0 -0
  63. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/tests/utils.py +0 -0
  64. {cli_helpers-2.12.0 → cli_helpers-2.14.0}/tox.ini +0 -0
@@ -1,21 +1,34 @@
1
1
  # Changelog
2
2
 
3
+ ## Version 2.14.0
4
+
5
+ (released on 2026-04-13)
6
+
7
+ - Downgrade Pygments requirement to v1.6+, and fix tests to support all versions.
8
+
9
+ ## Version 2.13.0
10
+
11
+ (released on 2026-04-13)
12
+
13
+ - Pin Pygments library to older version v2.19.2 to fix tests.
14
+ - Fix dates in changelog.
15
+
3
16
  ## Version 2.12.0
4
17
 
5
- (released on 2025-03-21)
18
+ (released on 2026-03-21)
6
19
 
7
20
  - Probe tabulate version for `preserve_whitespace` keyword support.
8
21
 
9
22
  ## Version 2.11.0
10
23
 
11
- (released on 2025-03-05)
24
+ (released on 2026-03-05)
12
25
 
13
26
  - Support and require version 0.10.x of `tabulate`.
14
27
  - Pin `tabulate` version more tightly.
15
28
 
16
29
  ## Version 2.10.1
17
30
 
18
- (released on 2025-02-18)
31
+ (released on 2026-02-18)
19
32
 
20
33
  - Update license dates.
21
34
  - Change `master` branch references to `main`.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cli_helpers
3
- Version: 2.12.0
3
+ Version: 2.14.0
4
4
  Summary: Helpers for building command-line apps
5
5
  Home-page: https://github.com/dbcli/cli_helpers
6
6
  Author: dbcli
@@ -0,0 +1 @@
1
+ __version__ = "2.14.0"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cli_helpers
3
- Version: 2.12.0
3
+ Version: 2.14.0
4
4
  Summary: Helpers for building command-line apps
5
5
  Home-page: https://github.com/dbcli/cli_helpers
6
6
  Author: dbcli
@@ -2,7 +2,7 @@ autopep8==1.3.3
2
2
  codecov==2.1.13
3
3
  coverage==4.3.4
4
4
  black>=20.8b1
5
- Pygments>=2.4.0
5
+ Pygments>=1.6
6
6
  pytest==7.4.3
7
7
  pytest-cov==2.4.0
8
8
  Sphinx==1.5.5
@@ -207,13 +207,24 @@ def test_style_output(TwoFiftySixColor):
207
207
  data = [["观音", "2"], ["Ποσειδῶν", "b"]]
208
208
 
209
209
  expected_headers = ["\x1b[91;01mh1\x1b[39;00m", "\x1b[91;01mh2\x1b[39;00m"]
210
- expected_data = [
210
+ # Pygments v2.19.2 and earlier
211
+ expected_data_old = [
211
212
  ["\x1b[38;5;233;48;5;7m观音\x1b[39;49m", "\x1b[38;5;233;48;5;7m2\x1b[39;49m"],
212
213
  ["\x1b[38;5;10mΠοσειδῶν\x1b[39m", "\x1b[38;5;10mb\x1b[39m"],
213
214
  ]
215
+ # Pygments v2.20.0 and later
216
+ # it looks like the control sequences changed after https://github.com/pygments/pygments/pull/3043
217
+ expected_data_new = [
218
+ [
219
+ '\x1b[38;5;233;48;5;255m观音\x1b[39;49m',
220
+ '\x1b[38;5;233;48;5;255m2\x1b[39;49m',
221
+ ],
222
+ ['\x1b[38;5;10mΠοσειδῶν\x1b[39m', '\x1b[38;5;10mb\x1b[39m'],
223
+ ]
214
224
  results = style_output(data, headers, style=CliStyle)
215
225
 
216
- assert (expected_data, expected_headers) == (list(results[0]), results[1])
226
+ assert results[1] == expected_headers
227
+ assert list(results[0]) in [expected_data_old, expected_data_new]
217
228
 
218
229
 
219
230
  @pytest.mark.skipif(not HAS_PYGMENTS, reason="requires the Pygments library")
@@ -232,16 +243,27 @@ def test_style_output_with_newlines(TwoFiftySixColor):
232
243
  data = [["观音\nLine2", "Ποσειδῶν"]]
233
244
 
234
245
  expected_headers = ["\x1b[91;01mh1\x1b[39;00m", "\x1b[91;01mh2\x1b[39;00m"]
235
- expected_data = [
246
+ # Pygments v2.19.2 and earlier
247
+ expected_data_old = [
236
248
  [
237
249
  "\x1b[38;5;233;48;5;7m观音\x1b[39;49m\n\x1b[38;5;233;48;5;7m"
238
250
  "Line2\x1b[39;49m",
239
251
  "\x1b[38;5;233;48;5;7mΠοσειδῶν\x1b[39;49m",
240
252
  ]
241
253
  ]
254
+ # Pygments v2.20.0 and later
255
+ # it looks like the control sequences changed after https://github.com/pygments/pygments/pull/3043
256
+ expected_data_new = [
257
+ [
258
+ '\x1b[38;5;233;48;5;255m观音\x1b[39;49m\n\x1b[38;5;233;48;5;255m'
259
+ 'Line2\x1b[39;49m',
260
+ '\x1b[38;5;233;48;5;255mΠοσειδῶν\x1b[39;49m',
261
+ ]
262
+ ]
242
263
  results = style_output(data, headers, style=CliStyle)
243
264
 
244
- assert (expected_data, expected_headers) == (list(results[0]), results[1])
265
+ assert results[1] == expected_headers
266
+ assert list(results[0]) in [expected_data_old, expected_data_new]
245
267
 
246
268
 
247
269
  @pytest.mark.skipif(not HAS_PYGMENTS, reason="requires the Pygments library")
@@ -260,10 +282,17 @@ def test_style_output_custom_tokens(TwoFiftySixColor):
260
282
  data = [["1", "2"], ["a", "b"]]
261
283
 
262
284
  expected_headers = ["\x1b[91;01mh1\x1b[39;00m", "\x1b[91;01mh2\x1b[39;00m"]
263
- expected_data = [
285
+ # Pygments v2.19.2 and earlier
286
+ expected_data_old = [
264
287
  ["\x1b[38;5;233;48;5;7m1\x1b[39;49m", "\x1b[38;5;233;48;5;7m2\x1b[39;49m"],
265
288
  ["\x1b[38;5;10ma\x1b[39m", "\x1b[38;5;10mb\x1b[39m"],
266
289
  ]
290
+ # Pygments v2.20.0 and later
291
+ # it looks like the control sequences changed after https://github.com/pygments/pygments/pull/3043
292
+ expected_data_new = [
293
+ ['\x1b[38;5;233;48;5;255m1\x1b[39;49m', '\x1b[38;5;233;48;5;255m2\x1b[39;49m'],
294
+ ['\x1b[38;5;10ma\x1b[39m', '\x1b[38;5;10mb\x1b[39m'],
295
+ ]
267
296
 
268
297
  output = style_output(
269
298
  data,
@@ -274,7 +303,8 @@ def test_style_output_custom_tokens(TwoFiftySixColor):
274
303
  even_row_token=Token.Results.EvenRows,
275
304
  )
276
305
 
277
- assert (expected_data, expected_headers) == (list(output[0]), output[1])
306
+ assert output[1] == expected_headers
307
+ assert list(output[0]) in [expected_data_old, expected_data_new]
278
308
 
279
309
 
280
310
  def test_format_integer():
@@ -1 +0,0 @@
1
- __version__ = "2.12.0"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes