You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since version 13.8 calling export_... or save_... methods on a console stopped exporting captured output. This broke my library that uses this to save the output of the console to different file formats.
To reproduce create a file "console_export_bug.py":
$ uv run --with 'rich<13.8' console_export_bug.py
$ uv run --with 'rich>13.8' console_export_bug.pyInstalled 5 packages in 6msTraceback (most recent call last): File "/tmp/console_export_bug.py", line 7, in <module> assert "ExportMe" in exported_text, repr(exported_text)AssertionError: ''
All three asserts above fail now.
This also fails to print even if the export_... calls are moved into the with block.
If this change is intentional, is there a way to export the contents of a console without printing them to the terminal that still works with recent versions of rich? Thanks.
This is the expected behavior. The captured content is excluded from the output. It was broken in an earlier version.
If this change is intentional, is there a way to export the contents of a console without printing them to the terminal that still works with recent versions of rich? Thanks.
Describe the bug
Since version 13.8 calling
export_...
orsave_...
methods on a console stopped exporting captured output. This broke my library that uses this to save the output of the console to different file formats.To reproduce create a file "console_export_bug.py":
All three asserts above fail now.
This also fails to print even if the
export_...
calls are moved into thewith
block.If this change is intentional, is there a way to export the contents of a console without printing them to the terminal that still works with recent versions of rich? Thanks.
Reported downstream issue: hamdanal/rich-argparse#133
Platform
Click to expand
The text was updated successfully, but these errors were encountered: