Describe the bug
When alembic prints longs messages to stdout, it attempts to wrap messages at the terminal width.
However, it wraps 2 characters wider than the message.
Expected behavior
Messages should properly wrap at the width of the terminal.
To Reproduce
In a fairly narrow terminal window (e.g. 64 columns wide), run:
python -c 'from alembic.util.messaging import msg; msg("A" * 500)'
Output:
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Expected:
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAA
Versions.
- OS: macOS 14.1.2
- Python: 3.11.6
- Alembic: 1.13.1
- SQLAlchemy: N/A
- Database: N/A
- DBAPI: N/A
Additional context
Fun fact: this bug was introduced all the way back in d4fea1d!
The message is wrapped at the terminal width, but then two spaces are prepended to every line.
Have a nice day!
Describe the bug
When alembic prints longs messages to stdout, it attempts to wrap messages at the terminal width.
However, it wraps 2 characters wider than the message.
Expected behavior
Messages should properly wrap at the width of the terminal.
To Reproduce
In a fairly narrow terminal window (e.g. 64 columns wide), run:
Output:
Expected:
Versions.
Additional context
Fun fact: this bug was introduced all the way back in d4fea1d!
The message is wrapped at the terminal width, but then two spaces are prepended to every line.
Have a nice day!