Skip to content
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

Add Generic.EmphStrong token #2444

Merged
merged 1 commit into from May 29, 2023
Merged

Add Generic.EmphStrong token #2444

merged 1 commit into from May 29, 2023

Conversation

diskdance
Copy link
Contributor

Note that some theme do not use bold or italic styling for Generic.Emph or Generic.Strong token. For these themes, I didn't touch them.

Tested to work on default theme.

Closes #2307.

@Anteru Anteru added the A-theming area: changes to themes label May 28, 2023
@Anteru
Copy link
Collaborator

Anteru commented May 28, 2023

@jeanas Is there an easy way to allow failures on -dev Python variants to fail gracefully? This seems completely unrelated/a Python 3.12 specific issue which we can't solve from our end?

@jeanas
Copy link
Contributor

jeanas commented May 28, 2023

3.12 was introduced by @hugovk in #2324.

I won't have a computer with Git this afternoon and probably tomorrow, but if I read actions/runner#2347 correctly, we should set continue-on-error on the 3.12 job, and just ignore the red CI checkmark when it's the only failed job.

(GitLab does better than GitHub here.)

@hugovk
Copy link
Contributor

hugovk commented May 28, 2023

The -W error is converting a deprecation warning into an error.

This change will allow the other jobs to continue, even if 3.12 is failing:

diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 3f5c26ad..bb02f37b 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -12,6 +12,7 @@ jobs:
   build:
     runs-on: ${{ matrix.os }}
     strategy:
+      fail-fast: false
       matrix:
         os: [windows-latest, ubuntu-latest]
         python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12-dev"]

@hugovk
Copy link
Contributor

hugovk commented May 28, 2023

Please see #2445 for that.

The deprecation warning is:

DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead

Out of scope for this PR, but let's find where that is coming from and either fix it or temporarily silence it. To unblock this PR we could temporarily remove -W error for 3.12, or even comment out 3.12 from the CI.

The warning could be coming from pytest, I know they're fixing some of those and should have a fix after the next 3.12 beta: pytest-dev/pytest#10894 (comment)

And the next beta is scheduled for Tuesday: https://peps.python.org/pep-0693/

@hugovk
Copy link
Contributor

hugovk commented May 29, 2023

Confirming the deprecation warning comes from ast.Str in pytest:

I've updated PR #2445 to temporarily skip warnings for 3.12 on the CI until pytest-dev/pytest#10894 is fixed.

@jeanas
Copy link
Contributor

jeanas commented May 29, 2023

@diskdance Please rebase this on master, it should fix the failures.

@jeanas jeanas merged commit b7c8f35 into pygments:master May 29, 2023
15 checks passed
@jeanas
Copy link
Contributor

jeanas commented May 29, 2023

Thanks!

@diskdance diskdance deleted the emphstrong branch May 30, 2023 11:22
@Anteru Anteru added this to the 2.16.0 milestone Aug 5, 2023
neiljp added a commit to neiljp/zulip-terminal that referenced this pull request Oct 4, 2023
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.
neiljp added a commit to zulip/zulip-terminal that referenced this pull request Oct 4, 2023
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 #1431.
rsashank pushed a commit to rsashank/zulip-terminal that referenced this pull request Oct 21, 2023
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.
Subhasish-Behera pushed a commit to Subhasish-Behera/zulip-terminal that referenced this pull request Oct 27, 2023
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.
jrijul1201 added a commit to jrijul1201/zulip-terminal that referenced this pull request Dec 19, 2023
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.
jrijul1201 added a commit to jrijul1201/zulip-terminal that referenced this pull request Dec 20, 2023
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.
jrijul1201 added a commit to jrijul1201/zulip-terminal that referenced this pull request Dec 20, 2023
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.
jrijul1201 added a commit to jrijul1201/zulip-terminal that referenced this pull request Dec 21, 2023
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 was temporarily fixed by pinning pygments at ~=2.15.1 in zulip#1433.

Method `translate_styles` manually converts the pygments `bold italic`
style into the urwid-compatible `bold, italics` is there.

Unpin Pygments from ~=2.15.1 to >=2.14.0.

Fixes part of zulip#1434.
jrijul1201 added a commit to jrijul1201/zulip-terminal that referenced this pull request Dec 22, 2023
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 was temporarily fixed by pinning pygments at ~=2.15.1 in zulip#1433.

Method `translate_styles` manually converts the pygments `bold italic`
style into the urwid-compatible `bold, italics` is there.

Unpin Pygments from ~=2.15.1 to >=2.14.0.

Fixes part of zulip#1434.
jrijul1201 added a commit to jrijul1201/zulip-terminal that referenced this pull request Dec 22, 2023
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.
jrijul1201 added a commit to jrijul1201/zulip-terminal that referenced this pull request Dec 22, 2023
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 was temporarily fixed by pinning pygments at ~=2.15.1 in zulip#1433.

Method `translate_styles` manually converts the pygments `bold italic`
style into the urwid-compatible `bold, italics` is there.

Unpin Pygments from ~=2.15.1 to >=2.14.0.

Fixes part of zulip#1434.
jrijul1201 added a commit to jrijul1201/zulip-terminal that referenced this pull request Dec 22, 2023
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.
neiljp pushed a commit to jrijul1201/zulip-terminal that referenced this pull request Jan 8, 2024
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.
neiljp pushed a commit to jrijul1201/zulip-terminal that referenced this pull request Jan 8, 2024
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.
neiljp pushed a commit to zulip/zulip-terminal that referenced this pull request Jan 8, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-theming area: changes to themes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a token type like Generic.EmphStrong to allow bold italic styling
4 participants