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
We currently depend on Colorama on Windows, which converts ANSI formatting codes to equivalent Windows Console commands. However, on Windows >= 10, both the console host and Terminal app support ANSI:
On Windows 10 and higher, the Windows Console Host is xterm compatible. The Windows Terminal application is also xterm compatible. These terminals support ANSI escape sequences.
Removing colorama would not break Click running on older versions of Windows. It would cause ANSI to be emitted unless color=False was passed to the context, which is easy enough to do if a project wants to opt-in to supporting older Windows versions.
Reacted by Kevin Deldycke, Ilya Solin and Alex Koster
I have a feeling the tests will continue to work, I'm not sure colorama's effects would be picked up by the test runner, it modifies the console.
I patched the CLIRunner in Click Extra to force coloring even if the tests are run in a non-interactive terminal (i.e. the whole is_atty auto-detection machinery). This helped me test the ANSI rendering of my coloring help screens for 4 years. Had to fix a lot of edge-cases but it's quite solid now. I can try porting a lightweight version of that in the future.
Right, that's fine for our ANSI color output, but colorama and the Windows console works at a different layer. I have a Windows machine right now, so I'll be able to manually test removing it if no one else gets there first.
Activity
Rowlando13 commentedon May 18, 2026
May be possible to remove
colorama, will have to test extensively on windows 11 on an actual machine.kdeldycke commentedon May 21, 2026
We can extend the tests to the
windows-11-armrunner as I do for Click Extra. So far bothmainandstablebranches of Click seems to work: https://github.com/kdeldycke/click-extra/actions/runs/26231172013/job/77192017687[-]drop colorama[/-][+]Drop `colorama`[/+]davidism commentedon May 21, 2026
I have a feeling the tests will continue to work, I'm not sure colorama's effects would be picked up by the test runner, it modifies the console.
kdeldycke commentedon May 21, 2026
I patched the
CLIRunnerin Click Extra to force coloring even if the tests are run in a non-interactive terminal (i.e. the wholeis_attyauto-detection machinery). This helped me test the ANSI rendering of my coloring help screens for 4 years. Had to fix a lot of edge-cases but it's quite solid now. I can try porting a lightweight version of that in the future.For details: https://github.com/kdeldycke/click-extra/blob/d46781f0940e45eb34c4111a828b94300fb87fb8/click_extra/testing.py#L203-L216
davidism commentedon May 21, 2026
Right, that's fine for our ANSI color output, but colorama and the Windows console works at a different layer. I have a Windows machine right now, so I'll be able to manually test removing it if no one else gets there first.
davidism commentedon May 23, 2026
Seems to work fine, PR coming soon.
kdeldycke commentedon Jul 8, 2026
Also see related documentation updates at: #3671