-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adopt rich, for handling terminal output #10461
Comments
Oh, this is likely gonna bring back #8169; since rich only works on systems with proper threading support. And... the same will apply for pip. From #8169 (comment):
|
+1 on just requiring threading to work, and not worrying beyond that. From #8169 (comment), threading is optional in Python 3.6, so we'd need to alter our support policy to either drop 3.6 slightly early, or to explicitly say that 3.6 without threading is not supported. But I don't think we need to do anything more than just say so and move on. |
What if we make all Rich-related functionalities no-op on 3.6 (i.e. no progress bar etc.)? Honestly I don't feel rich displays aren't that essential anyway. Or would that be too tedious? |
Well... 3.6 is end of life in 1 month and 2 weeks. I'm actually leaning toward dropping it entirely in 22.0 TBH. And, I expect that we'd be using rich for a lot more than just progress bars (error message presentation is the primary motivator FWIW), so... I don't think I wanna do too much to make sure that certain configurations of Python 3.6 stay functional. |
I agree, let's just drop 3.6 in 22.0 and be done with it. |
Dropping 3.6 also means we can use dataclasses -- which... yes! |
Okay, I spent a bit of time trying to port our spinners to use rich spinners, but... it's stupidly tricky, and I'm gonna kick the can down the road for that. Dumping my WIP changes here (at least, the bits that still made sense) instead of my git stash because... it might be useful for someone else who might come along to pick this up
|
Another potential issue: tests are strongly coupled with the assumption that the spinner will spin on each line of output. |
Initial discussion at #10423
This is mostly an umbrella issue for tracking actually doing this, and for serving as a place for discussion whenever a downstream redistributor inevitably comes complaining about this. :)
The first step is obviously to vendor rich. Next, the most obvious change would be to use rich's output logging-related adapter, to replace as much of our custom output stuff with it as possible -- that'll allow using rich's nice markup in our output. At this point, we can close this issue.
The bulk of the benefits will come from further refactoring though:
The text was updated successfully, but these errors were encountered: