-
-
Notifications
You must be signed in to change notification settings - Fork 250
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
Gruvbox & zt_light themes don't work with pygments 2.16.x #1431
Comments
@laomuon Thanks for the detailed bug report and suggestion! I'm not in a position to manually debug the code right now, though it was a little surprising since gruvbox - and other themes - have worked for me recently. However, after a little dig it looks like this might be due to pygments/pygments#2444, which was new in 2.16.0. Since we only specify pygments>=2.14.0, I suspect that this may be the underlying cause for you. A short term fix for Based on the pygments PR, I suspect this may impact multiple or all of our themes, so to unblock pygments>=2.16 we likely want to improve the translation from pygments to urwid. We could try using Thanks again - any feedback on the above would be great! |
Pygments 2.16.0 introduced a style to support a combination of bold and italic styling in pygments/pygments#2444. Both of our gruvbox themes and the light native theme gain a 'bold strong' style via pygments as a result, which urwid fails to parse and blocks the application from loading. Longer-term we should improve the pygments to urwid translation logic to allow these styles to work and an upgrade to later pygments versions, but for now this allows these themes to continue working as before. Fixes zulip#1431.
@laomuon Following up on this, I can confirm locally:
I'd like to get this working ASAP first, so I'm capping pygments via #1433 for now. |
@laomuon Thanks again for the report - the workaround should solve this for now. If this doesn't fix it or you have other problems or ideas, please continue to file issues or come to chat in #zulip-terminal on chat.zulip.org :) |
Pygments 2.16.0 introduced a style to support a combination of bold and italic styling in pygments/pygments#2444. Both of our gruvbox themes and the light native theme gain a 'bold strong' style via pygments as a result, which urwid fails to parse and blocks the application from loading. Longer-term we should improve the pygments to urwid translation logic to allow these styles to work and an upgrade to later pygments versions, but for now this allows these themes to continue working as before. Fixes zulip#1431.
Pygments 2.16.0 introduced a style to support a combination of bold and italic styling in pygments/pygments#2444. Both of our gruvbox themes and the light native theme gain a 'bold strong' style via pygments as a result, which urwid fails to parse and blocks the application from loading. Longer-term we should improve the pygments to urwid translation logic to allow these styles to work and an upgrade to later pygments versions, but for now this allows these themes to continue working as before. Fixes zulip#1431.
Pygments 2.16.0 introduced a style to support a combination of bold and italic styling in pygments/pygments#2444. Both of our gruvbox themes and the light native theme gain a 'bold strong' style via pygments as a result, which urwid fails to parse and blocks the application from loading. This work would represent a clean fix for zulip#1431, which was temporarily fixed by pinning pygments at ~=2.15.1 in zulip#1433. Add method `translate_styles` that manually converts the pygments `bold italic` style into the urwid-compatible `bold, italics`. Tests added. Fixes part of zulip#1434.
Pygments 2.16.0 introduced a style to support a combination of bold and italic styling in pygments/pygments#2444. Both of our gruvbox themes and the light native theme gain a 'bold strong' style via pygments as a result, which urwid fails to parse and blocks the application from loading. This work would represent a clean fix for zulip#1431, which was temporarily fixed by pinning pygments at ~=2.15.1 in zulip#1433. Add method `translate_styles` that manually converts the pygments `bold italic` style into the urwid-compatible `bold, italics`. Tests added. Fixes part of zulip#1434.
Pygments 2.16.0 introduced a style to support a combination of bold and italic styling in pygments/pygments#2444. Both of our gruvbox themes and the light native theme gain a 'bold strong' style via pygments as a result, which urwid fails to parse and blocks the application from loading. This work would represent a clean fix for zulip#1431, which was temporarily fixed by pinning pygments at ~=2.15.1 in zulip#1433. Add method `translate_styles` that manually converts the pygments `bold italic` style into the urwid-compatible `bold, italics`. Tests added. Fixes part of zulip#1434.
Pygments 2.16.0 introduced a style to support a combination of bold and italic styling in pygments/pygments#2444. Both of our gruvbox themes and the light native theme gain a 'bold strong' style via pygments as a result, which urwid fails to parse and blocks the application from loading. This work would represent a clean fix for zulip#1431, which was temporarily fixed by pinning pygments at ~=2.15.1 in zulip#1433. Add method `translate_styles` that manually converts the pygments `bold italic` style into the urwid-compatible `bold, italics`. Tests added. Fixes part of zulip#1434.
Pygments 2.16.0 introduced a style to support a combination of bold and italic styling in pygments/pygments#2444. Both of our gruvbox themes and the light native theme gain a 'bold strong' style via pygments as a result, which urwid fails to parse and blocks the application from loading. This work would represent a clean fix for zulip#1431, which was temporarily fixed by pinning pygments at ~=2.15.1 in zulip#1433. Add method `translate_styles` that manually converts the pygments `bold italic` style into the urwid-compatible `bold, italics`. Tests added. Fixes part of zulip#1434.
The previous commit in zulip#1452 fixes the issue zulip#1431 that was temporarily fixed by pinning Pygments at ~=2.15.1. Combined with <2.18.0, since that unreleased version depends on Python3.8 and could make ZT uninstallable on older pythons. Fixes part of zulip#1434.
Pygments 2.16.0 introduced a style to support a combination of bold and italic styling in pygments/pygments#2444. Both of our gruvbox themes and the light native theme gain a 'bold italic' style via pygments as a result, which urwid fails to parse and blocks the application from loading. This work would represent a clean fix for zulip#1431, which was temporarily fixed by pinning pygments at ~=2.15.1 in zulip#1433. This minimally handles spaces and the shortened `italic` in pygments styles, sufficient to resolve the current style issue. Note that other pygments styles in themes that we do not yet use may need additional translation or adjustment. Tests added. Fixes part of zulip#1434.
The previous commit fixes the issue zulip#1431 that was temporarily fixed by pinning pygments at ~=2.15.1 in zulip#1433. Subsequent versions of pygments have since been released, but an upper limit of 2.18.0 is included, since that unreleased version depends on Python3.8 and could make ZT uninstallable on older pythons. Fixes part of zulip#1434.
Pygments 2.16.0 introduced a style to support a combination of bold and italic styling in pygments/pygments#2444. Both of our gruvbox themes and the light native theme gain a 'bold italic' style via pygments as a result, which urwid fails to parse and blocks the application from loading. This work would represent a clean fix for zulip#1431, which was temporarily fixed by pinning pygments at ~=2.15.1 in zulip#1433. This minimally handles spaces and the shortened `italic` in pygments styles, sufficient to resolve the current style issue. Note that other pygments styles in themes that we do not yet use may need additional translation or adjustment. Tests added. Fixes part of zulip#1434.
The previous commit fixes the issue zulip#1431 that was temporarily fixed by pinning pygments at ~=2.15.1 in zulip#1433. Subsequent versions of pygments have since been released, but an upper limit of 2.18.0 is included, since that unreleased version depends on Python3.8 and could make ZT uninstallable on older pythons. Fixes part of zulip#1434.
Pygments 2.16.0 introduced a style to support a combination of bold and italic styling in pygments/pygments#2444. Both of our gruvbox themes and the light native theme gain a 'bold italic' style via pygments as a result, which urwid fails to parse and blocks the application from loading. This work would represent a clean fix for #1431, which was temporarily fixed by pinning pygments at ~=2.15.1 in #1433. This minimally handles spaces and the shortened `italic` in pygments styles, sufficient to resolve the current style issue. Note that other pygments styles in themes that we do not yet use may need additional translation or adjustment. Tests added. Fixes part of #1434.
The previous commit fixes the issue #1431 that was temporarily fixed by pinning pygments at ~=2.15.1 in #1433. Subsequent versions of pygments have since been released, but an upper limit of 2.18.0 is included, since that unreleased version depends on Python3.8 and could make ZT uninstallable on older pythons. Fixes part of #1434.
Description
When I launch with the option
-t gruvbox
or-t gruvbox_light
, I encountered this error:Im on the main branch of the repo
Logs
Additional context
It seems that
pygment:ges
has a propertybold italic
which I think is not directly supported byurwid
. A possible workaround:Im not sure however of the color choice. Any thought?
The text was updated successfully, but these errors were encountered: