Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ Features:
* Add a ``\service`` prompt token for connections made using ``service=...``
or ``PGSERVICE``. For example, set ``prompt = '\service> '``.

Internal:
---------
* Require ``cli_helpers >= 2.15.2``. That release aligns vertical (expanded)
output by display width, so a header of wide characters like ``配列`` lines
up; ``test_format_array_output_expanded`` had the old misalignment written
down and fails with it.

4.7.1 (2026-09-20)
==================

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dependencies = [
"psycopg-binary >= 3.0.14; sys_platform == 'win32'",
"sqlparse >=0.3.0,<0.7",
"configobj >= 5.0.6",
"cli_helpers[styles] >= 2.4.0",
"cli_helpers[styles] >= 2.15.2",
# setproctitle is used to mask the password when running `ps` in command line.
# But this is not necessary in Windows since the password is never shown in the
# task manager. Also setproctitle is a hard dependency to install in Windows,
Expand Down
5 changes: 3 additions & 2 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,16 @@ def test_format_array_output_expanded(executor):
SELECT '{}', NULL, array[NULL]
"""
results = run(executor, statement, expanded=True)
# 配列 is two wide characters: its padding counts display width (cli_helpers 2.15.2+).
expected = [
"-[ RECORD 1 ]-------------------------",
"bigint_array | {1,2,3}",
"nested_numeric_array | {{1,2},{3,4}}",
"配列 | {å,魚,текст}",
"配列 | {å,魚,текст}",
"-[ RECORD 2 ]-------------------------",
"bigint_array | {}",
"nested_numeric_array | <null>",
"配列 | {<null>}",
"配列 | {<null>}",
"SELECT 2",
]
assert "\n".join(results) == "\n".join(expected)
Expand Down
Loading