Open GavanWilhite opened 3 years ago
Do you have any other information? How do you know that it was 3.0.8 not e.g. 3.0.7? There's isn't much to work with here.
What code? How does it happen? How can one reproduce it?
I don’t know, and yeah I get that it’s rough having limited info in an issue like this, simply sharing that it broke when we upgraded, and was fixed when I rolled back.
I’ll see if I can get more info, but I’m not certain when next I’ll be able to dig into this.
On Tue, Mar 9, 2021 at 5:18 PM Blazej Michalik notifications@github.com wrote:
Do you have any other information? How do you know that it was 3.0.8 not e.g. 3.0.7? There's isn't much to work with here.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/prompt-toolkit/python-prompt-toolkit/issues/1391#issuecomment-794696603, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAP5B7YPPYNRDN3KZQ7S4I3TC3CEPANCNFSM4Y4UI2BA .
I ran into the same issue by coincidentially jumping from 3.0.8 to 3.0.18 too.
I had my entire prompt wrapped in patch_stdout()
and after the upgrade some colors just printed as escape codes (through prefixed with question marks!).
The apparent fix patch_stdout
commit from 3.0.11 now requires using patch_stdout(raw=True)
so escaped prints don't get their ansi sequence initiator replaced by just ?
via https://github.com/prompt-toolkit/python-prompt-toolkit/blob/5aea076692a304ec2bf8ad18fc59d4885cc462b1/prompt_toolkit/output/vt100.py#L512-L523
Though, after more testing with patch_stdout(raw=True)
under 3.0.18, some of my output is getting duplicated and I can't figure out the source.
I have a timestamp printed in each output (some of the outputs are large 400+ to 2000+ line pandas dataframes), and the exact same timestamp output blocks are being printed twice to stdout from one print statement.
Looks like there's a lot of caching/queuing/buffering being done with the patch_stdout()
magic, but I don't see why only large print outputs would be getting duplicated. Rolling back to 3.0.10 fixes the output confusion for now.
Looks like the double output problem may be fixed by https://github.com/prompt-toolkit/python-prompt-toolkit/pull/1422
Somewhere between version 3.0.8 and 3.0.16 color parsing started breaking.
It start functioning correctly, but half-way through program execution (maybe RPrompt rendering?) it starts breaking and just printing "?[92m" and such where color should be.